From MAILER-DAEMON Thu Nov 01 09:20:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TTuhb-0004Ed-6e
	for mharc-coreutils@gnu.org; Thu, 01 Nov 2012 09:20:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38939)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dwalsh@redhat.com>) id 1TTuhY-000469-DA
	for coreutils@gnu.org; Thu, 01 Nov 2012 09:20:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <dwalsh@redhat.com>) id 1TTuhW-0002Ve-Cp
	for coreutils@gnu.org; Thu, 01 Nov 2012 09:20:52 -0400
Received: from mx1.redhat.com ([209.132.183.28]:21076)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dwalsh@redhat.com>) id 1TTuhW-0002VS-4T
	for coreutils@gnu.org; Thu, 01 Nov 2012 09:20:50 -0400
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA1DKkD5014531
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 1 Nov 2012 09:20:47 -0400
Received: from [10.16.60.53] (redsox.boston.devel.redhat.com [10.16.60.53])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qA1DKkak009989; Thu, 1 Nov 2012 09:20:46 -0400
Message-ID: <5092772C.8060102@redhat.com>
Date: Thu, 01 Nov 2012 09:20:44 -0400
From: Daniel J Walsh <dwalsh@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121016 Thunderbird/16.0.1
MIME-Version: 1.0
To: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
Subject: Re: Make coretutils work better with SELinux.
References: <50733664.5000503@redhat.com> <50733CC1.9000506@draigBrady.com>
	<87626jolel.fsf@rho.meyering.net> <507D5C87.3030501@redhat.com>
	<87wqyqwnik.fsf@rho.meyering.net> <5081CBB0.2020507@redhat.com>
	<877gqly15j.fsf@rho.meyering.net> <508FE7AF.5000003@redhat.com>
	<5091C82C.9030104@draigBrady.com>
In-Reply-To: <5091C82C.9030104@draigBrady.com>
X-Enigmail-Version: 1.4.5
Content-Type: text/plain; charset=ISO-8859-1
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qA1DKkD5014531
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 01 Nov 2012 13:20:53 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/31/2012 08:54 PM, P=E1draig Brady wrote:
> On 10/30/2012 02:43 PM, Daniel J Walsh wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>=20
>> For some reason I could not get git to take more then a one line
>> comment. This is the comment I was trying to add.
>>=20
>>=20
>> build: Change -Z opt w/out arg label target with default label
>>=20
>> The -Z without argument will ask SELinux what the default label of the=
 i=20
>> dest object should be and then attempt to change it.
>>=20
>> The -Z with an optional context will create all targets with the optio=
nal
>> label. This is still supported for backwards compatability.
>>=20
>> The mv command does not support the optional argument.
>>=20
>>=20
>> BTW, it looks like coreutils has removed -ZCONTEXT from cp, if I had m=
y=20
>> druthers, I would make all commands just use -Z and not allow the
>> optional arg.  Then -Z would just set the default label.  I would bet
>> that no one in history has executed a command like:
>>=20
>> mkdir -Zunconfined_u:object_r:httpd_user_content_t:s0 ~/myweb
>=20
> Thanks for the update.
>=20
> Short options with optional args are very problematic. It would mean `c=
p
> -aZ` was OK while `cp -Za` was not etc. Also in Red Hat distros, `cp -Z=
`
> requires an arg, so changing that would mean that older scripts that us=
ed
> `cp -Z blah...` would break with newer cp, as a space is not allowed fo=
r
> optional args.
>=20
> For that reason I would keep -Z and --context as is, but deprecate them=
 for
> the commands that set a context, and add a new --new-context option tha=
t
> could take the optional arg:
>=20
> In that way, -Z can continue to be used as it is commonly with commands
> like `ls` etc. to _read_ the context. Whereas the currently rare form o=
f
> {mkdir,cp,install} -Z context:to_write can be deprecated in favor of:
>=20
> --new-context[=3DCONTEXT] set security context to CONTEXT, or set conte=
xt to=20
> the system default for the destination.
>=20
> I'm mildly in favor of introducing --new-context, over just making
> --context take an optional arg (so that it's obvious a new context is b=
eing
> set, rather than one being copied), but I'm strongly against making -Z =
take
> an optional arg.
>=20
> cheers, P=E1draig.

If I made the -Z option not take an optional arg but default to "setting =
the
default context, on the commands that create new content", are you ok wit=
h that?

Then make --context or --new-context always take an arg?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCSdywACgkQrlYvE4MpobNqYwCfZGS3+PH5J81pTc0llGrYpFY2
A58AoL0KeSENexkAnJW/KDZSb21tQRfe
=3Dh+WZ
-----END PGP SIGNATURE-----


From MAILER-DAEMON Thu Nov 01 11:47:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TTwzM-0008Ar-0L
	for mharc-coreutils@gnu.org; Thu, 01 Nov 2012 11:47:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49454)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TTwzI-00086H-4h
	for coreutils@gnu.org; Thu, 01 Nov 2012 11:47:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TTwzG-0005h2-Hr
	for coreutils@gnu.org; Thu, 01 Nov 2012 11:47:20 -0400
Received: from mx1.redhat.com ([209.132.183.28]:27436)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TTwzG-0005gS-9N
	for coreutils@gnu.org; Thu, 01 Nov 2012 11:47:18 -0400
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
	(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA1FlGxp028566
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 1 Nov 2012 11:47:16 -0400
Received: from [10.36.116.60] (ovpn-116-60.ams2.redhat.com [10.36.116.60])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id qA1FlDVD023476
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 1 Nov 2012 11:47:15 -0400
Message-ID: <50929981.4000808@draigBrady.com>
Date: Thu, 01 Nov 2012 15:47:13 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: Make coretutils work better with SELinux.
References: <50733664.5000503@redhat.com> <50733CC1.9000506@draigBrady.com>
	<87626jolel.fsf@rho.meyering.net> <507D5C87.3030501@redhat.com>
	<87wqyqwnik.fsf@rho.meyering.net> <5081CBB0.2020507@redhat.com>
	<877gqly15j.fsf@rho.meyering.net> <508FE7AF.5000003@redhat.com>
	<5091C82C.9030104@draigBrady.com> <5092772C.8060102@redhat.com>
In-Reply-To: <5092772C.8060102@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qA1FlGxp028566
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 01 Nov 2012 15:47:21 -0000

On 11/01/2012 01:20 PM, Daniel J Walsh wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 10/31/2012 08:54 PM, P=E1draig Brady wrote:
>> On 10/30/2012 02:43 PM, Daniel J Walsh wrote:
>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>>
>>> For some reason I could not get git to take more then a one line
>>> comment. This is the comment I was trying to add.
>>>
>>>
>>> build: Change -Z opt w/out arg label target with default label
>>>
>>> The -Z without argument will ask SELinux what the default label of th=
e i
>>> dest object should be and then attempt to change it.
>>>
>>> The -Z with an optional context will create all targets with the opti=
onal
>>> label. This is still supported for backwards compatability.
>>>
>>> The mv command does not support the optional argument.
>>>
>>>
>>> BTW, it looks like coreutils has removed -ZCONTEXT from cp, if I had =
my
>>> druthers, I would make all commands just use -Z and not allow the
>>> optional arg.  Then -Z would just set the default label.  I would bet
>>> that no one in history has executed a command like:
>>>
>>> mkdir -Zunconfined_u:object_r:httpd_user_content_t:s0 ~/myweb
>>
>> Thanks for the update.
>>
>> Short options with optional args are very problematic. It would mean `=
cp
>> -aZ` was OK while `cp -Za` was not etc. Also in Red Hat distros, `cp -=
Z`
>> requires an arg, so changing that would mean that older scripts that u=
sed
>> `cp -Z blah...` would break with newer cp, as a space is not allowed f=
or
>> optional args.
>>
>> For that reason I would keep -Z and --context as is, but deprecate the=
m for
>> the commands that set a context, and add a new --new-context option th=
at
>> could take the optional arg:
>>
>> In that way, -Z can continue to be used as it is commonly with command=
s
>> like `ls` etc. to _read_ the context. Whereas the currently rare form =
of
>> {mkdir,cp,install} -Z context:to_write can be deprecated in favor of:
>>
>> --new-context[=3DCONTEXT] set security context to CONTEXT, or set cont=
ext to
>> the system default for the destination.
>>
>> I'm mildly in favor of introducing --new-context, over just making
>> --context take an optional arg (so that it's obvious a new context is =
being
>> set, rather than one being copied), but I'm strongly against making -Z=
 take
>> an optional arg.
>>
>> cheers, P=E1draig.
>
> If I made the -Z option not take an optional arg but default to "settin=
g the
> default context, on the commands that create new content", are you ok w=
ith that?
>
> Then make --context or --new-context always take an arg?

That would be preferable, but the main worry I'd have with that,
is install scripts and packages etc. in Red Hat land doing:
`install -Z context:to_write ...`

I don't think we could break compatibility with that now?

thanks,
P=E1draig.


From MAILER-DAEMON Thu Nov 01 11:59:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TTxAa-0000MB-Ct
	for mharc-coreutils@gnu.org; Thu, 01 Nov 2012 11:59:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36175)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TTxAX-0000Lz-IZ
	for coreutils@gnu.org; Thu, 01 Nov 2012 11:58:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TTxAW-0000iK-2O
	for coreutils@gnu.org; Thu, 01 Nov 2012 11:58:57 -0400
Received: from moutng.kundenserver.de ([212.227.126.187]:51057)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TTxAV-0000ho-PV
	for coreutils@gnu.org; Thu, 01 Nov 2012 11:58:55 -0400
Received: from [192.168.2.108] (p4FF762A6.dip.t-dialin.net [79.247.98.166])
	by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis)
	id 0MIkdY-1TW91Z3VuK-002iZV; Thu, 01 Nov 2012 16:58:54 +0100
Message-ID: <50929C3D.8080100@bernhard-voelker.de>
Date: Thu, 01 Nov 2012 16:58:53 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: [PATCH] tests: fix syntax error in setuidgid_has_perm_
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:9iC5cYoZqsnbF/Ol4a+fPtzKipmVZ7vHRwzBL/E/qBb
	+Pe/5lnlJGl+3/584YFt7z2aVZ2D0GJ14+hsr1Vdg9kVwv9xrv
	mQaP2CePAKv1M1M42cMKPuTuA2Kq6UwvZAVLMlJgx3rGMKqE9P
	AqTwYKxJWgw86C9qz3TRXjn/f7i4pbXVMWiH0OsdyCO44UnwvN
	/2smAB5je1445wGPLalKfo2yfN6JEDOLBgTZ2jHUEKgzel5k+f
	sVME49705TQXO3C0zQMfvCIbs9Omoz49lK9gKJPGRvRMv/yQl/
	vFG2kRtggbz5MiyiLxVWoOVOXTBBzCaw7XsghaBAEuXA10UioX
	dKSEVJ9q6dUnQt31947481eH1fZRIPlgzti2mQHUJ
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.126.187
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 01 Nov 2012 15:58:58 -0000

Somehow in between the discussion about
  "Various tests give illusory results"
  http://lists.gnu.org/archive/html/coreutils/2012-08/msg00082.html
a syntax error snuck into the sed expression in setuidgid_has_perm_.

Several root tests have been skipped although they
could and should have been run.

Have a nice day,
Berny


>From b60b96bdc4c83479c4accf623d436647d3de9651 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Thu, 1 Nov 2012 16:50:51 +0100
Subject: [PATCH] tests: fix syntax error in setuidgid_has_perm_

An invalid sed expression lead to the following error:
  + sed -n 'ls/.* //p'
  sed: -e expression #1, char 2: extra characters after command
Use "one" instead of "el".
Bug introduced in v8.19-111-g51a4b04.

* init.cfg (setuidgid_has_perm_): s/ls/1s/.
* NEWS (Build-related): Mention the fix.
---
 NEWS     |    5 +++++
 init.cfg |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 3b40375..85f3003 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,11 @@ GNU coreutils NEWS                                    -*- outline -*-
   build failure when building from modified sources, as is common practice
   for a patched distribution package.

+  The check in the root-only tests to test whether our dummy user,
+  $NON_ROOT_USERNAME, is able to run binaries from the build directory
+  failed. As a result, these tests have been skipped unnecessarily.
+  [bug introduced in coreutils-8.20]
+

 * Noteworthy changes in release 8.20 (2012-10-23) [stable]

diff --git a/init.cfg b/init.cfg
index 304b918..e853b0a 100644
--- a/init.cfg
+++ b/init.cfg
@@ -352,7 +352,7 @@ setuidgid_has_perm_()
 {
   local rm_version=$(
     setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
-    sed -n 'ls/.* //p'
+    sed -n '1s/.* //p'
   )
   case ":$rm_version:" in
       :$PACKAGE_VERSION:) ;;
-- 
1.7.7




From MAILER-DAEMON Thu Nov 01 14:43:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TTzjI-0008WF-7g
	for mharc-coreutils@gnu.org; Thu, 01 Nov 2012 14:43:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59272)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dwalsh@redhat.com>) id 1TTzjF-0008Ut-8j
	for coreutils@gnu.org; Thu, 01 Nov 2012 14:42:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <dwalsh@redhat.com>) id 1TTzjD-0000vC-Vz
	for coreutils@gnu.org; Thu, 01 Nov 2012 14:42:57 -0400
Received: from mx1.redhat.com ([209.132.183.28]:65084)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dwalsh@redhat.com>) id 1TTzjD-0000v7-Nd
	for coreutils@gnu.org; Thu, 01 Nov 2012 14:42:55 -0400
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
	(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA1Igr95013396
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 1 Nov 2012 14:42:53 -0400
Received: from [10.16.60.53] (redsox.boston.devel.redhat.com [10.16.60.53])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id qA1Igq9x012579; Thu, 1 Nov 2012 14:42:52 -0400
Message-ID: <5092C2AA.2010909@redhat.com>
Date: Thu, 01 Nov 2012 14:42:50 -0400
From: Daniel J Walsh <dwalsh@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121016 Thunderbird/16.0.1
MIME-Version: 1.0
To: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
Subject: Re: Make coretutils work better with SELinux.
References: <50733664.5000503@redhat.com> <50733CC1.9000506@draigBrady.com>
	<87626jolel.fsf@rho.meyering.net> <507D5C87.3030501@redhat.com>
	<87wqyqwnik.fsf@rho.meyering.net> <5081CBB0.2020507@redhat.com>
	<877gqly15j.fsf@rho.meyering.net> <508FE7AF.5000003@redhat.com>
	<5091C82C.9030104@draigBrady.com> <5092772C.8060102@redhat.com>
	<50929981.4000808@draigBrady.com>
In-Reply-To: <50929981.4000808@draigBrady.com>
X-Enigmail-Version: 1.4.5
Content-Type: text/plain; charset=ISO-8859-1
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qA1Igr95013396
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 01 Nov 2012 18:42:58 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/01/2012 11:47 AM, P=E1draig Brady wrote:
> On 11/01/2012 01:20 PM, Daniel J Walsh wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>=20
>> On 10/31/2012 08:54 PM, P=E1draig Brady wrote:
>>> On 10/30/2012 02:43 PM, Daniel J Walsh wrote:
>>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>>>=20
>>>> For some reason I could not get git to take more then a one line=20
>>>> comment. This is the comment I was trying to add.
>>>>=20
>>>>=20
>>>> build: Change -Z opt w/out arg label target with default label
>>>>=20
>>>> The -Z without argument will ask SELinux what the default label of
>>>> the i dest object should be and then attempt to change it.
>>>>=20
>>>> The -Z with an optional context will create all targets with the
>>>> optional label. This is still supported for backwards compatability.
>>>>=20
>>>> The mv command does not support the optional argument.
>>>>=20
>>>>=20
>>>> BTW, it looks like coreutils has removed -ZCONTEXT from cp, if I had
>>>> my druthers, I would make all commands just use -Z and not allow the=
=20
>>>> optional arg.  Then -Z would just set the default label.  I would
>>>> bet that no one in history has executed a command like:
>>>>=20
>>>> mkdir -Zunconfined_u:object_r:httpd_user_content_t:s0 ~/myweb
>>>=20
>>> Thanks for the update.
>>>=20
>>> Short options with optional args are very problematic. It would mean
>>> `cp -aZ` was OK while `cp -Za` was not etc. Also in Red Hat distros,
>>> `cp -Z` requires an arg, so changing that would mean that older scrip=
ts
>>> that used `cp -Z blah...` would break with newer cp, as a space is no=
t
>>> allowed for optional args.
>>>=20
>>> For that reason I would keep -Z and --context as is, but deprecate th=
em
>>> for the commands that set a context, and add a new --new-context opti=
on
>>> that could take the optional arg:
>>>=20
>>> In that way, -Z can continue to be used as it is commonly with
>>> commands like `ls` etc. to _read_ the context. Whereas the currently
>>> rare form of {mkdir,cp,install} -Z context:to_write can be deprecated
>>> in favor of:
>>>=20
>>> --new-context[=3DCONTEXT] set security context to CONTEXT, or set con=
text
>>> to the system default for the destination.
>>>=20
>>> I'm mildly in favor of introducing --new-context, over just making=20
>>> --context take an optional arg (so that it's obvious a new context is
>>> being set, rather than one being copied), but I'm strongly against
>>> making -Z take an optional arg.
>>>=20
>>> cheers, P=E1draig.
>>=20
>> If I made the -Z option not take an optional arg but default to "setti=
ng
>> the default context, on the commands that create new content", are you=
 ok
>> with that?
>>=20
>> Then make --context or --new-context always take an arg?
>=20
> That would be preferable, but the main worry I'd have with that, is ins=
tall
> scripts and packages etc. in Red Hat land doing: `install -Z
> context:to_write ...`
>=20
> I don't think we could break compatibility with that now?
>=20
> thanks, P=E1draig.

I would be shocked if we were.  I have never seen anything like that in 1=
0 years.

Most people would have no idea how to do it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCSwqoACgkQrlYvE4MpobObCQCg57nAIZUzybi7L8gjB04Ghjmo
XGYAnjbyHYCQXE0C2yTfX7MsLuoaLQxD
=3D7E6I
-----END PGP SIGNATURE-----


From MAILER-DAEMON Thu Nov 01 15:47:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TU0jv-0007V3-RK
	for mharc-coreutils@gnu.org; Thu, 01 Nov 2012 15:47:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36197)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TU0jo-0007Qz-6p
	for coreutils@gnu.org; Thu, 01 Nov 2012 15:47:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TU0jh-0002qU-SK
	for coreutils@gnu.org; Thu, 01 Nov 2012 15:47:36 -0400
Received: from mx1.redhat.com ([209.132.183.28]:23356)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TU0jh-0002qA-KK
	for coreutils@gnu.org; Thu, 01 Nov 2012 15:47:29 -0400
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
	(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA1JlRjc005043
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 1 Nov 2012 15:47:28 -0400
Received: from [10.36.116.26] (ovpn-116-26.ams2.redhat.com [10.36.116.26])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qA1JlO5M031204
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Thu, 1 Nov 2012 15:47:26 -0400
Message-ID: <5092D1CC.5050505@draigBrady.com>
Date: Thu, 01 Nov 2012 19:47:24 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: Make coretutils work better with SELinux.
References: <50733664.5000503@redhat.com> <50733CC1.9000506@draigBrady.com>
	<87626jolel.fsf@rho.meyering.net> <507D5C87.3030501@redhat.com>
	<87wqyqwnik.fsf@rho.meyering.net> <5081CBB0.2020507@redhat.com>
	<877gqly15j.fsf@rho.meyering.net> <508FE7AF.5000003@redhat.com>
	<5091C82C.9030104@draigBrady.com> <5092772C.8060102@redhat.com>
	<50929981.4000808@draigBrady.com> <5092C2AA.2010909@redhat.com>
In-Reply-To: <5092C2AA.2010909@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qA1JlRjc005043
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 01 Nov 2012 19:47:42 -0000

On 11/01/2012 06:42 PM, Daniel J Walsh wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 11/01/2012 11:47 AM, P=E1draig Brady wrote:
>> On 11/01/2012 01:20 PM, Daniel J Walsh wrote:
>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>>
>>> On 10/31/2012 08:54 PM, P=E1draig Brady wrote:
>>>> On 10/30/2012 02:43 PM, Daniel J Walsh wrote:
>>>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>>>>
>>>>> For some reason I could not get git to take more then a one line
>>>>> comment. This is the comment I was trying to add.
>>>>>
>>>>>
>>>>> build: Change -Z opt w/out arg label target with default label
>>>>>
>>>>> The -Z without argument will ask SELinux what the default label of
>>>>> the i dest object should be and then attempt to change it.
>>>>>
>>>>> The -Z with an optional context will create all targets with the
>>>>> optional label. This is still supported for backwards compatability.
>>>>>
>>>>> The mv command does not support the optional argument.
>>>>>
>>>>>
>>>>> BTW, it looks like coreutils has removed -ZCONTEXT from cp, if I ha=
d
>>>>> my druthers, I would make all commands just use -Z and not allow th=
e
>>>>> optional arg.  Then -Z would just set the default label.  I would
>>>>> bet that no one in history has executed a command like:
>>>>>
>>>>> mkdir -Zunconfined_u:object_r:httpd_user_content_t:s0 ~/myweb
>>>>
>>>> Thanks for the update.
>>>>
>>>> Short options with optional args are very problematic. It would mean
>>>> `cp -aZ` was OK while `cp -Za` was not etc. Also in Red Hat distros,
>>>> `cp -Z` requires an arg, so changing that would mean that older scri=
pts
>>>> that used `cp -Z blah...` would break with newer cp, as a space is n=
ot
>>>> allowed for optional args.
>>>>
>>>> For that reason I would keep -Z and --context as is, but deprecate t=
hem
>>>> for the commands that set a context, and add a new --new-context opt=
ion
>>>> that could take the optional arg:
>>>>
>>>> In that way, -Z can continue to be used as it is commonly with
>>>> commands like `ls` etc. to _read_ the context. Whereas the currently
>>>> rare form of {mkdir,cp,install} -Z context:to_write can be deprecate=
d
>>>> in favor of:
>>>>
>>>> --new-context[=3DCONTEXT] set security context to CONTEXT, or set co=
ntext
>>>> to the system default for the destination.
>>>>
>>>> I'm mildly in favor of introducing --new-context, over just making
>>>> --context take an optional arg (so that it's obvious a new context i=
s
>>>> being set, rather than one being copied), but I'm strongly against
>>>> making -Z take an optional arg.
>>>>
>>>> cheers, P=E1draig.
>>>
>>> If I made the -Z option not take an optional arg but default to "sett=
ing
>>> the default context, on the commands that create new content", are yo=
u ok
>>> with that?
>>>
>>> Then make --context or --new-context always take an arg?
>>
>> That would be preferable, but the main worry I'd have with that, is in=
stall
>> scripts and packages etc. in Red Hat land doing: `install -Z
>> context:to_write ...`
>>
>> I don't think we could break compatibility with that now?
>>
>> thanks, P=E1draig.
>
> I would be shocked if we were.  I have never seen anything like that in=
 10 years.
>
> Most people would have no idea how to do it.

Well I certainly respect your knowledge on all things SELinux.
It would be certainly nice to just support -Z, --context[=3DCONTEXT]
So searching public code using the old form...
   http://searchco.de/?q=3D%2Finstall.*-Z%2F&cs=3Don
Gives only one hit
   http://searchco.de/codesearch/view/8385388

So fair enough, it looks like these options were rarely used.
Supporting -Z, --context[=3DCONTEXT] will be a lot more useful.

Looking again at the common operation of copying files,
maintaining metadata, but set SELinux labels with restorecon.
We would now have as I previously said:

   cp -a --no-preserve=3Dcontext --context

but now this is also supported:

   cp -a --no-preserve=3Dcontext -Z

it would be better to support:

   cp -aZ --no-preserve=3Dcontext

or even better to have -Z imply --no-preserve=3Dcontext,
and therefore just support this operation with:

   cp -aZ

While the existing -Z doesn't allow overriding -a,
it doesn't seem very well thought out, as currently
`cp -a -Z blah --no-preserve=3Dcontext` isn't allowed, while
`cp -a --no-preserve=3Dcontext -Z blah` is.

As for --new-context vs --context...
since this is quite confusing already,
I'd prefer if we used --new-context instead,
but supported --context in the code with
a deprecation notice to use --new-context.

cheers,
P=E1draig.


From MAILER-DAEMON Sat Nov 03 22:14:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TUpis-0000AQ-C7
	for mharc-coreutils@gnu.org; Sat, 03 Nov 2012 22:14:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45920)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TUpiq-00009s-0Y
	for coreutils@gnu.org; Sat, 03 Nov 2012 22:14:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TUpip-00074O-3g
	for coreutils@gnu.org; Sat, 03 Nov 2012 22:13:59 -0400
Received: from mx1.redhat.com ([209.132.183.28]:39333)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TUpio-00074I-Ri
	for coreutils@gnu.org; Sat, 03 Nov 2012 22:13:59 -0400
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
	(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA42DtYx013523
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Sat, 3 Nov 2012 22:13:55 -0400
Received: from pb-n5110.redhat.com (ovpn-116-18.ams2.redhat.com [10.36.116.18])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id qA42DsxM007062; Sat, 3 Nov 2012 22:13:54 -0400
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH] tests: use sub-second timeouts to speed up a timeout test
Date: Sun,  4 Nov 2012 02:13:50 +0000
Message-Id: <1351995230-2800-1-git-send-email-P@draigBrady.com>
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 04 Nov 2012 02:14:01 -0000

* tests/misc/timeout.sh: Take advantage of recent support for
sub-second timeouts to decrease runtime from about 6s to 2s.
---
 tests/misc/timeout.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/misc/timeout.sh b/tests/misc/timeout.sh
index 66d6956..8db27c7 100755
--- a/tests/misc/timeout.sh
+++ b/tests/misc/timeout.sh
@@ -33,18 +33,18 @@ timeout 10 sh -c 'exit 2'
 test $? = 2 || fail=1
 
 # timeout
-timeout 1 sleep 10
+timeout .1 sleep 10
 test $? = 124 || fail=1
 
 # exit status propagation even on timeout
-timeout --preserve-status 1 sleep 10
+timeout --preserve-status .1 sleep 10
 # exit status should be 128+TERM
 test $? = 124 && fail=1
 
 # kill delay. Note once the initial timeout triggers,
 # the exit status will be 124 even if the command
 # exits on its own accord.
-timeout -s0 -k1 1 sleep 10
+timeout -s0 -k1 .1 sleep 10
 test $? = 124 && fail=1
 
 # Ensure 'timeout' is immune to parent's SIGCHLD handler
@@ -57,7 +57,7 @@ test $? = 124 && fail=1
 ) || fail=1
 
 # Don't be confused when starting off with a child (Bug#9098).
-out=$(sleep 1 & exec timeout 2 sh -c 'sleep 3; echo foo')
+out=$(sleep .1 & exec timeout .5 sh -c 'sleep 2; echo foo')
 status=$?
 test "$out" = "" && test $status = 124 || fail=1
 
-- 
1.7.6.4



From MAILER-DAEMON Sat Nov 03 22:18:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TUpmp-0000Wq-QE
	for mharc-coreutils@gnu.org; Sat, 03 Nov 2012 22:18:07 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51569)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TUpmo-0000WF-23
	for coreutils@gnu.org; Sat, 03 Nov 2012 22:18:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TUpmn-00089R-2p
	for coreutils@gnu.org; Sat, 03 Nov 2012 22:18:05 -0400
Received: from mx1.redhat.com ([209.132.183.28]:56375)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TUpmm-00089N-Qj
	for coreutils@gnu.org; Sat, 03 Nov 2012 22:18:04 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA42I3qG032488
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Sat, 3 Nov 2012 22:18:03 -0400
Received: from pb-n5110.redhat.com (ovpn-116-18.ams2.redhat.com [10.36.116.18])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qA42I1Up031311; Sat, 3 Nov 2012 22:18:02 -0400
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH] doc: update info cross reference to bash
Date: Sun,  4 Nov 2012 02:17:59 +0000
Message-Id: <1351995479-3940-1-git-send-email-P@draigBrady.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 04 Nov 2012 02:18:06 -0000

* doc/coreutils.texi (tee invocation): Reference
the bash manual rather than bashref, as the latter
is more likely to work on newer systems.
---
 doc/coreutils.texi |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 767a31e..4497c39 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -12392,7 +12392,7 @@ checksum in a file named @file{dvd.sha1}.
 Note, however, that this example relies on a feature of modern shells
 called @dfn{process substitution}
 (the @samp{>(command)} syntax, above;
-@xref{Process Substitution,,Process Substitution, bashref,
+@xref{Process Substitution,,Process Substitution, bash,
 The Bash Reference Manual}.),
 so it works with @command{zsh}, @command{bash}, and @command{ksh},
 but not with @command{/bin/sh}.  So if you write code like this
-- 
1.7.6.4



From MAILER-DAEMON Mon Nov 05 12:15:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TVQGy-0000TA-G5
	for mharc-coreutils@gnu.org; Mon, 05 Nov 2012 12:15:40 -0500
Received: from eggs.gnu.org ([208.118.235.92]:54349)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TVQGw-0000Sy-2A
	for coreutils@gnu.org; Mon, 05 Nov 2012 12:15:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TVQGq-00010S-5w
	for coreutils@gnu.org; Mon, 05 Nov 2012 12:15:37 -0500
Received: from moutng.kundenserver.de ([212.227.17.10]:56661)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TVQGp-0000zh-Ru
	for coreutils@gnu.org; Mon, 05 Nov 2012 12:15:32 -0500
Received: from oxbaltgw54.schlund.de (oxbaltgw54.schlund.de [172.19.246.178])
	by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis)
	id 0M0GLZ-1TERsy37Fd-00u8s9; Mon, 05 Nov 2012 18:15:29 +0100
Date: Mon, 5 Nov 2012 18:15:29 +0100 (CET)
From: Bernhard Voelker <mail@bernhard-voelker.de>
To: Coreutils <coreutils@gnu.org>
Message-ID: <1163052843.1441564.1352135729661.JavaMail.open-xchange@email.1und1.de>
Subject: Zero-length arguments?
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Priority: 3
Importance: Medium
X-Mailer: Open-Xchange Mailer v6.20.7-Rev2
X-Provags-ID: V02:K0:VFXfjIEhTSqgJvAcZ0/4qSHqPQbxlCIv0pWlhZDQYaO
	/7SuG7XycDo42Y1q4tn+x1wWSlkZaFlEcrVcWojkFfmKKzRKsY
	dVau3iIDacIT7Usz8mm7cw18dOKW32e0T9fCFyvOmbHjpcHBMp
	lb0ewoOksFEuivflto4/Gg6EsSMvu0nNlnBh5ltyZZsAVc5Tv4
	/uMorgD9IPXPmK4hpqCUKcfO0uvZ5LVf0uaJQLop6yUKS17Uhn
	upJh32fGzSUnpXiW6SC9oEzuP+3B7JjvycAPDFjXSHJPqvB3xc
	pA6Ifvy26z0iJ0KtZrK9Ja7RG1wyCl5p6Si8c8Rj+huSrbsBZL
	mfEg3Q3FJ4qUGSKIIUKOG4jdhJH2pfQATtQ+7UX7QWrX4w6XoF
	UhZUtCgiBrtNK2icYAHIXX7T3ngktEEdh9zMP1MCpSAaZ5GrMy A/WAo
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.17.10
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: Bernhard Voelker <mail@bernhard-voelker.de>
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, 05 Nov 2012 17:15:39 -0000

My question bases on the discussion in:
  https://lists.samba.org/archive/rsync/2012-November/027946.html
where an empty variable $OPTS was passed quoted:
 $ rsync "$OPTS" -avx from to

How should a program react for Zero-length arguments?
Today, coreutils programs give a diagnostic like this:

  $ cat ''
  cat: : No such file or directory

  $ ls -l ''
  ls: cannot access : No such file or directory

I mean, if the argument refers to a file or directory,
then it's impossible for it to be an empty string.

Exceptions are du and wc:

  $ du ''
  du: invalid zero-length file name

  $ wc ''
  wc: invalid zero-length file name

and 'sort --files0':

  $ sort --files0-from=/tmp/x
  sort: /tmp/x:1: invalid zero-length file name

Is this behavior correct / specified somewhere?
At least it should be consistent among coreutils, eh?

Have a nice day,
Berny


From MAILER-DAEMON Mon Nov 05 12:24:13 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TVQPF-0001gc-09
	for mharc-coreutils@gnu.org; Mon, 05 Nov 2012 12:24:13 -0500
Received: from eggs.gnu.org ([208.118.235.92]:40953)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1TVQPC-0001gP-Mu
	for coreutils@gnu.org; Mon, 05 Nov 2012 12:24:11 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1TVQP6-0003kN-Q0
	for coreutils@gnu.org; Mon, 05 Nov 2012 12:24:10 -0500
Received: from mx1.redhat.com ([209.132.183.28]:12885)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1TVQP6-0003jY-FG
	for coreutils@gnu.org; Mon, 05 Nov 2012 12:24:04 -0500
Received: from int-mx09.intmail.prod.int.phx2.redhat.com
	(int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA5HNxtw009369
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 5 Nov 2012 12:23:59 -0500
Received: from [10.3.113.113] (ovpn-113-113.phx2.redhat.com [10.3.113.113])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qA5HNwZx006509; Mon, 5 Nov 2012 12:23:59 -0500
Message-ID: <5097F62D.7050807@redhat.com>
Date: Mon, 05 Nov 2012 10:23:57 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121016 Thunderbird/16.0.1
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: Zero-length arguments?
References: <1163052843.1441564.1352135729661.JavaMail.open-xchange@email.1und1.de>
In-Reply-To: <1163052843.1441564.1352135729661.JavaMail.open-xchange@email.1und1.de>
X-Enigmail-Version: 1.4.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigCA0E5D724B22E73665F95733"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 05 Nov 2012 17:24:11 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigCA0E5D724B22E73665F95733
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 11/05/2012 10:15 AM, Bernhard Voelker wrote:
> My question bases on the discussion in:
>   https://lists.samba.org/archive/rsync/2012-November/027946.html
> where an empty variable $OPTS was passed quoted:
>  $ rsync "$OPTS" -avx from to
>=20
> How should a program react for Zero-length arguments?
> Today, coreutils programs give a diagnostic like this:
>=20
>   $ cat ''
>   cat: : No such file or directory

That's a literal strerror() output based on the ENOENT error required
for treating an empty string as a file.

> Exceptions are du and wc:
>=20
>   $ du ''
>   du: invalid zero-length file name

This situation and others like it are the result of the gnulib module
argv-iter, which obviously filters out empty strings prior to ever
triggering an ENOENT failure.  But the end result is still the same - an
attempt to use an empty string as a file name fails.

>=20
> Is this behavior correct / specified somewhere?

Correct, yes.  Specified somewhere?  Well, the generic rule that the
empty file name must cause failure is documented in POSIX; the specific
choice of what error message we issue is not documented.

> At least it should be consistent among coreutils, eh?

Perhaps.  Patches welcome, if you think one or the other style of error
message is worth improving.  But I'm not personally bothered by it.

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


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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBCAAGBQJQl/YtAAoJEKeha0olJ0NqnDoH/jNde9M+AkFwflte3Va+mXE9
ENkKdgUWvRT1tvmZnDwy4RXncu7BXR+2n0tnfT2tyPGna7uPRDqJ+NembxcxVmJg
K+gyjflpHB0/faLDcFTIXOkuLd5CdznltJd28dUBxMZz/HLWX7bZ07BZJ3crGe5q
hjyd8m7n4aiXzpWLdKalcEA4yHMx19B1/HDVsOFBdsNwzo3CF4drW2XloujRJ7T5
PE03OknD1RJ1oYMoe8jyrEKid3WxyfKegdaU5a4S+YUE/xC1+BgFxd2717/qfmhY
HFUmkj/bQUYZP3iwEFwb7ogJHZKkh5l4Nn9ZJsSYeJlotoG8lhPGl2a0Q8/QT/E=
=skA1
-----END PGP SIGNATURE-----

--------------enigCA0E5D724B22E73665F95733--


From MAILER-DAEMON Mon Nov 05 14:39:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TVSWW-00085l-6g
	for mharc-coreutils@gnu.org; Mon, 05 Nov 2012 14:39:52 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45006)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TVSWU-00085f-6m
	for coreutils@gnu.org; Mon, 05 Nov 2012 14:39:50 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TVSWT-0005kJ-5C
	for coreutils@gnu.org; Mon, 05 Nov 2012 14:39:50 -0500
Received: from moutng.kundenserver.de ([212.227.126.171]:50875)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TVSWS-0005kA-RT
	for coreutils@gnu.org; Mon, 05 Nov 2012 14:39:49 -0500
Received: from [192.168.2.106] (p4FF766A7.dip.t-dialin.net [79.247.102.167])
	by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis)
	id 0M2XRt-1TFRH40e8r-00sk8b; Mon, 05 Nov 2012 20:39:47 +0100
Message-ID: <50981602.1090502@bernhard-voelker.de>
Date: Mon, 05 Nov 2012 20:39:46 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: [PATCH] maint: fix factor's test file name pattern in .gitignore
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:0dm9BRjqDxVHzNx4Ojnrh/1iSct6Ugc853YrORJzkDh
	ZL0KyOSnB4b0cH5shg74tjQ5hpdL5YbeMlgODmEOmGs4m5G9xd
	Ecy1ilBeskVf6FNyxqUCksagaeKixKIShne7W1xfX0dWH+muMB
	m6vHWa+8ES1zFg2QQ4ojsi69BQqiys2DlXkZwAfWA6oTJOGUbg
	2mIQ2rlm322Ze1DGHSq0Shd9HC16rA7yISLBf4Lx0Sgryb0cdL
	NPhHCRCJ5x/qoHLGesSqPOkJEnuYyHRG5mYFIhjshN3Zh4oTpU
	r/wwWfhqZKJoNAjQZm4LT6TfOeADIuvIWHSz28g2prmlO+x9Bv
	p4MbyY7U5pJjlpHp6Ds8Ym9E0ELKYGT1VsjHYZmT0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.126.171
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 05 Nov 2012 19:39:51 -0000

I missed to adapt .gitignore in v8.20-9-g1cace4a, sorry.

Have a nice day,
Berny


>From c1d6ac0bd57817ceb3436d84170fe0c922fcb50f Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Mon, 5 Nov 2012 20:35:13 +0100
Subject: [PATCH] maint: fix factor's test file name pattern in .gitignore

* .gitignore: Adapt the entry for the files generated during
the factor tests (see v8.20-9-g1cace4a).
---
 .gitignore |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/.gitignore b/.gitignore
index 8a423f7..5ce2361 100644
--- a/.gitignore
+++ b/.gitignore
@@ -161,7 +161,7 @@
 /tests/*/*.log
 /tests/*/*.trs
 /tests/.built-programs
-/tests/factor/[0-9]*.sh
+/tests/factor/t[0-9][0-9].sh
 /tests/t?
 /tests/test-suite.log
 ID
-- 
1.7.7



From MAILER-DAEMON Mon Nov 05 18:31:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TVW8y-0004sO-8A
	for mharc-coreutils@gnu.org; Mon, 05 Nov 2012 18:31:48 -0500
Received: from eggs.gnu.org ([208.118.235.92]:50706)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TVW8w-0004sI-B1
	for coreutils@gnu.org; Mon, 05 Nov 2012 18:31:47 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TVW8v-0003h3-D0
	for coreutils@gnu.org; Mon, 05 Nov 2012 18:31:46 -0500
Received: from mx1.redhat.com ([209.132.183.28]:30518)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TVW8v-0003fp-4n
	for coreutils@gnu.org; Mon, 05 Nov 2012 18:31:45 -0500
Received: from int-mx02.intmail.prod.int.phx2.redhat.com
	(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA5NVeBb018611
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 5 Nov 2012 18:31:40 -0500
Received: from [10.36.116.28] (ovpn-116-28.ams2.redhat.com [10.36.116.28])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id qA5NVblD015356
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Mon, 5 Nov 2012 18:31:39 -0500
Message-ID: <50984C59.3020807@draigBrady.com>
Date: Mon, 05 Nov 2012 23:31:37 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] maint: fix factor's test file name pattern in .gitignore
References: <50981602.1090502@bernhard-voelker.de>
In-Reply-To: <50981602.1090502@bernhard-voelker.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qA5NVeBb018611
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 05 Nov 2012 23:31:47 -0000

On 11/05/2012 07:39 PM, Bernhard Voelker wrote:
> I missed to adapt .gitignore in v8.20-9-g1cace4a, sorry.
>
> Have a nice day,
> Berny
>
>
>>From c1d6ac0bd57817ceb3436d84170fe0c922fcb50f Mon Sep 17 00:00:00 2001
> From: Bernhard Voelker <mail@bernhard-voelker.de>
> Date: Mon, 5 Nov 2012 20:35:13 +0100
> Subject: [PATCH] maint: fix factor's test file name pattern in .gitigno=
re
>
> * .gitignore: Adapt the entry for the files generated during
> the factor tests (see v8.20-9-g1cace4a).
> ---
>   .gitignore |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/.gitignore b/.gitignore
> index 8a423f7..5ce2361 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -161,7 +161,7 @@
>   /tests/*/*.log
>   /tests/*/*.trs
>   /tests/.built-programs
> -/tests/factor/[0-9]*.sh
> +/tests/factor/t[0-9][0-9].sh
>   /tests/t?
>   /tests/test-suite.log
>   ID
>


pushed.

thanks,
P=E1draig.


From MAILER-DAEMON Tue Nov 06 22:10:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TVw1q-00029K-Ry
	for mharc-coreutils@gnu.org; Tue, 06 Nov 2012 22:10:10 -0500
Received: from eggs.gnu.org ([208.118.235.92]:51016)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TVw1m-00026v-K7
	for coreutils@gnu.org; Tue, 06 Nov 2012 22:10:09 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TVw1j-0005vY-EZ
	for coreutils@gnu.org; Tue, 06 Nov 2012 22:10:06 -0500
Received: from mx1.redhat.com ([209.132.183.28]:51333)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TVw1j-0005qC-2T
	for coreutils@gnu.org; Tue, 06 Nov 2012 22:10:03 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA739vrX028666
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 6 Nov 2012 22:09:58 -0500
Received: from [10.36.116.23] (ovpn-116-23.ams2.redhat.com [10.36.116.23])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qA739svK006927
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Tue, 6 Nov 2012 22:09:56 -0500
Message-ID: <5099D101.5040907@draigBrady.com>
Date: Wed, 07 Nov 2012 03:09:53 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: df --output
References: <505BD64C.7020801@bernhard-voelker.de>
	<876277akxo.fsf@rho.meyering.net>
	<505C2A06.2080704@bernhard-voelker.de>
	<87pq5f913w.fsf@rho.meyering.net>
	<505C35C9.1090207@bernhard-voelker.de>
	<505F70E2.9030006@bernhard-voelker.de>
	<87fw68x9qc.fsf@rho.meyering.net>
	<5067682C.6020403@bernhard-voelker.de>
	<506876B9.7000600@bernhard-voelker.de>
In-Reply-To: <506876B9.7000600@bernhard-voelker.de>
Content-Type: multipart/mixed; boundary="------------050306000002060602060607"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 07 Nov 2012 03:10:09 -0000

This is a multi-part message in MIME format.
--------------050306000002060602060607
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id qA739vrX028666

On 09/30/2012 05:43 PM, Bernhard Voelker wrote:
> On 09/29/2012 11:29 PM, Bernhard Voelker wrote:
>> Here you are (see attached):
>>
>> [PATCH 20/20] df: print "total" in grand total's target field if no so=
urce
>> [PATCH 19/20] df: cleanup comments regarding double blank after
>> [PATCH 18/20] df: add a test for the --output option
>> [PATCH 17/20] df: document the new --output option
>> [PATCH 16/20] df: plug two minor memory holes detected by valgrind
>> [PATCH 15/20] df: add new --output option
>> [PATCH 14/20] df: enhance comment describing history
>> [PATCH 13/20] df: give posix_format variable a better scope
>> [PATCH 12/20] df: cleanup header_mode handling regarding --inodes
>> [PATCH 11/20] df: minor cleanup to improve readability
>> [PATCH 10/20] df: remove remainder of pre-mixed fields support
>> [PATCH 09/20] df: add basic support for mixed block and inode fields
>> [PATCH 08/20] df: print '-' into the target column of the total line
>> [PATCH 07/20] df: only sum up grand total if required
>> [PATCH 06/20] df: remove now-obsolescent condition
>> [PATCH 05/20] df: use enum value for long option --total
>> [PATCH 04/20] df: apply ambsalign to the last field with
>> [PATCH 03/20] df: rework internal processing of output columns
>> [PATCH 02/20] df: rename some displayable fields
>> [PATCH 01/20] df: move the call of get_header from get_dev to main
>>
>> The bigger/important changes are in the patches 03, 09, and 15.
>>
>> Example:
>>
>>    $ src/df -h --tot --o=3Dtarget,pcent,ipcent / /home
>>    Mounted on Use% IUse%
>>    /           65%   32%
>>    /home       65%    2%
>>    total       65%    5%
>>
>> Have a nice day,
>> Berny
>
> I have added another patch at the end:
>
>    [PATCH 21/21] df: ensure that the mount list contains a valid
>    fstype with --output
>
>    The function read_file_system_list only ensures a valid file
>    system type if the calling parameter is true. With the new
>    option --output, there is an additional condition needed:
>    when the FSTYPE_FIELD is used.
>
> I didn't notice a problem on GNU/Linux, but the documentation of
> read_file_system_list() leads to the conclusion that df needs to
> pass true also for 'df --o=3Dfstype,...'.
>
> The new, additional condition may also have replaced the one before
>      || print_type
> because
>      || field_data[FSTYPE_FIELD].used
> also leads to true with 'df -T'; I just left it there for now.
>
> Have a nice day,
> Berny
>


I've finished my review. Sorry for the delay.
I've made a couple of adjustments in the attached df--output-adjustments.=
patch

The first is to rename --output=3Dtotal to --output=3Dsize
I think having `df --total --output=3Dtotal` is a bit confusing?

Also I've changed df --output to show the block size in the "size" header=
,
unless -h (human) is being used.  I.E. behave with this header
more like the traditional df output.  I think this is needed
as important info is lost about the units otherwise?

I've put the full rebased 24 item patch set here:
http://www.pixelbeat.org/patches/coreutils/df--output.patch.bz2

Before merging I'll probably reorder/squash to 3 patches;
logic, docs and test

thanks,
P=E1draig.

--------------050306000002060602060607
Content-Type: text/x-patch;
 name="df--output-adjustments.patch"
Content-Disposition: attachment;
 filename="df--output-adjustments.patch"
Content-Transfer-Encoding: 7bit

>From d34ae68693ebdb1b049479ad50c3ce2c8b823aa7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Wed, 7 Nov 2012 00:45:07 +0000
Subject: [PATCH 1/3] df: change --output=total to --output=size

To avoid confusion with --total

* src/df.c: Rename the argument.
* doc/coreutils.texi (df invocation): Likewise.
* test/df/df-output.sh: Likewise.
---
 doc/coreutils.texi    |    4 ++--
 src/df.c              |    6 +++---
 tests/df/df-output.sh |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 8027c78..b251b3d 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -10702,14 +10702,14 @@ The source of the mount point, usually a device.
 @item fstype
 File system type.
 
-@item total
+@item size
 Total number of blocks.
 @item used
 Number of used blocks.
 @item avail
 Number of available blocks.
 @item pcent
-Percentage of @var{used} divided by @var{total}.
+Percentage of @var{used} divided by @var{size}.
 
 @item itotal
 Total number of inodes.
diff --git a/src/df.c b/src/df.c
index 079fa02..bdeaf03 100644
--- a/src/df.c
+++ b/src/df.c
@@ -166,7 +166,7 @@ static struct field_data_t field_data[] = {
     "fstype", OTHER_FLD, N_("Type"),        4, MBS_ALIGN_LEFT,  false },
 
   [TOTAL_FIELD] = { TOTAL_FIELD,
-    "total",  BLOCK_FLD, N_("blocks"),      5, MBS_ALIGN_RIGHT, false },
+    "size",   BLOCK_FLD, N_("blocks"),      5, MBS_ALIGN_RIGHT, false },
 
   [USED_FIELD] = { USED_FIELD,
     "used",   BLOCK_FLD, N_("Used"),        5, MBS_ALIGN_RIGHT, false },
@@ -193,7 +193,7 @@ static struct field_data_t field_data[] = {
     "target", OTHER_FLD, N_("Mounted on"),  0, MBS_ALIGN_LEFT,  false }
 };
 
-static char const *all_args_string = "source,fstype,total,used,avail,pcent,"
+static char const *all_args_string = "source,fstype,size,used,avail,pcent,"
   "itotal,iused,iavail,ipcent,target";
 
 /* Storage for the definition of output columns.  */
@@ -1158,7 +1158,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
       emit_size_note ();
   fputs (_("\n\
 FIELD_LIST is a comma-separated list of columns to be included.  Valid\n\
-field names are: 'source', 'fstype', 'total', 'used', 'avail', 'pcent',\n\
+field names are: 'source', 'fstype', 'size', 'used', 'avail', 'pcent',\n\
 'itotal', 'iused', 'iavail', 'ipcent' and 'target' (see info page).\n\
 "), stdout);
       emit_ancillary_info ();
diff --git a/tests/df/df-output.sh b/tests/df/df-output.sh
index 210cce3..34c4049 100644
--- a/tests/df/df-output.sh
+++ b/tests/df/df-output.sh
@@ -70,7 +70,7 @@ cat <<\EOF > exp || framework_failure_
 Filesystem Type Size Used Avail Use% Inodes IUsed IFree IUse% Mounted on
 EOF
 
-df --o=source,fstype,total,used,avail,pcent \
+df --o=source,fstype,size,used,avail,pcent \
  --o=itotal,iused,iavail,ipcent,target '.' >out || fail=1
 sed -e '1 {s/ [ ]*/ /g;q}' out > out2
 compare exp out2 || fail=1
-- 
1.7.6.4


>From c8ae726034d22b7fc8015134587c6dd6df6222ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Wed, 7 Nov 2012 00:52:44 +0000
Subject: [PATCH 2/3] df: with --output but without -h, show the block size

* src/df.c (get_header): Indicate the block size used,
in the "size" header, when using --output without -h.
* tests/df/df-output.sh: Adjust for, and add an extra test for,
the new behavior.
---
 src/df.c              |    8 +++++++-
 tests/df/df-output.sh |   14 ++++++++++++--
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/df.c b/src/df.c
index bdeaf03..751740c 100644
--- a/src/df.c
+++ b/src/df.c
@@ -493,7 +493,10 @@ get_header (void)
       char *cell = NULL;
       char const *header = _(columns[col]->caption);
 
-      if (header_mode == DEFAULT_MODE && columns[col]->field == TOTAL_FIELD)
+      if (columns[col]->field == TOTAL_FIELD
+          && (header_mode == DEFAULT_MODE
+              || (header_mode == OUTPUT_MODE
+                  && !(human_output_opts & human_autoscale))))
         {
           char buf[LONGEST_HUMAN_READABLE + 1];
 
@@ -526,6 +529,9 @@ get_header (void)
 
           char *num = human_readable (output_block_size, buf, opts, 1, 1);
 
+          /* Reset the header back to the default in OUTPUT_MODE.  */
+          header = N_("blocks");
+
           /* TRANSLATORS: this is the "1K-blocks" header in "df" output.  */
           if (asprintf (&cell, _("%s-%s"), num, header) == -1)
             cell = NULL;
diff --git a/tests/df/df-output.sh b/tests/df/df-output.sh
index 34c4049..0b40b28 100644
--- a/tests/df/df-output.sh
+++ b/tests/df/df-output.sh
@@ -70,12 +70,22 @@ cat <<\EOF > exp || framework_failure_
 Filesystem Type Size Used Avail Use% Inodes IUsed IFree IUse% Mounted on
 EOF
 
-df --o=source,fstype,size,used,avail,pcent \
+df -h --o=source,fstype,size,used,avail,pcent \
  --o=itotal,iused,iavail,ipcent,target '.' >out || fail=1
 sed -e '1 {s/ [ ]*/ /g;q}' out > out2
 compare exp out2 || fail=1
 
-df --output '.' >out || fail=1
+df -h --output '.' >out || fail=1
+sed -e '1 {s/ [ ]*/ /g;q}' out > out2
+compare exp out2 || fail=1
+
+# Ensure that --output indicates the block size
+# when not using --human-readable
+cat <<\EOF > exp || framework_failure_
+1K-blocks
+EOF
+
+df -B1K --output=size '.' >out || fail=1
 sed -e '1 {s/ [ ]*/ /g;q}' out > out2
 compare exp out2 || fail=1
 
-- 
1.7.6.4


>From a1d60dee50a7d75065e35e6ba74ab7412055a3ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Wed, 7 Nov 2012 02:35:51 +0000
Subject: [PATCH 3/3] maint: df: whitespace cleanups

Minor tweaks for squashing.
---
 src/df.c |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/df.c b/src/df.c
index 751740c..7f418c4 100644
--- a/src/df.c
+++ b/src/df.c
@@ -279,7 +279,7 @@ alloc_table_row (void)
 {
   nrows++;
   table = xnrealloc (table, nrows, sizeof (char *));
-  table[nrows-1] = xnmalloc (ncolumns, sizeof (char *));
+  table[nrows - 1] = xnmalloc (ncolumns, sizeof (char *));
 }
 
 /* Output each cell in the table, accounting for the
@@ -290,7 +290,7 @@ print_table (void)
 {
   size_t row;
 
-  for (row = 0; row < nrows; row ++)
+  for (row = 0; row < nrows; row++)
     {
       size_t col;
       for (col = 0; col < ncolumns; col++)
@@ -331,9 +331,9 @@ alloc_field (int f, const char *c)
 {
   ncolumns++;
   columns = xnrealloc (columns, ncolumns, sizeof (struct field_data_t *));
-  columns[ncolumns-1] = &field_data[f];
+  columns[ncolumns - 1] = &field_data[f];
   if (c != NULL)
-    columns[ncolumns-1]->caption = c;
+    columns[ncolumns - 1]->caption = c;
 
   if (field_data[f].used)
     assert (!"field used");
@@ -363,7 +363,7 @@ decode_output_arg (char const *arg)
       display_field_t field = -1;
       for (unsigned int i = 0; i < ARRAY_CARDINALITY (field_data); i++)
         {
-          if (STREQ (field_data[i].arg , s))
+          if (STREQ (field_data[i].arg, s))
             {
               field = i;
               break;
@@ -379,7 +379,7 @@ decode_output_arg (char const *arg)
         {
           /* Prevent the fields from being used more than once.  */
           error (0, 0, _("option --output: field '%s' used more than once"),
-            field_data[field].arg);
+                 field_data[field].arg);
           usage (EXIT_FAILURE);
         }
 
@@ -420,7 +420,7 @@ static void
 get_field_list (void)
 {
   switch (header_mode)
-  {
+    {
     case DEFAULT_MODE:
       alloc_field (SOURCE_FIELD, NULL);
       if (print_type)
@@ -468,15 +468,15 @@ get_field_list (void)
 
     case OUTPUT_MODE:
       if (!ncolumns)
-      {
-        /* Add all fields if --output was given without a field list.  */
-        decode_output_arg (all_args_string);
-      }
+        {
+          /* Add all fields if --output was given without a field list.  */
+          decode_output_arg (all_args_string);
+        }
       break;
 
     default:
       assert (!"invalid header_mode");
-  }
+    }
 }
 
 /* Obtain the appropriate header entries.  */
@@ -553,7 +553,7 @@ get_header (void)
 
       hide_problematic_chars (cell);
 
-      table[nrows-1][col] = cell;
+      table[nrows - 1][col] = cell;
 
       columns[col]->width = MAX (columns[col]->width, mbswidth (cell, 0));
     }
@@ -719,7 +719,7 @@ add_to_grand_total (struct field_values_t *bv, struct field_values_t *iv)
   if (known_value (bv->total))
     grand_fsu.fsu_blocks += bv->input_units * bv->total;
   if (known_value (bv->available_to_root))
-    grand_fsu.fsu_bfree  += bv->input_units * bv->available_to_root;
+    grand_fsu.fsu_bfree += bv->input_units * bv->available_to_root;
   if (known_value (bv->available))
     add_uint_with_neg_flag (&grand_fsu.fsu_bavail,
                             &grand_fsu.fsu_bavail_top_bit_set,
@@ -874,7 +874,7 @@ get_dev (char const *disk, char const *mount_point,
                      && v->used <= TYPE_MAXIMUM (uintmax_t) / 100
                      && v->used + v->available != 0
                      && (v->used + v->available < v->used)
-                         == v->negate_available)
+                     == v->negate_available)
               {
                 uintmax_t u100 = v->used * 100;
                 uintmax_t nonroot_total = v->used + v->available;
@@ -939,7 +939,7 @@ get_dev (char const *disk, char const *mount_point,
 
       hide_problematic_chars (cell);
       columns[col]->width = MAX (columns[col]->width, mbswidth (cell, 0));
-      table[nrows-1][col] = cell;
+      table[nrows - 1][col] = cell;
     }
   free (dev_name);
 }
@@ -1162,7 +1162,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       emit_blocksize_note ("DF");
       emit_size_note ();
-  fputs (_("\n\
+      fputs (_("\n\
 FIELD_LIST is a comma-separated list of columns to be included.  Valid\n\
 field names are: 'source', 'fstype', 'size', 'used', 'avail', 'pcent',\n\
 'itotal', 'iused', 'iavail', 'ipcent' and 'target' (see info page).\n\
@@ -1456,7 +1456,7 @@ main (int argc, char **argv)
         error (EXIT_FAILURE, 0, _("no file systems processed"));
     }
 
-  IF_LINT ( free (columns));
+  IF_LINT (free (columns));
 
   exit (exit_status);
 }
-- 
1.7.6.4


--------------050306000002060602060607--


From MAILER-DAEMON Wed Nov 07 03:33:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TW14o-00074q-2u
	for mharc-coreutils@gnu.org; Wed, 07 Nov 2012 03:33:34 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33496)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TW14i-00074f-Fb
	for coreutils@gnu.org; Wed, 07 Nov 2012 03:33:32 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TW14a-00030Q-Du
	for coreutils@gnu.org; Wed, 07 Nov 2012 03:33:28 -0500
Received: from moutng.kundenserver.de ([212.227.17.8]:56584)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TW14a-000302-3p
	for coreutils@gnu.org; Wed, 07 Nov 2012 03:33:20 -0500
Received: from [192.168.2.106] (p4FF72E70.dip.t-dialin.net [79.247.46.112])
	by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis)
	id 0MTP5b-1TxLER48pD-00RpP1; Wed, 07 Nov 2012 09:33:17 +0100
Message-ID: <509A1CCC.2080203@bernhard-voelker.de>
Date: Wed, 07 Nov 2012 09:33:16 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
Subject: Re: df --output
References: <505BD64C.7020801@bernhard-voelker.de>
	<876277akxo.fsf@rho.meyering.net>
	<505C2A06.2080704@bernhard-voelker.de>
	<87pq5f913w.fsf@rho.meyering.net>
	<505C35C9.1090207@bernhard-voelker.de>
	<505F70E2.9030006@bernhard-voelker.de>
	<87fw68x9qc.fsf@rho.meyering.net>
	<5067682C.6020403@bernhard-voelker.de>
	<506876B9.7000600@bernhard-voelker.de>
	<5099D101.5040907@draigBrady.com>
In-Reply-To: <5099D101.5040907@draigBrady.com>
Content-Type: multipart/mixed; boundary="------------000205020302060903050009"
X-Provags-ID: V02:K0:fpQwogIbYGhoTsgLLULJd59m9lfYiwjCsCNCV3RKXw+
	sYv5DcoGq8aZFLMOPkNLZgnJOokFID2PTTkufLA4+OTfQ9M56O
	yx+jSKzFWLL7syPZ8SnfIyUsqmoGGRu2R02E16kt9zHc1pYR2G
	Tn5dm7/0BOeGk1M2fPy13FTx1q/TnscGxmq6pI92AerLjf9W9r
	WwNsJmMqsTBOm+9pTltvCWa+klod8thtkF+/S/YgzZKJq/iOnf
	k0QdyhHVsSLO7pbCx5XLe3PiktL9tWHDXynHcEY10MsFCrjn26
	F0mXmk8rqDySh29c/hbg/Oy0jgAvXNk45xDStKDHKbun2QqEZy
	00sTChvRghrrWDC25OscrNc5FvzRtmN1+1RCma5j8
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.17.8
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 07 Nov 2012 08:33:32 -0000

This is a multi-part message in MIME format.
--------------000205020302060903050009
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

On 11/07/2012 04:09 AM, Pádraig Brady wrote:
> I've finished my review. Sorry for the delay.

Thank you, no worries.

> I've made a couple of adjustments in the attached df--output-adjustments.patch
> 
> The first is to rename --output=total to --output=size
> I think having `df --total --output=total` is a bit confusing?

I made it 'total' to better align with 'itotal' in the inode case,
but ambiguity with --total is a valid point.

Wouldn't it be worth to s/TOTAL_FIELD/SIZE_FIELD/ then?

> Also I've changed df --output to show the block size in the "size" header,
> unless -h (human) is being used.  I.E. behave with this header
> more like the traditional df output.  I think this is needed
> as important info is lost about the units otherwise?

+1

> I've put the full rebased 24 item patch set here:
> http://www.pixelbeat.org/patches/coreutils/df--output.patch.bz2

Apart from the above note, it looks all good to me. Thanks.

BTW: during development, I was using the attached bulk test script
to catch regressions between df of version 8.19 and my version.
If you want to try it, then you'll have to adapt the variables
DF_OLD / DF_NEW at the top of the script to fit into your environment.

Have a nice day,
Berny

--------------000205020302060903050009
Content-Type: text/plain; charset=UTF-8;
 name="dftest"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="dftest"

#!/bin/sh

# Define test candidates:
# both must start with "/home/" and end on "df" (see sed command below)
DF_OLD=/home/berny/git/coreutils-8.19/inst/bin/df
DF_NEW=/home/berny/coreutils/src/df

TEST_SH=/tmp/dftest.tmp.sh
OUT_OLD=/tmp/dftest.out.old
OUT_NEW=/tmp/dftest.out.new

function dfprep
{
  printf "#!/bin/sh  \n"
  printf "DF=\"\$1\" \n"
  
  for o in '' -i -h -hi -P -hP -Ph -iP -Pi -hiP -a -l '-t ext3' '-t typo' '-x ext3' '-x typo'
  do
    for s in '' -k -m -Bk -BkB  -BkiB -B1k -B1kB -B1kiB -Bsi -Bhuman-readable
    do
      for t in '' '--total'
      do
        for p in '' '.'
        do
          printf "                 \"\$DF\" $o $s $t $p || echo \$? \n"
          printf "BLOCKSIZE=1M     \"\$DF\" $o $s $t $p || echo \$? \n"
          printf "BLOCK_SIZE=1M    \"\$DF\" $o $s $t $p || echo \$? \n"
          printf "DF_BLOCK_SIZE=1M \"\$DF\" $o $s $t $p || echo \$? \n"
        done
      done
    done
  done
}
  
dfprep > $TEST_SH
sync
sh -x $TEST_SH $DF_OLD > $OUT_OLD 2>&1
sh -x $TEST_SH $DF_NEW > $OUT_NEW 2>&1
for f in $OUT_OLD $OUT_NEW
do
  sed -i \
    -e '1n; s/\/home\/.*\/df/df/' \
    -e 's/^\(total.*%\)$/\1 -/' \
    $f
  for x in 3 2 1 ; do
    sed -i \
      -e "s/ \([0-9]\{12\}\)\([^0-9]\)/ abcdefghijkl\2/;
          s/ \([0-9]\{11\}\)\([^0-9]\)/ abcdefghijk\2/; \
          s/ \([0-9]\{10\}\)\([^0-9]\)/ abcdefghij\2/; \
          s/ \([0-9]\{9\}\)\([^0-9]\)/ abcdefghi\2/; \
          s/ \([0-9]\{8\}\)\([^0-9]\)/ abcdefgh\2/; \
          s/ \([0-9]\{7\}\)\([^0-9]\)/ abcdefg\2/; \
          s/ \([0-9]\{6\}\)\([^0-9]\)/ abcdef\2/; \
          s/ \([0-9]\{5\}\)\([^0-9]\)/ abcde\2/; \
          s/ \([0-9]\{4\}\)\([^0-9]\)/ abcd\2/; \
          s/ \([0-9]\{3\}\)\([^0-9]\)/ abc\2/; \
          s/ \([0-9]\{2\}\)\([^0-9]\)/ ab\2/; \
          s/ \([0-9]\{1\}\)\([^0-9]\)/ a\2/
          " \
      $f
  done
done
meld $OUT_OLD $OUT_NEW &

--------------000205020302060903050009--


From MAILER-DAEMON Wed Nov 07 06:23:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TW3jQ-0000Hu-AZ
	for mharc-coreutils@gnu.org; Wed, 07 Nov 2012 06:23:40 -0500
Received: from eggs.gnu.org ([208.118.235.92]:34492)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TW3jJ-0000Gt-8E
	for coreutils@gnu.org; Wed, 07 Nov 2012 06:23:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TW3jD-0006t0-2r
	for coreutils@gnu.org; Wed, 07 Nov 2012 06:23:33 -0500
Received: from mx1.redhat.com ([209.132.183.28]:63511)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TW3jC-0006si-QP
	for coreutils@gnu.org; Wed, 07 Nov 2012 06:23:27 -0500
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
	(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA7BNMGZ001118
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 7 Nov 2012 06:23:23 -0500
Received: from [10.36.116.73] (ovpn-116-73.ams2.redhat.com [10.36.116.73])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id qA7BNK20007261
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 7 Nov 2012 06:23:22 -0500
Message-ID: <509A44A7.2020205@draigBrady.com>
Date: Wed, 07 Nov 2012 11:23:19 +0000
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: df --output
References: <505BD64C.7020801@bernhard-voelker.de>
	<876277akxo.fsf@rho.meyering.net>
	<505C2A06.2080704@bernhard-voelker.de>
	<87pq5f913w.fsf@rho.meyering.net>
	<505C35C9.1090207@bernhard-voelker.de>
	<505F70E2.9030006@bernhard-voelker.de>
	<87fw68x9qc.fsf@rho.meyering.net>
	<5067682C.6020403@bernhard-voelker.de>
	<506876B9.7000600@bernhard-voelker.de>
	<5099D101.5040907@draigBrady.com>
	<509A1CCC.2080203@bernhard-voelker.de>
In-Reply-To: <509A1CCC.2080203@bernhard-voelker.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qA7BNMGZ001118
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 07 Nov 2012 11:23:39 -0000

On 11/07/2012 08:33 AM, Bernhard Voelker wrote:
> On 11/07/2012 04:09 AM, P=C3=A1draig Brady wrote:
>> I've finished my review. Sorry for the delay.
>
> Thank you, no worries.
>
>> I've made a couple of adjustments in the attached df--output-adjustmen=
ts.patch
>>
>> The first is to rename --output=3Dtotal to --output=3Dsize
>> I think having `df --total --output=3Dtotal` is a bit confusing?
>
> I made it 'total' to better align with 'itotal' in the inode case,
> but ambiguity with --total is a valid point.
>
> Wouldn't it be worth to s/TOTAL_FIELD/SIZE_FIELD/ then?

good point.

>> Also I've changed df --output to show the block size in the "size" hea=
der,
>> unless -h (human) is being used.  I.E. behave with this header
>> more like the traditional df output.  I think this is needed
>> as important info is lost about the units otherwise?
>
> +1
>
>> I've put the full rebased 24 item patch set here:
>> http://www.pixelbeat.org/patches/coreutils/df--output.patch.bz2
>
> Apart from the above note, it looks all good to me. Thanks.
>
> BTW: during development, I was using the attached bulk test script
> to catch regressions between df of version 8.19 and my version.
> If you want to try it, then you'll have to adapt the variables
> DF_OLD / DF_NEW at the top of the script to fit into your environment.

That verification script passes.
I've rolled the patch set up to 3 patches here:
   http://www.pixelbeat.org/patches/coreutils/df--output-merge.patch.bz2
which I'll merge later today.

thanks again!
P=C3=A1draig.


From MAILER-DAEMON Wed Nov 07 06:49:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TW47w-0004ws-TP
	for mharc-coreutils@gnu.org; Wed, 07 Nov 2012 06:49:00 -0500
Received: from eggs.gnu.org ([208.118.235.92]:57644)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TW47t-0004tt-Uu
	for coreutils@gnu.org; Wed, 07 Nov 2012 06:48:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TW47n-0005pc-58
	for coreutils@gnu.org; Wed, 07 Nov 2012 06:48:57 -0500
Received: from moutng.kundenserver.de ([212.227.17.10]:64081)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TW47m-0005pK-RD
	for coreutils@gnu.org; Wed, 07 Nov 2012 06:48:51 -0500
Received: from [192.168.2.106] (p4FF72E70.dip.t-dialin.net [79.247.46.112])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0M8X4h-1T9sOy2g9D-00wF8W; Wed, 07 Nov 2012 12:48:49 +0100
Message-ID: <509A4A9E.6070504@bernhard-voelker.de>
Date: Wed, 07 Nov 2012 12:48:46 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
Subject: Re: df --output
References: <505BD64C.7020801@bernhard-voelker.de>
	<876277akxo.fsf@rho.meyering.net>
	<505C2A06.2080704@bernhard-voelker.de>
	<87pq5f913w.fsf@rho.meyering.net>
	<505C35C9.1090207@bernhard-voelker.de>
	<505F70E2.9030006@bernhard-voelker.de>
	<87fw68x9qc.fsf@rho.meyering.net>
	<5067682C.6020403@bernhard-voelker.de>
	<506876B9.7000600@bernhard-voelker.de>
	<5099D101.5040907@draigBrady.com>
	<509A1CCC.2080203@bernhard-voelker.de>
	<509A44A7.2020205@draigBrady.com>
In-Reply-To: <509A44A7.2020205@draigBrady.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:OjvuOpEuHMkdkKGXjI55vVPQm+wGguaJi25A97fltAv
	hFDzMSgvqWkksZI2hyxoKoj0dNh4qYEOxZnbsnbgrtN23tNCXK
	aBdFDdQ5dQV5cQuV45il/XsgUSpLC5PzIUvxVit87I54sZ+wNx
	g94GmIGtJG4ZZHmiO9FmbIvxHGAFkCjxLZlMgrfhJnhI/xB9mW
	fm3sExKKP3yvwZTt4bmmlSDRrRHi350rm3O6KQFdD7D7PxzYTY
	d6f6yBOSPzmWwszibZbZtfw2bPisTxF0EuAsa3Zb4vOsUY1rU9
	TONuxWTFGzw56q/3hq5bE+dpXE6aafKnIkxbrLvCkw5gT/55Sk
	DJfc3KLjMD8M+nrI5kGJ7CmujngGLSB1xf7K4uN7l
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.17.10
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 07 Nov 2012 11:48:59 -0000



On 11/07/2012 12:23 PM, PÃ¡draig Brady wrote:
> I've rolled the patch set up to 3 patches here:
>    http://www.pixelbeat.org/patches/coreutils/df--output-merge.patch.bz2
> which I'll merge later today.

Hi Padraig,

thanks - although I still don't see much gain to have such jumbo
commits instead of ~20 little, on-topic ones which would also make
it easier for future looks back in git history in order to find out
why something has been changed the way it has been changed, see e.g.
the build system rework of Stefano. Your choice.

BTW: should we somewhere mention why we did all this?
The discussion started with http://bugs.gnu.org/10915 .

BTW2: I think you should mention yourself in a contribution
line or alike, shouldn't you?

Have a nice day,
Berny


From MAILER-DAEMON Wed Nov 07 08:05:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TW5Jt-0000gx-4t
	for mharc-coreutils@gnu.org; Wed, 07 Nov 2012 08:05:25 -0500
Received: from eggs.gnu.org ([208.118.235.92]:43404)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TW5Jj-0000ga-0f
	for coreutils@gnu.org; Wed, 07 Nov 2012 08:05:24 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TW5Jc-0007K3-GY
	for coreutils@gnu.org; Wed, 07 Nov 2012 08:05:14 -0500
Received: from mx1.redhat.com ([209.132.183.28]:25171)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TW5Jc-0007Ga-77
	for coreutils@gnu.org; Wed, 07 Nov 2012 08:05:08 -0500
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA7D514V024392
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 7 Nov 2012 08:05:02 -0500
Received: from [10.36.116.73] (ovpn-116-73.ams2.redhat.com [10.36.116.73])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qA7D4xSB017136
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Wed, 7 Nov 2012 08:05:01 -0500
Message-ID: <509A5C7A.2080109@draigBrady.com>
Date: Wed, 07 Nov 2012 13:04:58 +0000
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: df --output
References: <505BD64C.7020801@bernhard-voelker.de>
	<876277akxo.fsf@rho.meyering.net>
	<505C2A06.2080704@bernhard-voelker.de>
	<87pq5f913w.fsf@rho.meyering.net>
	<505C35C9.1090207@bernhard-voelker.de>
	<505F70E2.9030006@bernhard-voelker.de>
	<87fw68x9qc.fsf@rho.meyering.net>
	<5067682C.6020403@bernhard-voelker.de>
	<506876B9.7000600@bernhard-voelker.de>
	<5099D101.5040907@draigBrady.com>
	<509A1CCC.2080203@bernhard-voelker.de>
	<509A44A7.2020205@draigBrady.com>
	<509A4A9E.6070504@bernhard-voelker.de>
In-Reply-To: <509A4A9E.6070504@bernhard-voelker.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qA7D514V024392
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 07 Nov 2012 13:05:24 -0000

On 11/07/2012 11:48 AM, Bernhard Voelker wrote:
>
>
> On 11/07/2012 12:23 PM, P=C3=A1draig Brady wrote:
>> I've rolled the patch set up to 3 patches here:
>>     http://www.pixelbeat.org/patches/coreutils/df--output-merge.patch.=
bz2
>> which I'll merge later today.
>
> Hi Padraig,
>
> thanks - although I still don't see much gain to have such jumbo
> commits instead of ~20 little, on-topic ones which would also make
> it easier for future looks back in git history in order to find out
> why something has been changed the way it has been changed, see e.g.
> the build system rework of Stefano. Your choice.

Yes it's a trade off between short term and long term info.
There is no value for example in keeping my whitespace fixup
patch separate, nor fixes that were particular to the local branch
(like the mem leak fix) as they may confuse future investigations.
In future when doing `git blame` we can see immediately the change
related to df --output.  Also the shortlog generated in release
announcements is more feature focused than implementation focused.
So while I'm not convinced on the roll-up approach, it seems
like the better approach going forward.

> BTW: should we somewhere mention why we did all this?
> The discussion started with http://bugs.gnu.org/10915 .

I'll add that thanks.

> BTW2: I think you should mention yourself in a contribution
> line or alike, shouldn't you?

Committer field is fine for me :)

cheers,
P=C3=A1draig.


From MAILER-DAEMON Wed Nov 07 08:10:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TW5PA-0001Uv-8y
	for mharc-coreutils@gnu.org; Wed, 07 Nov 2012 08:10:52 -0500
Received: from eggs.gnu.org ([208.118.235.92]:40728)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TW5P3-0001Rt-D2
	for coreutils@gnu.org; Wed, 07 Nov 2012 08:10:51 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TW5Ot-0000uv-JN
	for coreutils@gnu.org; Wed, 07 Nov 2012 08:10:45 -0500
Received: from moutng.kundenserver.de ([212.227.17.9]:63447)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TW5Ot-0000tn-9H
	for coreutils@gnu.org; Wed, 07 Nov 2012 08:10:35 -0500
Received: from [192.168.2.106] (p4FF72E70.dip.t-dialin.net [79.247.46.112])
	by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis)
	id 0MY28S-1Ts26w0R4C-00VDPY; Wed, 07 Nov 2012 14:10:31 +0100
Message-ID: <509A5DC4.2080806@bernhard-voelker.de>
Date: Wed, 07 Nov 2012 14:10:28 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
Subject: Re: df --output
References: <505BD64C.7020801@bernhard-voelker.de>
	<876277akxo.fsf@rho.meyering.net>
	<505C2A06.2080704@bernhard-voelker.de>
	<87pq5f913w.fsf@rho.meyering.net>
	<505C35C9.1090207@bernhard-voelker.de>
	<505F70E2.9030006@bernhard-voelker.de>
	<87fw68x9qc.fsf@rho.meyering.net>
	<5067682C.6020403@bernhard-voelker.de>
	<506876B9.7000600@bernhard-voelker.de>
	<5099D101.5040907@draigBrady.com>
	<509A1CCC.2080203@bernhard-voelker.de>
	<509A44A7.2020205@draigBrady.com>
	<509A4A9E.6070504@bernhard-voelker.de>
	<509A5C7A.2080109@draigBrady.com>
In-Reply-To: <509A5C7A.2080109@draigBrady.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:A3l0JR7K4eErp4yQICxoOxNszAngpfBTtDNBQgFFRg8
	q3bla/H+McwAiPCQG0vtiSi3MvvHUXVislBzbNKrPn+ePZisY0
	ZxwZu9ydVMt/VpIXtvBDo2LYVUDvZUxtxryhXwe1wrAbkcROpJ
	cmA2PjpSGscGQ71hXfKfXOcIsI6St7QMFpqHVewtPApKXeMsTk
	qFv16LWsGy2Eipi6jybNVSRHBbcylbRSlIG3lSQvxiTopFhePp
	y/kuUTXKVHSGVvkBEBAC+PvXGKaKWmIL0yiKGY8xV4Xe9O6P+S
	4fCJJBUT0pe597GREe7aEXm/REwV9uVGheCt2oXiE5n7OhztQf
	dIV8u44O4UKJWqkc7ObMxboh3uu5u9VHEvMRfsq8x
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.17.9
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 07 Nov 2012 13:10:51 -0000

On 11/07/2012 02:04 PM, PÃ¡draig Brady wrote:
>> thanks - although I still don't see much gain to have such jumbo
>> > commits instead of ~20 little, on-topic ones which would also make
>> > it easier for future looks back in git history in order to find out
>> > why something has been changed the way it has been changed, see e.g.
>> > the build system rework of Stefano. Your choice.
> Yes it's a trade off between short term and long term info.
> There is no value for example in keeping my whitespace fixup
> patch separate, nor fixes that were particular to the local branch
> (like the mem leak fix) as they may confuse future investigations.
> In future when doing `git blame` we can see immediately the change
> related to df --output.  Also the shortlog generated in release
> announcements is more feature focused than implementation focused.
> So while I'm not convinced on the roll-up approach, it seems
> like the better approach going forward.

Ideally, we'd have both: the bunch of single revisions and a
single merge commit, i.e., retain the development line on a
separate branch ... maybe that's overkill.

Have a nice day,
Berny



From MAILER-DAEMON Thu Nov 08 17:21:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TWaTL-0004ZC-3i
	for mharc-coreutils@gnu.org; Thu, 08 Nov 2012 17:21:15 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44119)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dwalsh@redhat.com>) id 1TWaTH-0004XZ-8U
	for coreutils@gnu.org; Thu, 08 Nov 2012 17:21:13 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <dwalsh@redhat.com>) id 1TWaTE-00082U-1S
	for coreutils@gnu.org; Thu, 08 Nov 2012 17:21:11 -0500
Received: from mx1.redhat.com ([209.132.183.28]:51141)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dwalsh@redhat.com>) id 1TWaTD-00081J-Kt
	for coreutils@gnu.org; Thu, 08 Nov 2012 17:21:07 -0500
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA8ML3Bk008921
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 8 Nov 2012 17:21:03 -0500
Received: from [10.11.10.116] (vpn-10-116.rdu.redhat.com [10.11.10.116])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qA8ML2w9015569; Thu, 8 Nov 2012 17:21:02 -0500
Message-ID: <509C304B.1030708@redhat.com>
Date: Thu, 08 Nov 2012 17:20:59 -0500
From: Daniel J Walsh <dwalsh@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121016 Thunderbird/16.0.1
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: Make mv work better with SELinux.
References: <50733664.5000503@redhat.com> <50733CC1.9000506@draigBrady.com>
	<87626jolel.fsf@rho.meyering.net> <507D5C87.3030501@redhat.com>
	<87wqyqwnik.fsf@rho.meyering.net> <5081CBB0.2020507@redhat.com>
	<877gqly15j.fsf@rho.meyering.net>
In-Reply-To: <877gqly15j.fsf@rho.meyering.net>
X-Enigmail-Version: 1.4.5
Content-Type: multipart/mixed; boundary="------------060603080104010606050305"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 08 Nov 2012 22:21:13 -0000

This is a multi-part message in MIME format.
--------------060603080104010606050305
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Another pass at the patch.

This time -Z is not optional, only --context is.

- -Z or --context indicates use default label.

- --context=CTX uses previous behavior.

You can now do

cp -aZ and cp -Za and the right thing will happen.

I have turned off the warning SELinux is disabled if you specify -Z or
- --context.  Now it will quietly ignore.  I can add a comment to the usage if
you think it is worth while.   The reason I want to do this, is to allow
people to do "mkdir -Z /var/run/XYZ" in a script and not worry about whether
or not SELinux is enabled.  Currently we have lots of init script that do
things like

mkdir -Z /var/run/XYZ
restorecon /var/run/XYZ

Where restorecon quietly exits if SELinux is disabled.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCcMEsACgkQrlYvE4MpobMtdgCfduYKrGB3Igb4XJyi6AcPW/MV
pqIAoNXqgO4Sw0lbUt6xpWOacpG2dj2N
=3JB1
-----END PGP SIGNATURE-----

--------------060603080104010606050305
Content-Type: text/x-patch;
 name="0001-build-Change-Z-opt-w-out-arg-label-target-with-defau.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0001-build-Change-Z-opt-w-out-arg-label-target-with-defau.pa";
 filename*1="tch"

diff --git a/gnulib b/gnulib
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit d245e6ddd6ab2624d0d83acd8f111454f984f50f
+Subproject commit d245e6ddd6ab2624d0d83acd8f111454f984f50f-dirty
diff --git a/src/chcon.c b/src/chcon.c
index 34e92e4..0cf8fa6 100644
--- a/src/chcon.c
+++ b/src/chcon.c
@@ -355,7 +355,7 @@ Usage: %s [OPTION]... CONTEXT FILE...\n\
 "),
         program_name, program_name, program_name);
       fputs (_("\
-Change the security context of each FILE to CONTEXT.\n\
+Change the SELinux security context of each FILE to CONTEXT.\n\
 With --reference, change the security context of each FILE to that of RFILE.\n\
 \n\
 "), stdout);
diff --git a/src/copy.c b/src/copy.c
index 16aed03..c91a756 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -60,6 +60,7 @@
 #include "write-any-file.h"
 #include "areadlink.h"
 #include "yesno.h"
+#include "selinux.h"
 
 #if USE_XATTR
 # include <attr/error_context.h>
@@ -837,41 +838,18 @@ copy_reg (char const *src_name, char const *dst_name,
          1) the src context may prohibit writing, and
          2) because it's more consistent to use the same context
          that is used when the destination file doesn't already exist.  */
-      if (x->preserve_security_context && 0 <= dest_desc)
+      if ((x->set_security_context || x->preserve_security_context) && 0 <= dest_desc)
         {
           bool all_errors = (!x->data_copy_required
                              || x->require_preserve_context);
           bool some_errors = !all_errors && !x->reduce_diagnostics;
-          security_context_t con = NULL;
 
-          if (getfscreatecon (&con) < 0)
-            {
-              if (all_errors || (some_errors && !errno_unsupported (errno)))
-                error (0, errno, _("failed to get file system create context"));
-              if (x->require_preserve_context)
-                {
-                  return_val = false;
-                  goto close_src_and_dst_desc;
-                }
-            }
-
-          if (con)
-            {
-              if (fsetfilecon (dest_desc, con) < 0)
-                {
-                  if (all_errors || (some_errors && !errno_unsupported (errno)))
-                    error (0, errno,
-                           _("failed to set the security context of %s to %s"),
-                           quote_n (0, dst_name), quote_n (1, con));
-                  if (x->require_preserve_context)
-                    {
-                      return_val = false;
-                      freecon (con);
-                      goto close_src_and_dst_desc;
-                    }
-                }
-              freecon (con);
-            }
+          if (restorecon(dst_name, 0, x->preserve_security_context) < 0)  {
+            if (all_errors || (some_errors && !errno_unsupported (errno)))
+              error (0, errno, _("failed to set file system context on %s"), quote_n (0, dst_name));
+            return_val = false;
+            goto close_src_and_dst_desc;
+          }
         }
 
       if (dest_desc < 0 && x->unlink_dest_after_failed_open)
@@ -892,6 +870,9 @@ copy_reg (char const *src_name, char const *dst_name,
 
   if (*new_dst)
     {
+      if (x->set_security_context && (! x->require_preserve_context))
+        defaultcon(dst_name, dst_mode);
+
     open_with_O_CREAT:;
 
       int open_flags = O_WRONLY | O_CREAT | O_BINARY;
@@ -974,6 +955,9 @@ copy_reg (char const *src_name, char const *dst_name,
       goto close_src_and_dst_desc;
     }
 
+  if (x->set_security_context && ! x->preserve_security_context)
+    restorecon(dst_name, 1, false);
+
   /* --attributes-only overrides --reflink.  */
   if (data_copy_required && x->reflink_mode)
     {
@@ -2092,6 +2076,9 @@ copy_internal (char const *src_name, char const *dst_name,
             emit_verbose (src_name, dst_name,
                           backup_succeeded ? dst_backup : NULL);
 
+          if (x->set_security_context)
+            restorecon(dst_name, 1, false);
+
           if (rename_succeeded)
             *rename_succeeded = true;
 
@@ -2231,6 +2218,11 @@ copy_internal (char const *src_name, char const *dst_name,
             return false;
         }
     }
+  else
+  {
+    if (x->set_security_context)
+      restorecon(dst_name, 1, false);
+  }
 
   if (S_ISDIR (src_mode))
     {
diff --git a/src/copy.h b/src/copy.h
index 440d3bb..d6044aa 100644
--- a/src/copy.h
+++ b/src/copy.h
@@ -159,6 +159,9 @@ struct cp_options
   bool preserve_timestamps;
   bool explicit_no_preserve_mode;
 
+  /* If true, attempt to set specified security context */
+  bool set_security_context;
+
   /* Enabled for mv, and for cp by the --preserve=links option.
      If true, attempt to preserve in the destination files any
      logical hard links between the source files.  If used with cp's
diff --git a/src/cp.c b/src/cp.c
index 61b31af..2bf6a7b 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -141,6 +141,7 @@ static struct option const long_opts[] =
   {"target-directory", required_argument, NULL, 't'},
   {"update", no_argument, NULL, 'u'},
   {"verbose", no_argument, NULL, 'v'},
+  {GETOPT_SELINUX_CONTEXT_OPTION_DECL},
   {GETOPT_HELP_OPTION_DECL},
   {GETOPT_VERSION_OPTION_DECL},
   {NULL, 0, NULL, 0}
@@ -229,6 +230,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
                                  destination file is missing\n\
   -v, --verbose                explain what is being done\n\
   -x, --one-file-system        stay on this file system\n\
+  -Z, --context[=CTX]      set security context of destination file to default type or to CTX if specified\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -786,6 +788,7 @@ cp_option_init (struct cp_options *x)
   x->explicit_no_preserve_mode = false;
   x->preserve_security_context = false;
   x->require_preserve_context = false;
+  x->set_security_context = false;
   x->preserve_xattr = false;
   x->reduce_diagnostics = false;
   x->require_preserve_xattr = false;
@@ -877,8 +880,10 @@ decode_preserve_arg (char const *arg, struct cp_options *x, bool on_off)
           break;
 
         case PRESERVE_CONTEXT:
-          x->preserve_security_context = on_off;
-          x->require_preserve_context = on_off;
+          if (! x->set_security_context) {
+            x->preserve_security_context = on_off;
+            x->require_preserve_context = on_off;
+          }
           break;
 
         case PRESERVE_XATTR:
@@ -892,7 +897,7 @@ decode_preserve_arg (char const *arg, struct cp_options *x, bool on_off)
           x->preserve_ownership = on_off;
           x->preserve_links = on_off;
           x->explicit_no_preserve_mode = !on_off;
-          if (selinux_enabled)
+          if (selinux_enabled && (! x->set_security_context))
             x->preserve_security_context = on_off;
           x->preserve_xattr = on_off;
           break;
@@ -935,7 +940,7 @@ main (int argc, char **argv)
      we'll actually use backup_suffix_string.  */
   backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
 
-  while ((c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:T",
+  while ((c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:TZ",
                            long_opts, NULL))
          != -1)
     {
@@ -962,7 +967,7 @@ main (int argc, char **argv)
           x.preserve_mode = true;
           x.preserve_timestamps = true;
           x.require_preserve = true;
-          if (selinux_enabled)
+          if (selinux_enabled && (! x.set_security_context))
              x.preserve_security_context = true;
           x.preserve_xattr = true;
           x.reduce_diagnostics = true;
@@ -1092,6 +1097,23 @@ main (int argc, char **argv)
           x.one_file_system = true;
           break;
 
+
+        case 'Z':
+          /* politely decline if we're not on a selinux-enabled kernel. */
+          if( selinux_enabled ) {
+                  if (optarg) {
+                          /* if there's a security_context given set new path
+                             components to that context, too */
+                          if ( setfscreatecon(optarg) < 0 ) {
+                                  (void) fprintf(stderr, _("cannot set default security context %s\n"), optarg);
+                                  exit( 1 );
+                          }
+                  }
+                  x.set_security_context = true;
+                  x.preserve_security_context = false;
+          }
+         break;
+
         case 'S':
           make_backups = true;
           backup_suffix_string = optarg;
diff --git a/src/install.c b/src/install.c
index 8ea5491..0b9b317 100644
--- a/src/install.c
+++ b/src/install.c
@@ -280,6 +280,7 @@ cp_option_init (struct cp_options *x)
   x->data_copy_required = true;
   x->require_preserve = false;
   x->require_preserve_context = false;
+  x->set_security_context = false;
   x->require_preserve_xattr = false;
   x->recursive = false;
   x->sparse_mode = SPARSE_AUTO;
@@ -641,8 +642,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
 "), stdout);
       fputs (_("\
       --preserve-context  preserve SELinux security context\n\
-  -Z, --context=CONTEXT  set SELinux security context of files and directories\
-\n\
+  -Z, --context[=CTX]      set security context of destination file to default type or to CTX if specified\n\
 "), stdout);
 
       fputs (HELP_OPTION_DESCRIPTION, stdout);
@@ -783,7 +783,7 @@ main (int argc, char **argv)
      we'll actually use backup_suffix_string.  */
   backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
 
-  while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pt:TvS:Z:", long_options,
+  while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pt:TvS:Z", long_options,
                               NULL)) != -1)
     {
       switch (optc)
@@ -860,18 +860,20 @@ main (int argc, char **argv)
                              "this kernel is not SELinux-enabled"));
               break;
             }
+          if ( x.set_security_context || scontext ) {
+             (void) fprintf(stderr, "%s: cannot force target context and preserve it\n", argv[0]);
+             exit( 1 );
+          }
           x.preserve_security_context = true;
-          use_default_selinux_context = false;
           break;
         case 'Z':
-          if ( ! selinux_enabled)
-            {
-              error (0, 0, _("WARNING: ignoring --context (-Z); "
-                             "this kernel is not SELinux-enabled"));
-              break;
-            }
-          scontext = optarg;
-          use_default_selinux_context = false;
+          if ( selinux_enabled )
+          {
+                  if (optarg)
+                          scontext = optarg;
+                  else
+                          x.set_security_context = true;
+          }
           break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
diff --git a/src/local.mk b/src/local.mk
index f40f681..113544a 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -306,6 +306,10 @@ RELEASE_YEAR = \
   `sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \
     $(top_srcdir)/lib/version-etc.c`
 
+selinux_sources = \
+  src/selinux.c \
+  src/selinux.h
+
 copy_sources = \
   src/copy.c \
   src/cp-hash.c \
@@ -317,12 +321,12 @@ copy_sources = \
 # to install before applying any user-specified name transformations.
 
 transform = s/ginstall/install/; $(program_transform_name)
-src_ginstall_SOURCES = src/install.c src/prog-fprintf.c $(copy_sources)
+src_ginstall_SOURCES = src/install.c src/prog-fprintf.c $(copy_sources) $(selinux_sources)
 
 # This is for the '[' program.  Automake transliterates '[' and '/' to '_'.
 src___SOURCES = src/lbracket.c
 
-src_cp_SOURCES = src/cp.c $(copy_sources)
+src_cp_SOURCES = src/cp.c $(copy_sources) $(selinux_sources)
 src_dir_SOURCES = src/ls.c src/ls-dir.c
 src_vdir_SOURCES = src/ls.c src/ls-vdir.c
 src_id_SOURCES = src/id.c src/group-list.c
@@ -335,12 +339,15 @@ src_kill_SOURCES = src/kill.c src/operand2sig.c
 src_realpath_SOURCES = src/realpath.c src/relpath.c src/relpath.h
 src_timeout_SOURCES = src/timeout.c src/operand2sig.c
 
-src_mv_SOURCES = src/mv.c src/remove.c $(copy_sources)
+src_mv_SOURCES = src/mv.c src/remove.c $(copy_sources) $(selinux_sources)
 src_rm_SOURCES = src/rm.c src/remove.c
 
-src_mkdir_SOURCES = src/mkdir.c src/prog-fprintf.c
+src_mkdir_SOURCES = src/mkdir.c src/prog-fprintf.c $(selinux_sources)
 src_rmdir_SOURCES = src/rmdir.c src/prog-fprintf.c
 
+src_mkfifo_SOURCES = src/mkfifo.c $(selinux_sources)
+src_mknod_SOURCES = src/mknod.c $(selinux_sources)
+
 src_df_SOURCES = src/df.c src/find-mount-point.c
 src_stat_SOURCES = src/stat.c src/find-mount-point.c
 
diff --git a/src/mkdir.c b/src/mkdir.c
index 32f79d4..548030c 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -29,6 +29,7 @@
 #include "prog-fprintf.h"
 #include "quote.h"
 #include "savewd.h"
+#include "selinux.h"
 
 /* The official name of this program (e.g., no 'g' prefix).  */
 #define PROGRAM_NAME "mkdir"
@@ -65,8 +66,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -m, --mode=MODE   set file mode (as in chmod), not a=rwx - umask\n\
   -p, --parents     no error if existing, make parent directories as needed\n\
   -v, --verbose     print a message for each created directory\n\
-  -Z, --context=CTX  set the SELinux security context of each created\n\
-                      directory to CTX\n\
+  -Z, --context[=CTX]  set the SELinux security context of each created\n\
+                      directory to default type or to CTX if specified\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -91,6 +92,9 @@ struct mkdir_options
   /* File mode bits affected by MODE.  */
   mode_t mode_bits;
 
+  /* Set the SELinux File Context.  */
+  int set_security_context;
+
   /* If not null, format to use when reporting newly made directories.  */
   char const *created_directory_format;
 };
@@ -113,6 +117,9 @@ static int
 make_ancestor (char const *dir, char const *component, void *options)
 {
   struct mkdir_options const *o = options;
+
+  if (o->set_security_context)
+    defaultcon(dir, S_IFDIR);
   int r = mkdir (component, o->ancestor_mode);
   if (r == 0)
     {
@@ -146,6 +153,7 @@ main (int argc, char **argv)
   options.mode = S_IRWXUGO;
   options.mode_bits = 0;
   options.created_directory_format = NULL;
+  options.set_security_context = false;
 
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
@@ -155,7 +163,7 @@ main (int argc, char **argv)
 
   atexit (close_stdout);
 
-  while ((optc = getopt_long (argc, argv, "pm:vZ:", longopts, NULL)) != -1)
+  while ((optc = getopt_long (argc, argv, "pm:vZ", longopts, NULL)) != -1)
     {
       switch (optc)
         {
@@ -169,7 +177,13 @@ main (int argc, char **argv)
           options.created_directory_format = _("created directory %s");
           break;
         case 'Z':
-          scontext = optarg;
+          if ( is_selinux_enabled() > 0 )
+          {
+            if (optarg)
+              scontext = optarg;
+            else
+              options.set_security_context = true;
+          }
           break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
diff --git a/src/mkfifo.c b/src/mkfifo.c
index e524c44..3253640 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -26,6 +26,7 @@
 #include "error.h"
 #include "modechange.h"
 #include "quote.h"
+#include "selinux.h"
 
 /* The official name of this program (e.g., no 'g' prefix).  */
 #define PROGRAM_NAME "mkfifo"
@@ -60,7 +61,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -m, --mode=MODE    set file permission bits to MODE, not a=rw - umask\n\
 "), stdout);
       fputs (_("\
-  -Z, --context=CTX  set the SELinux security context of each NAME to CTX\n\
+  -Z, --context[=CTX]  set the SELinux security context of each NAME to default type or CTX if specified\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -74,6 +75,7 @@ main (int argc, char **argv)
 {
   mode_t newmode;
   char const *specified_mode = NULL;
+  int set_security_context = false;
   int exit_status = EXIT_SUCCESS;
   int optc;
   security_context_t scontext = NULL;
@@ -86,7 +88,7 @@ main (int argc, char **argv)
 
   atexit (close_stdout);
 
-  while ((optc = getopt_long (argc, argv, "m:Z:", longopts, NULL)) != -1)
+  while ((optc = getopt_long (argc, argv, "m:Z", longopts, NULL)) != -1)
     {
       switch (optc)
         {
@@ -94,7 +96,13 @@ main (int argc, char **argv)
           specified_mode = optarg;
           break;
         case 'Z':
-          scontext = optarg;
+          if ( is_selinux_enabled() > 0 )
+          {
+            if (optarg)
+              scontext = optarg;
+            else
+              set_security_context = true;
+          }
           break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
@@ -128,6 +136,8 @@ main (int argc, char **argv)
     }
 
   for (; optind < argc; ++optind)
+    if (set_security_context)
+      defaultcon(argv[optind], S_IFIFO);
     if (mkfifo (argv[optind], newmode) != 0)
       {
         error (0, errno, _("cannot create fifo %s"), quote (argv[optind]));
diff --git a/src/mknod.c b/src/mknod.c
index dc158b4..6977ba8 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -27,6 +27,7 @@
 #include "modechange.h"
 #include "quote.h"
 #include "xstrtol.h"
+#include "selinux.h"
 
 /* The official name of this program (e.g., no 'g' prefix).  */
 #define PROGRAM_NAME "mknod"
@@ -62,7 +63,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -m, --mode=MODE    set file permission bits to MODE, not a=rw - umask\n\
 "), stdout);
       fputs (_("\
-  -Z, --context=CTX  set the SELinux security context of NAME to CTX\n\
+  -Z, --context[=CTX]  set the SELinux security context of NAME to default type or to CTX if specified\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -94,6 +95,7 @@ main (int argc, char **argv)
   int expected_operands;
   mode_t node_type;
   security_context_t scontext = NULL;
+  int set_security_context = false;
 
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
@@ -103,7 +105,7 @@ main (int argc, char **argv)
 
   atexit (close_stdout);
 
-  while ((optc = getopt_long (argc, argv, "m:Z:", longopts, NULL)) != -1)
+  while ((optc = getopt_long (argc, argv, "m:Z", longopts, NULL)) != -1)
     {
       switch (optc)
         {
@@ -111,7 +113,13 @@ main (int argc, char **argv)
           specified_mode = optarg;
           break;
         case 'Z':
-          scontext = optarg;
+          if ( is_selinux_enabled() > 0 )
+          {
+            if (optarg)
+              scontext = optarg;
+            else
+              set_security_context = true;
+          }
           break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
@@ -212,6 +220,9 @@ main (int argc, char **argv)
           error (EXIT_FAILURE, 0, _("invalid device %s %s"), s_major, s_minor);
 #endif
 
+        if (set_security_context)
+          defaultcon(argv[optind], node_type);
+
         if (mknod (argv[optind], newmode | node_type, device) != 0)
           error (EXIT_FAILURE, errno, "%s", quote (argv[optind]));
       }
diff --git a/src/mv.c b/src/mv.c
index 5b08fdd..683c649 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -55,6 +55,7 @@ static bool remove_trailing_slashes;
 static struct option const long_options[] =
 {
   {"backup", optional_argument, NULL, 'b'},
+  {"context", no_argument, NULL, 'Z'},
   {"force", no_argument, NULL, 'f'},
   {"interactive", no_argument, NULL, 'i'},
   {"no-clobber", no_argument, NULL, 'n'},
@@ -120,6 +121,7 @@ cp_option_init (struct cp_options *x)
   x->preserve_timestamps = true;
   x->explicit_no_preserve_mode= false;
   x->preserve_security_context = selinux_enabled;
+  x->set_security_context = false;
   x->reduce_diagnostics = false;
   x->data_copy_required = true;
   x->require_preserve = false;  /* FIXME: maybe make this an option */
@@ -317,6 +319,7 @@ If you specify more than one of -i, -f, -n, only the final one takes effect.\n\
                                  than the destination file or when the\n\
                                  destination file is missing\n\
   -v, --verbose                explain what is being done\n\
+  -Z, --context                set security context of destination file to default type\n \
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -351,6 +354,7 @@ main (int argc, char **argv)
   bool no_target_directory = false;
   int n_files;
   char **file;
+  bool selinux_enabled = (0 < is_selinux_enabled ());
 
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
@@ -369,7 +373,7 @@ main (int argc, char **argv)
      we'll actually use backup_suffix_string.  */
   backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
 
-  while ((c = getopt_long (argc, argv, "bfint:uvS:T", long_options, NULL))
+  while ((c = getopt_long (argc, argv, "bfint:uvS:TZ", long_options, NULL))
          != -1)
     {
       switch (c)
@@ -418,6 +422,13 @@ main (int argc, char **argv)
           make_backups = true;
           backup_suffix_string = optarg;
           break;
+        case 'Z':
+          /* politely decline if we're not on a selinux-enabled kernel. */
+          if( selinux_enabled ) {
+            x.preserve_security_context = false;
+            x.set_security_context = true;
+          }
+          break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
         default:
diff --git a/src/runcon.c b/src/runcon.c
index 875441f..7162f65 100644
--- a/src/runcon.c
+++ b/src/runcon.c
@@ -85,7 +85,7 @@ Usage: %s CONTEXT COMMAND [args]\n\
   or:  %s [ -c ] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n\
 "), program_name, program_name);
       fputs (_("\
-Run a program in a different security context.\n\
+Run a program in a different SELinux security context.\n\
 With neither CONTEXT nor COMMAND, print the current security context.\n\
 \n\
   CONTEXT            Complete security context\n\
diff --git a/src/system.h b/src/system.h
index 06cc803..b5d750c 100644
--- a/src/system.h
+++ b/src/system.h
@@ -330,7 +330,7 @@ enum
 #define GETOPT_VERSION_OPTION_DECL \
   "version", no_argument, NULL, GETOPT_VERSION_CHAR
 #define GETOPT_SELINUX_CONTEXT_OPTION_DECL \
-  "context", required_argument, NULL, 'Z'
+  "context", optional_argument, NULL, 'Z'
 
 #define case_GETOPT_HELP_CHAR			\
   case GETOPT_HELP_CHAR:			\

--------------060603080104010606050305--


From MAILER-DAEMON Thu Nov 08 17:29:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TWabW-0005bq-17
	for mharc-coreutils@gnu.org; Thu, 08 Nov 2012 17:29:42 -0500
Received: from eggs.gnu.org ([208.118.235.92]:34750)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TWabT-0005ZG-P5
	for coreutils@gnu.org; Thu, 08 Nov 2012 17:29:40 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TWabS-0001ca-OD
	for coreutils@gnu.org; Thu, 08 Nov 2012 17:29:39 -0500
Received: from moutng.kundenserver.de ([212.227.17.9]:61102)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TWabS-0001cA-Dx
	for coreutils@gnu.org; Thu, 08 Nov 2012 17:29:38 -0500
Received: from [192.168.2.106] (p4FF75E22.dip.t-dialin.net [79.247.94.34])
	by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis)
	id 0MZfLS-1TlW9u0gF4-00L2FH; Thu, 08 Nov 2012 23:29:36 +0100
Message-ID: <509C324F.3030104@bernhard-voelker.de>
Date: Thu, 08 Nov 2012 23:29:35 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: configure && make dist fails
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:jKvixxXBwxB3Y6ZRa4KyJIJkRDhnmTxsm26ooVdIwJO
	mANU9Y7EnrGsYkBvHkOLlOemy4bONTJUArVsWHitYFYhBEHqWA
	f8jKMgcNUi4IMxnb1Ph27RDPQGLU1msN1hAawHatn1MBTB1jYT
	f4YDmARvBJsrVKsn+ijLx1EPC/z8M/pfjySDzRWH1QAE90Vh1A
	NsIlAywKkg5f47T9iEQVqRZHYiFp3t8TIW1I385jm65GJumxmj
	+qcpPA67TbkYD3O2wBWg6760yLbpX5VYtYE15KlyeN3i2ZFTul
	icEqP5mz0PaMRJk1uy/f/Z36Tu5oIgDKpm5F+O8bjdcfF8O1Qo
	P7pJkhySa7tuWl/lbc0kadNLhtUian+RYcgP1hLGG
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.17.9
Cc: Philipp Thomas <pth@suse.de>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 08 Nov 2012 22:29:40 -0000

Reported by Philipp Thomas.

With the new build system, when I omit the explicit 'make' step,
the following 'make dist' fails.

  $ git clean -xdf
  $ ./bootstrap
  $ ./configure
  $ # ==== NO 'make' HERE ====
  $ make dist
  [...]
  make  \
    top_distdir="coreutils-8.20.20-e73bb" distdir="coreutils-8.20.20-e73bb" \
    dist-info dist-hook
  make[2]: Entering directory `/media/sdb5/berny/git/coreutils'
    MAKEINFO doc/coreutils.info
    GEN      gen-ChangeLog
  gitlog-to-changelog: warning: missing email address for Niels Möller
    CC       lib/set-mode-acl.o
    CC       lib/copy-acl.o
    CC       lib/file-has-acl.o
    CC       lib/allocator.o
    CC       lib/areadlink.o
    CC       lib/areadlink-with-size.o
    CC       lib/areadlinkat.o
    CC       lib/argmatch.o
    CC       lib/argv-iter.o
  In file included from lib/argv-iter.c:20:0:
  lib/argv-iter.h:21:25: fatal error: arg-nonnull.h: No such file or directory
  compilation terminated.
  make[2]: *** [lib/argv-iter.o] Error 1
  make[2]: Leaving directory `/media/sdb5/berny/git/coreutils'
  make[1]: *** [distdir] Error 2
  make[1]: Leaving directory `/media/sdb5/berny/git/coreutils'
  make: *** [dist] Error 2

The same happens with a dist tarball:

 $ tar xf ~/coreutils/coreutils-8.20.20-e73bb.tar.xz
 $ cd coreutils-8.20.20-e73bb
 $ ./configure
 $ make dist
 [...]
 make: *** [dist] Error 2


Isn't this supposed to work?

Have a nice day,
Berny


From MAILER-DAEMON Thu Nov 08 18:42:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TWbk0-00017Q-HZ
	for mharc-coreutils@gnu.org; Thu, 08 Nov 2012 18:42:32 -0500
Received: from eggs.gnu.org ([208.118.235.92]:36069)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TWbjy-00017K-G5
	for coreutils@gnu.org; Thu, 08 Nov 2012 18:42:31 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TWbjx-0007nL-E0
	for coreutils@gnu.org; Thu, 08 Nov 2012 18:42:30 -0500
Received: from mx1.redhat.com ([209.132.183.28]:65338)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TWbjx-0007nA-5j
	for coreutils@gnu.org; Thu, 08 Nov 2012 18:42:29 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA8NgQ65010949
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 8 Nov 2012 18:42:26 -0500
Received: from [10.36.116.27] (ovpn-116-27.ams2.redhat.com [10.36.116.27])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qA8NgOU9001362
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Thu, 8 Nov 2012 18:42:25 -0500
Message-ID: <509C435F.7040107@draigBrady.com>
Date: Thu, 08 Nov 2012 23:42:23 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: Make mv work better with SELinux.
References: <50733664.5000503@redhat.com> <50733CC1.9000506@draigBrady.com>
	<87626jolel.fsf@rho.meyering.net> <507D5C87.3030501@redhat.com>
	<87wqyqwnik.fsf@rho.meyering.net> <5081CBB0.2020507@redhat.com>
	<877gqly15j.fsf@rho.meyering.net> <509C304B.1030708@redhat.com>
In-Reply-To: <509C304B.1030708@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qA8NgQ65010949
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 08 Nov 2012 23:42:31 -0000

On 11/08/2012 10:20 PM, Daniel J Walsh wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Another pass at the patch.
>
> This time -Z is not optional, only --context is.
>
> - -Z or --context indicates use default label.
>
> - --context=3DCTX uses previous behavior.
>
> You can now do
>
> cp -aZ and cp -Za and the right thing will happen.

Excellent.

> I have turned off the warning SELinux is disabled if you specify -Z or
> - --context.  Now it will quietly ignore.  I can add a comment to the u=
sage if
> you think it is worth while.   The reason I want to do this, is to allo=
w
> people to do "mkdir -Z /var/run/XYZ" in a script and not worry about wh=
ether
> or not SELinux is enabled.  Currently we have lots of init script that =
do
> things like
>
> mkdir -Z /var/run/XYZ
> restorecon /var/run/XYZ
>
> Where restorecon quietly exits if SELinux is disabled.

Yes that makes sense.
--context without args just means set the system default
for the path, which can be nothing if SELinux is disabled.

I've no time to review now,
but hope to review fully and merge over the weekend.
I might get time to do some docs and tests too.

thanks!
P=E1draig.


From MAILER-DAEMON Fri Nov 09 02:36:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TWj8M-0002vO-Q5
	for mharc-coreutils@gnu.org; Fri, 09 Nov 2012 02:36:10 -0500
Received: from eggs.gnu.org ([208.118.235.92]:42670)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TWj8K-0002tT-6A
	for coreutils@gnu.org; Fri, 09 Nov 2012 02:36:09 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TWj8J-0000V1-9Q
	for coreutils@gnu.org; Fri, 09 Nov 2012 02:36:08 -0500
Received: from mx.meyering.net ([88.168.87.75]:53861)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TWj8J-0000Us-2Y
	for coreutils@gnu.org; Fri, 09 Nov 2012 02:36:07 -0500
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id CE87160121;
	Fri,  9 Nov 2012 08:36:05 +0100 (CET)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: FYI: updated to latest gnulib --- almost, but not quite
Date: Fri, 09 Nov 2012 08:36:05 +0100
Message-ID: <87y5ibw7mi.fsf@rho.meyering.net>
Lines: 15
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 88.168.87.75
Cc: Paul Eggert <eggert@cs.ucla.edu>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 09 Nov 2012 07:36:09 -0000

I was going to write this:

  FYI, I've just updated coreutils to use
  the latest from gnulib, after fixing a couple of
  minor problems in gnulib.  Now, at least for me,
  "make check" and "make syntax-check" pass with this
  latest version of gnulib (on x86_64/F17 and i686/F18)

But then I saw a some new utimes-related test failures.
And again.  But not every time.

I saw failures on 2 of 3 "make -j5 check" runs on
an old 2-core F18/i686+SSD/ext4.  But when I revert the last
two changes to gnulib's tests/nap.h, I saw 10 successes in a row,
so I'd revert those if I had more time now.


From MAILER-DAEMON Fri Nov 09 04:13:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TWkeg-0008Ky-Ck
	for mharc-coreutils@gnu.org; Fri, 09 Nov 2012 04:13:38 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33544)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1TWkeb-0008Kr-7T
	for coreutils@gnu.org; Fri, 09 Nov 2012 04:13:37 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1TWkea-0002rx-2b
	for coreutils@gnu.org; Fri, 09 Nov 2012 04:13:33 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:51020)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1TWkeZ-0002rs-Qd
	for coreutils@gnu.org; Fri, 09 Nov 2012 04:13:31 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 41594A60001
	for <coreutils@gnu.org>; Fri,  9 Nov 2012 01:13:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Hk+kdiTyp5Sh for <coreutils@gnu.org>;
	Fri,  9 Nov 2012 01:13:30 -0800 (PST)
Received: from [192.168.1.3] (pool-108-23-119-2.lsanca.fios.verizon.net
	[108.23.119.2])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id A688739E8105
	for <coreutils@gnu.org>; Fri,  9 Nov 2012 01:13:30 -0800 (PST)
Message-ID: <509CC93C.9040802@cs.ucla.edu>
Date: Fri, 09 Nov 2012 01:13:32 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:16.0) Gecko/20121028 Thunderbird/16.0.2
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: [PATCH] df: port the new df test to POSIX sed, larger file systems
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 131.179.128.62
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 09 Nov 2012 09:13:37 -0000

* tests/df/df-output.sh: For the test "df -B1K --output=size",
do not assume that the file system size fits in 9 bytes; it
might be larger than that, so omit leading space.  Also, use
portable 'sed' commands: POSIX says sed commands inside { } should
all end in newline.
---
 tests/df/df-output.sh | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/tests/df/df-output.sh b/tests/df/df-output.sh
index 0b40b28..f586334 100644
--- a/tests/df/df-output.sh
+++ b/tests/df/df-output.sh
@@ -72,11 +72,17 @@ EOF
 
 df -h --o=source,fstype,size,used,avail,pcent \
  --o=itotal,iused,iavail,ipcent,target '.' >out || fail=1
-sed -e '1 {s/ [ ]*/ /g;q}' out > out2
+sed -e '1 {
+          s/ [ ]*/ /g
+          q
+        }' out > out2
 compare exp out2 || fail=1
 
 df -h --output '.' >out || fail=1
-sed -e '1 {s/ [ ]*/ /g;q}' out > out2
+sed -e '1 {
+          s/ [ ]*/ /g
+          q
+        }' out > out2
 compare exp out2 || fail=1
 
 # Ensure that --output indicates the block size
@@ -86,7 +92,11 @@ cat <<\EOF > exp || framework_failure_
 EOF
 
 df -B1K --output=size '.' >out || fail=1
-sed -e '1 {s/ [ ]*/ /g;q}' out > out2
+sed -e '1 {
+          s/ [ ]*/ /g
+          s/^ //
+          q
+        }' out > out2
 compare exp out2 || fail=1
 
 # Ensure that the grand total line now contains a "-" in the TARGET field ...
@@ -95,7 +105,11 @@ cat <<\EOF > exp || framework_failure_
 EOF
 
 df --output=source,target --total '.' >out || fail=1
-sed -n -e '3 {s/^total[ ]*//;p;q}' out > out2
+sed -n -e '3 {
+             s/^total[ ]*//
+             p
+             q
+           }' out > out2
 compare exp out2 || fail=1
 
 # ... but it should read "total" if there is no SOURCE field.
@@ -104,7 +118,10 @@ total
 EOF
 
 df --output=target --total '.' >out || fail=1
-sed -n -e '3 {p;q}' out > out2
+sed -n -e '3 {
+             p
+             q
+           }' out > out2
 compare exp out2 || fail=1
 
 # Ensure that --output is mentioned in the usage.
-- 
1.7.11.7



From MAILER-DAEMON Fri Nov 09 04:23:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TWkoX-0001xF-To
	for mharc-coreutils@gnu.org; Fri, 09 Nov 2012 04:23:49 -0500
Received: from eggs.gnu.org ([208.118.235.92]:37083)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1TWkoV-0001x7-Oq
	for coreutils@gnu.org; Fri, 09 Nov 2012 04:23:48 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1TWkoP-0006LP-S2
	for coreutils@gnu.org; Fri, 09 Nov 2012 04:23:47 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:51292)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1TWkoP-0006LK-Jf
	for coreutils@gnu.org; Fri, 09 Nov 2012 04:23:41 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 083E7A60001;
	Fri,  9 Nov 2012 01:23:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id iM6kleErYWmu; Fri,  9 Nov 2012 01:23:40 -0800 (PST)
Received: from [192.168.1.3] (pool-108-23-119-2.lsanca.fios.verizon.net
	[108.23.119.2])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id D18A639E8105;
	Fri,  9 Nov 2012 01:23:39 -0800 (PST)
Message-ID: <509CCB9D.70909@cs.ucla.edu>
Date: Fri, 09 Nov 2012 01:23:41 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:16.0) Gecko/20121028 Thunderbird/16.0.2
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: FYI: updated to latest gnulib --- almost, but not quite
References: <87y5ibw7mi.fsf@rho.meyering.net>
In-Reply-To: <87y5ibw7mi.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 131.179.128.62
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 09 Nov 2012 09:23:48 -0000

On 11/08/2012 11:36 PM, Jim Meyering wrote:
> I saw failures on 2 of 3 "make -j5 check" runs on
> an old 2-core F18/i686+SSD/ext4.  But when I revert the last
> two changes to gnulib's tests/nap.h, I saw 10 successes in a row,
> so I'd revert those if I had more time now.

Feel free to revert them; they're just performance improvements
for the tests, and aren't crucial.  That being said,
I'm not observing problems on my old 2-core host
(Ubuntu 12.04/x86/ext4) nor on my newer 4-core host
(Fedora 17/x86-64/ext4).  I'm not using SSDs.

I have the sneaking suspicion that this whole area is pretty
buggy, and that the updated test (which runs faster) is more
likely to expose race-condition bugs in the underlying system.
Whether this is a win for coreutils is another matter....

BTW I did run into trouble when I tried to reproduce the problem.
I followed the instructions in README-hacking:

        $ ./bootstrap
        $ git submodule foreach git pull origin master
        $ git commit -m 'build: update gnulib submodule to latest' gnulib

but the "make check" immediately failed because of the
public-submodule-commit rule.  I worked around this by
commenting out that rule's body.  Is there some better way
to try out the latest gnulib these days?

Also, I ran into a problem with the gnulib getlogin test
(I fixed by gnulib checkin
<http://lists.gnu.org/archive/html/bug-gnulib/2012-11/msg00049.html>)
and found a couple of problems in the recently added df test
(I fixed with coreutils git commit
a395b637a62a380f2d11e12f8c9e0eceb9e86a8f).


From MAILER-DAEMON Fri Nov 09 04:50:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TWlEL-00025K-9p
	for mharc-coreutils@gnu.org; Fri, 09 Nov 2012 04:50:29 -0500
Received: from eggs.gnu.org ([208.118.235.92]:48586)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TWlED-000236-TN
	for coreutils@gnu.org; Fri, 09 Nov 2012 04:50:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TWlE8-0007Ie-7v
	for coreutils@gnu.org; Fri, 09 Nov 2012 04:50:21 -0500
Received: from moutng.kundenserver.de ([212.227.126.171]:54979)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TWlE7-0007IQ-Uv
	for coreutils@gnu.org; Fri, 09 Nov 2012 04:50:16 -0500
Received: from [192.168.2.106] (p4FF7421D.dip.t-dialin.net [79.247.66.29])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0LcJLm-1T5iPa3IMY-00jqmu; Fri, 09 Nov 2012 10:50:07 +0100
Message-ID: <509CD1CA.4040501@bernhard-voelker.de>
Date: Fri, 09 Nov 2012 10:50:02 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: [PATCH] df: port the new df test to POSIX sed, larger file systems
References: <509CC93C.9040802@cs.ucla.edu>
In-Reply-To: <509CC93C.9040802@cs.ucla.edu>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:5Cg0GBGWmrA7DyThLjvfr8PUjI8/2kFNF1yrhf9dYus
	WEPV7usyS0k/kQOtEvU+aM/eqIkU27pk//FK1g3k7kCYACwF8Z
	KUJqhVGlYXpLKFA+PEKyfpYQSHMUh/tsBUKHhUcFvDZ7jVXW8A
	KOjim975Z1r9Jeke3f9qbBX0DdP+rrqYiX46om3mq5HXLVjFeb
	eW0x0oIJQQrugn7zcD9dMtLJmIOtr0lGrA9pqte2mo1SuCAgiB
	odxH0G2GWFLAWXI+F6BpdfJ9V0+htkiuu11wUekqeUQWMwhP8s
	fFftSC2tEchD2iEbdQSQIrWgaUwgAMqaaY6KJF38Xo8IRM8xxT
	dTbsamKk5j9CwDaey4slBPHmhEMUu/9M2HS/U7Veq
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.126.171
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 09 Nov 2012 09:50:27 -0000

On 11/09/2012 10:13 AM, Paul Eggert wrote:
> * tests/df/df-output.sh: For the test "df -B1K --output=size",
> do not assume that the file system size fits in 9 bytes; it
> might be larger than that, so omit leading space.  Also, use
> portable 'sed' commands: POSIX says sed commands inside { } should
> all end in newline.

Good catch, thanks.
My file system for '.' is too small for this test to fail ... ;-)

> -sed -e '1 {s/ [ ]*/ /g;q}' out > out2
> +sed -e '1 {
> +          s/ [ ]*/ /g
> +          s/^ //
> +          q
> +        }' out > out2

What about simplifying the first s/... to eliminate all blanks?

-sed -e '1 {s/ [ ]*/ /g;q}' out > out2
+sed -e '1 {
+          s/ //g
+          q
+        }' out > out2

Have a nice day,
Berny


From MAILER-DAEMON Fri Nov 09 04:57:11 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TWlKp-0005Tx-Kq
	for mharc-coreutils@gnu.org; Fri, 09 Nov 2012 04:57:11 -0500
Received: from eggs.gnu.org ([208.118.235.92]:54602)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TWlKl-0005LB-Hs
	for coreutils@gnu.org; Fri, 09 Nov 2012 04:57:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TWlKf-0000xV-Nu
	for coreutils@gnu.org; Fri, 09 Nov 2012 04:57:07 -0500
Received: from mx1.redhat.com ([209.132.183.28]:57872)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TWlKf-0000xO-FR
	for coreutils@gnu.org; Fri, 09 Nov 2012 04:57:01 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA99uhrj029603
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 9 Nov 2012 04:56:43 -0500
Received: from [10.36.116.19] (ovpn-116-19.ams2.redhat.com [10.36.116.19])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qA99ueW0009182
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Fri, 9 Nov 2012 04:56:42 -0500
Message-ID: <509CD357.6060809@draigBrady.com>
Date: Fri, 09 Nov 2012 09:56:39 +0000
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] df: port the new df test to POSIX sed, larger file systems
References: <509CC93C.9040802@cs.ucla.edu>
	<509CD1CA.4040501@bernhard-voelker.de>
In-Reply-To: <509CD1CA.4040501@bernhard-voelker.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qA99uhrj029603
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Paul Eggert <eggert@cs.ucla.edu>, Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 09 Nov 2012 09:57:08 -0000

On 11/09/2012 09:50 AM, Bernhard Voelker wrote:
> On 11/09/2012 10:13 AM, Paul Eggert wrote:
>> * tests/df/df-output.sh: For the test "df -B1K --output=3Dsize",
>> do not assume that the file system size fits in 9 bytes; it
>> might be larger than that, so omit leading space.  Also, use
>> portable 'sed' commands: POSIX says sed commands inside { } should
>> all end in newline.
>
> Good catch, thanks.
> My file system for '.' is too small for this test to fail ... ;-)

Yes thanks for the fix Paul.

>> -sed -e '1 {s/ [ ]*/ /g;q}' out > out2
>> +sed -e '1 {
>> +          s/ [ ]*/ /g
>> +          s/^ //
>> +          q
>> +        }' out > out2
>
> What about simplifying the first s/... to eliminate all blanks?
>
> -sed -e '1 {s/ [ ]*/ /g;q}' out > out2
> +sed -e '1 {
> +          s/ //g
> +          q
> +        }' out > out2

I suppose you could simplify them all to a single line again by
using coreutils head, tail and tr instead of sed?

replace sed 1 ... with: head -n1 | tr -s ' '
and sed 3... with: tail -n1 | tr -s ' '
and the right aligned df -B1K one with: head -n1 | tr -d ' '

cheers,
P=C3=A1draig.


From MAILER-DAEMON Fri Nov 09 08:43:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TWos4-0007MD-6D
	for mharc-coreutils@gnu.org; Fri, 09 Nov 2012 08:43:44 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45405)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1TWorq-0007H9-Ow
	for coreutils@gnu.org; Fri, 09 Nov 2012 08:43:42 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1TWorg-0007Ft-OG
	for coreutils@gnu.org; Fri, 09 Nov 2012 08:43:30 -0500
Received: from mx1.redhat.com ([209.132.183.28]:34687)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1TWorg-0007Fe-ED
	for coreutils@gnu.org; Fri, 09 Nov 2012 08:43:20 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA9DhIRQ018282
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 9 Nov 2012 08:43:18 -0500
Received: from [10.3.113.12] ([10.3.113.12])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qA9DhHJt021465; Fri, 9 Nov 2012 08:43:18 -0500
Message-ID: <509D0874.80209@redhat.com>
Date: Fri, 09 Nov 2012 06:43:16 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121016 Thunderbird/16.0.1
MIME-Version: 1.0
To: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: FYI: updated to latest gnulib --- almost, but not quite
References: <87y5ibw7mi.fsf@rho.meyering.net> <509CCB9D.70909@cs.ucla.edu>
In-Reply-To: <509CCB9D.70909@cs.ucla.edu>
X-Enigmail-Version: 1.4.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigACD4872EDADD8C0A2AABC966"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 09 Nov 2012 13:43:42 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigACD4872EDADD8C0A2AABC966
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 11/09/2012 02:23 AM, Paul Eggert wrote:
> BTW I did run into trouble when I tried to reproduce the problem.
> I followed the instructions in README-hacking:
>=20
>         $ ./bootstrap
>         $ git submodule foreach git pull origin master
>         $ git commit -m 'build: update gnulib submodule to latest' gnul=
ib
>=20
> but the "make check" immediately failed because of the
> public-submodule-commit rule.  I worked around this by
> commenting out that rule's body.  Is there some better way
> to try out the latest gnulib these days?

make check gl_public_submodule_commit=3D

That trick ought to be documented in HACKING.

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


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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBCAAGBQJQnQh0AAoJEKeha0olJ0Nqd/oH/099hsS8uf5lQSAOUOfmdOsd
G0e/BCEiUZJHAzN+2l13OTYVkLF9sFHkArN5qF+xCfMQGHrP5UOeJZt4a2ibb4P9
rO3xmO6hYIT/athq1PqYp0wGnD1D+73O5SFZI0vOmDr8u63sChDZIKX4piJGUJDW
dZtiJqbZjuc2TM5jzM1lpzbGAUiugxuMeCKX1Pty4HpTM8dgTnVwaTYVBC9RAw3m
BSey8R+imKipeEFkWHQ/Gx5w8InEqDeiLRDmBOK+3qqUAUArDARhXBvf7R3++C0C
n92OiYLaWnrj9nvprsDG4fh11gGmHp+mpMqngQWMK2c6DHF/Gf0zxXsgHROQ1Sc=
=kB8r
-----END PGP SIGNATURE-----

--------------enigACD4872EDADD8C0A2AABC966--


From MAILER-DAEMON Fri Nov 09 09:12:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TWpK4-0002aR-Vo
	for mharc-coreutils@gnu.org; Fri, 09 Nov 2012 09:12:40 -0500
Received: from eggs.gnu.org ([208.118.235.92]:36456)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TWpJw-0002Ma-A4
	for coreutils@gnu.org; Fri, 09 Nov 2012 09:12:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TWpJr-0008RV-B1
	for coreutils@gnu.org; Fri, 09 Nov 2012 09:12:32 -0500
Received: from moutng.kundenserver.de ([212.227.126.187]:50626)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TWpJr-0008RO-1S
	for coreutils@gnu.org; Fri, 09 Nov 2012 09:12:27 -0500
Received: from [192.168.2.106] (p4FF7421D.dip.t-dialin.net [79.247.66.29])
	by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis)
	id 0Lql1O-1Stvrv2q3O-00dnvA; Fri, 09 Nov 2012 15:12:25 +0100
Message-ID: <509D0F48.3070209@bernhard-voelker.de>
Date: Fri, 09 Nov 2012 15:12:24 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: [PATCH] maint: fix factor's tests to use coreutil's own sha1sum
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:WVYZi9vv+N2g6bpVP7MpcsY0CW+pCc0c+BHGOjJ8Zdt
	rBDA0MpClTrZ39bh8DCIh4m/8pb4fkolDvb5ZyUkxYehSzDU0W
	2Mq33+yzc+A8HtJojGNNmDu8XkBuQubFh6O3AagXyuRHUcXOBx
	8RUvNmdtp1IO+QDLt7q+jn8uKXXmqEPTIcbAxgiY7mLDjwp+fe
	iv03+eLSsl2EXGtZ9uzXNc8GYQyDNNGhi3VOt5Y3P+2YeCbSh2
	D85sjB8jTGQXqUiSR0oLZJHKpS+B+EDGfaAjF6qc3EbEQouozI
	SX1iktc9e9xLV+RiYnc7Z0Gzj1Wu0GydIMHaCKcD19WIeFuV5E
	SQOrWXQrY2IVoGl8ZcH3Y5qyzqjLL5R869nxEVTCV
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.126.187
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 09 Nov 2012 14:12:40 -0000

>From 3b16882dc7af6b84ad269f42a8d611c1fdcd0493 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Fri, 9 Nov 2012 15:09:05 +0100
Subject: [PATCH] maint: fix factor's tests to use coreutil's own sha1sum

The test used the shasum utility which seems to belong to the
perl package. On SLES-10.4, perl doesn't include this yet:

  + seq 0 10000000
  + factor
  + shasum -c --status exp
  ./tests/factor/t00.sh: line 30: shasum: command not found
  + Exit 1

It is better to use our own stuff anyway.

* tests/factor/run.sh: s/shasum/sha1sum/. Additionally, add
sha1sum to the print_ver_ call.
---
 tests/factor/run.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/factor/run.sh b/tests/factor/run.sh
index 33ec8cd..c292f2b 100644
--- a/tests/factor/run.sh
+++ b/tests/factor/run.sh
@@ -17,7 +17,7 @@
 # Don't run these tests by default.
 very_expensive_

-print_ver_ factor seq
+print_ver_ factor seq sha1sum

 # Template variables.
 START=__START__
@@ -27,6 +27,6 @@ CKSUM=__CKSUM__
 echo "$CKSUM  -" > exp

 f=1
-seq $START $END | factor | shasum -c --status exp && f=0
+seq $START $END | factor | sha1sum -c --status exp && f=0

 Exit $f
-- 
1.7.7




From MAILER-DAEMON Fri Nov 09 09:51:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TWpw0-0006fG-3t
	for mharc-coreutils@gnu.org; Fri, 09 Nov 2012 09:51:52 -0500
Received: from eggs.gnu.org ([208.118.235.92]:48426)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TWpvx-0006dN-20
	for coreutils@gnu.org; Fri, 09 Nov 2012 09:51:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TWpvv-0003qe-Uv
	for coreutils@gnu.org; Fri, 09 Nov 2012 09:51:48 -0500
Received: from mx1.redhat.com ([209.132.183.28]:35557)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TWpvv-0003qN-Mt
	for coreutils@gnu.org; Fri, 09 Nov 2012 09:51:47 -0500
Received: from int-mx02.intmail.prod.int.phx2.redhat.com
	(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA9EphO1009407
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 9 Nov 2012 09:51:43 -0500
Received: from [10.36.116.19] (ovpn-116-19.ams2.redhat.com [10.36.116.19])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id qA9EpeUk017643
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 9 Nov 2012 09:51:42 -0500
Message-ID: <509D187C.5060909@draigBrady.com>
Date: Fri, 09 Nov 2012 14:51:40 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] maint: fix factor's tests to use coreutil's own sha1sum
References: <509D0F48.3070209@bernhard-voelker.de>
In-Reply-To: <509D0F48.3070209@bernhard-voelker.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qA9EphO1009407
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 09 Nov 2012 14:51:50 -0000

On 11/09/2012 02:12 PM, Bernhard Voelker wrote:
>>From 3b16882dc7af6b84ad269f42a8d611c1fdcd0493 Mon Sep 17 00:00:00 2001
> From: Bernhard Voelker <mail@bernhard-voelker.de>
> Date: Fri, 9 Nov 2012 15:09:05 +0100
> Subject: [PATCH] maint: fix factor's tests to use coreutil's own sha1su=
m

Since this is a functional change on some systems I
s/maint:/tests:/ and pushed.

thanks!
P=E1draig.


From MAILER-DAEMON Fri Nov 09 12:14:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TWs9g-0004Ah-SU
	for mharc-coreutils@gnu.org; Fri, 09 Nov 2012 12:14:08 -0500
Received: from eggs.gnu.org ([208.118.235.92]:35391)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1TWs9f-00047T-5g
	for coreutils@gnu.org; Fri, 09 Nov 2012 12:14:07 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1TWs9d-0007Hd-9F
	for coreutils@gnu.org; Fri, 09 Nov 2012 12:14:07 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:40774)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1TWs9d-0007HL-3N
	for coreutils@gnu.org; Fri, 09 Nov 2012 12:14:05 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id EE4B139E810F;
	Fri,  9 Nov 2012 09:14:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id gH-dFMlNxORJ; Fri,  9 Nov 2012 09:14:03 -0800 (PST)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id A362A39E810A;
	Fri,  9 Nov 2012 09:14:03 -0800 (PST)
Message-ID: <509D39DB.3090908@cs.ucla.edu>
Date: Fri, 09 Nov 2012 09:14:03 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121029 Thunderbird/16.0.2
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] df: port the new df test to POSIX sed, larger file systems
References: <509CC93C.9040802@cs.ucla.edu>
	<509CD1CA.4040501@bernhard-voelker.de>
In-Reply-To: <509CD1CA.4040501@bernhard-voelker.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 131.179.128.62
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 09 Nov 2012 17:14:08 -0000

On 11/09/2012 01:50 AM, Bernhard Voelker wrote:
> What about simplifying the first s/... to eliminate all blanks?

Yes, could do that, if someone has the energy....


From MAILER-DAEMON Sat Nov 10 21:54:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TXNh4-0001ho-Ea
	for mharc-coreutils@gnu.org; Sat, 10 Nov 2012 21:54:42 -0500
Received: from eggs.gnu.org ([208.118.235.92]:40664)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <KAction@gnu.org>) id 1TXJw0-00014j-7S
	for coreutils@gnu.org; Sat, 10 Nov 2012 17:53:55 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <KAction@gnu.org>) id 1TXJvx-0004K8-5T
	for coreutils@gnu.org; Sat, 10 Nov 2012 17:53:52 -0500
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35645)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <KAction@gnu.org>) id 1TXJvx-0004K4-21
	for coreutils@gnu.org; Sat, 10 Nov 2012 17:53:49 -0500
Received: from broadband-77-37-146-56.nationalcablenetworks.ru
	([77.37.146.56]:49605 helo=localhost)
	by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <KAction@gnu.org>) id 1TXJvw-0001ha-6y
	for coreutils@gnu.org; Sat, 10 Nov 2012 17:53:48 -0500
Date: Sun, 11 Nov 2012 02:53:44 +0400
From: Dmitry Bogatov <KAction@gnu.org>
To: coreutils@gnu.org
Subject: [feature-propsal] mv && leaving symlink behind
Message-ID: <20121110225344.GA7092@hell>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="3MwIy2ne0vdjdPXF"
Content-Disposition: inline
X-Jabber: KAction@beem-project.com
X-Phone: +79161582266
X-Message: If you read this, tell me about it. I am really impressed.
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
	(bad octet value).
X-Received-From: 2001:4830:134:3::e
X-Mailman-Approved-At: Sat, 10 Nov 2012 21:54:41 -0500
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 10 Nov 2012 22:53:55 -0000


--3MwIy2ne0vdjdPXF
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline

Hello!  I have idea about adding functionality of moving file and adding
symbolic link at previous place, that links to new place.

What your opinion, would it be useful? For me, it would be quick way to
move configuration file into VCS directory.

I think I am able to code it.



--
Best regards,
	Dmitry Bogatov <KAction@gnu.org>, GNU Thales maintainer.
GPG: 54B7F00D
I prefer plain text formatted in accordance with RFC1855, section 2.1.1.

--3MwIy2ne0vdjdPXF
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iQIcBAEBAgAGBQJQntr4AAoJEHiL4BJUt/ANwBUP/3IYXKMc212xEOntHDHWiXHR
HFrlFHbo9NaO6NpNn7n1Rio3wpJWbLoy62cvgXT08lDtrB+wS38ytly52Rr1Ttbx
BBpUAJ1B9NC5i4cG0rNz6P5Qr7u4K3t9lSRHbDqdRIFlPncexmANs+d0Z3p6MMBp
KpXeOK+q9QiJyh1HKnnLR01RW2SIeUBkV8VYUjIJ8NIqCxP2aV9O+pMHdB3W2hnc
FMh4HZAjRSX7cBtiveB4ftHXX7h85lcEePP+wn7mJKmkU+oSX8fper8V8xYCVU8o
eh3zQXysFnq7d0sxtTop3tYJUvMdpyi+v4qTLw1nYvAKb/wDcidofglxMQwB5z98
MIGL2of6k2LCIIb7NyGIuJ5HKyvrvVKblpNNH6mjR3oX80D9t5u1cgO/cR97n18s
bGYpTHZxSRajC5l7HQu5eVF0MqUEtXLw7RraiBNRFpKE0mF0lEfrZ9aBEa0P1iiT
tAszwjJSJwEoTWH5JzEBj3cJTtA6pf08TqbXGRAS/3z0rONKoztmjFUs1ckPeyVf
EvORJc/KW7qqUW5aVkBerXxtU5+TgfWsSzDssfnQGe3WhLFEUur+ffwy3X5Wf2w0
RxUpYHdPpdf2MmfyuytggZaE7KaOPfwVaQ/XO4HcjLXUpXsgitrwFPuzIvFmTENW
1/xtG+kaL1nr2ug8sKhP
=YVpN
-----END PGP SIGNATURE-----

--3MwIy2ne0vdjdPXF--


From MAILER-DAEMON Sun Nov 11 06:14:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TXVVC-0007LA-PJ
	for mharc-coreutils@gnu.org; Sun, 11 Nov 2012 06:14:58 -0500
Received: from eggs.gnu.org ([208.118.235.92]:48327)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TXVV8-0007Kj-VR
	for coreutils@gnu.org; Sun, 11 Nov 2012 06:14:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TXVV5-0005f6-Rd
	for coreutils@gnu.org; Sun, 11 Nov 2012 06:14:54 -0500
Received: from moutng.kundenserver.de ([212.227.17.10]:55956)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TXVV5-0005f2-FC
	for coreutils@gnu.org; Sun, 11 Nov 2012 06:14:51 -0500
Received: from [192.168.2.106] (p4FF73591.dip.t-dialin.net [79.247.53.145])
	by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis)
	id 0Mc8Nr-1TnG220slD-00JdWz; Sun, 11 Nov 2012 12:14:41 +0100
Message-ID: <509F88A0.5020201@bernhard-voelker.de>
Date: Sun, 11 Nov 2012 12:14:40 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: [PATCH] doc: remove already implemented items from TODO
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:xYQaQdIqFEf6hoEnnH1wwVbQyHyIozeJcO+o9v8HNlf
	2+rFGJdFES5DPYNavYILRuYO6jBdJzCwBHWa3g5+avAnH3sa6J
	LukwkFKIUJ/foU/p/zEosUH4a2Jp7w2JnClqMpNr0tv9+URwkf
	7yHbGtLG98YCndIUbokDxD+9g+XOM0H1ZJP6Ilu/b5kyun4qQB
	TtlDUFMbgk80dz8XROkgGnTDgMXQVnsDPdRmSiHsBpNkM63Fd6
	UpKpqJVp0I2rKk6ycHfGBYqkGbvHOdZb7Uz8RS3+WzAGWYstk9
	I8pl1agNZGVjIeGO8oJs4A0tI41H/8EL+fblSfS2Y44T+WiNhn
	Tyj8OlcLhsIVtD10kPms9s92WcnAbjg5U09Im6vAe
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.17.10
Cc: Karl Berry <karl@freefriends.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 11 Nov 2012 11:14:58 -0000

>From b4d94242ff9ff772dea8d84c34c5223c157a5677 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Sun, 11 Nov 2012 12:07:47 +0100
Subject: [PATCH] doc: remove already implemented items from TODO

* TODO (renice): The renice program is part of util-linux for
years now. Remove entry.
(dd): The option status=none has been implemented in commit
v8.19-143-g7331ab5. Remove entry.
---
 TODO |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/TODO b/TODO
index 2dcaf08..150d534 100644
--- a/TODO
+++ b/TODO
@@ -37,10 +37,6 @@ printf:
 consider adding some implementation of the "col" utility
   Suggested by Karl Berry.

-renice: POSIX utility, needs implementing.
-  suggestion from Karl Berry (among others).
-  Bob Proulx is working on this.
-
 doc/coreutils.texi:
   Address this comment: FIXME: mv's behavior in this case is system-dependent
   Better still: fix the code so it's *not* system-dependent.
@@ -119,10 +115,6 @@ Changes expected to go in, someday.
   an implicit --NO-dereference-command-line-symlink-to-dir meaning.
   Pointed out by Karl Berry.

-  dd: consider adding an option to suppress 'bytes/block read/written'
-  output to stderr.  Suggested here:
-    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165045
-
   Pending copyright papers:
   ------------------------
   getpwnam from Bruce Korb
-- 
1.7.7



From MAILER-DAEMON Sun Nov 11 20:48:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TXj8c-0006Er-9F
	for mharc-coreutils@gnu.org; Sun, 11 Nov 2012 20:48:34 -0500
Received: from eggs.gnu.org ([208.118.235.92]:55344)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TXj8Y-0006Eb-DL
	for coreutils@gnu.org; Sun, 11 Nov 2012 20:48:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TXj8V-0008F4-AM
	for coreutils@gnu.org; Sun, 11 Nov 2012 20:48:30 -0500
Received: from mx1.redhat.com ([209.132.183.28]:48328)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>)
	id 1TXj8R-0008Dt-KO; Sun, 11 Nov 2012 20:48:23 -0500
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
	(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAC1mK87015807
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Sun, 11 Nov 2012 20:48:20 -0500
Received: from [10.36.116.30] (ovpn-116-30.ams2.redhat.com [10.36.116.30])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAC1mHnG020055
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Sun, 11 Nov 2012 20:48:19 -0500
Message-ID: <50A05561.7040400@draigBrady.com>
Date: Mon, 12 Nov 2012 01:48:17 +0000
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Dmitry Bogatov <KAction@gnu.org>
Subject: Re: [feature-propsal] mv && leaving symlink behind
References: <20121110225344.GA7092@hell>
In-Reply-To: <20121110225344.GA7092@hell>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qAC1mK87015807
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 12 Nov 2012 01:48:33 -0000

On 11/10/2012 10:53 PM, Dmitry Bogatov wrote:
> Hello!  I have idea about adding functionality of moving file and addin=
g
> symbolic link at previous place, that links to new place.
>
> What your opinion, would it be useful? For me, it would be quick way to
> move configuration file into VCS directory.
>
> I think I am able to code it.

So this is like `cp -s` but linking in the opposite direction.
I can kind of see the appeal of the symmetry, but I'm not sure.
Might you get more control with something like:

   mv $file $dir/ && ln -sr $dir/$file .

cheers,
P=C3=A1draig.


From MAILER-DAEMON Mon Nov 12 09:28:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TXuzo-00014M-Ni
	for mharc-coreutils@gnu.org; Mon, 12 Nov 2012 09:28:16 -0500
Received: from eggs.gnu.org ([208.118.235.92]:59342)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <pth@suse.de>)
	id 1TXuzj-000104-CC
	for coreutils@gnu.org; Mon, 12 Nov 2012 09:28:14 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <pth@suse.de>) id 1TXuzg-0005G0-9m
	for coreutils@gnu.org; Mon, 12 Nov 2012 09:28:11 -0500
Received: from cantor2.suse.de ([195.135.220.15]:38959 helo=mx2.suse.de)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <pth@suse.de>)
	id 1TXuzg-0005Fq-3R
	for coreutils@gnu.org; Mon, 12 Nov 2012 09:28:08 -0500
Received: from relay1.suse.de (unknown [195.135.220.254])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx2.suse.de (Postfix) with ESMTP id 65A39A2C8B
	for <coreutils@gnu.org>; Mon, 12 Nov 2012 15:28:06 +0100 (CET)
Date: Mon, 12 Nov 2012 15:28:06 +0100
From: Philipp Thomas <pth@suse.de>
To: coreutils@gnu.org
Subject: How to incorporate new gnulib modules
Message-ID: <20121112142806.GD7607@paradies.suse.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Operating-System: openSUSE - Kernel Linux 3.4.11-2.16-desktop x86_64
Organization: SUSE LINUX Products GmbH, =?iso-8859-1?Q?G?=
	=?iso-8859-1?Q?F=3A_Jeff_Hawn=2C_Jennifer_Guild=2C_Felix_Imend=F6rffer=2C?=
	=?iso-8859-1?Q?_HRB_21284_=28AG_N=FCrnberg=29?=
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x
X-Received-From: 195.135.220.15
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 12 Nov 2012 14:28:14 -0000


For the code to support shared extents in du I need to add the rbtree
gnulib module(s) to coreutils. Having never done something like this before,
how do I go about doing so?

Thanks in advance
Philipp


From MAILER-DAEMON Mon Nov 12 09:53:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TXvOU-0003Sf-PN
	for mharc-coreutils@gnu.org; Mon, 12 Nov 2012 09:53:46 -0500
Received: from eggs.gnu.org ([208.118.235.92]:59178)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TXvOP-0003S6-On
	for coreutils@gnu.org; Mon, 12 Nov 2012 09:53:44 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TXvOM-0003xd-Ml
	for coreutils@gnu.org; Mon, 12 Nov 2012 09:53:41 -0500
Received: from mx1.redhat.com ([209.132.183.28]:36495)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TXvOM-0003xX-FV
	for coreutils@gnu.org; Mon, 12 Nov 2012 09:53:38 -0500
Received: from int-mx09.intmail.prod.int.phx2.redhat.com
	(int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qACEraFT010202
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 12 Nov 2012 09:53:36 -0500
Received: from [10.36.116.60] (ovpn-116-60.ams2.redhat.com [10.36.116.60])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qACErUN2001354
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Mon, 12 Nov 2012 09:53:33 -0500
Message-ID: <50A10D6A.4060506@draigBrady.com>
Date: Mon, 12 Nov 2012 14:53:30 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Philipp Thomas <pth@suse.de>
Subject: Re: How to incorporate new gnulib modules
References: <20121112142806.GD7607@paradies.suse.de>
In-Reply-To: <20121112142806.GD7607@paradies.suse.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qACEraFT010202
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 12 Nov 2012 14:53:44 -0000

On 11/12/2012 02:28 PM, Philipp Thomas wrote:
>
> For the code to support shared extents in du I need to add the rbtree
> gnulib module(s) to coreutils. Having never done something like this be=
fore,
> how do I go about doing so?

It's probably best to look at examples.

You can add gnulib modules private to coreutils like:
http://git.savannah.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommit;h=3D63b5=
e816

Or you can add to gnulib proper.
I note some *rbtree* files already in gnulib BTW.

cheers,
P=E1draig.


From MAILER-DAEMON Mon Nov 12 10:58:11 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TXwOo-0005hi-Vj
	for mharc-coreutils@gnu.org; Mon, 12 Nov 2012 10:58:10 -0500
Received: from eggs.gnu.org ([208.118.235.92]:47005)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <pth@suse.de>)
	id 1TXwOj-0005fd-JW
	for coreutils@gnu.org; Mon, 12 Nov 2012 10:58:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <pth@suse.de>) id 1TXwOg-00082F-HD
	for coreutils@gnu.org; Mon, 12 Nov 2012 10:58:05 -0500
Received: from cantor2.suse.de ([195.135.220.15]:42633 helo=mx2.suse.de)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <pth@suse.de>)
	id 1TXwOg-00082B-Al
	for coreutils@gnu.org; Mon, 12 Nov 2012 10:58:02 -0500
Received: from relay2.suse.de (unknown [195.135.220.254])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx2.suse.de (Postfix) with ESMTP id 64957A3A5C;
	Mon, 12 Nov 2012 16:58:01 +0100 (CET)
Date: Mon, 12 Nov 2012 16:58:01 +0100
From: Philipp Thomas <pth@suse.de>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: How to incorporate new gnulib modules
Message-ID: <20121112155801.GG7607@paradies.suse.de>
References: <20121112142806.GD7607@paradies.suse.de>
	<50A10D6A.4060506@draigBrady.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
In-Reply-To: <50A10D6A.4060506@draigBrady.com>
X-Operating-System: openSUSE - Kernel Linux 3.4.11-2.16-desktop x86_64
Organization: SUSE LINUX Products GmbH, =?iso-8859-1?Q?G?=
	=?iso-8859-1?Q?F=3A_Jeff_Hawn=2C_Jennifer_Guild=2C_Felix_Imend=F6rffer=2C?=
	=?iso-8859-1?Q?_HRB_21284_=28AG_N=FCrnberg=29?=
User-Agent: Mutt/1.5.21 (2010-09-15)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x
X-Received-From: 195.135.220.15
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 12 Nov 2012 15:58:09 -0000

* P=E1draig Brady (P@draigBrady.com) [20121112 15:53]:

> I note some *rbtree* files already in gnulib BTW.

After Jim requested to use the rbtree code in gnulib I knew that code was
present. So the question was how to import additional gnulib modules into
coreutils rather then getting new code into gnulib.

Philipp


From MAILER-DAEMON Mon Nov 12 11:19:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TXwjq-0002Fx-NE
	for mharc-coreutils@gnu.org; Mon, 12 Nov 2012 11:19:54 -0500
Received: from eggs.gnu.org ([208.118.235.92]:39608)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TXwjl-0002Fc-PE
	for coreutils@gnu.org; Mon, 12 Nov 2012 11:19:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TXwji-0005qZ-NA
	for coreutils@gnu.org; Mon, 12 Nov 2012 11:19:49 -0500
Received: from mx1.redhat.com ([209.132.183.28]:58511)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TXwji-0005qE-GB
	for coreutils@gnu.org; Mon, 12 Nov 2012 11:19:46 -0500
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qACGJjZk003624
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 12 Nov 2012 11:19:45 -0500
Received: from [10.36.116.60] (ovpn-116-60.ams2.redhat.com [10.36.116.60])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qACGJgpT015464
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Mon, 12 Nov 2012 11:19:44 -0500
Message-ID: <50A1219A.8060108@draigBrady.com>
Date: Mon, 12 Nov 2012 16:19:38 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Philipp Thomas <pth@suse.de>
Subject: Re: How to incorporate new gnulib modules
References: <20121112142806.GD7607@paradies.suse.de>
	<50A10D6A.4060506@draigBrady.com>
In-Reply-To: <50A10D6A.4060506@draigBrady.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qACGJjZk003624
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 12 Nov 2012 16:19:52 -0000

On 11/12/2012 02:53 PM, P=E1draig Brady wrote:
> On 11/12/2012 02:28 PM, Philipp Thomas wrote:
>>
>> For the code to support shared extents in du I need to add the rbtree
>> gnulib module(s) to coreutils. Having never done something like this b=
efore,
>> how do I go about doing so?
>
> It's probably best to look at examples.
>
> You can add gnulib modules private to coreutils like:
> http://git.savannah.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommit;h=3D63=
b5e816
>
> Or you can add to gnulib proper.
> I note some *rbtree* files already in gnulib BTW.

That's just a matter of adding the module to the list
in bootstrap.conf and running:

./bootstrap && ./configure && make

cheers,
P=E1draig.


From MAILER-DAEMON Mon Nov 12 16:35:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TY1fK-0003s2-20
	for mharc-coreutils@gnu.org; Mon, 12 Nov 2012 16:35:34 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45156)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <philipp@thogro.org>) id 1TY1fG-0003ri-A5
	for coreutils@gnu.org; Mon, 12 Nov 2012 16:35:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <philipp@thogro.org>) id 1TY1fD-00047u-7U
	for coreutils@gnu.org; Mon, 12 Nov 2012 16:35:30 -0500
Received: from mailout-de.gmx.net ([213.165.64.23]:36992)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <philipp@thogro.org>) id 1TY1fC-00047A-Sx
	for coreutils@gnu.org; Mon, 12 Nov 2012 16:35:27 -0500
Received: (qmail invoked by alias); 12 Nov 2012 21:35:24 -0000
Received: from dslb-178-007-022-213.pools.arcor-ip.net (EHLO Sisko)
	[178.7.22.213]
	by mail.gmx.net (mp071) with SMTP; 12 Nov 2012 22:35:24 +0100
X-Authenticated: #46577751
X-Provags-ID: V01U2FsdGVkX19XF8YiK81Xvzlcik98hLoXjXuTiGtI6dD7jxtNAr
	nw8x0Ex9EoYKRR
From: Philipp Thomas <philipp@thogro.org>
To: coreutils@gnu.org
Subject: Re: How to incorporate new gnulib modules
Date: Mon, 12 Nov 2012 22:35:29 +0100
Message-ID: <0rq2a899f28l4qdgr00tm152s7qkjpvf6h@4ax.com>
References: <20121112142806.GD7607@paradies.suse.de>
	<50A10D6A.4060506@draigBrady.com> <50A1219A.8060108@draigBrady.com>
In-Reply-To: <50A1219A.8060108@draigBrady.com>
User-Agent: ForteAgent/7.00.32.1200
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Y-GMX-Trusted: 0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 213.165.64.23
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 12 Nov 2012 21:35:33 -0000

On Mon, 12 Nov 2012 16:19:38 +0000, P=E1draig Brady <P@draigBrady.com>
wrote:

>That's just a matter of adding the module to the list
>in bootstrap.conf and running:
>
>./bootstrap && ./configure && make

Ahh, that was the needed info, thanks!

Philipp


From MAILER-DAEMON Tue Nov 13 01:18:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TY9pS-0006QN-0c
	for mharc-coreutils@gnu.org; Tue, 13 Nov 2012 01:18:34 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33247)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TY9pN-0006QF-Nn
	for coreutils@gnu.org; Tue, 13 Nov 2012 01:18:32 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TY9pK-0006Ge-Iw
	for coreutils@gnu.org; Tue, 13 Nov 2012 01:18:29 -0500
Received: from mx.meyering.net ([88.168.87.75]:59547)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1TY9pK-0006Ga-CC
	for coreutils@gnu.org; Tue, 13 Nov 2012 01:18:26 -0500
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 0EE0C600AE
	for <coreutils@gnu.org>; Tue, 13 Nov 2012 07:18:25 +0100 (CET)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH] maint: avoid unnecessary #include to fix syntax-check failure
Date: Tue, 13 Nov 2012 07:18:25 +0100
Message-ID: <877gpqnhzi.fsf@rho.meyering.net>
Lines: 28
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 88.168.87.75
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 13 Nov 2012 06:18:32 -0000

FYI,

>From 7b4df77dbebe6d11710a81c9e06a60e8086b9146 Mon Sep 17 00:00:00 2001
From: Jim Meyering <jim@meyering.net>
Date: Tue, 13 Nov 2012 07:03:01 +0100
Subject: [PATCH] maint: avoid unnecessary #include to fix syntax-check
 failure

* src/factor.c: Remove unneeded #inclusion of"verify.h".
It's already included via system.h.
---
 src/factor.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/factor.c b/src/factor.c
index 45f00bb..40cce1f 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -101,7 +101,6 @@
 #include "quote.h"
 #include "readtokens.h"
 #include "xstrtol.h"
-#include "verify.h"

 /* The official name of this program (e.g., no 'g' prefix).  */
 #define PROGRAM_NAME "factor"
--
1.8.0


From MAILER-DAEMON Tue Nov 13 08:39:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TYGho-0003nO-8X
	for mharc-coreutils@gnu.org; Tue, 13 Nov 2012 08:39:08 -0500
Received: from eggs.gnu.org ([208.118.235.92]:46403)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <pth@suse.de>)
	id 1TYGhk-0003mx-Jm
	for coreutils@gnu.org; Tue, 13 Nov 2012 08:39:07 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <pth@suse.de>) id 1TYGhh-0008Bf-I4
	for coreutils@gnu.org; Tue, 13 Nov 2012 08:39:04 -0500
Received: from cantor2.suse.de ([195.135.220.15]:55858 helo=mx2.suse.de)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <pth@suse.de>)
	id 1TYGhh-0008BS-Bg
	for coreutils@gnu.org; Tue, 13 Nov 2012 08:39:01 -0500
Received: from relay2.suse.de (unknown [195.135.220.254])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx2.suse.de (Postfix) with ESMTP id 8B226A24CA;
	Tue, 13 Nov 2012 14:39:00 +0100 (CET)
Date: Tue, 13 Nov 2012 14:39:00 +0100
From: Philipp Thomas <pth@suse.de>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: How to incorporate new gnulib modules
Message-ID: <20121113133900.GJ7607@paradies.suse.de>
References: <20121112142806.GD7607@paradies.suse.de>
	<50A10D6A.4060506@draigBrady.com> <50A1219A.8060108@draigBrady.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
In-Reply-To: <50A1219A.8060108@draigBrady.com>
X-Operating-System: openSUSE - Kernel Linux 3.4.11-2.16-desktop x86_64
Organization: SUSE LINUX Products GmbH, =?iso-8859-1?Q?G?=
	=?iso-8859-1?Q?F=3A_Jeff_Hawn=2C_Jennifer_Guild=2C_Felix_Imend=F6rffer=2C?=
	=?iso-8859-1?Q?_HRB_21284_=28AG_N=FCrnberg=29?=
User-Agent: Mutt/1.5.21 (2010-09-15)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x
X-Received-From: 195.135.220.15
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 13 Nov 2012 13:39:07 -0000

* P=E1draig Brady (P@draigBrady.com) [20121112 17:19]:

> That's just a matter of adding the module to the list
> in bootstrap.conf and running:
>=20
> ./bootstrap && ./configure && make

That works for checked out sources, but how do I add a gnulib module to
older versions where I only have the tar ball? Specifically its the
rbtree-list module that I want to add to coreutils-8.12.

Philipp


From MAILER-DAEMON Tue Nov 13 08:51:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TYGuF-0006YW-MN
	for mharc-coreutils@gnu.org; Tue, 13 Nov 2012 08:51:59 -0500
Received: from eggs.gnu.org ([208.118.235.92]:38948)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TYGuA-0006YI-TJ
	for coreutils@gnu.org; Tue, 13 Nov 2012 08:51:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TYGu7-0003mC-Pk
	for coreutils@gnu.org; Tue, 13 Nov 2012 08:51:54 -0500
Received: from mx1.redhat.com ([209.132.183.28]:42158)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TYGu7-0003lq-Hx
	for coreutils@gnu.org; Tue, 13 Nov 2012 08:51:51 -0500
Received: from int-mx02.intmail.prod.int.phx2.redhat.com
	(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qADDpnp9032106
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 13 Nov 2012 08:51:49 -0500
Received: from [10.36.116.71] (ovpn-116-71.ams2.redhat.com [10.36.116.71])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id qADDpl4q020731
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 13 Nov 2012 08:51:48 -0500
Message-ID: <50A25072.50702@draigBrady.com>
Date: Tue, 13 Nov 2012 13:51:46 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Philipp Thomas <pth@suse.de>
Subject: Re: How to incorporate new gnulib modules
References: <20121112142806.GD7607@paradies.suse.de>
	<50A10D6A.4060506@draigBrady.com> <50A1219A.8060108@draigBrady.com>
	<20121113133900.GJ7607@paradies.suse.de>
In-Reply-To: <20121113133900.GJ7607@paradies.suse.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qADDpnp9032106
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 13 Nov 2012 13:51:58 -0000

On 11/13/2012 01:39 PM, Philipp Thomas wrote:
> * P=E1draig Brady (P@draigBrady.com) [20121112 17:19]:
>
>> That's just a matter of adding the module to the list
>> in bootstrap.conf and running:
>>
>> ./bootstrap && ./configure && make
>
> That works for checked out sources, but how do I add a gnulib module to
> older versions where I only have the tar ball? Specifically its the
> rbtree-list module that I want to add to coreutils-8.12.

You've have to do that manually,
since there various processes involved in
incorporating a gnulib module into the dist.

I'd suggest going from checked out sources, like:

git checkout v8.12
git checkout -b du-extents
git submodule update
...

cheers,
P=E1draig.


From MAILER-DAEMON Wed Nov 14 08:51:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TYdNA-0007iu-41
	for mharc-coreutils@gnu.org; Wed, 14 Nov 2012 08:51:20 -0500
Received: from eggs.gnu.org ([208.118.235.92]:51372)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdFK-0002Ir-W9
	for coreutils@gnu.org; Wed, 14 Nov 2012 08:43:18 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdFH-0003wD-Sq
	for coreutils@gnu.org; Wed, 14 Nov 2012 08:43:14 -0500
Received: from mail-vc0-f169.google.com ([209.85.220.169]:64432)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdFH-0003vz-OZ
	for coreutils@gnu.org; Wed, 14 Nov 2012 08:43:11 -0500
Received: by mail-vc0-f169.google.com with SMTP id fl17so527549vcb.0
	for <coreutils@gnu.org>; Wed, 14 Nov 2012 05:43:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:date:message-id:subject:from:to:content-type;
	bh=XG3z6axgWYLqwpvB+V35nBFzC5AMKSPxeGp3SL2nwtM=;
	b=KapXcko1KJlWNWn+9dXLbYNiv+q4HoPC7HTxwNLp5vK5ZnwTNs7OTaP4JM04tvn3kR
	Fxhf4qT49IcHHNMQ5IhFcisdfx9O5WkFmVh1p1JcpLfnRYHCTnMHZpSoG/h3/7NM9rHw
	rSh3YmUcaZbyFhmg6cPBhQhKggibtUjJNNXqLFb14ICAyM3sRCTwrbGVK+ow/T53KIPu
	5CQR83O5G06OoXuXXgh5k5ITLXSQ9qOLLCGcuE/7Mkz5wJqaS+hHf4nbRR5z+Mdy2qR1
	J6BHhv1xBgtcnGZaw086Lw/8q1P3WmXxSJKocOQtp0vrW+wsDE2wpfxrabj6K5eSVVoI
	lHug==
MIME-Version: 1.0
Received: by 10.220.210.193 with SMTP id gl1mr10878236vcb.58.1352900590672;
	Wed, 14 Nov 2012 05:43:10 -0800 (PST)
Received: by 10.58.19.71 with HTTP; Wed, 14 Nov 2012 05:43:10 -0800 (PST)
Date: Wed, 14 Nov 2012 11:43:10 -0200
Message-ID: <CADdLYsrS1_iEuOyV8yfb5Trs5ZU9ZRVGxgaLL6xOhrXa33nt4Q@mail.gmail.com>
Subject: touch: is 00hh timestamp invalid?
From: Rafael Xavier <rxaviers@gmail.com>
To: coreutils@gnu.org
Content-Type: multipart/alternative; boundary=bcaec54ee94a1f998804ce74b7a0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 209.85.220.169
X-Mailman-Approved-At: Wed, 14 Nov 2012 08:51:17 -0500
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 14 Nov 2012 13:43:18 -0000

--bcaec54ee94a1f998804ce74b7a0
Content-Type: text/plain; charset=ISO-8859-1

Hello all,

Am I missing something? But, I am unable to set the timestamp of a file to
00h.

$ touch -t 10202359 'photo.jpg'
# works

$ touch -t 10210000 'photo.jpg'
touch: invalid date format `10210000'

$ touch --version
touch (GNU coreutils) 8.5

Thanks in advance for any help.

-- 
<http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
http://rafael.xavier.blog.br

--bcaec54ee94a1f998804ce74b7a0
Content-Type: text/html; charset=ISO-8859-1

Hello all,<br><br>Am I missing something? But, I am unable to set the timestamp of a file to 00h.<br><br>$ touch -t 10202359 &#39;photo.jpg&#39;<br># works<br><br>$ touch -t 10210000 &#39;photo.jpg&#39;<br>touch: invalid date format `10210000&#39;<br>
<br>$ touch --version<br>touch (GNU coreutils) 8.5<br><br clear="all">Thanks in advance for any help.<br><br>-- <br><span style="color:rgb(102,102,102)"><a href="http://www.rafael.xavier.blog.br/" target="_blank"></a>+55 (16) 8138-1583, skype: rxaviers<br>
</span><a href="http://rafael.xavier.blog.br" target="_blank">http://rafael.xavier.blog.br</a><br>

--bcaec54ee94a1f998804ce74b7a0--


From MAILER-DAEMON Wed Nov 14 08:51:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TYdNF-0007os-Hy
	for mharc-coreutils@gnu.org; Wed, 14 Nov 2012 08:51:25 -0500
Received: from eggs.gnu.org ([208.118.235.92]:60450)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdNB-0007nI-T9
	for coreutils@gnu.org; Wed, 14 Nov 2012 08:51:24 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdN8-0001ZG-Qw
	for coreutils@gnu.org; Wed, 14 Nov 2012 08:51:21 -0500
Received: from mail-vb0-f41.google.com ([209.85.212.41]:51511)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdN8-0001Z1-LW
	for coreutils@gnu.org; Wed, 14 Nov 2012 08:51:18 -0500
Received: by mail-vb0-f41.google.com with SMTP id v13so525174vbk.0
	for <coreutils@gnu.org>; Wed, 14 Nov 2012 05:51:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:content-type; bh=fR0f2lEgj7clkweRAEN9slNQWGKRQTrhx4PzES+kGIo=;
	b=0ddRRsNXGPDjZpj0ZaXqy9m3UFkgE47bJPzfpBz+ETueBkN7lTn4GN47ONx8+7xisy
	hdcXSSKKTHoAm9JzgbSjmKSKS/Zq9swZwa+XZpSkdHcQo5Q31VY+qXM4hyfmXwPtq5Xo
	x8RivApkhIYecPONPZuassyqelwOEaW6abP9y3uq+bDE0NozITUdKdADgCvbhKNiX00X
	fl/jZ6jgl6RTyDweQAaJ3Xu2dSoSR4wPDdxhatBJCuT0yoTgFrJS0Vek5lGKI37gbZRE
	TkniApAXoWbV2mSLu7nFqvnwUxAz6Vwb75NmJwp2iuPpiB3nLDcUtZmnkAkxEz6Jxyu6
	22Rg==
MIME-Version: 1.0
Received: by 10.52.179.2 with SMTP id dc2mr2015093vdc.50.1352901078235; Wed,
	14 Nov 2012 05:51:18 -0800 (PST)
Received: by 10.58.19.71 with HTTP; Wed, 14 Nov 2012 05:51:18 -0800 (PST)
In-Reply-To: <CADdLYsp3fRDj7=1DgkSBR8QQQLzozRLjYb85oWFSKRUpoTmVLw@mail.gmail.com>
References: <CADdLYsrS1_iEuOyV8yfb5Trs5ZU9ZRVGxgaLL6xOhrXa33nt4Q@mail.gmail.com>
	<CADdLYsp3fRDj7=1DgkSBR8QQQLzozRLjYb85oWFSKRUpoTmVLw@mail.gmail.com>
Date: Wed, 14 Nov 2012 11:51:18 -0200
Message-ID: <CADdLYsrLUnN0R1n38HzD7EgY9fOYN-40prAJYjcGpNr=fH+NRg@mail.gmail.com>
Subject: Re: touch: is 00hh timestamp invalid?
From: Rafael Xavier <rxaviers@gmail.com>
To: coreutils@gnu.org
Content-Type: multipart/alternative; boundary=bcaec5014a432f3b8d04ce74d406
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 209.85.212.41
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 14 Nov 2012 13:51:25 -0000

--bcaec5014a432f3b8d04ce74d406
Content-Type: text/plain; charset=ISO-8859-1

A gnulib posixtime bug?

On Wed, Nov 14, 2012 at 11:48 AM, Rafael Xavier <rxaviers@gmail.com> wrote:

> The interesting thing is that the below "workaround" works:
>
> $ touch -t 10212359.60 'photo.jpg'
>
> $ ls -l 'photo.jpg'
> -rw-r--r-- 1 xavier xavier 146604 2012-10-22 00:00 photo.jpg
>
> holy cow
>
>
> On Wed, Nov 14, 2012 at 11:43 AM, Rafael Xavier <rxaviers@gmail.com>wrote:
>
>> Hello all,
>>
>> Am I missing something? But, I am unable to set the timestamp of a file
>> to 00h.
>>
>> $ touch -t 10202359 'photo.jpg'
>> # works
>>
>> $ touch -t 10210000 'photo.jpg'
>> touch: invalid date format `10210000'
>>
>> $ touch --version
>> touch (GNU coreutils) 8.5
>>
>> Thanks in advance for any help.
>>
>> --
>> <http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
>> http://rafael.xavier.blog.br
>>
>
>
>
> --
> <http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
> http://rafael.xavier.blog.br
>



-- 
<http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
http://rafael.xavier.blog.br

--bcaec5014a432f3b8d04ce74d406
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

A gnulib posixtime bug?<br><br><div class=3D"gmail_quote">On Wed, Nov 14, 2=
012 at 11:48 AM, Rafael Xavier <span dir=3D"ltr">&lt;<a href=3D"mailto:rxav=
iers@gmail.com" target=3D"_blank">rxaviers@gmail.com</a>&gt;</span> wrote:<=
br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left=
:1px #ccc solid;padding-left:1ex">
The interesting thing is that the below &quot;workaround&quot; works:<br><b=
r>$ touch -t 10212359.60 &#39;photo.jpg&#39;<br><br>$ ls -l &#39;photo.jpg&=
#39;<br>-rw-r--r-- 1 xavier xavier 146604 2012-10-22 00:00 photo.jpg<br>

<br>holy cow<div class=3D"HOEnZb"><div class=3D"h5"><br><br><div class=3D"g=
mail_quote">On Wed, Nov 14, 2012 at 11:43 AM, Rafael Xavier <span dir=3D"lt=
r">&lt;<a href=3D"mailto:rxaviers@gmail.com" target=3D"_blank">rxaviers@gma=
il.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Hello all,<br><br>Am I missing something? But, I am unable to set the times=
tamp of a file to 00h.<br><br>$ touch -t 10202359 &#39;photo.jpg&#39;<br># =
works<br><br>$ touch -t 10210000 &#39;photo.jpg&#39;<br>touch: invalid date=
 format `10210000&#39;<br>


<br>$ touch --version<br>touch (GNU coreutils) 8.5<br><br clear=3D"all">Tha=
nks in advance for any help.<span><font color=3D"#888888"><br><br>-- <br><s=
pan style=3D"color:rgb(102,102,102)"><a href=3D"http://www.rafael.xavier.bl=
og.br/" target=3D"_blank"></a><a href=3D"tel:%2B55%20%2816%29%208138-1583" =
value=3D"+551681381583" target=3D"_blank">+55 (16) 8138-1583</a>, skype: rx=
aviers<br>


</span><a href=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://ra=
fael.xavier.blog.br</a><br>
</font></span></blockquote></div><br><br clear=3D"all"><br>-- <br><span sty=
le=3D"color:rgb(102,102,102)"><a href=3D"http://www.rafael.xavier.blog.br/"=
 target=3D"_blank"></a><a href=3D"tel:%2B55%20%2816%29%208138-1583" value=
=3D"+551681381583" target=3D"_blank">+55 (16) 8138-1583</a>, skype: rxavier=
s<br>
</span><a href=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://ra=
fael.xavier.blog.br</a><br>

</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br><span style=
=3D"color:rgb(102,102,102)"><a href=3D"http://www.rafael.xavier.blog.br/" t=
arget=3D"_blank"></a>+55 (16) 8138-1583, skype: rxaviers<br></span><a href=
=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://rafael.xavier.bl=
og.br</a><br>


--bcaec5014a432f3b8d04ce74d406--


From MAILER-DAEMON Wed Nov 14 08:51:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TYdNA-0007jo-DO
	for mharc-coreutils@gnu.org; Wed, 14 Nov 2012 08:51:20 -0500
Received: from eggs.gnu.org ([208.118.235.92]:36082)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdKW-0006j4-EL
	for coreutils@gnu.org; Wed, 14 Nov 2012 08:48:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdKT-0008WF-CH
	for coreutils@gnu.org; Wed, 14 Nov 2012 08:48:36 -0500
Received: from mail-vb0-f41.google.com ([209.85.212.41]:35577)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdKT-0008W9-73
	for coreutils@gnu.org; Wed, 14 Nov 2012 08:48:33 -0500
Received: by mail-vb0-f41.google.com with SMTP id v13so521752vbk.0
	for <coreutils@gnu.org>; Wed, 14 Nov 2012 05:48:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:content-type; bh=GroW4JHY5VGD2LdsEOR4PekwIvu9kFN/MHYuo/Wie0E=;
	b=mUcS+f0UpPITcaMsuPygh5GFfDPPR97gx0yZw4MLkQMN8rdxJdj72ILMQVBsqxmiBV
	9QskVqOf9gS6xgrJVd7uXKc6A01TM8nu6EQTtqLGEy/6tclv4LvZ6cDj1cr9gmGuRorJ
	VGGAM3U6niQ50Tc7WdKtBJX4WHd3Vj6Q0W2ezUrkjQoPgu/tLuc2d41fivV95CE0Z0a6
	Oh+yWlKQyX2Uen9QhYsjYD/Uo6kNobdRFmPtvLZyHvcjQowi160OyBcVAt/fATMQLo3O
	E9EYPVUAwlaqZgp8NJ5pIInICMKrdFIdupvdfw5gTto6NNlslKBX6Eg/u/jsBsHMs6Qb
	CNhw==
MIME-Version: 1.0
Received: by 10.221.12.9 with SMTP id pg9mr11110968vcb.68.1352900912374; Wed,
	14 Nov 2012 05:48:32 -0800 (PST)
Received: by 10.58.19.71 with HTTP; Wed, 14 Nov 2012 05:48:32 -0800 (PST)
In-Reply-To: <CADdLYsrS1_iEuOyV8yfb5Trs5ZU9ZRVGxgaLL6xOhrXa33nt4Q@mail.gmail.com>
References: <CADdLYsrS1_iEuOyV8yfb5Trs5ZU9ZRVGxgaLL6xOhrXa33nt4Q@mail.gmail.com>
Date: Wed, 14 Nov 2012 11:48:32 -0200
Message-ID: <CADdLYsp3fRDj7=1DgkSBR8QQQLzozRLjYb85oWFSKRUpoTmVLw@mail.gmail.com>
Subject: Re: touch: is 00hh timestamp invalid?
From: Rafael Xavier <rxaviers@gmail.com>
To: coreutils@gnu.org
Content-Type: multipart/alternative; boundary=bcaec54b4ada4c640504ce74ca26
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 209.85.212.41
X-Mailman-Approved-At: Wed, 14 Nov 2012 08:51:17 -0500
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 14 Nov 2012 13:48:39 -0000

--bcaec54b4ada4c640504ce74ca26
Content-Type: text/plain; charset=ISO-8859-1

The interesting thing is that the below "workaround" works:

$ touch -t 10212359.60 'photo.jpg'

$ ls -l 'photo.jpg'
-rw-r--r-- 1 xavier xavier 146604 2012-10-22 00:00 photo.jpg

holy cow

On Wed, Nov 14, 2012 at 11:43 AM, Rafael Xavier <rxaviers@gmail.com> wrote:

> Hello all,
>
> Am I missing something? But, I am unable to set the timestamp of a file to
> 00h.
>
> $ touch -t 10202359 'photo.jpg'
> # works
>
> $ touch -t 10210000 'photo.jpg'
> touch: invalid date format `10210000'
>
> $ touch --version
> touch (GNU coreutils) 8.5
>
> Thanks in advance for any help.
>
> --
> <http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
> http://rafael.xavier.blog.br
>



-- 
<http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
http://rafael.xavier.blog.br

--bcaec54b4ada4c640504ce74ca26
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

The interesting thing is that the below &quot;workaround&quot; works:<br><b=
r>$ touch -t 10212359.60 &#39;photo.jpg&#39;<br><br>$ ls -l &#39;photo.jpg&=
#39;<br>-rw-r--r-- 1 xavier xavier 146604 2012-10-22 00:00 photo.jpg<br>
<br>holy cow<br><br><div class=3D"gmail_quote">On Wed, Nov 14, 2012 at 11:4=
3 AM, Rafael Xavier <span dir=3D"ltr">&lt;<a href=3D"mailto:rxaviers@gmail.=
com" target=3D"_blank">rxaviers@gmail.com</a>&gt;</span> wrote:<br><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc s=
olid;padding-left:1ex">
Hello all,<br><br>Am I missing something? But, I am unable to set the times=
tamp of a file to 00h.<br><br>$ touch -t 10202359 &#39;photo.jpg&#39;<br># =
works<br><br>$ touch -t 10210000 &#39;photo.jpg&#39;<br>touch: invalid date=
 format `10210000&#39;<br>

<br>$ touch --version<br>touch (GNU coreutils) 8.5<br><br clear=3D"all">Tha=
nks in advance for any help.<span class=3D"HOEnZb"><font color=3D"#888888">=
<br><br>-- <br><span style=3D"color:rgb(102,102,102)"><a href=3D"http://www=
.rafael.xavier.blog.br/" target=3D"_blank"></a><a href=3D"tel:%2B55%20%2816=
%29%208138-1583" value=3D"+551681381583" target=3D"_blank">+55 (16) 8138-15=
83</a>, skype: rxaviers<br>

</span><a href=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://ra=
fael.xavier.blog.br</a><br>
</font></span></blockquote></div><br><br clear=3D"all"><br>-- <br><span sty=
le=3D"color:rgb(102,102,102)"><a href=3D"http://www.rafael.xavier.blog.br/"=
 target=3D"_blank"></a>+55 (16) 8138-1583, skype: rxaviers<br></span><a hre=
f=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://rafael.xavier.b=
log.br</a><br>


--bcaec54b4ada4c640504ce74ca26--


From MAILER-DAEMON Wed Nov 14 09:05:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TYdb1-00045w-6r
	for mharc-coreutils@gnu.org; Wed, 14 Nov 2012 09:05:39 -0500
Received: from eggs.gnu.org ([208.118.235.92]:53593)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdaw-00044w-Bc
	for coreutils@gnu.org; Wed, 14 Nov 2012 09:05:37 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdat-0006s5-9D
	for coreutils@gnu.org; Wed, 14 Nov 2012 09:05:34 -0500
Received: from mail-vb0-f41.google.com ([209.85.212.41]:65353)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdat-0006s1-34
	for coreutils@gnu.org; Wed, 14 Nov 2012 09:05:31 -0500
Received: by mail-vb0-f41.google.com with SMTP id v13so545728vbk.0
	for <coreutils@gnu.org>; Wed, 14 Nov 2012 06:05:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:content-type; bh=scv+cM6XZcftaxMq+Tx3FiwTssiu7KsatPBet8ZZcSg=;
	b=MaAUbk95vjzMRwwYHSG0w5pWWwd5j0t39yYhUJ17yod9Amk2fRi1RCb3K7meS2zVwm
	gAeZf8g/nzyiWxolb9qT1u5SdUORzh5LDFbjMVCg8fif3z1FKcoJKzxK69IHrJa50sRt
	XX92Zp2PW+cd0PiPnG6oNJXYz8lLkPJZRrbw5g44BRxwBgiD6y7mcPqxArPAJe/d3cWx
	xL0PhrDARm8PdsNodj+AZyrdRJlLlRF0/2+oZfA5Iu22wP02TAMuAxsltls1D9LHUcL1
	JetJe8MyuoneJ+6LVrXuRV/1ZxQKVfwEkcr0hUOjeaUM3ImKn34JTzPbdbu39/J+O2/a
	I0Qg==
MIME-Version: 1.0
Received: by 10.52.74.135 with SMTP id t7mr2049597vdv.18.1352901930572; Wed,
	14 Nov 2012 06:05:30 -0800 (PST)
Received: by 10.58.19.71 with HTTP; Wed, 14 Nov 2012 06:05:30 -0800 (PST)
In-Reply-To: <CADdLYsrLUnN0R1n38HzD7EgY9fOYN-40prAJYjcGpNr=fH+NRg@mail.gmail.com>
References: <CADdLYsrS1_iEuOyV8yfb5Trs5ZU9ZRVGxgaLL6xOhrXa33nt4Q@mail.gmail.com>
	<CADdLYsp3fRDj7=1DgkSBR8QQQLzozRLjYb85oWFSKRUpoTmVLw@mail.gmail.com>
	<CADdLYsrLUnN0R1n38HzD7EgY9fOYN-40prAJYjcGpNr=fH+NRg@mail.gmail.com>
Date: Wed, 14 Nov 2012 12:05:30 -0200
Message-ID: <CADdLYsoRPjGwO4F9K0KZ4g41QJs80cK_Wfc8V8aOQ3-eZHvZ5w@mail.gmail.com>
Subject: Re: touch: is 00hh timestamp invalid?
From: Rafael Xavier <rxaviers@gmail.com>
To: coreutils@gnu.org
Content-Type: multipart/alternative; boundary=bcaec501634bfcdd1f04ce750673
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 209.85.212.41
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 14 Nov 2012 14:05:37 -0000

--bcaec501634bfcdd1f04ce750673
Content-Type: text/plain; charset=ISO-8859-1

wow, I've just figured it out.
Sorry for the buzz, it's due my timezone. On that day, BRT have a daylight
savings change and the time between midnight and 1am is invalid.

On Wed, Nov 14, 2012 at 11:51 AM, Rafael Xavier <rxaviers@gmail.com> wrote:

> A gnulib posixtime bug?
>
>
> On Wed, Nov 14, 2012 at 11:48 AM, Rafael Xavier <rxaviers@gmail.com>wrote:
>
>> The interesting thing is that the below "workaround" works:
>>
>> $ touch -t 10212359.60 'photo.jpg'
>>
>> $ ls -l 'photo.jpg'
>> -rw-r--r-- 1 xavier xavier 146604 2012-10-22 00:00 photo.jpg
>>
>> holy cow
>>
>>
>> On Wed, Nov 14, 2012 at 11:43 AM, Rafael Xavier <rxaviers@gmail.com>wrote:
>>
>>> Hello all,
>>>
>>> Am I missing something? But, I am unable to set the timestamp of a file
>>> to 00h.
>>>
>>> $ touch -t 10202359 'photo.jpg'
>>> # works
>>>
>>> $ touch -t 10210000 'photo.jpg'
>>> touch: invalid date format `10210000'
>>>
>>> $ touch --version
>>> touch (GNU coreutils) 8.5
>>>
>>> Thanks in advance for any help.
>>>
>>> --
>>> <http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
>>> http://rafael.xavier.blog.br
>>>
>>
>>
>>
>> --
>> <http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
>> http://rafael.xavier.blog.br
>>
>
>
>
> --
> <http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
> http://rafael.xavier.blog.br
>



-- 
<http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
http://rafael.xavier.blog.br

--bcaec501634bfcdd1f04ce750673
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

wow, I&#39;ve just figured it out.<br>Sorry for the buzz, it&#39;s due my t=
imezone. On that day, BRT have a daylight savings change and the time betwe=
en midnight and 1am is invalid.<br><br><div class=3D"gmail_quote">On Wed, N=
ov 14, 2012 at 11:51 AM, Rafael Xavier <span dir=3D"ltr">&lt;<a href=3D"mai=
lto:rxaviers@gmail.com" target=3D"_blank">rxaviers@gmail.com</a>&gt;</span>=
 wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">A gnulib posixtime bug?<div class=3D"HOEnZb"=
><div class=3D"h5"><br><br><div class=3D"gmail_quote">On Wed, Nov 14, 2012 =
at 11:48 AM, Rafael Xavier <span dir=3D"ltr">&lt;<a href=3D"mailto:rxaviers=
@gmail.com" target=3D"_blank">rxaviers@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
The interesting thing is that the below &quot;workaround&quot; works:<br><b=
r>$ touch -t 10212359.60 &#39;photo.jpg&#39;<br><br>$ ls -l &#39;photo.jpg&=
#39;<br>-rw-r--r-- 1 xavier xavier 146604 2012-10-22 00:00 photo.jpg<br>


<br>holy cow<div><div><br><br><div class=3D"gmail_quote">On Wed, Nov 14, 20=
12 at 11:43 AM, Rafael Xavier <span dir=3D"ltr">&lt;<a href=3D"mailto:rxavi=
ers@gmail.com" target=3D"_blank">rxaviers@gmail.com</a>&gt;</span> wrote:<b=
r>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Hello all,<br><br>Am I missing something? But, I am unable to set the times=
tamp of a file to 00h.<br><br>$ touch -t 10202359 &#39;photo.jpg&#39;<br># =
works<br><br>$ touch -t 10210000 &#39;photo.jpg&#39;<br>touch: invalid date=
 format `10210000&#39;<br>



<br>$ touch --version<br>touch (GNU coreutils) 8.5<br><br clear=3D"all">Tha=
nks in advance for any help.<span><font color=3D"#888888"><br><br>-- <br><s=
pan style=3D"color:rgb(102,102,102)"><a href=3D"http://www.rafael.xavier.bl=
og.br/" target=3D"_blank"></a><a href=3D"tel:%2B55%20%2816%29%208138-1583" =
value=3D"+551681381583" target=3D"_blank">+55 (16) 8138-1583</a>, skype: rx=
aviers<br>



</span><a href=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://ra=
fael.xavier.blog.br</a><br>
</font></span></blockquote></div><br><br clear=3D"all"><br>-- <br><span sty=
le=3D"color:rgb(102,102,102)"><a href=3D"http://www.rafael.xavier.blog.br/"=
 target=3D"_blank"></a><a href=3D"tel:%2B55%20%2816%29%208138-1583" value=
=3D"+551681381583" target=3D"_blank">+55 (16) 8138-1583</a>, skype: rxavier=
s<br>

</span><a href=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://ra=
fael.xavier.blog.br</a><br>

</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br><span style=
=3D"color:rgb(102,102,102)"><a href=3D"http://www.rafael.xavier.blog.br/" t=
arget=3D"_blank"></a><a href=3D"tel:%2B55%20%2816%29%208138-1583" value=3D"=
+551681381583" target=3D"_blank">+55 (16) 8138-1583</a>, skype: rxaviers<br=
>
</span><a href=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://ra=
fael.xavier.blog.br</a><br>

</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br><span style=
=3D"color:rgb(102,102,102)"><a href=3D"http://www.rafael.xavier.blog.br/" t=
arget=3D"_blank"></a>+55 (16) 8138-1583, skype: rxaviers<br></span><a href=
=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://rafael.xavier.bl=
og.br</a><br>


--bcaec501634bfcdd1f04ce750673--


From MAILER-DAEMON Wed Nov 14 09:14:05 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TYdjB-0006sa-Am
	for mharc-coreutils@gnu.org; Wed, 14 Nov 2012 09:14:05 -0500
Received: from eggs.gnu.org ([208.118.235.92]:35591)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdj7-0006rt-Ap
	for coreutils@gnu.org; Wed, 14 Nov 2012 09:14:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdj4-0000yg-8h
	for coreutils@gnu.org; Wed, 14 Nov 2012 09:14:01 -0500
Received: from mail-ye0-f169.google.com ([209.85.213.169]:38984)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <rxaviers@gmail.com>) id 1TYdj4-0000yQ-2i
	for coreutils@gnu.org; Wed, 14 Nov 2012 09:13:58 -0500
Received: by mail-ye0-f169.google.com with SMTP id q11so69363yen.0
	for <coreutils@gnu.org>; Wed, 14 Nov 2012 06:13:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:content-type; bh=M14oGSECpVgYFLm06OEHOVGkL89bHHD/JWSwEvA3fkY=;
	b=I51yUqCH8/Gnixtwck2bGB2aezjQRnrfJdDTv1DAwaN4CLE+j1e/SLGv6ouYhJUfmC
	O5d0JjIGsoh9YUwLQ76YsQrHsQI4z/7sZ7w0KazcTy+cJilTwdYnIZDoil91vw68jHd8
	hoBOKFqnl+UlAAzGMurSDMTXMn+mtgtlegKkRnnnZQfOoHlNkhOAVOAoVO1x0rlgRDx1
	9EZ8yYF68U+LmvG+v4kLF9gKLCMDEobx3ee4ghbCuGZlJz+mDd7ryU2+HtNsv/0aey1U
	D+mZCA4yEw063R58wQmVrDrMZECs5SsqsTLlMN+eDkDZKzx0FexinoEEXQ4Z9E5fX4op
	+osw==
MIME-Version: 1.0
Received: by 10.58.73.137 with SMTP id l9mr32403032vev.44.1352902437451; Wed,
	14 Nov 2012 06:13:57 -0800 (PST)
Received: by 10.58.19.71 with HTTP; Wed, 14 Nov 2012 06:13:57 -0800 (PST)
In-Reply-To: <CADdLYsoRPjGwO4F9K0KZ4g41QJs80cK_Wfc8V8aOQ3-eZHvZ5w@mail.gmail.com>
References: <CADdLYsrS1_iEuOyV8yfb5Trs5ZU9ZRVGxgaLL6xOhrXa33nt4Q@mail.gmail.com>
	<CADdLYsp3fRDj7=1DgkSBR8QQQLzozRLjYb85oWFSKRUpoTmVLw@mail.gmail.com>
	<CADdLYsrLUnN0R1n38HzD7EgY9fOYN-40prAJYjcGpNr=fH+NRg@mail.gmail.com>
	<CADdLYsoRPjGwO4F9K0KZ4g41QJs80cK_Wfc8V8aOQ3-eZHvZ5w@mail.gmail.com>
Date: Wed, 14 Nov 2012 12:13:57 -0200
Message-ID: <CADdLYsrOeSNRkQLxNMy8xhrOOE6qYvUbSjzkhRhn9ZO1KXbZQQ@mail.gmail.com>
Subject: Re: touch: is 00hh timestamp invalid?
From: Rafael Xavier <rxaviers@gmail.com>
To: coreutils@gnu.org
Content-Type: multipart/alternative; boundary=047d7bacc17033387d04ce75253b
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 209.85.213.169
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 14 Nov 2012 14:14:04 -0000

--047d7bacc17033387d04ce75253b
Content-Type: text/plain; charset=ISO-8859-1

Interesting to note that 10212359.60 bypasses it. <- That could be a bug.

On Wed, Nov 14, 2012 at 12:05 PM, Rafael Xavier <rxaviers@gmail.com> wrote:

> wow, I've just figured it out.
> Sorry for the buzz, it's due my timezone. On that day, BRT have a daylight
> savings change and the time between midnight and 1am is invalid.
>
>
> On Wed, Nov 14, 2012 at 11:51 AM, Rafael Xavier <rxaviers@gmail.com>wrote:
>
>> A gnulib posixtime bug?
>>
>>
>> On Wed, Nov 14, 2012 at 11:48 AM, Rafael Xavier <rxaviers@gmail.com>wrote:
>>
>>> The interesting thing is that the below "workaround" works:
>>>
>>> $ touch -t 10212359.60 'photo.jpg'
>>>
>>> $ ls -l 'photo.jpg'
>>> -rw-r--r-- 1 xavier xavier 146604 2012-10-22 00:00 photo.jpg
>>>
>>> holy cow
>>>
>>>
>>> On Wed, Nov 14, 2012 at 11:43 AM, Rafael Xavier <rxaviers@gmail.com>wrote:
>>>
>>>> Hello all,
>>>>
>>>> Am I missing something? But, I am unable to set the timestamp of a file
>>>> to 00h.
>>>>
>>>> $ touch -t 10202359 'photo.jpg'
>>>> # works
>>>>
>>>> $ touch -t 10210000 'photo.jpg'
>>>> touch: invalid date format `10210000'
>>>>
>>>> $ touch --version
>>>> touch (GNU coreutils) 8.5
>>>>
>>>> Thanks in advance for any help.
>>>>
>>>> --
>>>> <http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
>>>> http://rafael.xavier.blog.br
>>>>
>>>
>>>
>>>
>>> --
>>> <http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
>>> http://rafael.xavier.blog.br
>>>
>>
>>
>>
>> --
>> <http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
>> http://rafael.xavier.blog.br
>>
>
>
>
> --
> <http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
> http://rafael.xavier.blog.br
>



-- 
<http://www.rafael.xavier.blog.br/>+55 (16) 8138-1583, skype: rxaviers
http://rafael.xavier.blog.br

--047d7bacc17033387d04ce75253b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Interesting to note that 10212359.60 bypasses it. &lt;- That could be a bug=
.<br><br><div class=3D"gmail_quote">On Wed, Nov 14, 2012 at 12:05 PM, Rafae=
l Xavier <span dir=3D"ltr">&lt;<a href=3D"mailto:rxaviers@gmail.com" target=
=3D"_blank">rxaviers@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">wow, I&#39;ve just figured it out.<br>Sorry =
for the buzz, it&#39;s due my timezone. On that day, BRT have a daylight sa=
vings change and the time between midnight and 1am is invalid.<div class=3D=
"HOEnZb">
<div class=3D"h5"><br><br><div class=3D"gmail_quote">On Wed, Nov 14, 2012 a=
t 11:51 AM, Rafael Xavier <span dir=3D"ltr">&lt;<a href=3D"mailto:rxaviers@=
gmail.com" target=3D"_blank">rxaviers@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">A gnulib posixtime bug?<div><div><br><br><di=
v class=3D"gmail_quote">On Wed, Nov 14, 2012 at 11:48 AM, Rafael Xavier <sp=
an dir=3D"ltr">&lt;<a href=3D"mailto:rxaviers@gmail.com" target=3D"_blank">=
rxaviers@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
The interesting thing is that the below &quot;workaround&quot; works:<br><b=
r>$ touch -t 10212359.60 &#39;photo.jpg&#39;<br><br>$ ls -l &#39;photo.jpg&=
#39;<br>-rw-r--r-- 1 xavier xavier 146604 2012-10-22 00:00 photo.jpg<br>



<br>holy cow<div><div><br><br><div class=3D"gmail_quote">On Wed, Nov 14, 20=
12 at 11:43 AM, Rafael Xavier <span dir=3D"ltr">&lt;<a href=3D"mailto:rxavi=
ers@gmail.com" target=3D"_blank">rxaviers@gmail.com</a>&gt;</span> wrote:<b=
r>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Hello all,<br><br>Am I missing something? But, I am unable to set the times=
tamp of a file to 00h.<br><br>$ touch -t 10202359 &#39;photo.jpg&#39;<br># =
works<br><br>$ touch -t 10210000 &#39;photo.jpg&#39;<br>touch: invalid date=
 format `10210000&#39;<br>




<br>$ touch --version<br>touch (GNU coreutils) 8.5<br><br clear=3D"all">Tha=
nks in advance for any help.<span><font color=3D"#888888"><br><br>-- <br><s=
pan style=3D"color:rgb(102,102,102)"><a href=3D"http://www.rafael.xavier.bl=
og.br/" target=3D"_blank"></a><a href=3D"tel:%2B55%20%2816%29%208138-1583" =
value=3D"+551681381583" target=3D"_blank">+55 (16) 8138-1583</a>, skype: rx=
aviers<br>




</span><a href=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://ra=
fael.xavier.blog.br</a><br>
</font></span></blockquote></div><br><br clear=3D"all"><br>-- <br><span sty=
le=3D"color:rgb(102,102,102)"><a href=3D"http://www.rafael.xavier.blog.br/"=
 target=3D"_blank"></a><a href=3D"tel:%2B55%20%2816%29%208138-1583" value=
=3D"+551681381583" target=3D"_blank">+55 (16) 8138-1583</a>, skype: rxavier=
s<br>


</span><a href=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://ra=
fael.xavier.blog.br</a><br>

</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br><span style=
=3D"color:rgb(102,102,102)"><a href=3D"http://www.rafael.xavier.blog.br/" t=
arget=3D"_blank"></a><a href=3D"tel:%2B55%20%2816%29%208138-1583" value=3D"=
+551681381583" target=3D"_blank">+55 (16) 8138-1583</a>, skype: rxaviers<br=
>

</span><a href=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://ra=
fael.xavier.blog.br</a><br>

</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br><span style=
=3D"color:rgb(102,102,102)"><a href=3D"http://www.rafael.xavier.blog.br/" t=
arget=3D"_blank"></a><a href=3D"tel:%2B55%20%2816%29%208138-1583" value=3D"=
+551681381583" target=3D"_blank">+55 (16) 8138-1583</a>, skype: rxaviers<br=
>
</span><a href=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://ra=
fael.xavier.blog.br</a><br>

</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br><span style=
=3D"color:rgb(102,102,102)"><a href=3D"http://www.rafael.xavier.blog.br/" t=
arget=3D"_blank"></a>+55 (16) 8138-1583, skype: rxaviers<br></span><a href=
=3D"http://rafael.xavier.blog.br" target=3D"_blank">http://rafael.xavier.bl=
og.br</a><br>


--047d7bacc17033387d04ce75253b--


From MAILER-DAEMON Wed Nov 14 09:19:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TYdoC-0001SE-Fl
	for mharc-coreutils@gnu.org; Wed, 14 Nov 2012 09:19:16 -0500
Received: from eggs.gnu.org ([208.118.235.92]:35345)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1TYdo8-0001RD-Ba
	for coreutils@gnu.org; Wed, 14 Nov 2012 09:19:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1TYdo5-0002di-9Q
	for coreutils@gnu.org; Wed, 14 Nov 2012 09:19:12 -0500
Received: from mx1.redhat.com ([209.132.183.28]:18373)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1TYdo5-0002dH-0Q
	for coreutils@gnu.org; Wed, 14 Nov 2012 09:19:09 -0500
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
	(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAEEJ78I012152
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 14 Nov 2012 09:19:07 -0500
Received: from [10.3.113.23] (ovpn-113-23.phx2.redhat.com [10.3.113.23])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAEEJ6Sq011687; Wed, 14 Nov 2012 09:19:07 -0500
Message-ID: <50A3A859.60507@redhat.com>
Date: Wed, 14 Nov 2012 07:19:05 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121029 Thunderbird/16.0.2
MIME-Version: 1.0
To: Rafael Xavier <rxaviers@gmail.com>
Subject: Re: touch: is 00hh timestamp invalid?
References: <CADdLYsrS1_iEuOyV8yfb5Trs5ZU9ZRVGxgaLL6xOhrXa33nt4Q@mail.gmail.com>
	<CADdLYsp3fRDj7=1DgkSBR8QQQLzozRLjYb85oWFSKRUpoTmVLw@mail.gmail.com>
	<CADdLYsrLUnN0R1n38HzD7EgY9fOYN-40prAJYjcGpNr=fH+NRg@mail.gmail.com>
	<CADdLYsoRPjGwO4F9K0KZ4g41QJs80cK_Wfc8V8aOQ3-eZHvZ5w@mail.gmail.com>
In-Reply-To: <CADdLYsoRPjGwO4F9K0KZ4g41QJs80cK_Wfc8V8aOQ3-eZHvZ5w@mail.gmail.com>
X-Enigmail-Version: 1.4.5
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig07D7387311C42F53361F61DC"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 14 Nov 2012 14:19:15 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig07D7387311C42F53361F61DC
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 11/14/2012 07:05 AM, Rafael Xavier wrote:
> wow, I've just figured it out.
> Sorry for the buzz, it's due my timezone. On that day, BRT have a dayli=
ght
> savings change and the time between midnight and 1am is invalid.

Indeed, and this is a FAQ:
https://www.gnu.org/software/coreutils/faq/#The-date-command-is-not-worki=
ng-right_002e

>=20
> On Wed, Nov 14, 2012 at 11:51 AM, Rafael Xavier <rxaviers@gmail.com> wr=
ote:
>=20
>> A gnulib posixtime bug?

Nope.  And please don't top-post - it makes it awkward to reply.

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


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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBCAAGBQJQo6hZAAoJEKeha0olJ0NqqUAIAJCdI5+yRFvYAxW2ogFpyznp
3plOjFErW0lLJnXkhvWNPTpvIrnUqrpcuwMDk58rhZLyeKoP3RTlTaPIjoqhKdGp
DvDjdzMSXyJ1AP5ZoJXhJk8iZvW9RWmHRGln+FtkpZbh2FXuWLJG4ScbFbsU8byA
bUTgHsO/PWtw//G2XFJlWkVkj4o6vYPZTe/zoTmjK+INNN7wWvOKWli0LDA9vt4u
TTNH9cW4wJ9rcSaCTlvVvFTbRSGE+rpHduyP0JUqoi1KilmfLTXgWqzKA3ikEZWt
vsz2rCr1/5azeOFNTz8viCEuR7qdmbPKnlsABtZMveZBade7c7a+Gx3bFi2JT3Y=
=Wx6o
-----END PGP SIGNATURE-----

--------------enig07D7387311C42F53361F61DC--


From MAILER-DAEMON Fri Nov 16 15:08:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TZSCn-000299-Pp
	for mharc-coreutils@gnu.org; Fri, 16 Nov 2012 15:08:01 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44793)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bob@proulx.com>) id 1TZSCj-00026y-BK
	for coreutils@gnu.org; Fri, 16 Nov 2012 15:08:00 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bob@proulx.com>) id 1TZSCg-0000ej-9T
	for coreutils@gnu.org; Fri, 16 Nov 2012 15:07:57 -0500
Received: from joseki.proulx.com ([216.17.153.58]:43257)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bob@proulx.com>) id 1TZSCg-0000eP-2w
	for coreutils@gnu.org; Fri, 16 Nov 2012 15:07:54 -0500
Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119])
	by joseki.proulx.com (Postfix) with ESMTP id 3ABA3211D6
	for <coreutils@gnu.org>; Fri, 16 Nov 2012 13:07:53 -0700 (MST)
Received: by hysteria.proulx.com (Postfix, from userid 1000)
	id ECC122DCC7; Fri, 16 Nov 2012 13:07:52 -0700 (MST)
Date: Fri, 16 Nov 2012 13:07:52 -0700
From: Bob Proulx <bob@proulx.com>
To: coreutils@gnu.org
Subject: BTS Mail-Followup-To submitter email
Message-ID: <20121116200752.GA2948@hysteria.proulx.com>
Mail-Followup-To: coreutils@gnu.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 216.17.153.58
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 16 Nov 2012 20:08:00 -0000

Just an FYI for frequent bug tracking system users...

Glenn Morris made a nice improvement to the Mail-Followup-To header
that is added to the closed bug email.  The closed bug email includes
a MFT header to keep follow-ups from going to the -done address and
closing a possibly later reopened bug.

It most recently did not include the original bug submitter but with
the new improvement it now does so that follow-ups will be directed
automatically to include the original bug submitter.  Nice!  Here are
the details:

  http://lists.gnu.org/archive/html/help-debbugs/2012-11/threads.html

Bob


From MAILER-DAEMON Sat Nov 17 11:27:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TZlF8-0005fO-QO
	for mharc-coreutils@gnu.org; Sat, 17 Nov 2012 11:27:42 -0500
Received: from eggs.gnu.org ([208.118.235.92]:54941)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1TZlF4-0005dz-Fu
	for coreutils@gnu.org; Sat, 17 Nov 2012 11:27:41 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1TZlF1-0002qQ-DF
	for coreutils@gnu.org; Sat, 17 Nov 2012 11:27:38 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:60483)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@cs.ucla.edu>) id 1TZlF1-0002qG-8B
	for coreutils@gnu.org; Sat, 17 Nov 2012 11:27:35 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id B869BA6000A
	for <coreutils@gnu.org>; Sat, 17 Nov 2012 08:27:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id p3rS-W6H3tYh for <coreutils@gnu.org>;
	Sat, 17 Nov 2012 08:27:33 -0800 (PST)
Received: from [192.168.1.3] (pool-71-189-154-249.lsanca.fios.verizon.net
	[71.189.154.249])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 455E1A60001
	for <coreutils@gnu.org>; Sat, 17 Nov 2012 08:27:33 -0800 (PST)
Message-ID: <50A7BAF5.8040909@cs.ucla.edu>
Date: Sat, 17 Nov 2012 08:27:33 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:16.0) Gecko/20121028 Thunderbird/16.0.2
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: [PATCH] doc: explain why dd is called "dd"
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 131.179.128.62
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 17 Nov 2012 16:27:41 -0000

I pushed this hoping that it may help forestall questions about
why dd is so, ahem, *unusual*....

* doc/coreutils.texi (dd invocation): Mention JCL.
---
 doc/coreutils.texi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 7f8c0d1..70e7ca0 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -8045,7 +8045,9 @@ dd @var{option}
 @end example
 
 The only options are @option{--help} and @option{--version}.
-@xref{Common options}.  @command{dd} accepts the following operands.
+@xref{Common options}.  @command{dd} accepts the following operands,
+whose syntax was inspired by the DD (data definition) statement of
+OS/360 JCL.
 
 @table @samp
 
-- 
1.7.11.7



From MAILER-DAEMON Sun Nov 18 13:09:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ta9Je-0006dD-Gb
	for mharc-coreutils@gnu.org; Sun, 18 Nov 2012 13:09:58 -0500
Received: from eggs.gnu.org ([208.118.235.92]:60078)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Ta9Ja-0006cm-CE
	for coreutils@gnu.org; Sun, 18 Nov 2012 13:09:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Ta9JX-0003LH-9N
	for coreutils@gnu.org; Sun, 18 Nov 2012 13:09:54 -0500
Received: from mx.meyering.net ([88.168.87.75]:39838)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Ta9JX-0003LB-1Y
	for coreutils@gnu.org; Sun, 18 Nov 2012 13:09:51 -0500
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id B6B3A601EB;
	Sun, 18 Nov 2012 19:09:49 +0100 (CET)
Resent-To: Michael Stone <mstone@debian.org>, dschepler@gmail.com,
	coreutils@gnu.org
Resent-From: Jim Meyering <jim@meyering.net>
Resent-Message-ID: <87y5hybx5e.fsf@rho.meyering.net>
Resent-Date: Sun, 18 Nov 2012 19:09:49 +0100
From: Jim Meyering <jim@meyering.net>
To: Michael Stone <mstone@debian.org>, dschepler@gmail.com
Subject: Re: [dschepler@gmail.com: Bug#693337: coreutils: src/factor.c should
	use HAVE_LONG_LONG_INT instead of undefined HAVE_LONG_LONG]
In-Reply-To: <35f66652-318d-11e2-8f8a-001cc0cda50c@msgid.mathom.us> (Michael
	Stone's message of "Sun, 18 Nov 2012 09:35:49 -0500")
References: <35f66652-318d-11e2-8f8a-001cc0cda50c@msgid.mathom.us>
Date: Sun, 18 Nov 2012 19:08:50 +0100
Message-ID: <873906dbrh.fsf@rho.meyering.net>
MIME-Version: 1.0
Content-Type: text/plain
Lines: 60
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 88.168.87.75
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 18 Nov 2012 18:09:57 -0000

Michael Stone wrote:

> FYI
>
> From: Daniel Schepler <dschepler@gmail.com>
> Subject: Bug#693337: coreutils: src/factor.c should use HAVE_LONG_LONG_INT
> 	instead of undefined HAVE_LONG_LONG
> To: submit@bugs.debian.org
> Date: Thu, 15 Nov 2012 08:02:02 -0800 (3 days, 1 hour, 53 minutes ago)
>
> Source: coreutils
> Version: 8.20-1
> Severity: wishlist
> User: debian-x32@lists.debian.org
> Usertags: port-x32 ftbfs-x32
>
> Hi, coreutils is currently failing to build on the x32 port, with assembler
> errors in src/factor.c.  I found that the cause is the file incorrectly defining
> DItype to long instead of long long, because of the issue I detailed in the
> subject.  Attached a full debdiff of the changes with which coreutils builds
> again.
>
> I also tested the patch on i386, and verified that the build still works fine
> there.  And of course, the patch should make no difference on amd64.

Thanks to both of you.
I've written the following.
Daniel, since you're listed as the author, please proofread that
commit log (I wouldn't want to commit anything erroneous in your name).
I'll wait for your ACK before pushing it.

>From 700fe515c26bdb18dd831366773898bf3739b0e2 Mon Sep 17 00:00:00 2001
From: Daniel Schepler <dschepler@gmail.com>
Date: Sun, 18 Nov 2012 10:04:54 -0800
Subject: [PATCH] build: fix compilation failure on x32

* src/factor.c [HAVE_ATTRIBUTE_MODE]: Fix typo in #if test:
s/HAVE_LONG_LONG/HAVE_LONG_LONG_INT/.  Otherwise, factor.c would
elicit assembler errors on x32: it was incorrectly defining DItype
to long instead of long long.  Patch and report in
http://bugs.debian.org/693337;  Mike Stone notified upstream.
---
 src/factor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/factor.c b/src/factor.c
index 8439262..6d1d17a 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -147,7 +147,7 @@ typedef unsigned int UDItype    __attribute__ ((mode (DI)));
 typedef unsigned char UQItype;
 typedef          long SItype;
 typedef unsigned long int USItype;
-#  if HAVE_LONG_LONG
+#  if HAVE_LONG_LONG_INT
 typedef long long int DItype;
 typedef unsigned long long int UDItype;
 #  else /* Assume `long' gives us a wide enough type.  Needed for hppa2.0w.  */
--
1.8.0.197.g5a90748


From MAILER-DAEMON Sun Nov 18 13:15:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ta9Ov-0007KH-2F
	for mharc-coreutils@gnu.org; Sun, 18 Nov 2012 13:15:25 -0500
Received: from eggs.gnu.org ([208.118.235.92]:35030)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Ta9Oq-0007IH-PV
	for coreutils@gnu.org; Sun, 18 Nov 2012 13:15:23 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Ta9On-0004jp-Nd
	for coreutils@gnu.org; Sun, 18 Nov 2012 13:15:20 -0500
Received: from mx.meyering.net ([88.168.87.75]:39849)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Ta9Om-0004jh-Uz
	for coreutils@gnu.org; Sun, 18 Nov 2012 13:15:17 -0500
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 45AE1602DB
	for <coreutils@gnu.org>; Sun, 18 Nov 2012 19:15:16 +0100 (CET)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: FYI: three maint patches
Date: Sun, 18 Nov 2012 19:15:16 +0100
Message-ID: <87r4nqbwwb.fsf@rho.meyering.net>
Lines: 98
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 88.168.87.75
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 18 Nov 2012 18:15:23 -0000

I've pushed these three maint patches:

>From d35a931d2daf0b8e8ad79940b99c40dc8ef75317 Mon Sep 17 00:00:00 2001
From: Jim Meyering <jim@meyering.net>
Date: Sun, 18 Nov 2012 09:16:17 -0800
Subject: [PATCH 1/3] maint: avoid i686-specific syntax-check failure

* cfg.mk (_gl_TS_unmarked_extern_vars): Define.
---
 cfg.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cfg.mk b/cfg.mk
index 2ddf414..943933a 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -604,3 +604,8 @@ export _gl_TS_headers = $(srcdir)/cfg.mk
 _gl_TS_dir = .
 _gl_TS_obj_files = src/*.$(OBJEXT)
 _gl_TS_other_headers = src/*.h
+
+# Tell the tight_scope rule about an exceptional "extern" variable.
+# Normally, the rule would detect its declaration, but that uses a
+# different name, __clz_tab.
+_gl_TS_unmarked_extern_vars = factor_clz_tab
--
1.8.0.197.g5a90748


>From 427e63661bf2f282035d0b1b3a94f420a0f19b07 Mon Sep 17 00:00:00 2001
From: Jim Meyering <jim@meyering.net>
Date: Sun, 18 Nov 2012 09:45:14 -0800
Subject: [PATCH 2/3] maint: correct indentation of W_TYPE_SIZE-defining cpp
 directives

* src/factor.c: Indent cpp directives to reflect their nesting.
---
 src/factor.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/factor.c b/src/factor.c
index 40cce1f..8439262 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -126,13 +126,13 @@
 /* Make definitions for longlong.h to make it do what it can do for us */

 /* bitcount for uintmax_t */
-#if UINTMAX_MAX == UINT32_MAX
-# define W_TYPE_SIZE 32
-#elif UINTMAX_MAX == UINT64_MAX
-# define W_TYPE_SIZE 64
-#elif UINTMAX_MAX == UINT128_MAX
-# define W_TYPE_SIZE 128
-#endif
+# if UINTMAX_MAX == UINT32_MAX
+#  define W_TYPE_SIZE 32
+# elif UINTMAX_MAX == UINT64_MAX
+#  define W_TYPE_SIZE 64
+# elif UINTMAX_MAX == UINT128_MAX
+#  define W_TYPE_SIZE 128
+# endif

 # define UWtype  uintmax_t
 # define UHWtype unsigned long int
--
1.8.0.197.g5a90748


>From 92cadcc8129831a8784c7ccbf75085bae3af0d70 Mon Sep 17 00:00:00 2001
From: Jim Meyering <jim@meyering.net>
Date: Sun, 18 Nov 2012 09:51:48 -0800
Subject: [PATCH 3/3] maint: reenable accidentally-disabled cppi-check
 syntax-check rule

* cfg.mk (exclude_file_name_regexp--sc_preprocessor_indentation): Fix
typo that disabled the sc_preprocessor_indentation syntax-check rule
by exempting all files.  s/__ll/_ll/  The typo was introduced in
commit v8.19-157-g759ebcb.
---
 cfg.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cfg.mk b/cfg.mk
index 943933a..38be9c8 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -574,7 +574,7 @@ exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
   $(tbi_1)|$(tbi_2)|$(tbi_3)

 exclude_file_name_regexp--sc_preprocessor_indentation = \
-  ^(gl/lib/rand-isaac\.[ch]|gl/tests/test-rand-isaac\.c)$$|$(__ll)
+  ^(gl/lib/rand-isaac\.[ch]|gl/tests/test-rand-isaac\.c)$$|$(_ll)
 exclude_file_name_regexp--sc_prohibit_stat_st_blocks = \
   ^(src/system\.h|tests/du/2g\.sh)$$

--
1.8.0.197.g5a90748


From MAILER-DAEMON Mon Nov 19 17:32:12 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TaZsy-0004xo-HE
	for mharc-coreutils@gnu.org; Mon, 19 Nov 2012 17:32:12 -0500
Received: from eggs.gnu.org ([208.118.235.92]:57321)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TaZsu-0004s1-Vr
	for coreutils@gnu.org; Mon, 19 Nov 2012 17:32:10 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TaZst-00059c-LB
	for coreutils@gnu.org; Mon, 19 Nov 2012 17:32:08 -0500
Received: from moutng.kundenserver.de ([212.227.126.171]:53117)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TaZst-00059J-Bd
	for coreutils@gnu.org; Mon, 19 Nov 2012 17:32:07 -0500
Received: from [192.168.1.11] (p4FF77D02.dip.t-dialin.net [79.247.125.2])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0MYHJs-1TnnHA2g7c-00UrqO; Mon, 19 Nov 2012 23:32:04 +0100
Message-ID: <50AAB363.5010609@bernhard-voelker.de>
Date: Mon, 19 Nov 2012 23:32:03 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: Re: [PATCH] doc: remove already implemented items from TODO
References: <509F88A0.5020201@bernhard-voelker.de>
In-Reply-To: <509F88A0.5020201@bernhard-voelker.de>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:WpKq2wtZa87LI/JUxg5efH4B/LihoPorBTi4jM8EOai
	wWW1tELmU3ZJ0aQlHV6rEikXijG3p2+4CgM7Ohlpza35xWcw7g
	L87fgALYOspQI+wmzM28bW89gtzCEwIKz14WBFrBN4MIy9d4QT
	hjm54sUVzvs4TaNFVlC/j5S5+WBq4cjlp9g5R19WmYL/jDkJ/e
	6KK0ysS/Emw4pBLLyqHg0JeSeRZnEnx8LUz3R2Ugvr3w8zEeM4
	pAkt0dZ/h85ATsZk7nZYiuJM4KVSm/k26PNMapMoNUDoGACbkE
	KnGUEmlYZjM/0egPQV/mz7kapZDX+QbqRhERCM7/hgYZ9FxR9c
	0ajfh5aGftPA1wsDYFNh4hrVSpidVW7X4MO8JPC9b
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.126.171
Cc: Karl Berry <karl@freefriends.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 19 Nov 2012 22:32:10 -0000

On 11/11/2012 12:14 PM, Bernhard Voelker wrote:
> From b4d94242ff9ff772dea8d84c34c5223c157a5677 Mon Sep 17 00:00:00 2001
> From: Bernhard Voelker <mail@bernhard-voelker.de>
> Date: Sun, 11 Nov 2012 12:07:47 +0100
> Subject: [PATCH] doc: remove already implemented items from TODO
> 
> * TODO (renice): The renice program is part of util-linux for
> years now. Remove entry.
> (dd): The option status=none has been implemented in commit
> v8.19-143-g7331ab5. Remove entry.
> ---

FYI - pushed: v8.20-37-gdf06231.

Have a nice day,
Berny


From MAILER-DAEMON Tue Nov 20 07:48:27 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TanFb-0000eu-S0
	for mharc-coreutils@gnu.org; Tue, 20 Nov 2012 07:48:27 -0500
Received: from eggs.gnu.org ([208.118.235.92]:60122)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TanFW-0000eX-H8
	for coreutils@gnu.org; Tue, 20 Nov 2012 07:48:26 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TanFQ-00037j-89
	for coreutils@gnu.org; Tue, 20 Nov 2012 07:48:22 -0500
Received: from moutng.kundenserver.de ([212.227.126.186]:49727)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>)
	id 1TanFP-00037Y-Uf; Tue, 20 Nov 2012 07:48:16 -0500
Received: from [192.168.1.11] (p4FF74619.dip.t-dialin.net [79.247.70.25])
	by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis)
	id 0M1kNy-1TGVXT3ZUI-00tYjg; Tue, 20 Nov 2012 13:48:14 +0100
Message-ID: <50AB7C0D.2040608@bernhard-voelker.de>
Date: Tue, 20 Nov 2012 13:48:13 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>, =?ISO-8859-1?Q?Ludovic_Court=E8s?=
	<ludo@gnu.org>
Subject: coreutils builds on Hydra broken since Oct. 5th
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:VDzdS5EBpx4l8JIcJAhpmPg9EfGNnYIT2j0wfOJqtBS
	6IyFFl/TBDLc9Tmf0HQwauRrs8SHSWWbTM4OclUt57h+FZ5Rxi
	ZPgiD/EQgQVPNyzMZgh1CsNlHAw/vZsRVnTagjb6bZEWf+jo3z
	/PYbG//nP/+5xIZLJJ1IleqtH6sinp18VleOkqXTIJoEWFLwls
	v4qH1klBlZNgZy4zIKuWJ/2oewtAT10zwI9w85UUTksXT2UzWq
	0uxiRmjhnW52MJAL760q51pqLngdiTiYMIKruIbKzZy/YhdLyJ
	nUVrd8pXIJBPD/ijAjd3WidQSYaWJPIR77DuTnqy1rKhIPRMPS
	UvjkL/4K9YNlGbazQzl0LhUb+atinWxCNkKiPltr/
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.126.186
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 20 Nov 2012 12:48:26 -0000

http://hydra.nixos.org/job/gnu/coreutils-master/build/errors, e.g.
http://hydra.nixos.org/build/3338727/log/raw:

  [qsource root is vly0xg7509kpdxbk5bd5g92l7bssvcsd-git-export
  [q[ppatching sources
  [q[pautoconfPhase
  sed: can't read src/wheel-gen.pl: No such file or directory

Other builds stop like this:
http://hydra.nixos.org/build/3338726/log/tail-reload

  [qsource root is coreutils-tarball-0
  [q[ppatching sources
  [q[pconfiguring
  no configure script, doing nothing
  [q[pbuilding
  no Makefile, doing nothing
  [q[prunning tests
  check flags:
  make: *** No rule to make target `check'.  Stop.

There must be something basically wrong now.
But I don't see it. Any clues?

Have a nice day,
Berny



From MAILER-DAEMON Tue Nov 20 10:22:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Tapec-0007pt-QL
	for mharc-coreutils@gnu.org; Tue, 20 Nov 2012 10:22:26 -0500
Received: from eggs.gnu.org ([208.118.235.92]:37154)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Tapea-0007oj-GC
	for coreutils@gnu.org; Tue, 20 Nov 2012 10:22:25 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TapeU-0003ys-Dy
	for coreutils@gnu.org; Tue, 20 Nov 2012 10:22:24 -0500
Received: from mx1.redhat.com ([209.132.183.28]:37577)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>)
	id 1TapeU-0003yh-6x; Tue, 20 Nov 2012 10:22:18 -0500
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAKFMBoj026253
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 20 Nov 2012 10:22:11 -0500
Received: from [10.36.116.51] (ovpn-116-51.ams2.redhat.com [10.36.116.51])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAKFM8LN026512
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Tue, 20 Nov 2012 10:22:10 -0500
Message-ID: <50ABA01F.9080706@draigBrady.com>
Date: Tue, 20 Nov 2012 15:22:07 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: coreutils builds on Hydra broken since Oct. 5th
References: <50AB7C0D.2040608@bernhard-voelker.de>
In-Reply-To: <50AB7C0D.2040608@bernhard-voelker.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qAKFMBoj026253
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: =?ISO-8859-1?Q?Ludovic_Court=E8s?= <ludo@gnu.org>,
	Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 20 Nov 2012 15:22:25 -0000

On 11/20/2012 12:48 PM, Bernhard Voelker wrote:
> http://hydra.nixos.org/job/gnu/coreutils-master/build/errors, e.g.
> http://hydra.nixos.org/build/3338727/log/raw:
>
>    [qsource root is vly0xg7509kpdxbk5bd5g92l7bssvcsd-git-export
>    =1B[q=1B[ppatching sources
>    =1B[q=1B[pautoconfPhase
>    sed: can't read src/wheel-gen.pl: No such file or directory

That file is no longer included since:
http://git.savannah.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommit;h=3D759e=
bcb5

> Other builds stop like this:
> http://hydra.nixos.org/build/3338726/log/tail-reload
>
>    =1B[qsource root is coreutils-tarball-0
>    =1B[q=1B[ppatching sources
>    =1B[q=1B[pconfiguring
>    no configure script, doing nothing
>    =1B[q=1B[pbuilding
>    no Makefile, doing nothing
>    =1B[q=1B[prunning tests
>    check flags:
>    make: *** No rule to make target `check'.  Stop.
>
> There must be something basically wrong now.
> But I don't see it. Any clues?

It seems I'm no longer getting emails
from the Hydra build daemon, as I got none
of the above info.

thanks,
P=E1draig.


From MAILER-DAEMON Tue Nov 20 11:32:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TaqkV-0003UL-Rt
	for mharc-coreutils@gnu.org; Tue, 20 Nov 2012 11:32:35 -0500
Received: from eggs.gnu.org ([208.118.235.92]:51728)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <KAction@gnu.org>) id 1TaqkT-0003U4-6v
	for coreutils@gnu.org; Tue, 20 Nov 2012 11:32:34 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <KAction@gnu.org>) id 1TaqkJ-0004jv-LJ
	for coreutils@gnu.org; Tue, 20 Nov 2012 11:32:33 -0500
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38767)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <KAction@gnu.org>) id 1TaqkJ-0004jr-H4
	for coreutils@gnu.org; Tue, 20 Nov 2012 11:32:23 -0500
Received: from broadband-77-37-146-56.nationalcablenetworks.ru
	([77.37.146.56]:37880 helo=localhost)
	by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <KAction@gnu.org>) id 1TaqkI-0007yt-F5
	for coreutils@gnu.org; Tue, 20 Nov 2012 11:32:23 -0500
Date: Tue, 20 Nov 2012 20:32:17 +0400
From: Dmitry Bogatov <KAction@gnu.org>
To: coreutils@gnu.org
Subject: [patch] mv symlink functionality
Message-ID: <20121120163217.GA29946@hell>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="opJtzjQTFsWo+cga"
Content-Disposition: inline
X-Jabber: KAction@beem-project.com
X-Phone: +79161582266
X-Message: If you read this, tell me about it. I am really impressed.
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
	(bad octet value).
X-Received-From: 2001:4830:134:3::e
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 20 Nov 2012 16:32:34 -0000


--opJtzjQTFsWo+cga
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline

Hello! Some time before I proposed idea for mv to leave symlink
behind. It received neither approval nor disappoval, so here is patch.

Words are wind, so code should attract more attention ;)


--
Best regards,
	Dmitry Bogatov <KAction@gnu.org>, GNU Thales maintainer.
GPG: D1E0591E0037BDCCBEE56002788BE01254B7F00D
Please, use GPG encryption, signing and format plain text letters
in accordance with RFC1855, section 2.1.1.


diff --git a/src/mv.c b/src/mv.c
index 5b08fdd..ff47e13 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -61,6 +61,7 @@ static struct option const long_options[] =
   {"no-target-directory", no_argument, NULL, 'T'},
   {"strip-trailing-slashes", no_argument, NULL, STRIP_TRAILING_SLASHES_OPTION},
   {"suffix", required_argument, NULL, 'S'},
+  {"symbolic-trail", no_argument, NULL, 's'},
   {"target-directory", required_argument, NULL, 't'},
   {"update", no_argument, NULL, 'u'},
   {"verbose", no_argument, NULL, 'v'},
@@ -236,6 +237,9 @@ do_move (const char *source, const char *dest, const struct cp_options *x)
         }
     }

+  if (x->symbolic_link)
+    ok &= !!symlink(dest, source);
+
   return ok;
 }

@@ -301,6 +305,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
 \n\
   -b                           like --backup but does not accept an argument\n\
   -f, --force                  do not prompt before overwriting\n\
+  -s, --symbolic-trace         leave a symbolic link to new file location.\n\
   -i, --interactive            prompt before overwrite\n\
   -n, --no-clobber             do not overwrite an existing file\n\
 If you specify more than one of -i, -f, -n, only the final one takes effect.\n\
@@ -369,7 +374,7 @@ main (int argc, char **argv)
      we'll actually use backup_suffix_string.  */
   backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");

-  while ((c = getopt_long (argc, argv, "bfint:uvS:T", long_options, NULL))
+  while ((c = getopt_long (argc, argv, "bfint:uvsS:T", long_options, NULL))
          != -1)
     {
       switch (c)
@@ -405,6 +410,9 @@ main (int argc, char **argv)
             }
           target_directory = optarg;
           break;
+        case 's':
+          x.symbolic_link = true;
+          break;
         case 'T':
           no_target_directory = true;
           break;

--opJtzjQTFsWo+cga
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iQIcBAEBAgAGBQJQq7CRAAoJEHiL4BJUt/AN9JoQALACD61E4Fa/Znsi/lq8GrS9
wiMC2F4Co3mqYPQS/tmscvvM9TIOXwGYWWU2g2d8OiEAx6Ie6oyT4CpQeKmwCj8F
E+4lox+v97dxEFe7zmJvOWO27f3ycdaj8ugtjjdo1l8/5FzllviZzzd0boZvS/SC
jtPaCJig3/8EhymX+XDmCYrZGX75OoBvr1T6V4PpsejBov531pKVgsb3vtmF0V44
AviHlAiLjYYWzAuaOsz5wXQ7zzRZFYCJGFpYnxZsfM9Wrsp8oFWtf69vDOnezfs2
MvK2gzCmoNCgT/pASbWuHQ4N3+89OVNB04GhGkHqmiXHrvfSxzopPzgpLARChahC
bwwlu3LNiaaqr5J8p51AOUa9M5xZV0Fv/l4Oo0WatnuU9boHgpHFra49my7g7ezj
ZQZwwep2oJB/PuHywPZvCRQP9zKqdTca/NKcaSKR+SS3imljy5Bqy7BpwP/6F1eK
z+pKQBRAnDjNYJyyGrhwoRytEzqpS4PANshSS5SJBpy9LsMeq1IoaTfo3U9OCcCV
+lzvSlIdQHN66XqMG0qzjo2EiBMxbP4YfgbY440wJ1vGpcfeu74xZlVi6+R081Wh
sxk0mNUj9GGji8ziupCVNvATlssKfw8ckcDbu1G2hn4hpc6ISCONYqvqnxU/Am8S
/ouUe1i2zZMoXiioT4//
=Hrh9
-----END PGP SIGNATURE-----

--opJtzjQTFsWo+cga--


From MAILER-DAEMON Tue Nov 20 16:32:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TavQa-0000FO-4L
	for mharc-coreutils@gnu.org; Tue, 20 Nov 2012 16:32:20 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45456)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ludo@gnu.org>) id 1TavQY-0000F6-Al
	for coreutils@gnu.org; Tue, 20 Nov 2012 16:32:19 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ludo@gnu.org>) id 1TavQW-0003RY-SG
	for coreutils@gnu.org; Tue, 20 Nov 2012 16:32:18 -0500
Received: from xanadu.aquilenet.fr ([88.191.123.111]:34658)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@gnu.org>)
	id 1TavQW-0003RS-M5
	for coreutils@gnu.org; Tue, 20 Nov 2012 16:32:16 -0500
Received: from localhost (localhost [127.0.0.1])
	by xanadu.aquilenet.fr (Postfix) with ESMTP id 1F064ABC1;
	Tue, 20 Nov 2012 22:32:07 +0100 (CET)
Received: from xanadu.aquilenet.fr ([127.0.0.1])
	by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id lh4TPS72dgKJ; Tue, 20 Nov 2012 22:32:07 +0100 (CET)
Received: from pluto (reverse-83.fdn.fr [80.67.176.83])
	by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 9275FABBF;
	Tue, 20 Nov 2012 22:32:06 +0100 (CET)
From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: coreutils builds on Hydra broken since Oct. 5th
References: <50AB7C0D.2040608@bernhard-voelker.de>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 30 Brumaire an 221 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0xEA52ECF4
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA  D15D 77DD 95E2 EA52 ECF4
X-OS: x86_64-unknown-linux-gnu
Date: Tue, 20 Nov 2012 22:32:06 +0100
In-Reply-To: <50AB7C0D.2040608@bernhard-voelker.de> (Bernhard Voelker's
	message of "Tue, 20 Nov 2012 13:48:13 +0100")
Message-ID: <87vcd0klk9.fsf@gnu.org>
User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 88.191.123.111
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 20 Nov 2012 21:32:19 -0000

Hi,

Bernhard Voelker <mail@bernhard-voelker.de> skribis:

> http://hydra.nixos.org/job/gnu/coreutils-master/build/errors, e.g.
> http://hydra.nixos.org/build/3338727/log/raw:
>
>   [qsource root is vly0xg7509kpdxbk5bd5g92l7bssvcsd-git-export
>   [q[ppatching sources
>   [q[pautoconfPhase
>   sed: can't read src/wheel-gen.pl: No such file or directory

The recipe had a hack to replace the /usr/bin/perl shebang with the
right path:

  http://git.sv.gnu.org/cgit/hydra-recipes.git/tree/coreutils/release.nix?i=
d=3Db09570ad2c3c5b179213cd0bbfecedced7ca0ce1#n66

I just removed it:

  http://git.sv.gnu.org/cgit/hydra-recipes.git/commit/?id=3D178efc3c953c2c6=
2fb328c59cf099ebc2b77ed7d

> Other builds stop like this:
> http://hydra.nixos.org/build/3338726/log/tail-reload

Yeah, this may look obscure...  What happened is that the =E2=80=98tarball=
=E2=80=99 job
failed; however, even though it failed, it produced a result, which is a
copy build tree when it failed (the build tree of a failed build can be
accessed by clicking on =E2=80=9CFailed build produced output=E2=80=9D.)

That output was then passed to the =E2=80=98build=E2=80=99 job (and similar=
), which then
failed because it contains no =E2=80=98configure=E2=80=99 script, etc.

P=C3=A1draig Brady <P@draigBrady.com> skribis:

> It seems I'm no longer getting emails
> from the Hydra build daemon, as I got none
> of the above info.

Messages are sent upon status change.  So presumably you got one when
=E2=80=98tarball=E2=80=99 first failed, and then no longer received any.

HTH,
Ludo=E2=80=99.


From MAILER-DAEMON Thu Nov 22 04:13:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbSr4-0006KV-87
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 04:13:54 -0500
Received: from eggs.gnu.org ([208.118.235.92]:46945)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbSqy-0006JH-PB
	for coreutils@gnu.org; Thu, 22 Nov 2012 04:13:53 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbSqv-0005Sd-Si
	for coreutils@gnu.org; Thu, 22 Nov 2012 04:13:48 -0500
Received: from moutng.kundenserver.de ([212.227.17.9]:51320)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>)
	id 1TbSqv-0005RU-Jk; Thu, 22 Nov 2012 04:13:45 -0500
Received: from [192.168.1.11] (p4FF76626.dip.t-dialin.net [79.247.102.38])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0LfWbl-1SvEIJ2qKX-00oeH1; Thu, 22 Nov 2012 10:13:43 +0100
Message-ID: <50ADECC5.5080207@bernhard-voelker.de>
Date: Thu, 22 Nov 2012 10:13:41 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: =?UTF-8?B?THVkb3ZpYyBDb3VydMOocw==?= <ludo@gnu.org>, =?UTF-8?B?UMOhZHI=?=
	=?UTF-8?B?YWlnIEJyYWR5?= <P@draigBrady.com>
Subject: Re: coreutils builds on Hydra broken since Oct. 5th
References: <50AB7C0D.2040608@bernhard-voelker.de> <87vcd0klk9.fsf@gnu.org>
In-Reply-To: <87vcd0klk9.fsf@gnu.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:Dg6DclyOV10xYOwmyaxy3BhzH+I0Zcm7fdEpgVQpTIG
	DTHXGkkkIo4xjgnbqnSeZ98yD7Di9Be7j24conExcIiU9VCrGf
	JYFAj6zL+oD0QRPL48flGdstJLzenzd8pY5kzJVy07zEI4Q35I
	1rQq3FsZhZRkohPrmPeEvXXaCYl+PaAoKDx5tG3wn/ZdiDNRUt
	QkTQWH94T4qZ8GDDoLdUPMOB5FJ/oPy5wn1zqurhNe88kewFXr
	qjNLwqBFo3SyXlNtYByDxe6l7PwLt4M8JGmKREABr8+QZLuiKY
	ahmHxXEENxk9imgainR/6VvM+u+6wxV1gVVHBG8vjty+R5HYX+
	QFZryo4ejxv3l4k+z1yVjGME+RTPwHhs4AcWK+fdo
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.17.9
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 09:13:53 -0000

On 11/20/2012 10:32 PM, Ludovic CourtÃ¨s wrote:
> The recipe had a hack to replace the /usr/bin/perl shebang with the
> right path:
> 
>   http://git.sv.gnu.org/cgit/hydra-recipes.git/tree/coreutils/release.nix?id=b09570ad2c3c5b179213cd0bbfecedced7ca0ce1#n66
> 
> I just removed it:
> 
>   http://git.sv.gnu.org/cgit/hydra-recipes.git/commit/?id=178efc3c953c2c62fb328c59cf099ebc2b77ed7d

Thanks, the job 'build' is working again. ;-)

Below are 2 other proposed changes:
* 6a3976a coreutils: remove su
* 8b6569f coreutils: job manual is also non-recursive now

I'm not sure about the 2nd hunk in patch 2/2:
it's strange that target "install-html" depends on
"install-html-recursive" which is undefined. For now, it
may suffice to use "install-html-am" directly instead.

Have a nice day,
Berny



>From 6a3976ad378874968e5eb5efc864a8c940ad7c8f Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Thu, 22 Nov 2012 09:58:41 +0100
Subject: [PATCH 1/2] coreutils: remove su

* coreutils/release.nix (build, xbuild_gnu, coverage): Remove su.
---
 coreutils/release.nix |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/coreutils/release.nix b/coreutils/release.nix
index 7b55f44..26a573e 100644
--- a/coreutils/release.nix
+++ b/coreutils/release.nix
@@ -85,7 +85,7 @@ let
         src = jobs.tarball;
         buildInputs = buildInputsFrom pkgs ;
         configureFlags = let stdenv = pkgs.stdenv; in
-          [ "--enable-install-program=arch,hostname,su" ]
+          [ "--enable-install-program=arch,hostname" ]
           ++ (stdenv.lib.optional stdenv.isLinux [ "--enable-gcc-warnings" ]);
         inherit meta succeedOnFailure keepBuildDirectory;
       };
@@ -101,7 +101,7 @@ let
         src = jobs.tarball;
         buildInputs = [ pkgs.gmp ];
         buildNativeInputs = with pkgs; [ perl xz ];
-        configureFlags = [ "--enable-install-program=arch,hostname,su" ];
+        configureFlags = [ "--enable-install-program=arch,hostname" ];
         doCheck = false;
         inherit meta succeedOnFailure keepBuildDirectory;
       }).hostDrv;
@@ -110,7 +110,7 @@ let
       pkgs.releaseTools.coverageAnalysis {
         name = "coreutils-coverage";
         src = jobs.tarball;
-        configureFlags = [ "--enable-install-program=arch,hostname,su" ];
+        configureFlags = [ "--enable-install-program=arch,hostname" ];
         buildInputs = buildInputsFrom pkgs;
         postCheck =
           # Remove the file that confuses lcov.
-- 
1.7.7


>From 8b6569f3ab4bb83cb1f19d465d15e8283118b191 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Thu, 22 Nov 2012 10:03:15 +0100
Subject: [PATCH 2/2] coreutils: job manual is also non-recursive now

* coreutils/release.nix (manual): Remove '-C doc' from make
call as the targets html and pdf are also non-recursive now.
Use 'install-html-am' instead of 'install-html' as the depending
'install-html-recursive' is currently undefined. Likewise for
'install-pdf-am'.
---
 coreutils/release.nix |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/coreutils/release.nix b/coreutils/release.nix
index 26a573e..56196b3 100644
--- a/coreutils/release.nix
+++ b/coreutils/release.nix
@@ -127,9 +127,9 @@ let
         buildInputs = buildInputsFrom pkgs ++ [ pkgs.texinfo pkgs.texLive ];
         doCheck = false;

-        buildPhase = "make -C doc html pdf";
+        buildPhase = "make html pdf";
         installPhase =
-          '' make -C doc install-html install-pdf
+          '' make install-html-am install-pdf-am

              ensureDir "$out/nix-support"
              echo "doc manual $out/share/doc/coreutils/coreutils.html" >> "$out/nix-support/hydra-build-products"
-- 
1.7.7


From MAILER-DAEMON Thu Nov 22 05:18:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbTs0-0007TQ-Sy
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 05:18:56 -0500
Received: from eggs.gnu.org ([208.118.235.92]:54926)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbTrv-0007TJ-8q
	for coreutils@gnu.org; Thu, 22 Nov 2012 05:18:55 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbTrq-000874-U4
	for coreutils@gnu.org; Thu, 22 Nov 2012 05:18:51 -0500
Received: from mx1.redhat.com ([209.132.183.28]:39653)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbTrq-000869-Mo
	for coreutils@gnu.org; Thu, 22 Nov 2012 05:18:46 -0500
Received: from int-mx02.intmail.prod.int.phx2.redhat.com
	(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAMAIf0C002198
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 22 Nov 2012 05:18:41 -0500
Received: from [10.36.116.74] (ovpn-116-74.ams2.redhat.com [10.36.116.74])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id qAMAIbR9024679
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 22 Nov 2012 05:18:40 -0500
Message-ID: <50ADFBFD.6040202@draigBrady.com>
Date: Thu, 22 Nov 2012 10:18:37 +0000
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: [PATCH] df: port the new df test to POSIX sed, larger file systems
References: <509CC93C.9040802@cs.ucla.edu>
	<509CD1CA.4040501@bernhard-voelker.de>
	<509D39DB.3090908@cs.ucla.edu>
In-Reply-To: <509D39DB.3090908@cs.ucla.edu>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qAMAIf0C002198
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Bernhard Voelker <mail@bernhard-voelker.de>, Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 10:18:55 -0000

On 11/09/2012 05:14 PM, Paul Eggert wrote:
> On 11/09/2012 01:50 AM, Bernhard Voelker wrote:
>> What about simplifying the first s/... to eliminate all blanks?
>
> Yes, could do that, if someone has the energy....

I also noticed that `sed -i` was used,
so I fixed that and made the simplificiation as suggested above, with...


commit 6bc77b3ae940b8afff101a1484e8f04d2cba1f56
Author: P=C3=A1draig Brady <P@draigBrady.com>
Date:   Thu Nov 22 10:07:25 2012 +0000

     tests: don't rely on sed -i being available

     * tests/df/df-output.sh: sed --in-place is not generally available.
     Also as suggested by Bernhard Voelker, simplify one of the
     sed expressions a little, as removing all spaces suffices here.

diff --git a/tests/df/df-output.sh b/tests/df/df-output.sh
index f586334..0aee5f2 100644
--- a/tests/df/df-output.sh
+++ b/tests/df/df-output.sh
@@ -27,28 +27,28 @@ Try 'df --help' for more information.
  EOF

  df -i --output '.' 2>out && fail=3D1
-sed -i 's/ -i / OPT /' out
-compare exp out || fail=3D1
+sed 's/ -i / OPT /' out > out2
+compare exp out2 || fail=3D1

  df --output -i '.' 2>out && fail=3D1
-sed -i 's/ -i / OPT /' out
-compare exp out || fail=3D1
+sed 's/ -i / OPT /' out > out2
+compare exp out2 || fail=3D1

  df -P --output '.' 2>out && fail=3D1
-sed -i 's/ -P / OPT /' out
-compare exp out || fail=3D1
+sed 's/ -P / OPT /' out > out2
+compare exp out2 || fail=3D1

  df --output -P '.' 2>out && fail=3D1
-sed -i 's/ -P / OPT /' out
-compare exp out || fail=3D1
+sed 's/ -P / OPT /' out > out2
+compare exp out2 || fail=3D1

  df -T --output '.' 2>out && fail=3D1
-sed -i 's/ -T / OPT /' out
-compare exp out || fail=3D1
+sed 's/ -T / OPT /' out > out2
+compare exp out2 || fail=3D1

  df --output -T '.' 2>out && fail=3D1
-sed -i 's/ -T / OPT /' out
-compare exp out || fail=3D1
+sed 's/ -T / OPT /' out > out2
+compare exp out2 || fail=3D1

  # Ensure that each field is only used once for the --output argument.
  cat <<\EOF > exp || framework_failure_
@@ -93,8 +93,7 @@ EOF

  df -B1K --output=3Dsize '.' >out || fail=3D1
  sed -e '1 {
-          s/ [ ]*/ /g
-          s/^ //
+          s/ //
            q
          }' out > out2
  compare exp out2 || fail=3D1


From MAILER-DAEMON Thu Nov 22 06:34:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbV2g-0004Hr-C1
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 06:34:02 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33444)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbV2e-0004Gk-Ar
	for coreutils@gnu.org; Thu, 22 Nov 2012 06:34:01 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbV2Y-0004qL-IF
	for coreutils@gnu.org; Thu, 22 Nov 2012 06:34:00 -0500
Received: from moutng.kundenserver.de ([212.227.126.187]:51460)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbV2Y-0004qF-8Y
	for coreutils@gnu.org; Thu, 22 Nov 2012 06:33:54 -0500
Received: from [192.168.1.11] (p4FF76626.dip.t-dialin.net [79.247.102.38])
	by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis)
	id 0LbNoU-1SquxI3EMs-00krd8; Thu, 22 Nov 2012 12:33:43 +0100
Message-ID: <50AE0D95.3060707@bernhard-voelker.de>
Date: Thu, 22 Nov 2012 12:33:41 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
Subject: Re: [PATCH] df: port the new df test to POSIX sed, larger file systems
References: <509CC93C.9040802@cs.ucla.edu>
	<509CD1CA.4040501@bernhard-voelker.de>
	<509D39DB.3090908@cs.ucla.edu> <50ADFBFD.6040202@draigBrady.com>
In-Reply-To: <50ADFBFD.6040202@draigBrady.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:9AyuHiHRO0hPlbKXRSfrJD+iyv57ALExtLwtlUG3RJ6
	eGR2yGiCIy/Fu6AaZtm8AbGWbW4XsDJlfdsYft46z/IPcRmX6n
	kPoxI2EbDulYzWufb+Guqc+D+ymL8rxF4XgJiBtcneG/mypDBp
	jxQD62tRdXh89jxvcHHG5vf4M+iQY2SPI3ETOUMKqCgwva5XQN
	cUu2csBYlL7uiFrNNaxKSHVB7RPGw/yrOVDyIMcgCv23h8u5aK
	uldEIeDUFEFM3D/Yd55w5xaLNQU35QtyoGEZAuuuLCIgyDy+X9
	tjezNywhPi1/35btDGVs0ONZ2k9RbUB1LyKc/ULdeV1/zbCO9U
	GtsJFT3lpf7RFD6Ib5CVVtCRG6Roz/ShVWHbR3sni
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.126.187
Cc: Paul Eggert <eggert@cs.ucla.edu>, Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 11:34:01 -0000

On 11/22/2012 11:18 AM, PÃ¡draig Brady wrote:
> I also noticed that `sed -i` was used,
> so I fixed that and made the simplificiation as suggested above, with...

Thanks.

The patch doesn't apply well - there is an excess blank at the beginning
of each unchanged line. Strange.

Other than that, it looks good.

What about a further simplification?

Have a nice day,
Berny


diff --git a/tests/df/df-output.sh b/tests/df/df-output.sh
index 0aee5f2..2bee4b0 100644
--- a/tests/df/df-output.sh
+++ b/tests/df/df-output.sh
@@ -124,12 +124,7 @@ sed -n -e '3 {
 compare exp out2 || fail=1

 # Ensure that --output is mentioned in the usage.
-cat <<\EOF > exp || framework_failure_
---output
-EOF
-
 df --help > out || fail=1
-grep ' --output' out | sed 's/^.*\(--output\).*$/\1/;q' > out2
-compare exp out2 || fail=1
+grep ' --output' out >/dev/null || fail=1

 Exit $fail


From MAILER-DAEMON Thu Nov 22 06:52:47 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbVKp-0002et-Az
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 06:52:47 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58454)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbVKh-0002cE-Tk
	for coreutils@gnu.org; Thu, 22 Nov 2012 06:52:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbVKg-0001o8-AQ
	for coreutils@gnu.org; Thu, 22 Nov 2012 06:52:39 -0500
Received: from mx1.redhat.com ([209.132.183.28]:27042)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbVKg-0001ng-34
	for coreutils@gnu.org; Thu, 22 Nov 2012 06:52:38 -0500
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
	(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAMBqXdq026441
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 22 Nov 2012 06:52:33 -0500
Received: from [10.36.116.74] (ovpn-116-74.ams2.redhat.com [10.36.116.74])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAMBqTir007529
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Thu, 22 Nov 2012 06:52:31 -0500
Message-ID: <50AE11FD.5090105@draigBrady.com>
Date: Thu, 22 Nov 2012 11:52:29 +0000
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] df: port the new df test to POSIX sed, larger file systems
References: <509CC93C.9040802@cs.ucla.edu>
	<509CD1CA.4040501@bernhard-voelker.de>
	<509D39DB.3090908@cs.ucla.edu> <50ADFBFD.6040202@draigBrady.com>
	<50AE0D95.3060707@bernhard-voelker.de>
In-Reply-To: <50AE0D95.3060707@bernhard-voelker.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qAMBqXdq026441
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Paul Eggert <eggert@cs.ucla.edu>, Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 11:52:45 -0000

On 11/22/2012 11:33 AM, Bernhard Voelker wrote:
> On 11/22/2012 11:18 AM, P=C3=A1draig Brady wrote:
>> I also noticed that `sed -i` was used,
>> so I fixed that and made the simplificiation as suggested above, with.=
..
>
> Thanks.
>
> The patch doesn't apply well - there is an excess blank at the beginnin=
g
> of each unchanged line. Strange.
>
> Other than that, it looks good.
>
> What about a further simplification?
>
> Have a nice day,
> Berny
>
>
> diff --git a/tests/df/df-output.sh b/tests/df/df-output.sh
> index 0aee5f2..2bee4b0 100644
> --- a/tests/df/df-output.sh
> +++ b/tests/df/df-output.sh
> @@ -124,12 +124,7 @@ sed -n -e '3 {
>   compare exp out2 || fail=3D1
>
>   # Ensure that --output is mentioned in the usage.
> -cat <<\EOF > exp || framework_failure_
> ---output
> -EOF
> -
>   df --help > out || fail=3D1
> -grep ' --output' out | sed 's/^.*\(--output\).*$/\1/;q' > out2
> -compare exp out2 || fail=3D1
> +grep ' --output' out >/dev/null || fail=3D1

Yes I'll squash that it.

thanks,
P=C3=A1draig.


From MAILER-DAEMON Thu Nov 22 07:25:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbVqJ-0005ZR-Hb
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 07:25:19 -0500
Received: from eggs.gnu.org ([208.118.235.92]:57905)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1TbVqE-0005Y0-Hd
	for coreutils@gnu.org; Thu, 22 Nov 2012 07:25:18 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1TbVqD-0003Y2-J6
	for coreutils@gnu.org; Thu, 22 Nov 2012 07:25:14 -0500
Received: from mail-lb0-f169.google.com ([209.85.217.169]:53574)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1TbVqD-0003X6-Ad
	for coreutils@gnu.org; Thu, 22 Nov 2012 07:25:13 -0500
Received: by mail-lb0-f169.google.com with SMTP id gk1so7049771lbb.0
	for <coreutils@gnu.org>; Thu, 22 Nov 2012 04:25:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=gH5rLn7++IoBPNwSlx6QD0g4F505eKT+4i/AO1TJ7hc=;
	b=SP4Y3azCvTH7rkwnLoXqz3NcDCby74aCyWBrI8jnc1avcCFY/RGU0R8gsK3ypNCw/6
	4Uf0BCxttYzmEe+iPb02lGIqTLsOzfCi6rRQB4Jd4K2Kjuf+ByLwMkXh+vegVwraCprA
	qBT42ZfeXjsNUbD6ZZ9+6uoAuaor7jlpkPT2pj0/ua5OGoO7gFLF4KU9xYTAi5srxgqC
	5DLZl6wrM0Iqxr4x+n6ThnUBiTjyDngFbd401jLhw4chiZcsbaOnrkuqz6fHZO+hg0Pa
	vdttUsCCp06Jk93+uRgtujx9D/JugsIOoT1oXTvW8tsVKIYUY3XLEqW4WeECSf6RAxvW
	2ELg==
Received: by 10.152.132.3 with SMTP id oq3mr358781lab.18.1353587112359;
	Thu, 22 Nov 2012 04:25:12 -0800 (PST)
Received: from [192.168.178.21]
	(host247-100-dynamic.8-87-r.retail.telecomitalia.it. [87.8.100.247])
	by mx.google.com with ESMTPS id et7sm1376290lbb.11.2012.11.22.04.25.09
	(version=SSLv3 cipher=OTHER); Thu, 22 Nov 2012 04:25:11 -0800 (PST)
Message-ID: <50AE19A2.5080805@gmail.com>
Date: Thu, 22 Nov 2012 13:25:06 +0100
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
Subject: Re: [PATCH] df: port the new df test to POSIX sed, larger file systems
References: <509CC93C.9040802@cs.ucla.edu>
	<509CD1CA.4040501@bernhard-voelker.de>
	<509D39DB.3090908@cs.ucla.edu> <50ADFBFD.6040202@draigBrady.com>
	<50AE0D95.3060707@bernhard-voelker.de>
	<50AE11FD.5090105@draigBrady.com>
In-Reply-To: <50AE11FD.5090105@draigBrady.com>
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: 209.85.217.169
Cc: Bernhard Voelker <mail@bernhard-voelker.de>, Coreutils <coreutils@gnu.org>,
	Paul Eggert <eggert@cs.ucla.edu>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 12:25:18 -0000

Hi PÃ¡draig, Bernhard.

On 11/22/2012 12:52 PM, PÃ¡draig Brady wrote:
>
>>   df --help > out || fail=1
>> -grep ' --output' out | sed 's/^.*\(--output\).*$/\1/;q' > out2
>> -compare exp out2 || fail=1
>> +grep ' --output' out >/dev/null || fail=1
>
Why this extra redirection to /dev/null?  I think the output from
the tests should be as verbose as possible, to simplify debugging
and analysis.  Granted, not a big deal here, but IMHO it's better
to be consistent and avoid gratuitous null redirections.

Regards,
  Stefano


From MAILER-DAEMON Thu Nov 22 07:36:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbW1L-0000pJ-UQ
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 07:36:43 -0500
Received: from eggs.gnu.org ([208.118.235.92]:47970)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbW1G-0000p9-Fy
	for coreutils@gnu.org; Thu, 22 Nov 2012 07:36:42 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbW1A-0006y6-DL
	for coreutils@gnu.org; Thu, 22 Nov 2012 07:36:38 -0500
Received: from moutng.kundenserver.de ([212.227.126.186]:49468)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbW1A-0006xx-45
	for coreutils@gnu.org; Thu, 22 Nov 2012 07:36:32 -0500
Received: from [192.168.1.11] (p4FF76626.dip.t-dialin.net [79.247.102.38])
	by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis)
	id 0MIPbr-1TXvmU1V2V-003mjz; Thu, 22 Nov 2012 13:36:21 +0100
Message-ID: <50AE1C43.9080206@bernhard-voelker.de>
Date: Thu, 22 Nov 2012 13:36:19 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] df: port the new df test to POSIX sed, larger file systems
References: <509CC93C.9040802@cs.ucla.edu>
	<509CD1CA.4040501@bernhard-voelker.de>
	<509D39DB.3090908@cs.ucla.edu> <50ADFBFD.6040202@draigBrady.com>
	<50AE0D95.3060707@bernhard-voelker.de>
	<50AE11FD.5090105@draigBrady.com> <50AE19A2.5080805@gmail.com>
In-Reply-To: <50AE19A2.5080805@gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:W7u3Qayj6RjX9gWlYQdAtLStRHsPVfMmSZvcOIBqlS6
	kFQ4kN48P/utoMFyLywNJsM+UwR2Z1xJ3shHObwCynBVvTj568
	/6LgABpJDiWPUsp4Pdkx7ob/6Rh7TV25CvQgm0Skt/faZrzn8u
	dsxDbuVgqJsQwJxRyPtUJRmK/ewC6wmsYX8YjCUYzD/Br6J2gJ
	IK8LO1slUF560nG6MY37xvJOUV+iJw+EHxSQpry4AJ6sNvS7ol
	Bsw5cHV8umRoedZhNNbi4Dwz5uShASn+aJAsgyFE4s0gC5kffT
	7ixY7e/9w+f9Aa8P8zcpXRRZd5rJ4+SbD5p0nWodHBZaIs8Ffy
	pw9VF04bApP1u4TuPEMkJIwqAW6mSYyPDPILqAYVu
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.126.186
Cc: Paul Eggert <eggert@cs.ucla.edu>, Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 12:36:42 -0000

On 11/22/2012 01:25 PM, Stefano Lattarini wrote:
> Hi PÃ¡draig, Bernhard.
> 
> On 11/22/2012 12:52 PM, PÃ¡draig Brady wrote:
>>
>>>   df --help > out || fail=1
>>> -grep ' --output' out | sed 's/^.*\(--output\).*$/\1/;q' > out2
>>> -compare exp out2 || fail=1
>>> +grep ' --output' out >/dev/null || fail=1
>>
> Why this extra redirection to /dev/null?  I think the output from
> the tests should be as verbose as possible, to simplify debugging
> and analysis.  Granted, not a big deal here, but IMHO it's better
> to be consistent and avoid gratuitous null redirections.

I was first thinking about 'grep -q', but there's only one use in
cfg.mk (nowhere else). Is that disliked?

Therefore, I thought that the redirection to /dev/null
would be best ... as there are many others in tests:

  git grep 'grep .*/dev/null' | grep ^tests | wc -l
  45

And I see your point: test logs should contain as must info
as possible. That's even better.

Before sending, I even thought about 'cat out' in case of failures,
something like:

  compare exp out2 || { fail=1 ; cat out; }

But I didn't include that.

Have a nice day,
Berny


From MAILER-DAEMON Thu Nov 22 08:29:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbWqm-0004aU-L0
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 08:29:52 -0500
Received: from eggs.gnu.org ([208.118.235.92]:46956)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <krichter722@aol.de>) id 1TbVvf-0006QB-MZ
	for coreutils@gnu.org; Thu, 22 Nov 2012 07:30:55 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <krichter722@aol.de>) id 1TbVvb-0005O7-E4
	for coreutils@gnu.org; Thu, 22 Nov 2012 07:30:51 -0500
Received: from imr-ma05.mx.aol.com ([64.12.100.31]:64182)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <krichter722@aol.de>) id 1TbVvb-0005O0-6h
	for coreutils@gnu.org; Thu, 22 Nov 2012 07:30:47 -0500
Received: from mtaout-mb04.r1000.mx.aol.com (mtaout-mb04.r1000.mx.aol.com
	[172.29.41.68])
	by imr-ma05.mx.aol.com (8.14.1/8.14.1) with ESMTP id qAMCUjJS016691
	for <coreutils@gnu.org>; Thu, 22 Nov 2012 07:30:45 -0500
Received: from [192.168.178.46] (port-92-195-103-209.dynamic.qsc.de
	[92.195.103.209])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mtaout-mb04.r1000.mx.aol.com (MUA/Third Party Client Interface) with
	ESMTPSA id 7FDB3E000090
	for <coreutils@gnu.org>; Thu, 22 Nov 2012 07:30:44 -0500 (EST)
Message-ID: <50AE1AEF.9030809@aol.de>
Date: Thu, 22 Nov 2012 13:30:39 +0100
From: Karl-Philipp Richter <krichter722@aol.de>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
To: coreutils@gnu.org
Subject: changing the text of info text of nice
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
x-aol-global-disposition: G
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aol.com;
	s=20110426; t=1353587444;
	bh=h54bhIibrDth2Jwn8nmKMX+YSlc5CUzkiQ4ngt3KsCQ=;
	h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type;
	b=PjkM7F0qqkKG514n1ZDiVG4+kvaWFsKWrirZZDhx4eW3OYJyqFBxpmea9UXWZo2BD
	zFbdVHYO2yvwci8qQKLPIzLoWKQXB2xxKxYew8TLnqYlRwtAY3gO0QvByTxOxtuJNx
	Q9jWkdawx65ouZM9wDUP5D5hRrmBAToXFcSeexmg=
X-AOL-SCOLL-SCORE: 0:2:281958912:93952408  
X-AOL-SCOLL-URL_COUNT: 0  
x-aol-sid: 3039ac1d294450ae1af2209b
X-AOL-IP: 92.195.103.209
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 64.12.100.31
X-Mailman-Approved-At: Thu, 22 Nov 2012 08:29:51 -0500
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 12:30:55 -0000

There should be a differentiation between the setting of niceness at 
start and after start of a command. If you read the info text without 
knowing about renice you might think that nice is able to "modify" the 
niceness after start. There should be clear statement that it can't and 
a link to the renice command.


From MAILER-DAEMON Thu Nov 22 08:31:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbWsX-0004xv-TT
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 08:31:41 -0500
Received: from eggs.gnu.org ([208.118.235.92]:35217)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbWsV-0004xm-HP
	for coreutils@gnu.org; Thu, 22 Nov 2012 08:31:40 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbWsP-0006Y2-5T
	for coreutils@gnu.org; Thu, 22 Nov 2012 08:31:39 -0500
Received: from moutng.kundenserver.de ([212.227.17.10]:49769)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbWsO-0006Xw-RN
	for coreutils@gnu.org; Thu, 22 Nov 2012 08:31:33 -0500
Received: from [192.168.1.11] (p4FF76626.dip.t-dialin.net [79.247.102.38])
	by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis)
	id 0MCOfZ-1TSy9a1ESf-0091Ww; Thu, 22 Nov 2012 14:31:32 +0100
Message-ID: <50AE2932.3040208@bernhard-voelker.de>
Date: Thu, 22 Nov 2012 14:31:30 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: [PATCH] df: reorder default field list of --output option
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:dDIfoXnZn97mUFi/TBfLS+apxsyod3qfdNHmhfGaiyf
	DzIl0GMBL4s9CsRz3ytfT9AeKkVbnr0uhBkViTgVi9e4Po//gn
	3KgkN0YpKtTigkwuJjgAkE+tTOqWjb6otCIa7FFdV4DbxRiL8r
	scq85kTwmVchims0dmNMZ+6oxyioGxr1wl3RA5lTf9l3p2TT9j
	vPaymaPB8J/uDbgni9YpgnnrPV3ws2sgp1ZKDUWMq73UUxBNXu
	TREd5fh9VLFdR88kjVDGi9hPOvQqhpqWeYC1nAQvlVVE3jJyvT
	6ERj7xrGLo9fBrjBq7I3DKvXJksE9PilO+Lh10E/aRg3LFTb/S
	IA+5d6KxZcetc+XZXOnYQUWmhSF3YUVNN1jh3rkkR
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.17.10
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 13:31:40 -0000

As I've been working with "df --o" for quite a while now, I noticed
that the readability of the full output could be improved by moving
the inodes fields before the block fields:
* inodes consumption is usually not often so critical in real life,
* some file systems do not provide inodes information.

Before:

  $ src/df --o -h / /home .
  Filesystem     Type  Size  Used Avail Use% Inodes IUsed IFree IUse% Mounted on
  /dev/sda1      ext4   12G  8.1G  2.9G  74%   751K  254K  497K   34% /
  /dev/sdb3      ext3   99G   61G   34G  65%   6.3M   81K  6.2M    2% /home
  /dev/sdb5      ext4  339G  255G   83G  76%    22M  1.1M   21M    5% /media/sdb5

After:

  $ src/df --o -h / /home .
  Filesystem     Type Inodes IUsed IFree IUse%  Size  Used Avail Use% Mounted on
  /dev/sda1      ext4   751K  254K  497K   34%   12G  8.1G  2.9G  74% /
  /dev/sdb3      ext3   6.3M   81K  6.2M    2%   99G   61G   34G  65% /home
  /dev/sdb5      ext4    22M  1.1M   21M    5%  339G  255G   83G  76% /media/sdb5


WDYT?

Have a nice day,
Berny


>From 7de2cd9f03971de8eb85c36f15f536bae033b9e5 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Thu, 22 Nov 2012 14:24:42 +0100
Subject: [PATCH] df: reorder default field list of --output option

As the inodes information is usually not so much of interest,
and some file systems including btrfs do not even provide it,
reading of the full df --output is easier when the block
statistic fields come just left of the last field, the mount
point.

* src/df.c (all_args_string): Move the inodes fields before
the block fields.
(usage): Likewise.
* tests/df/df-output.sh: Likewise.
* doc/coreutils.texi (df invocation): Likewise.
---
 doc/coreutils.texi    |   18 +++++++++---------
 src/df.c              |    8 ++++----
 tests/df/df-output.sh |    6 +++---
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 70e7ca0..53f7b58 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -10704,15 +10704,6 @@ The source of the mount point, usually a device.
 @item fstype
 File system type.

-@item size
-Total number of blocks.
-@item used
-Number of used blocks.
-@item avail
-Number of available blocks.
-@item pcent
-Percentage of @var{used} divided by @var{size}.
-
 @item itotal
 Total number of inodes.
 @item iused
@@ -10722,6 +10713,15 @@ Number of available inodes.
 @item ipcent
 Percentage of @var{iused} divided by @var{itotal}.

+@item size
+Total number of blocks.
+@item used
+Number of used blocks.
+@item avail
+Number of available blocks.
+@item pcent
+Percentage of @var{used} divided by @var{size}.
+
 @item target
 The mount point.
 @end table
diff --git a/src/df.c b/src/df.c
index c62d16b..cac26b7 100644
--- a/src/df.c
+++ b/src/df.c
@@ -193,8 +193,8 @@ static struct field_data_t field_data[] = {
     "target", OTHER_FLD, N_("Mounted on"),  0, MBS_ALIGN_LEFT,  false }
 };

-static char const *all_args_string = "source,fstype,size,used,avail,pcent,"
-  "itotal,iused,iavail,ipcent,target";
+static char const *all_args_string =
+  "source,fstype,itotal,iused,iavail,ipcent,size,used,avail,pcent,target";

 /* Storage for the definition of output columns.  */
 static struct field_data_t **columns;
@@ -1164,8 +1164,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
       emit_size_note ();
       fputs (_("\n\
 FIELD_LIST is a comma-separated list of columns to be included.  Valid\n\
-field names are: 'source', 'fstype', 'size', 'used', 'avail', 'pcent',\n\
-'itotal', 'iused', 'iavail', 'ipcent' and 'target' (see info page).\n\
+field names are: 'source', 'fstype', 'itotal', 'iused', 'iavail', 'ipcent',\n\
+'size', 'used', 'avail', 'pcent' and 'target' (see info page).\n\
 "), stdout);
       emit_ancillary_info ();
     }
diff --git a/tests/df/df-output.sh b/tests/df/df-output.sh
index f586334..960d30e 100644
--- a/tests/df/df-output.sh
+++ b/tests/df/df-output.sh
@@ -67,11 +67,11 @@ compare exp out || fail=1
 # that --o (without argument) is identical to the full list.

 cat <<\EOF > exp || framework_failure_
-Filesystem Type Size Used Avail Use% Inodes IUsed IFree IUse% Mounted on
+Filesystem Type Inodes IUsed IFree IUse% Size Used Avail Use% Mounted on
 EOF

-df -h --o=source,fstype,size,used,avail,pcent \
- --o=itotal,iused,iavail,ipcent,target '.' >out || fail=1
+df -h --o=source,fstype,itotal,iused,iavail,ipcent \
+ --o=size,used,avail,pcent,target '.' >out || fail=1
 sed -e '1 {
           s/ [ ]*/ /g
           q
-- 
1.7.7




From MAILER-DAEMON Thu Nov 22 08:36:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbWxZ-00076q-L3
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 08:36:53 -0500
Received: from eggs.gnu.org ([208.118.235.92]:35537)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ludo@gnu.org>) id 1TbWxS-00076i-OJ
	for coreutils@gnu.org; Thu, 22 Nov 2012 08:36:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ludo@gnu.org>) id 1TbWxN-0007yE-0z
	for coreutils@gnu.org; Thu, 22 Nov 2012 08:36:46 -0500
Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=42304
	helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ludo@gnu.org>) id 1TbWxM-0007xm-Rg
	for coreutils@gnu.org; Thu, 22 Nov 2012 08:36:40 -0500
Received: from localhost (localhost [127.0.0.1])
	by xanadu.aquilenet.fr (Postfix) with ESMTP id 81D54AC1B;
	Thu, 22 Nov 2012 14:36:30 +0100 (CET)
Received: from xanadu.aquilenet.fr ([127.0.0.1])
	by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 4h9gvu0-F+cB; Thu, 22 Nov 2012 14:36:30 +0100 (CET)
Received: from pluto (unknown [193.50.110.70])
	by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 4847EAC1A;
	Thu, 22 Nov 2012 14:36:30 +0100 (CET)
From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: coreutils builds on Hydra broken since Oct. 5th
References: <50AB7C0D.2040608@bernhard-voelker.de> <87vcd0klk9.fsf@gnu.org>
	<50ADECC5.5080207@bernhard-voelker.de>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 2 Frimaire an 221 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0xEA52ECF4
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA  D15D 77DD 95E2 EA52 ECF4
X-OS: x86_64-unknown-linux-gnu
Date: Thu, 22 Nov 2012 14:36:30 +0100
In-Reply-To: <50ADECC5.5080207@bernhard-voelker.de> (Bernhard Voelker's
	message of "Thu, 22 Nov 2012 10:13:41 +0100")
Message-ID: <87fw41u5cx.fsf@gnu.org>
User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2a01:e0b:1:123:ca0a:a9ff:fe03:271e
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 13:36:52 -0000

Hi,

Bernhard Voelker <mail@bernhard-voelker.de> skribis:

> Below are 2 other proposed changes:
> * 6a3976a coreutils: remove su
> * 8b6569f coreutils: job manual is also non-recursive now

Thanks, I pushed both.

> I'm not sure about the 2nd hunk in patch 2/2:
> it's strange that target "install-html" depends on
> "install-html-recursive" which is undefined. For now, it
> may suffice to use "install-html-am" directly instead.

As long as it does the job, fine.  :-)

Might be worth reporting it to bug-automake@gnu.org, though.

Ludo=E2=80=99.


From MAILER-DAEMON Thu Nov 22 09:03:06 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbXMw-00073o-3K
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 09:03:06 -0500
Received: from eggs.gnu.org ([208.118.235.92]:43552)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbXMn-0006ws-VN
	for coreutils@gnu.org; Thu, 22 Nov 2012 09:03:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbXMe-00085g-HC
	for coreutils@gnu.org; Thu, 22 Nov 2012 09:02:57 -0500
Received: from mx1.redhat.com ([209.132.183.28]:36305)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbXMe-00085R-9K
	for coreutils@gnu.org; Thu, 22 Nov 2012 09:02:48 -0500
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAME2iYf016016
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 22 Nov 2012 09:02:44 -0500
Received: from [10.36.116.74] (ovpn-116-74.ams2.redhat.com [10.36.116.74])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAME2fmq011433
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Thu, 22 Nov 2012 09:02:42 -0500
Message-ID: <50AE3080.7010309@draigBrady.com>
Date: Thu, 22 Nov 2012 14:02:40 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] df: reorder default field list of --output option
References: <50AE2932.3040208@bernhard-voelker.de>
In-Reply-To: <50AE2932.3040208@bernhard-voelker.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qAME2iYf016016
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 14:03:04 -0000

On 11/22/2012 01:31 PM, Bernhard Voelker wrote:
> As I've been working with "df --o" for quite a while now, I noticed
> that the readability of the full output could be improved by moving
> the inodes fields before the block fields:
> * inodes consumption is usually not often so critical in real life,
> * some file systems do not provide inodes information.
>
> Before:
>
>    $ src/df --o -h / /home .
>    Filesystem     Type  Size  Used Avail Use% Inodes IUsed IFree IUse% =
Mounted on
>    /dev/sda1      ext4   12G  8.1G  2.9G  74%   751K  254K  497K   34% =
/
>    /dev/sdb3      ext3   99G   61G   34G  65%   6.3M   81K  6.2M    2% =
/home
>    /dev/sdb5      ext4  339G  255G   83G  76%    22M  1.1M   21M    5% =
/media/sdb5
>
> After:
>
>    $ src/df --o -h / /home .
>    Filesystem     Type Inodes IUsed IFree IUse%  Size  Used Avail Use% =
Mounted on
>    /dev/sda1      ext4   751K  254K  497K   34%   12G  8.1G  2.9G  74% =
/
>    /dev/sdb3      ext3   6.3M   81K  6.2M    2%   99G   61G   34G  65% =
/home
>    /dev/sdb5      ext4    22M  1.1M   21M    5%  339G  255G   83G  76% =
/media/sdb5
>
>
> WDYT?

I agree.
No backwards compat issues to worry about yet.
Patch looks good.

thanks,
P=E1draig.


From MAILER-DAEMON Thu Nov 22 09:25:05 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbXiD-00063H-ID
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 09:25:05 -0500
Received: from eggs.gnu.org ([208.118.235.92]:36226)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbXi6-00060l-Ue
	for coreutils@gnu.org; Thu, 22 Nov 2012 09:25:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbXi0-0007kR-TF
	for coreutils@gnu.org; Thu, 22 Nov 2012 09:24:58 -0500
Received: from mx1.redhat.com ([209.132.183.28]:38208)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbXi0-0007kN-L4
	for coreutils@gnu.org; Thu, 22 Nov 2012 09:24:52 -0500
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAMEOnX1024765
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 22 Nov 2012 09:24:49 -0500
Received: from [10.36.116.74] (ovpn-116-74.ams2.redhat.com [10.36.116.74])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAMEOkxH021898
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Thu, 22 Nov 2012 09:24:48 -0500
Message-ID: <50AE35AE.9080803@draigBrady.com>
Date: Thu, 22 Nov 2012 14:24:46 +0000
From: =?ISO-8859-15?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Karl-Philipp Richter <krichter722@aol.de>
Subject: Re: changing the text of info text of nice
References: <50AE1AEF.9030809@aol.de>
In-Reply-To: <50AE1AEF.9030809@aol.de>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 14:25:04 -0000

On 11/22/2012 12:30 PM, Karl-Philipp Richter wrote:
> There should be a differentiation between the setting of niceness at start and after start of a command. If you read the info text without knowing about renice you might think that nice is able to "modify" the niceness after start. There should be clear statement that it can't and a link to the renice command.

Good point. It's a bit ambiguous.
How about...


diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 70e7ca0..4a4d72a 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -15676,8 +15676,9 @@ the exit status of @var{command} otherwise
  @cindex scheduling, affecting
  @cindex appropriate privileges

-@command{nice} prints or modifies a process's @dfn{niceness},
-a parameter that affects whether the process is scheduled favorably.
+@command{nice} prints a process's @dfn{niceness}, or runs
+a command with modified niceness.  @dfn{niceness} affects how
+favorably the process is scheduled in the system.
  Synopsis:

  @example
@@ -15712,6 +15713,9 @@ built-in utilities}).

  @mayConflictWithShellBuiltIn{nice}

+Note to change the @dfn{niceness} of an existing process,
+one needs to use the @command{renice} command.
+
  The program accepts the following option.  Also see @ref{Common options}.
  Options must precede operands.

diff --git a/man/nice.x b/man/nice.x
index 3448d69..952cb10 100644
--- a/man/nice.x
+++ b/man/nice.x
@@ -3,4 +3,4 @@ nice \- run a program with modified scheduling priority
  [DESCRIPTION]
  .\" Add any additional description here
  [SEE ALSO]
-nice(2)
+nice(2), renice(1)


From MAILER-DAEMON Thu Nov 22 09:28:05 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbXl7-00076E-AS
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 09:28:05 -0500
Received: from eggs.gnu.org ([208.118.235.92]:36789)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbXkz-00073M-TB
	for coreutils@gnu.org; Thu, 22 Nov 2012 09:28:03 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbXku-0008Sw-4p
	for coreutils@gnu.org; Thu, 22 Nov 2012 09:27:57 -0500
Received: from moutng.kundenserver.de ([212.227.126.186]:52242)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbXkt-0008Ss-RT
	for coreutils@gnu.org; Thu, 22 Nov 2012 09:27:52 -0500
Received: from [192.168.1.11] (p4FF76626.dip.t-dialin.net [79.247.102.38])
	by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis)
	id 0MbxnK-1TrYRD2Pva-00JJYq; Thu, 22 Nov 2012 15:27:47 +0100
Message-ID: <50AE3660.7030406@bernhard-voelker.de>
Date: Thu, 22 Nov 2012 15:27:44 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
Subject: Re: [PATCH] df: reorder default field list of --output option
References: <50AE2932.3040208@bernhard-voelker.de>
	<50AE3080.7010309@draigBrady.com>
In-Reply-To: <50AE3080.7010309@draigBrady.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:Q1a1U2ArNcyVAHWEBiMj4cqxwXDmDncf0rXeZTEapNE
	pQKWDnCbGkfOLLvUAheEW/v2PhDAAYS/cbLM2gk20zyop9l0F5
	/RGyaJtxO+0LJBhAKa1n8U/8xV+4RjDffawTMdKAUtDONHzLft
	YjHZQgNgcEuatXM/d2fbOERfs2alflknEymDMtTt39HVlOLPBp
	3gk1Itv2RhMwpvAktMpmPP7jCpg1cvKNh0yeJB9tJP9CWxD/xy
	pMEs6L4DuovCSTEYimWBQh+2TSWlY/IzrnUkSrNIrz5cX05dT3
	Pjttvbqzuo/aolMCTgKQihwQPLcFmPy/oo2f5GtAI61210CCwN
	uwXD0KcApDERjnXfVtULUs30jgBdynJcloXX9DS0v
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.126.186
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 14:28:03 -0000

On 11/22/2012 03:02 PM, Pádraig Brady wrote:
> No backwards compat issues to worry about yet.

yes. ;-)

> Patch looks good.

Thanks for the review.

BTW: Although I also reordered the fields in the description
in usage() and in the description of each field in coreutils.texi,
there's no explicit documentation about the default order yet.

Should I squash in something like this?

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 53f7b58..cc9df7d 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -10687,7 +10687,8 @@ out of date.  This is the default.
 @itemx @w{@kbd{--output}[=@var{field_list}]}
 @opindex --output
 Use the output format defined by @var{field_list}, or print all fields if
-@var{field_list} is omitted.
+@var{field_list} is omitted.  In the latter case, the order of the columns
+conforms to the order of the field descriptions below.

 The use of the @option{--output} together with each of the options @option{-i},
 @option{-P}, and @option{-T} is mutually exclusive.


Have a nice day,
Berny


From MAILER-DAEMON Thu Nov 22 09:37:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbXuW-0000WL-3X
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 09:37:48 -0500
Received: from eggs.gnu.org ([208.118.235.92]:54848)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbXuM-0000VO-MO
	for coreutils@gnu.org; Thu, 22 Nov 2012 09:37:46 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbXuH-0002zY-0j
	for coreutils@gnu.org; Thu, 22 Nov 2012 09:37:38 -0500
Received: from mx1.redhat.com ([209.132.183.28]:31085)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbXuG-0002zO-OY
	for coreutils@gnu.org; Thu, 22 Nov 2012 09:37:32 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAMEbTTl032094
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 22 Nov 2012 09:37:29 -0500
Received: from [10.36.116.74] (ovpn-116-74.ams2.redhat.com [10.36.116.74])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAMEbQkx011618
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Thu, 22 Nov 2012 09:37:28 -0500
Message-ID: <50AE38A6.1010108@draigBrady.com>
Date: Thu, 22 Nov 2012 14:37:26 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] df: reorder default field list of --output option
References: <50AE2932.3040208@bernhard-voelker.de>
	<50AE3080.7010309@draigBrady.com>
	<50AE3660.7030406@bernhard-voelker.de>
In-Reply-To: <50AE3660.7030406@bernhard-voelker.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qAMEbTTl032094
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 14:37:46 -0000

On 11/22/2012 02:27 PM, Bernhard Voelker wrote:
> On 11/22/2012 03:02 PM, P=E1draig Brady wrote:
>> No backwards compat issues to worry about yet.
>
> yes. ;-)
>
>> Patch looks good.
>
> Thanks for the review.
>
> BTW: Although I also reordered the fields in the description
> in usage() and in the description of each field in coreutils.texi,
> there's no explicit documentation about the default order yet.
>
> Should I squash in something like this?

I'd say yes.
It doesn't tie us any tighter to a particular order,
since we'll be bound after a while by backwards compat anyway.
So it's best to be explicit so that people who bother
to check these things have the info at hand.

thanks,
P=E1draig.


From MAILER-DAEMON Thu Nov 22 10:12:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbYSQ-0003Wd-GM
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 10:12:50 -0500
Received: from eggs.gnu.org ([208.118.235.92]:38111)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbYSK-0003Td-GG
	for coreutils@gnu.org; Thu, 22 Nov 2012 10:12:48 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbYSE-0005dB-H2
	for coreutils@gnu.org; Thu, 22 Nov 2012 10:12:44 -0500
Received: from moutng.kundenserver.de ([212.227.126.186]:60460)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbYSE-0005cp-5T
	for coreutils@gnu.org; Thu, 22 Nov 2012 10:12:38 -0500
Received: from [192.168.1.11] (p4FF76626.dip.t-dialin.net [79.247.102.38])
	by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis)
	id 0McEqN-1TriWh0Za3-00J4aV; Thu, 22 Nov 2012 16:12:36 +0100
Message-ID: <50AE40E3.7030902@bernhard-voelker.de>
Date: Thu, 22 Nov 2012 16:12:35 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
Subject: Re: [PATCH] df: reorder default field list of --output option
References: <50AE2932.3040208@bernhard-voelker.de>
	<50AE3080.7010309@draigBrady.com>
	<50AE3660.7030406@bernhard-voelker.de>
	<50AE38A6.1010108@draigBrady.com>
In-Reply-To: <50AE38A6.1010108@draigBrady.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:7Xkw9y4qktJykUjhSEHyJWG+uT0EmsW5UUmFFCdb5s5
	MneXX1KR84oEzxzZFaOwjpd5EvcS8B2qFJB2WEgzQgo3n5dZEu
	z9TS+tb7jIlu/RSYdCap9ZMfT4eNiiZ2/nnKXSEh7Uos9ulQOx
	zuI5nm1DAOXN1RKceeut5Us+1bSjTrtbwZDSbxr/hjIWWdEud9
	gnvMFVLS6DeF2+aAo5GsVg88COvvOeMbBDa4GJSuyq3hGrYITX
	nidw1m1GVE4edViqPGfQGCrIgZ9mm9aCWw8SoTpiEcVPzWRpwh
	MjiiI42w+SMftJ2rB0VvJfjjlh3nJxBfFMUpx4Zm7qn2FEPpDz
	9WoEOHDilY5CjCQz21T7AEnOwh7TLiSM7WI0jaX47
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.126.186
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 15:12:48 -0000



On 11/22/2012 03:37 PM, Pádraig Brady wrote:
> I'd say yes.
> It doesn't tie us any tighter to a particular order,
> since we'll be bound after a while by backwards compat anyway.
> So it's best to be explicit so that people who bother
> to check these things have the info at hand.

Pushed, thanks.

Have a nice day,
Berny


From MAILER-DAEMON Thu Nov 22 10:49:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbZ1f-0001ET-Oy
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 10:49:15 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44318)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <krichter722@aol.de>) id 1TbZ1Y-00017X-GB
	for coreutils@gnu.org; Thu, 22 Nov 2012 10:49:14 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <krichter722@aol.de>) id 1TbZ1S-0000W6-DC
	for coreutils@gnu.org; Thu, 22 Nov 2012 10:49:08 -0500
Received: from imr-da06.mx.aol.com ([205.188.169.203]:64561)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <krichter722@aol.de>) id 1TbZ1S-0000W0-57
	for coreutils@gnu.org; Thu, 22 Nov 2012 10:49:02 -0500
Received: from mtaout-da01.r1000.mx.aol.com (mtaout-da01.r1000.mx.aol.com
	[172.29.51.129])
	by imr-da06.mx.aol.com (8.14.1/8.14.1) with ESMTP id qAMFmgbh014473;
	Thu, 22 Nov 2012 10:48:42 -0500
Received: from [192.168.178.46] (port-92-195-103-209.dynamic.qsc.de
	[92.195.103.209])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mtaout-da01.r1000.mx.aol.com (MUA/Third Party Client Interface) with
	ESMTPSA id 867F5E0000B7; Thu, 22 Nov 2012 10:48:41 -0500 (EST)
Message-ID: <50AE4955.2050501@aol.de>
Date: Thu, 22 Nov 2012 16:48:37 +0100
From: Karl-Philipp Richter <krichter722@aol.de>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
To: =?ISO-8859-15?Q?P=E1draig_Brady?= <P@draigBrady.com>
Subject: Re: changing the text of info text of nice
References: <50AE1AEF.9030809@aol.de> <50AE35AE.9080803@draigBrady.com>
In-Reply-To: <50AE35AE.9080803@draigBrady.com>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
x-aol-global-disposition: G
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aol.com;
	s=20110426; t=1353599322;
	bh=lVnA63pkc/pGKmalBiOkHhQSahGAjR06292HDN4EZso=;
	h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type;
	b=N/6C/ZiQcfok269mzg4a6BtuRGLcMFiITwdSUBDfJMzQCpii0902pyYX86rMkUCft
	gdY8G3BxOV8GLkXw+GZe3T2ruaQa4TtaC5VglxWZexrfHcSxwWErWWuHPhuqkMdqui
	duwYF4Km64hYh9NjZ2TDnlxbXs3aEwatb/rUa4Sg=
X-AOL-SCOLL-SCORE: 0:2:491254464:93952408  
X-AOL-SCOLL-URL_COUNT: 0  
x-aol-sid: 3039ac1d338150ae49570096
X-AOL-IP: 92.195.103.209
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by imr-da06.mx.aol.com id
	qAMFmgbh014473
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 205.188.169.203
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 15:49:14 -0000

Sounds good, thank you! I've no experience with mailing lists... I=20
assume that this will be adapted in a(ny) future release, or do I have=20
to address to somebody else to achieve this?

Am 22.11.2012 15:24, schrieb P=E1draig Brady:
> On 11/22/2012 12:30 PM, Karl-Philipp Richter wrote:
>> There should be a differentiation between the setting of niceness at=20
>> start and after start of a command. If you read the info text without=20
>> knowing about renice you might think that nice is able to "modify"=20
>> the niceness after start. There should be clear statement that it=20
>> can't and a link to the renice command.
>
> Good point. It's a bit ambiguous.
> How about...
>
>
> diff --git a/doc/coreutils.texi b/doc/coreutils.texi
> index 70e7ca0..4a4d72a 100644
> --- a/doc/coreutils.texi
> +++ b/doc/coreutils.texi
> @@ -15676,8 +15676,9 @@ the exit status of @var{command} otherwise
>  @cindex scheduling, affecting
>  @cindex appropriate privileges
>
> -@command{nice} prints or modifies a process's @dfn{niceness},
> -a parameter that affects whether the process is scheduled favorably.
> +@command{nice} prints a process's @dfn{niceness}, or runs
> +a command with modified niceness.  @dfn{niceness} affects how
> +favorably the process is scheduled in the system.
>  Synopsis:
>
>  @example
> @@ -15712,6 +15713,9 @@ built-in utilities}).
>
>  @mayConflictWithShellBuiltIn{nice}
>
> +Note to change the @dfn{niceness} of an existing process,
> +one needs to use the @command{renice} command.
> +
>  The program accepts the following option.  Also see @ref{Common=20
> options}.
>  Options must precede operands.
>
> diff --git a/man/nice.x b/man/nice.x
> index 3448d69..952cb10 100644
> --- a/man/nice.x
> +++ b/man/nice.x
> @@ -3,4 +3,4 @@ nice \- run a program with modified scheduling priority
>  [DESCRIPTION]
>  .\" Add any additional description here
>  [SEE ALSO]
> -nice(2)
> +nice(2), renice(1)



From MAILER-DAEMON Thu Nov 22 11:05:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbZHr-0002CD-2F
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 11:05:59 -0500
Received: from eggs.gnu.org ([208.118.235.92]:40591)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbZHk-00029E-3n
	for coreutils@gnu.org; Thu, 22 Nov 2012 11:05:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbZHa-000696-N7
	for coreutils@gnu.org; Thu, 22 Nov 2012 11:05:52 -0500
Received: from mx1.redhat.com ([209.132.183.28]:36513)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbZHa-00068z-Ea
	for coreutils@gnu.org; Thu, 22 Nov 2012 11:05:42 -0500
Received: from int-mx09.intmail.prod.int.phx2.redhat.com
	(int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAMG5egT019272
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 22 Nov 2012 11:05:40 -0500
Received: from [10.36.116.74] (ovpn-116-74.ams2.redhat.com [10.36.116.74])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAMG5bRO032748
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Thu, 22 Nov 2012 11:05:39 -0500
Message-ID: <50AE4D51.5030003@draigBrady.com>
Date: Thu, 22 Nov 2012 16:05:37 +0000
From: =?ISO-8859-15?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Karl-Philipp Richter <krichter722@aol.de>
Subject: Re: changing the text of info text of nice
References: <50AE1AEF.9030809@aol.de> <50AE35AE.9080803@draigBrady.com>
	<50AE4955.2050501@aol.de>
In-Reply-To: <50AE4955.2050501@aol.de>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qAMG5egT019272
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 16:05:57 -0000

On 11/22/2012 03:48 PM, Karl-Philipp Richter wrote:
> Sounds good, thank you! I've no experience with mailing lists... I assu=
me that this will be adapted in a(ny) future release, or do I have to add=
ress to somebody else to achieve this?

You reached the correct upstream dev list.
This change will be incorporated into the repo soon,
and will automatically filter from there as distros
etc. pick up new releases.

thanks,
P=E1draig.


From MAILER-DAEMON Thu Nov 22 11:07:18 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbZJ8-0002Y0-Oz
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 11:07:18 -0500
Received: from eggs.gnu.org ([208.118.235.92]:40803)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1TbZJ3-0002VM-LD
	for coreutils@gnu.org; Thu, 22 Nov 2012 11:07:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1TbZIy-0006KV-QI
	for coreutils@gnu.org; Thu, 22 Nov 2012 11:07:13 -0500
Received: from mail-la0-f41.google.com ([209.85.215.41]:57668)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1TbZIy-0006KQ-Is
	for coreutils@gnu.org; Thu, 22 Nov 2012 11:07:08 -0500
Received: by mail-la0-f41.google.com with SMTP id m15so5151475lah.0
	for <coreutils@gnu.org>; Thu, 22 Nov 2012 08:07:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=6oAlYqnCv4XJMyZ7b1pvFl02nC+Oo3MsPI34pFtiZpE=;
	b=peH2T8QLkKSTJm7FKeWOsAohfxd2PbFXm6r7jGSj6/kNqLhlG3USNDtJTC/bVNs+Iq
	fT4kaXSGSvNSrwsUM8P21C52g0iqwBQcpxA1KRhcc5gWFaPFHrJCNdRwQO1b2D1li0U/
	vhkuX5k8W3rI79V1a2o+9fc+8p1SwYUCLYTsKrG0a505DE1Zxtw2iUy83brWX8zJI3HD
	qq1J+zF/eH8iCrr9q15Z1/87NIGA5QfSc4bFtdeJejEJrOPj7MpiohWpItovUq74ImX0
	ZyMnnm5izFNbjFbC3D6MZC/PgGrDVirmBlI+BBPTl5xrr3vgT+O9cpe54ydNDWsFHmVT
	mhyA==
Received: by 10.112.28.65 with SMTP id z1mr727369lbg.119.1353600016923;
	Thu, 22 Nov 2012 08:00:16 -0800 (PST)
Received: from [192.168.178.21]
	(host247-100-dynamic.8-87-r.retail.telecomitalia.it. [87.8.100.247])
	by mx.google.com with ESMTPS id gt17sm1414123lab.6.2012.11.22.08.00.14
	(version=SSLv3 cipher=OTHER); Thu, 22 Nov 2012 08:00:16 -0800 (PST)
Message-ID: <50AE4C07.9010507@gmail.com>
Date: Thu, 22 Nov 2012 17:00:07 +0100
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] df: port the new df test to POSIX sed, larger file systems
References: <509CC93C.9040802@cs.ucla.edu>
	<509CD1CA.4040501@bernhard-voelker.de>
	<509D39DB.3090908@cs.ucla.edu> <50ADFBFD.6040202@draigBrady.com>
	<50AE0D95.3060707@bernhard-voelker.de>
	<50AE11FD.5090105@draigBrady.com> <50AE19A2.5080805@gmail.com>
	<50AE1C43.9080206@bernhard-voelker.de>
In-Reply-To: <50AE1C43.9080206@bernhard-voelker.de>
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 209.85.215.41
Cc: Paul Eggert <eggert@cs.ucla.edu>, Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 16:07:17 -0000

On 11/22/2012 01:36 PM, Bernhard Voelker wrote:
> On 11/22/2012 01:25 PM, Stefano Lattarini wrote:
>> Hi Pádraig, Bernhard.
>>
>> On 11/22/2012 12:52 PM, Pádraig Brady wrote:
>>>
>>>>   df --help > out || fail=1
>>>> -grep ' --output' out | sed 's/^.*\(--output\).*$/\1/;q' > out2
>>>> -compare exp out2 || fail=1
>>>> +grep ' --output' out >/dev/null || fail=1
>>>
>> Why this extra redirection to /dev/null?  I think the output from
>> the tests should be as verbose as possible, to simplify debugging
>> and analysis.  Granted, not a big deal here, but IMHO it's better
>> to be consistent and avoid gratuitous null redirections.
> 
> I was first thinking about 'grep -q', but there's only one use in
> cfg.mk (nowhere else). Is that disliked?
>
"grep -q" is not portable AFAIK.

> Therefore, I thought that the redirection to /dev/null
> would be best ... as there are many others in tests:
> 
>   git grep 'grep .*/dev/null' | grep ^tests | wc -l
>   45
> 
> And I see your point: test logs should contain as must info
> as possible. That's even better.
>
Glad you agree.

> Before sending, I even thought about 'cat out' in case of failures,
> something like:
> 
>   compare exp out2 || { fail=1 ; cat out; }
>
Doesn't the 'compare' shell function automatically display the diffs
anyway (if there are any)?  In which case, an extra cat might be a
little overkill (but certainly it wouldn't hurt).

Regards,
  Stefano


From MAILER-DAEMON Thu Nov 22 11:07:51 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbZJf-0002c7-Sm
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 11:07:51 -0500
Received: from eggs.gnu.org ([208.118.235.92]:40897)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbZJZ-0002bg-QD
	for coreutils@gnu.org; Thu, 22 Nov 2012 11:07:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbZJU-0006PF-1n
	for coreutils@gnu.org; Thu, 22 Nov 2012 11:07:45 -0500
Received: from moutng.kundenserver.de ([212.227.17.9]:60944)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbZJT-0006P9-Nc
	for coreutils@gnu.org; Thu, 22 Nov 2012 11:07:39 -0500
Received: from [192.168.1.11] (p4FF76626.dip.t-dialin.net [79.247.102.38])
	by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis)
	id 0LmNF4-1T1xZo2wZm-00a8ue; Thu, 22 Nov 2012 17:07:31 +0100
Message-ID: <50AE4DC1.2010202@bernhard-voelker.de>
Date: Thu, 22 Nov 2012 17:07:29 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] df: port the new df test to POSIX sed, larger file systems
References: <509CC93C.9040802@cs.ucla.edu>
	<509CD1CA.4040501@bernhard-voelker.de>
	<509D39DB.3090908@cs.ucla.edu> <50ADFBFD.6040202@draigBrady.com>
	<50AE0D95.3060707@bernhard-voelker.de>
	<50AE11FD.5090105@draigBrady.com> <50AE19A2.5080805@gmail.com>
	<50AE1C43.9080206@bernhard-voelker.de> <50AE4C07.9010507@gmail.com>
In-Reply-To: <50AE4C07.9010507@gmail.com>
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:Tqox7TfP38Nyy1VjL9JvCM37kkIkPmwtyTqlC01rKk3
	rSZoIMD8d1zSGDrkS9nBeRwc8fTwAzlAn/65eHAaaA0nnOohPe
	Qng6VDlxgCodtzo9JGF7c7O715CnYKoxURporycsYwpksTg1sG
	0cliKlqsVJVQvhySg4xNhrKF1/YoYgzLww4SrksSXnBxPqrJ6O
	GuZsyOfE/D/jY37gxv7s4lq5B6+MK8QkMDWfhGBupBeVfa8yW6
	JuB8CtU+SSvbb67TmD1eRHxA7hv3ik6eno9greMQZ0SzzcjPvi
	64lbqH+uGobpftx6BwW0ny3g6Kwd1Su+o1ot0m6VZPrTkraqLt
	GJICa/pJtcndSV5TZJTq3Y/NlSqgIKR37DM9jv18V
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.17.9
Cc: Paul Eggert <eggert@cs.ucla.edu>, Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 16:07:50 -0000

On 11/22/2012 05:00 PM, Stefano Lattarini wrote:
> On 11/22/2012 01:36 PM, Bernhard Voelker wrote:

>> Before sending, I even thought about 'cat out' in case of failures,
>> something like:
>>
>>   compare exp out2 || { fail=1 ; cat out; }
>>
> Doesn't the 'compare' shell function automatically display the diffs
> anyway (if there are any)?

Ah, yes, it does (see init.sh).
Great. ;-)

Thanks & have a nice day,
Berny


From MAILER-DAEMON Thu Nov 22 12:38:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Tbaja-0005Cj-71
	for mharc-coreutils@gnu.org; Thu, 22 Nov 2012 12:38:42 -0500
Received: from eggs.gnu.org ([208.118.235.92]:56481)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbajX-0005Bh-Uq
	for coreutils@gnu.org; Thu, 22 Nov 2012 12:38:40 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TbajT-0002UJ-I3
	for coreutils@gnu.org; Thu, 22 Nov 2012 12:38:39 -0500
Received: from moutng.kundenserver.de ([212.227.126.186]:64024)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>)
	id 1TbajM-0002Ri-VK; Thu, 22 Nov 2012 12:38:29 -0500
Received: from [192.168.1.11] (p4FF76626.dip.t-dialin.net [79.247.102.38])
	by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis)
	id 0MCucZ-1TSTnG0PiN-009oTB; Thu, 22 Nov 2012 18:38:25 +0100
Message-ID: <50AE630F.3070702@bernhard-voelker.de>
Date: Thu, 22 Nov 2012 18:38:23 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: =?UTF-8?B?THVkb3ZpYyBDb3VydMOocw==?= <ludo@gnu.org>
Subject: Re: coreutils builds on Hydra broken since Oct. 5th
References: <50AB7C0D.2040608@bernhard-voelker.de> <87vcd0klk9.fsf@gnu.org>
	<50ADECC5.5080207@bernhard-voelker.de> <87fw41u5cx.fsf@gnu.org>
In-Reply-To: <87fw41u5cx.fsf@gnu.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:pkCWykNQXADWsHIdMDk6Aam2PdJBgM85lMmYG+A/g7f
	dMQpMAYadqqyoQiV5tJP6icyhkoxowI3S/H8qHfJ3ojiMLFhYr
	4D4TgtRrx23J5Fc0ihy2c1deh2n7zccB1h1rV1LA1yUjSPOko4
	10TizraAcxUmyFNpMk7KbQCpDcAmh4Uy6iwjvwLzfRkQN4z135
	HsuLzVQ6MX66IfWp+S2tE99RhIVhoEfhZuqEGhj0fPW++JYw9u
	fqAMbjqPZJeKBGh8FvFC7l4dmADH2y0ke4W0b8TBq/aZ6jyWLd
	h93OxH2tFeDNDEdYxjpqTPlm03mJ8knHUPBwnBZpo97O39FQWx
	RUROdN5v0vWYMmt8tBoOXmIxy6TFRZ7m5CkmpznIj
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.126.186
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 22 Nov 2012 17:38:41 -0000

On 11/22/2012 02:36 PM, Ludovic CourtÃ¨s wrote:
> Hi,
> 
> Bernhard Voelker <mail@bernhard-voelker.de> skribis:
> 
>> Below are 2 other proposed changes:
>> * 6a3976a coreutils: remove su
>> * 8b6569f coreutils: job manual is also non-recursive now
> 
> Thanks, I pushed both.

Thank you.

>> I'm not sure about the 2nd hunk in patch 2/2:
>> it's strange that target "install-html" depends on
>> "install-html-recursive" which is undefined. For now, it
>> may suffice to use "install-html-am" directly instead.
> 
> As long as it does the job, fine.  :-)
> 
> Might be worth reporting it to bug-automake@gnu.org, though.

I think I don't have enough knowledge in this
area to open a useful bug report.
Would somebody else jump in, please?

Have a nice day,
Berny


From MAILER-DAEMON Fri Nov 23 04:02:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Tbp9S-0006rU-N1
	for mharc-coreutils@gnu.org; Fri, 23 Nov 2012 04:02:22 -0500
Received: from eggs.gnu.org ([208.118.235.92]:59762)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Tbp9N-0006bz-8w
	for coreutils@gnu.org; Fri, 23 Nov 2012 04:02:21 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Tbp9H-0007Ad-FR
	for coreutils@gnu.org; Fri, 23 Nov 2012 04:02:17 -0500
Received: from moutng.kundenserver.de ([212.227.126.186]:52412)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Tbp9H-0007AW-5m
	for coreutils@gnu.org; Fri, 23 Nov 2012 04:02:11 -0500
Received: from [192.168.1.11] (p4FF746C4.dip.t-dialin.net [79.247.70.196])
	by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis)
	id 0MLyRQ-1Tcu0j0m5c-007oGK; Fri, 23 Nov 2012 10:02:09 +0100
Message-ID: <50AF3B90.8080108@bernhard-voelker.de>
Date: Fri, 23 Nov 2012 10:02:08 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: cp: when are ACLs copied?
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:PEGvOkbYsJgo/bMo4OMP6TsWBhAD/ZU2iCVYdLIUEun
	H/2PFomCdauYowq6OHkzp8dX47emglOrqMpzX6eUopIX7ADN3w
	nvdMI5aS4Ljf00Nl/y9JRLVZXVENmJMR2fUH8iDMCKmdeOI/D3
	dR5E7mdeBubC9YxU1F64MF6JHF45Mlrdn4tSIGSV8xC9ZcfWwS
	DkaJ987FO2PKhD0knl5MNPyLoXAZ0ZKl7CsQ98uMgO7C5PFIa0
	NisDc0CZHsRZ6/AdzzleJCOtX0/QNxBJbRksra7pz/Vkfk7kF/
	4uqcUYvk0B1DYvVx1MsvnW1GLrCpApDb11oOn7G2OIWBV8kNme
	PZtlNk25OtkjKcLNRJtK7aaK9X72kfdy/EDPshJ0S
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.126.186
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 23 Nov 2012 09:02:21 -0000

As far as I understand the texi documentation, "cp -p" and "cp --preserve"
copy the ACLs (because they belong to the 'mode' which is included in the
default 'mode,owner,timestamps'):

  ‘mode’
  Preserve the file mode bits and access control lists.

But reading further, this becomes unclear again:

  ‘xattr’
  Preserve extended attributes of the file, or fail with full diagnostics.
  If cp is built without xattr support, ignore this option. If SELinux context,
  ACLs or Capabilities are implemented using xattrs, they are preserved by this
  option as well.

Does that mean, that ACLs are not copied with "cp -p" on SELinux systems,
and that you'd need either "cp --pres=owner,mode,timestamps,xattr" or
"cp --pres=all" on such systems? Doesn't sound much consistent ...

And finally, what does the condition "If SELinux context" mean exactly?
a) if SELinux support is compiled into cp, or
b) if the system has SELinux enabled?

Have a nice day,
Berny


From MAILER-DAEMON Fri Nov 23 04:23:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TbpTa-0004W8-8a
	for mharc-coreutils@gnu.org; Fri, 23 Nov 2012 04:23:10 -0500
Received: from eggs.gnu.org ([208.118.235.92]:34411)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbpTT-0004UR-Sf
	for coreutils@gnu.org; Fri, 23 Nov 2012 04:23:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbpTS-00053z-UB
	for coreutils@gnu.org; Fri, 23 Nov 2012 04:23:03 -0500
Received: from mx1.redhat.com ([209.132.183.28]:46164)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TbpTS-00053n-Ma
	for coreutils@gnu.org; Fri, 23 Nov 2012 04:23:02 -0500
Received: from int-mx02.intmail.prod.int.phx2.redhat.com
	(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAN9MwF6008561
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 23 Nov 2012 04:22:59 -0500
Received: from [10.36.116.72] (ovpn-116-72.ams2.redhat.com [10.36.116.72])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id qAN9Mu1D019106
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 23 Nov 2012 04:22:58 -0500
Message-ID: <50AF406F.7090802@draigBrady.com>
Date: Fri, 23 Nov 2012 09:22:55 +0000
From: =?windows-1252?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: cp: when are ACLs copied?
References: <50AF3B90.8080108@bernhard-voelker.de>
In-Reply-To: <50AF3B90.8080108@bernhard-voelker.de>
Content-Type: text/plain; charset=windows-1252; format=flowed
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qAN9MwF6008561
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 23 Nov 2012 09:23:08 -0000

On 11/23/2012 09:02 AM, Bernhard Voelker wrote:
> As far as I understand the texi documentation, "cp -p" and "cp --preser=
ve"
> copy the ACLs (because they belong to the 'mode' which is included in t=
he
> default 'mode,owner,timestamps'):
>
>    =91mode=92
>    Preserve the file mode bits and access control lists.
>
> But reading further, this becomes unclear again:
>
>    =91xattr=92
>    Preserve extended attributes of the file, or fail with full diagnost=
ics.
>    If cp is built without xattr support, ignore this option. If SELinux=
 context,
>    ACLs or Capabilities are implemented using xattrs, they are preserve=
d by this
>    option as well.
>
> Does that mean, that ACLs are not copied with "cp -p" on SELinux system=
s,

no...

> and that you'd need either "cp --pres=3Downer,mode,timestamps,xattr" or
> "cp --pres=3Dall" on such systems? Doesn't sound much consistent ...

It means that since xattrs are often used to store ACLs, SELinux contexts
and capabilities etc., by specifying --preserve=3Dxattr you may be implic=
itly
copying those, even if you didn't specify --preserve=3Dmode or --preserve=
=3Dcontext

> And finally, what does the condition "If SELinux context" mean exactly?
> a) if SELinux support is compiled into cp, or
> b) if the system has SELinux enabled?

c) There are SElinux xattrs present.

thanks,
P=E1draig.


From MAILER-DAEMON Sat Nov 24 02:18:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TcA0x-0005YG-RP
	for mharc-coreutils@gnu.org; Sat, 24 Nov 2012 02:18:59 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44906)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <raphael.scarv@gmail.com>) id 1Tc5Vd-0007LE-1q
	for coreutils@gnu.org; Fri, 23 Nov 2012 21:30:22 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <raphael.scarv@gmail.com>) id 1Tc5Vb-0006Mk-Nl
	for coreutils@gnu.org; Fri, 23 Nov 2012 21:30:20 -0500
Received: from mail-we0-f169.google.com ([74.125.82.169]:62112)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <raphael.scarv@gmail.com>) id 1Tc5Vb-0006Mg-DQ
	for coreutils@gnu.org; Fri, 23 Nov 2012 21:30:19 -0500
Received: by mail-we0-f169.google.com with SMTP id t49so1983741wey.0
	for <coreutils@gnu.org>; Fri, 23 Nov 2012 18:30:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:date:message-id:subject:from:to:content-type;
	bh=2uZAsCGHTr6Z9SIY69mHs0mUCdhcM7xBnboH/9Ui+bc=;
	b=urxpR41qSU+qnl4dpuWpnEBGh+6dhvoZyGQnpEsMsKf+8wvyLzjSOgN8Fj2aks0tr6
	AuT63CJ5r/S9O5RSUCLnKEezryQi+9P++I1EwNJEfQHnkjSPVfOoeVAitvqbNGnU//vi
	UyQ2b6gmwW5Vra0DaZ6pG6Ce7bC6cupCG4Y0vpf1o3crR4vY6ASXqLsRufgBE896tqwZ
	c8azGk/QsyQs3yxW0l3uaK9S5PTX/l3GqnicwzZ+W/3iteqdmsTOtFV6hFHTLPCr0tM0
	0Y+TxgDQ6AYlrF20UkIhftO5aESJ3bAhApSAfNxa5cOtX3d5dAtL/o56onVVmjD4XG06
	CLMg==
MIME-Version: 1.0
Received: by 10.216.27.135 with SMTP id e7mr1969259wea.164.1353724218482; Fri,
	23 Nov 2012 18:30:18 -0800 (PST)
Received: by 10.217.82.3 with HTTP; Fri, 23 Nov 2012 18:30:18 -0800 (PST)
Date: Sat, 24 Nov 2012 00:30:18 -0200
Message-ID: <CACz=Wed1vHckvVkkjZUfssZ4s_5i5XpQHVEG7qV+Xdwr3KBP7A@mail.gmail.com>
Subject: modechange.c (Feature added) - Binary mode support.
From: Raphael S Carvalho <raphael.scarv@gmail.com>
To: coreutils@gnu.org
Content-Type: multipart/alternative; boundary=0016e6d785512a9ea404cf347b5b
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-Received-From: 74.125.82.169
X-Mailman-Approved-At: Sat, 24 Nov 2012 02:18:59 -0500
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 24 Nov 2012 02:30:22 -0000

--0016e6d785512a9ea404cf347b5b
Content-Type: text/plain; charset=ISO-8859-1

Hi,
I found some questions on the internet wondering whether chmod tool does
support binary numbers as input.
Even though it doesn't support I downloaded core-utils source and got
started reading chmode code.

Let's to the point: I added binary input support by making changes
into the*/lib/modechanges.c
* file.
PS: (b) prefix is not case sensitive.

*Tests:*
./chmod* b10111* t*    *
    stat t (0027/----*-w-rwx*)
./chmod b t *(Error)*
   ./chmod: invalid mode: `b'
./chmod *b111111* t
    stat t (0077/----*rwxrwx*)

Octal mode fulfills its goal very well, though Binary mode may be an
interesting feature.

Follows the changes:
--- modechange.c~    2012-11-24 00:03:36.000000000 -0200
+++ modechange.c    2012-11-23 23:54:45.000000000 -0200
@@ -137,6 +137,31 @@
   struct mode_change *mc;
   size_t used = 0;

+  if (*mode_string == 'b' || *mode_string == 'B')
+    {
+      unsigned int binary_mode = 0;
+      mode_t mode;
+      mode_t mentioned;
+
+      // Jumps the b character
+      mode_string++;
+      do
+        {
+          binary_mode = (binary_mode << 1) + *mode_string++ - '0';
+          if (ALLM < binary_mode)
+            return NULL;
+        }
+      while ('0' <= *mode_string && *mode_string <= '1');
+
+      if (*mode_string)
+      return NULL;
+
+      // Octal_to_mode function will fit the binary mode.
+      mode = octal_to_mode (binary_mode);
+      mentioned = (mode & (S_ISUID | S_ISGID)) | S_ISVTX | S_IRWXUGO;
+      return make_node_op_equals (mode, mentioned);
+    }
+
   if ('0' <= *mode_string && *mode_string < '8')
     {
       unsigned int octal_mode = 0;


I would like to receive any feedback on the matter.

Regards,*
Raphael S.Carvalho *
Blog: http://raphaelscarvalho.blogspot.com.br/
Github: https://github.com/raphaelsc

--0016e6d785512a9ea404cf347b5b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,<br>I found some questions on the internet wondering whether chmod tool =
does support binary numbers as input.<br>Even though it doesn&#39;t support=
 I downloaded core-utils source and got started reading chmode code. <br>
<br>Let&#39;s to the point: I added binary input support by making changes =
into the<b><i> /lib/modechanges.c</i></b> file.<br>PS: (b) prefix is not ca=
se sensitive.<br><br><b>Tests:</b><br>./chmod<b> b10111</b> t<b>=A0=A0=A0 <=
/b><br>
=A0=A0=A0 stat t (0027/----<b>-w-rwx</b>)<br>./chmod b t <b>(Error)</b><br>=
=A0=A0 ./chmod: invalid mode: `b&#39;<br>./chmod <b>b111111</b> t<br>=A0=A0=
=A0 stat t (0077/----<b>rwxrwx</b>)<br><br>Octal mode fulfills its goal ver=
y well, though Binary mode may be an interesting feature.<br>
<br>Follows the changes:<br>--- modechange.c~=A0=A0=A0 2012-11-24 00:03:36.=
000000000 -0200<br>+++ modechange.c=A0=A0=A0 2012-11-23 23:54:45.000000000 =
-0200<br>@@ -137,6 +137,31 @@<br>=A0=A0 struct mode_change *mc;<br>=A0=A0 s=
ize_t used =3D 0;<br>
=A0<br>+=A0 if (*mode_string =3D=3D &#39;b&#39; || *mode_string =3D=3D &#39=
;B&#39;)<br>+=A0=A0=A0 {<br>+=A0=A0=A0=A0=A0 unsigned int binary_mode =3D 0=
;<br>+=A0=A0=A0=A0=A0 mode_t mode;<br>+=A0=A0=A0=A0=A0 mode_t mentioned;<br=
>+<br>+=A0=A0=A0=A0=A0 // Jumps the b character<br>+=A0=A0=A0=A0=A0 mode_st=
ring++;<br>
+=A0=A0=A0=A0=A0 do<br>+=A0=A0=A0=A0=A0=A0=A0 {<br>+=A0=A0=A0=A0=A0=A0=A0=
=A0=A0 binary_mode =3D (binary_mode &lt;&lt; 1) + *mode_string++ - &#39;0&#=
39;;<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (ALLM &lt; binary_mode)=A0=A0=A0 <b=
r>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return NULL;<br>+=A0=A0=A0=A0=A0=A0=A0=
 }<br>+=A0=A0=A0=A0=A0 while (&#39;0&#39; &lt;=3D *mode_string &amp;&amp; *=
mode_string &lt;=3D &#39;1&#39;);<br>
+<br>+=A0=A0=A0=A0=A0 if (*mode_string)<br>+=A0=A0=A0 =A0 return NULL;<br>+=
=A0=A0=A0=A0=A0 <br>+=A0=A0=A0=A0=A0 // Octal_to_mode function will fit the=
 binary mode.<br>+=A0=A0=A0=A0=A0 mode =3D octal_to_mode (binary_mode);<br>=
+=A0=A0=A0=A0=A0 mentioned =3D (mode &amp; (S_ISUID | S_ISGID)) | S_ISVTX |=
 S_IRWXUGO;<br>
+=A0=A0=A0=A0=A0 return make_node_op_equals (mode, mentioned);<br>+=A0=A0=
=A0 }<br>+=A0 <br>=A0=A0 if (&#39;0&#39; &lt;=3D *mode_string &amp;&amp; *m=
ode_string &lt; &#39;8&#39;)<br>=A0=A0=A0=A0 {<br>=A0=A0=A0=A0=A0=A0 unsign=
ed int octal_mode =3D 0;<br><br><br>I would like to receive any feedback on=
 the matter.<br>
<br>Regards,<b><i> <br></i><i>Raphael S.Carvalho</i><i> </i></b><br>Blog: <=
a href=3D"http://raphaelscarvalho.blogspot.com.br/">http://raphaelscarvalho=
.blogspot.com.br/</a><br>Github: <a href=3D"https://github.com/raphaelsc">h=
ttps://github.com/raphaelsc</a><br>
<br>

--0016e6d785512a9ea404cf347b5b--


From MAILER-DAEMON Sat Nov 24 10:06:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TcHJg-0001u7-DA
	for mharc-coreutils@gnu.org; Sat, 24 Nov 2012 10:06:48 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45432)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TcHJd-0001tc-SP
	for coreutils@gnu.org; Sat, 24 Nov 2012 10:06:46 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TcHJb-00050z-FV
	for coreutils@gnu.org; Sat, 24 Nov 2012 10:06:45 -0500
Received: from moutng.kundenserver.de ([212.227.17.10]:64314)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TcHJb-00050e-5R
	for coreutils@gnu.org; Sat, 24 Nov 2012 10:06:43 -0500
Received: from [192.168.1.11] (p4FF76724.dip.t-dialin.net [79.247.103.36])
	by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis)
	id 0M0N4b-1TO3sz1MAH-00uNp6; Sat, 24 Nov 2012 16:06:40 +0100
Message-ID: <50B0E27F.4040000@bernhard-voelker.de>
Date: Sat, 24 Nov 2012 16:06:39 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: =?windows-1252?Q?P=E1draig_Brady?= <P@draigBrady.com>
Subject: Re: cp: when are ACLs copied?
References: <50AF3B90.8080108@bernhard-voelker.de>
	<50AF406F.7090802@draigBrady.com>
In-Reply-To: <50AF406F.7090802@draigBrady.com>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:xqwjL22gjggHb0HDEt2vBnIFZC+5EJsP5DmZ5n87jgf
	919IxOi4ERef8rLcYA9kg3G8cLcKx/ckLJCubp352/KzlOrrJ+
	Gpcu8EjLdcr7IwTBHVBnIJheNBRKl3IXNxD9YvFwJdqOK35Eku
	kTxsKAl6gsZrSX1s9wBnVnuCbNldWf79ppTu9X37GkgXFZ1n20
	IcZNGbSx1XHiWmdRGn5gSoRDbJ4eEY1prMtScpxUgTTGFrnrtJ
	XH/aTvLQJgdujrH1B8Qm0xyWlornzvvGQty0N/8OOu9rXAFRXv
	0Hw18Dxc+Dy5Zg75NsMN8lViNhgAq1y1k3qWb4hrOuxq5pmA/6
	hg9ymoosY6SjK2wlugR3GLmdg5NA4VKrOyp35yF1v
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.17.10
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 24 Nov 2012 15:06:47 -0000

On 11/23/2012 10:22 AM, Pádraig Brady wrote:
> It means that since xattrs are often used to store ACLs, SELinux contexts
> and capabilities etc., by specifying --preserve=xattr you may be implicitly
> copying those, even if you didn't specify --preserve=mode or --preserve=context

Thanks.

What about the following clarification?

Have a nice day,
Berny


>From d00ce5c1319a4b91765ab89263bf14b505361eec Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Sat, 24 Nov 2012 16:04:44 +0100
Subject: [PATCH] doc: cp: clarify behavior of the --preserve=xattr option

* doc/coreutils.texi (cp invocation): Enhance documentation
of the --preserve=xattr option regarding the preservation
of ACLs, SELinux contexts and capabilities: the user may
notice this only when not specifying --preserve=mode
and --preserve=context, too, i.e., otherwise, these attributes
are preserved anyway.
---
 doc/coreutils.texi |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index cc9df7d..26996c4 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -7838,7 +7838,8 @@ Preserve SELinux security context of the file, or fail with full diagnostics.
 Preserve extended attributes of the file, or fail with full diagnostics.
 If @command{cp} is built without xattr support, ignore this option.
 If SELinux context, ACLs or Capabilities are implemented using xattrs,
-they are preserved by this option as well.
+they are preserved implicitly by this option as well, i.e., even without
+specifying @option{--preserve=mode} or @option{--preserve=context}.
 @item all
 Preserve all file attributes.
 Equivalent to specifying all of the above, but with the difference
-- 
1.7.7



From MAILER-DAEMON Sat Nov 24 10:14:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TcHQs-00030n-EJ
	for mharc-coreutils@gnu.org; Sat, 24 Nov 2012 10:14:14 -0500
Received: from eggs.gnu.org ([208.118.235.92]:36984)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TcHQp-0002zp-Qm
	for coreutils@gnu.org; Sat, 24 Nov 2012 10:14:12 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TcHQo-00070t-SZ
	for coreutils@gnu.org; Sat, 24 Nov 2012 10:14:11 -0500
Received: from mx1.redhat.com ([209.132.183.28]:63080)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TcHQo-0006xw-Kz
	for coreutils@gnu.org; Sat, 24 Nov 2012 10:14:10 -0500
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
	(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAOFE5C9002551
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Sat, 24 Nov 2012 10:14:05 -0500
Received: from [10.36.116.21] (ovpn-116-21.ams2.redhat.com [10.36.116.21])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAOFE2ix007308
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Sat, 24 Nov 2012 10:14:04 -0500
Message-ID: <50B0E43A.7000309@draigBrady.com>
Date: Sat, 24 Nov 2012 15:14:02 +0000
From: =?windows-1252?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: cp: when are ACLs copied?
References: <50AF3B90.8080108@bernhard-voelker.de>
	<50AF406F.7090802@draigBrady.com>
	<50B0E27F.4040000@bernhard-voelker.de>
In-Reply-To: <50B0E27F.4040000@bernhard-voelker.de>
Content-Type: text/plain; charset=windows-1252; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qAOFE5C9002551
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Coreutils <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 24 Nov 2012 15:14:13 -0000

On 11/24/2012 03:06 PM, Bernhard Voelker wrote:
> On 11/23/2012 10:22 AM, P=E1draig Brady wrote:
>> It means that since xattrs are often used to store ACLs, SELinux conte=
xts
>> and capabilities etc., by specifying --preserve=3Dxattr you may be imp=
licitly
>> copying those, even if you didn't specify --preserve=3Dmode or --prese=
rve=3Dcontext
>
> Thanks.
>
> What about the following clarification?

+1


From MAILER-DAEMON Tue Nov 27 12:41:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TdP9s-0002n9-2f
	for mharc-coreutils@gnu.org; Tue, 27 Nov 2012 12:41:20 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44597)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <MEC@stowers.org>) id 1TdNek-0000cU-8Y
	for coreutils@gnu.org; Tue, 27 Nov 2012 11:05:11 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <MEC@stowers.org>) id 1TdNeT-0000Aj-Uy
	for coreutils@gnu.org; Tue, 27 Nov 2012 11:05:06 -0500
Received: from smtp01.stowers.org ([12.201.176.61]:59010)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <MEC@stowers.org>) id 1TdNeT-0000AP-Oi
	for coreutils@gnu.org; Tue, 27 Nov 2012 11:04:49 -0500
Received: from pps.filterd (smtp01 [127.0.0.1])
	by smtp01.stowers.org (8.14.4/8.14.4) with SMTP id qARFsxHf001583
	for <coreutils@gnu.org>; Tue, 27 Nov 2012 10:04:48 -0600
Received: from exchmb-02.stowers-institute.org (exchmb-02 [10.0.51.247] (may
	be forged)) by smtp01.stowers.org with ESMTP id 18vgfvrben-1
	(version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT)
	for <coreutils@gnu.org>; Tue, 27 Nov 2012 10:04:48 -0600
Received: from exchmb-02.stowers-institute.org ([10.0.51.247]) by
	EXCHMB-02.stowers-institute.org ([10.0.51.247]) with mapi;
	Tue, 27 Nov 2012 10:04:48 -0600
From: "Cook, Malcolm" <MEC@stowers.org>
To: "'coreutils@gnu.org'" <coreutils@gnu.org>
Date: Tue, 27 Nov 2012 10:04:47 -0600
Subject: shuf implementation - should/could it be  "reservoir sampling "
Thread-Topic: shuf implementation - should/could it be  "reservoir sampling "
Thread-Index: Ac3MuKplFq/EqX5/QT23bDm94pX5Ig==
Message-ID: <2C40E43D1F7A56408C4463FD245DDDF90790638537@EXCHMB-02.stowers-institute.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8185, 1.0.431,
	0.0.0000
	definitions=2012-11-27_05:2012-11-27, 2012-11-27,
	1970-01-01 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
	ipscore=0 suspectscore=2
	phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0
	reason=mlx
	scancount=1 engine=6.0.2-1203120001 definitions=main-1211270144
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x
X-Received-From: 12.201.176.61
X-Mailman-Approved-At: Tue, 27 Nov 2012 12:41:18 -0500
Cc: "Vallandingham, Jim" <jfv@stowers.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 27 Nov 2012 16:05:12 -0000

There is a discussion at http://news.ycombinator.com/item?id=3D4833546 comp=
aring shuf with dimsum (http://blog.noblemail.ca/2012/11/how-to-get-random-=
lines-out-of-file-or.html)

dimsum uses reservoir sampling so it should have a constant memory footprin=
t proportional to -n (though due to a bug with fix in progress, it currentl=
y does not)

I note that shuf does not have a constant memory footprint.   This can be o=
bserved, i.e. , with

yes | shuf -n 5

 and running top to watch the memory grow seeming boundlessly.

1)  what is the underlying algorithm ??
2) should/could it be changed to use "reservoir sampling" to obtain benefit=
s of constant memory footprint?

Thanks for your consideration!

Malcolm Cook
Computational Biology - Stowers Institute for Medical Research




From MAILER-DAEMON Tue Nov 27 20:43:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TdWgY-0007Kp-98
	for mharc-coreutils@gnu.org; Tue, 27 Nov 2012 20:43:34 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58756)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgS-0007Kj-Ky
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:29 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgR-0000Yt-Qm
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:28 -0500
Received: from mx1.redhat.com ([209.132.183.28]:32748)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgR-0000Ym-J1
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:27 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAS1hQmq019680
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <coreutils@gnu.org>; Tue, 27 Nov 2012 20:43:26 -0500
Received: from pb-n5110.redhat.com (ovpn-116-35.ams2.redhat.com [10.36.116.35])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAS1hP0q021669
	for <coreutils@gnu.org>; Tue, 27 Nov 2012 20:43:25 -0500
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: Re: Make mv work better with SELinux.
Date: Wed, 28 Nov 2012 01:43:10 +0000
Message-Id: <1354066999-17464-1-git-send-email-P@draigBrady.com>
In-Reply-To: <509C304B.1030708@redhat.com>
References: <509C304B.1030708@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	qAS1hQmq019680
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 28 Nov 2012 01:43:29 -0000

Sorry for the slowness of my review of this.
I had a spare hour there, and added these plumbing
patches to better integrate your patch into coreutils.
I'll squash these into your patch when finished.

Still todo is:
  actually analyze/test the meat of the patch
  write docs
  write tests
  Use mode_to_security_class() from libselinux if available

thanks,
P=C3=A1draig.



From MAILER-DAEMON Tue Nov 27 20:43:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TdWgb-0007PT-Cj
	for mharc-coreutils@gnu.org; Tue, 27 Nov 2012 20:43:37 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58774)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgY-0007Kz-PT
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:35 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgX-0000ZY-Td
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:34 -0500
Received: from mx1.redhat.com ([209.132.183.28]:24216)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgX-0000ZN-LI
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:33 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAS1hVNb005800
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 27 Nov 2012 20:43:31 -0500
Received: from pb-n5110.redhat.com (ovpn-116-35.ams2.redhat.com [10.36.116.35])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAS1hP0u021669; Tue, 27 Nov 2012 20:43:31 -0500
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH 4/9] cp: -Z: s/fprintf/error/
Date: Wed, 28 Nov 2012 01:43:14 +0000
Message-Id: <1354066999-17464-5-git-send-email-P@draigBrady.com>
In-Reply-To: <1354066999-17464-1-git-send-email-P@draigBrady.com>
References: <509C304B.1030708@redhat.com>
	<1354066999-17464-1-git-send-email-P@draigBrady.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 28 Nov 2012 01:43:36 -0000

change 2 cases
---
 src/cp.c      |    8 ++------
 src/install.c |    8 ++------
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/src/cp.c b/src/cp.c
index 77d04e6..cddef7c 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -1107,12 +1107,8 @@ main (int argc, char **argv)
                   /* if there's a security_context given set new path
                      components to that context, too.  */
                   if (setfscreatecon (optarg) < 0)
-                    {
-                      fprintf (stderr,
-                               _("cannot set default security context %s\n"),
-                               optarg);
-                      exit (1);
-                    }
+                    error (EXIT_FAILURE, 0,
+                           _("cannot set default security context %s"), optarg);
                 }
                 x.set_security_context = true;
                 x.preserve_security_context = false;
diff --git a/src/install.c b/src/install.c
index ed870f2..2c1ca34 100644
--- a/src/install.c
+++ b/src/install.c
@@ -861,12 +861,8 @@ main (int argc, char **argv)
               break;
             }
           if (x.set_security_context || scontext)
-            {
-              fprintf (stderr,
-                       "%s: cannot force target context and preserve it\n",
-                       argv[0]);
-              exit (1);
-            }
+            error (EXIT_FAILURE, 0,
+                   _("cannot force target context and preserve it"));
           x.preserve_security_context = true;
           break;
         case 'Z':
-- 
1.7.6.4



From MAILER-DAEMON Tue Nov 27 20:43:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TdWgc-0007T7-He
	for mharc-coreutils@gnu.org; Tue, 27 Nov 2012 20:43:38 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58837)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgb-0007Ou-4I
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:37 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWga-0000b7-7W
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:37 -0500
Received: from mx1.redhat.com ([209.132.183.28]:37784)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWga-0000ai-07
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:36 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAS1hYgG019695
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 27 Nov 2012 20:43:34 -0500
Received: from pb-n5110.redhat.com (ovpn-116-35.ams2.redhat.com [10.36.116.35])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAS1hP0w021669; Tue, 27 Nov 2012 20:43:33 -0500
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH 6/9] cp: -Z: add selinux.c to POTFILES.in
Date: Wed, 28 Nov 2012 01:43:16 +0000
Message-Id: <1354066999-17464-7-git-send-email-P@draigBrady.com>
In-Reply-To: <1354066999-17464-1-git-send-email-P@draigBrady.com>
References: <509C304B.1030708@redhat.com>
	<1354066999-17464-1-git-send-email-P@draigBrady.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 28 Nov 2012 01:43:38 -0000

spotted by make syntax-check
---
 po/POTFILES.in |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index b938dfc..630ac51 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -108,6 +108,7 @@ src/remove.c
 src/rm.c
 src/rmdir.c
 src/runcon.c
+src/selinux.c
 src/seq.c
 src/setuidgid.c
 src/shred.c
-- 
1.7.6.4



From MAILER-DAEMON Tue Nov 27 20:43:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TdWgd-0007W5-LM
	for mharc-coreutils@gnu.org; Tue, 27 Nov 2012 20:43:39 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58798)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgZ-0007Nf-TN
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgX-0000Zd-UD
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:35 -0500
Received: from mx1.redhat.com ([209.132.183.28]:49131)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgX-0000ZJ-Me
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:33 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAS1hUF6005792
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 27 Nov 2012 20:43:30 -0500
Received: from pb-n5110.redhat.com (ovpn-116-35.ams2.redhat.com [10.36.116.35])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAS1hP0t021669; Tue, 27 Nov 2012 20:43:29 -0500
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH 3/9] cp: -Z: spelling fixes
Date: Wed, 28 Nov 2012 01:43:13 +0000
Message-Id: <1354066999-17464-4-git-send-email-P@draigBrady.com>
In-Reply-To: <1354066999-17464-1-git-send-email-P@draigBrady.com>
References: <509C304B.1030708@redhat.com>
	<1354066999-17464-1-git-send-email-P@draigBrady.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 28 Nov 2012 01:43:38 -0000

from ispell
---
 src/selinux.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/selinux.c b/src/selinux.c
index 4e1e2f5..73fdef2 100644
--- a/src/selinux.c
+++ b/src/selinux.c
@@ -1,4 +1,4 @@
-/* selinux - core functions for maintaining SELinux labelking
+/* selinux - core functions for maintaining SELinux labeling
    Copyright (C) 2012 Red Hat, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -69,7 +69,7 @@ mode_to_security_class (mode_t m)
   of the path object would be if the current process label created it.
   it then returns the label.
 
-  Returns -1 on failure. errno will be set approptiately.
+  Returns -1 on failure. errno will be set appropriately.
 */
 
 static int
@@ -100,13 +100,13 @@ quit:
 }
 
 /*
-  This function takes a path and a mode, it asks calls computecon to get the
+  This function takes a path and a mode, it calls computecon to get the
   label of the path object if the current process created it, then it calls
   matchpathcon to get the default type for the object.  It substitutes the
   default type into label.  It tells the SELinux Kernel to label all new file
   system objects created by the current process with this label.
 
-  Returns -1 on failure. errno will be set approptiately.
+  Returns -1 on failure. errno will be set appropriately.
 */
 int
 defaultcon (char const *path, mode_t mode)
@@ -153,7 +153,7 @@ quit:
   default label should be, extracts the type field and then modifies the file
   system object.
 
-  Returns -1 on failure. errno will be set approptiately.
+  Returns -1 on failure. errno will be set appropriately.
 */
 static int
 restorecon_private (char const *path, bool preserve)
@@ -238,13 +238,13 @@ quit:
   Path of an existing file system object.
   A boolean indicating whether it should call restorecon_private recursively
   or not.
-  A boolean that indicates whether the function should preserve the objects
+  A boolean that indicates whether the function should preserve the object's
   label or generate a new label using matchpathcon.
 
   If Recurse is selected and the file system object is a directory, restorecon
   calls restorecon_private on every file system object in the directory.
 
-  Returns false on failure. errno will be set approptiately.
+  Returns false on failure. errno will be set appropriately.
 */
 bool
 restorecon (char const *path, bool recurse, bool preserve)
-- 
1.7.6.4



From MAILER-DAEMON Tue Nov 27 20:43:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TdWge-0007ZZ-RT
	for mharc-coreutils@gnu.org; Tue, 27 Nov 2012 20:43:40 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58868)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgc-0007SV-Bi
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgb-0000bd-DD
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:38 -0500
Received: from mx1.redhat.com ([209.132.183.28]:42132)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgb-0000bM-6s
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:37 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAS1hZC2004504
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 27 Nov 2012 20:43:35 -0500
Received: from pb-n5110.redhat.com (ovpn-116-35.ams2.redhat.com [10.36.116.35])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAS1hP0x021669; Tue, 27 Nov 2012 20:43:34 -0500
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH 7/9] cp: -Z: remove redundant includes from selinux.[ch]
Date: Wed, 28 Nov 2012 01:43:17 +0000
Message-Id: <1354066999-17464-8-git-send-email-P@draigBrady.com>
In-Reply-To: <1354066999-17464-1-git-send-email-P@draigBrady.com>
References: <509C304B.1030708@redhat.com>
	<1354066999-17464-1-git-send-email-P@draigBrady.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 28 Nov 2012 01:43:39 -0000

spotted by make syntax-check
---
 src/selinux.c |    8 +-------
 src/selinux.h |    4 +---
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/selinux.c b/src/selinux.c
index 73fdef2..bbb9999 100644
--- a/src/selinux.c
+++ b/src/selinux.c
@@ -21,18 +21,12 @@
 #include <selinux/flask.h>
 #include <selinux/context.h>
 #include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include <libgen.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include "selinux.h"
 
 #include "error.h"
 #include "system.h"
 #include "fts.h"
+#include "selinux.h"
 
 /*
   This function has being added to libselinux-2.1.12-5, but is here
diff --git a/src/selinux.h b/src/selinux.h
index 2d8e22e..ac316a9 100644
--- a/src/selinux.h
+++ b/src/selinux.h
@@ -19,9 +19,7 @@
 #ifndef COREUTILS_SELINUX_H
 # define COREUTILS_SELINUX_H
 
-# include <stdbool.h>
-# include <sys/stat.h>
-
 extern bool restorecon (char const *path, bool recurse, bool preserve);
 extern int defaultcon (char const *path, mode_t mode);
+
 #endif
-- 
1.7.6.4



From MAILER-DAEMON Tue Nov 27 20:43:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TdWgf-0007aL-2a
	for mharc-coreutils@gnu.org; Tue, 27 Nov 2012 20:43:41 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58816)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWga-0007On-IU
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgZ-0000aG-4i
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:36 -0500
Received: from mx1.redhat.com ([209.132.183.28]:22326)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgY-0000a3-U8
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:35 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAS1hXxB004493
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 27 Nov 2012 20:43:33 -0500
Received: from pb-n5110.redhat.com (ovpn-116-35.ams2.redhat.com [10.36.116.35])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAS1hP0v021669; Tue, 27 Nov 2012 20:43:32 -0500
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH 5/9] cp: -Z: wrap/clarify/isolate --help messages
Date: Wed, 28 Nov 2012 01:43:15 +0000
Message-Id: <1354066999-17464-6-git-send-email-P@draigBrady.com>
In-Reply-To: <1354066999-17464-1-git-send-email-P@draigBrady.com>
References: <509C304B.1030708@redhat.com>
	<1354066999-17464-1-git-send-email-P@draigBrady.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 28 Nov 2012 01:43:40 -0000

wrap all --help to less that 80 chars
s/security context/SELinux security context/
Isolate -Z help text from other/existing help strings
---
 src/cp.c      |    5 ++++-
 src/install.c |    3 ++-
 src/mkdir.c   |    2 +-
 src/mkfifo.c  |    3 ++-
 src/mknod.c   |    3 ++-
 src/mv.c      |    3 ++-
 6 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/cp.c b/src/cp.c
index cddef7c..b22e668 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -229,7 +229,10 @@ Mandatory arguments to long options are mandatory for short options too.\n\
                                  destination file is missing\n\
   -v, --verbose                explain what is being done\n\
   -x, --one-file-system        stay on this file system\n\
-  -Z, --context[=CTX]      set security context of destination file to default type or to CTX if specified\n\
+"), stdout);
+      fputs (_("\
+  -Z, --context[=CTX]          set SELinux security context of destination\n\
+                                 file to default type, or to CTX if specified\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
diff --git a/src/install.c b/src/install.c
index 2c1ca34..98c2ead 100644
--- a/src/install.c
+++ b/src/install.c
@@ -642,7 +642,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
 "), stdout);
       fputs (_("\
       --preserve-context  preserve SELinux security context\n\
-  -Z, --context[=CTX]      set security context of destination file to default type or to CTX if specified\n\
+  -Z, --context[=CTX]     set SELinux security context of destination file to\n\
+                            default type, or to CTX if specified\n\
 "), stdout);
 
       fputs (HELP_OPTION_DESCRIPTION, stdout);
diff --git a/src/mkdir.c b/src/mkdir.c
index 94ec3f6..2f8ffc2 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -67,7 +67,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -p, --parents     no error if existing, make parent directories as needed\n\
   -v, --verbose     print a message for each created directory\n\
   -Z, --context[=CTX]  set the SELinux security context of each created\n\
-                      directory to default type or to CTX if specified\n\
+                         directory to default type or to CTX if specified\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
diff --git a/src/mkfifo.c b/src/mkfifo.c
index f657ca0..9e80a20 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -61,7 +61,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -m, --mode=MODE    set file permission bits to MODE, not a=rw - umask\n\
 "), stdout);
       fputs (_("\
-  -Z, --context[=CTX]  set the SELinux security context of each NAME to default type or CTX if specified\n\
+  -Z, --context[=CTX]  set the SELinux security context of each NAME to\n\
+                         default type, or CTX if specified\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
diff --git a/src/mknod.c b/src/mknod.c
index 404385a..210c89d 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -63,7 +63,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -m, --mode=MODE    set file permission bits to MODE, not a=rw - umask\n\
 "), stdout);
       fputs (_("\
-  -Z, --context[=CTX]  set the SELinux security context of NAME to default type or to CTX if specified\n\
+  -Z, --context[=CTX]  set the SELinux security context of NAME to\n\
+                         default type, or to CTX if specified\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
diff --git a/src/mv.c b/src/mv.c
index da9009f..65000b1 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -319,7 +319,8 @@ If you specify more than one of -i, -f, -n, only the final one takes effect.\n\
                                  than the destination file or when the\n\
                                  destination file is missing\n\
   -v, --verbose                explain what is being done\n\
-  -Z, --context                set security context of destination file to default type\n \
+  -Z, --context                set SELinux security context of destination\n\
+                                 file to default type\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
-- 
1.7.6.4



From MAILER-DAEMON Tue Nov 27 20:43:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TdWgg-0007e2-CQ
	for mharc-coreutils@gnu.org; Tue, 27 Nov 2012 20:43:42 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58848)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgb-0007Q3-Ie
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:40 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgY-0000Zp-0m
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:37 -0500
Received: from mx1.redhat.com ([209.132.183.28]:40191)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgX-0000ZG-MX
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:33 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAS1hTtl005788
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 27 Nov 2012 20:43:29 -0500
Received: from pb-n5110.redhat.com (ovpn-116-35.ams2.redhat.com [10.36.116.35])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAS1hP0s021669; Tue, 27 Nov 2012 20:43:28 -0500
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH 2/9] cp: -Z: formatting cleanups
Date: Wed, 28 Nov 2012 01:43:12 +0000
Message-Id: <1354066999-17464-3-git-send-email-P@draigBrady.com>
In-Reply-To: <1354066999-17464-1-git-send-email-P@draigBrady.com>
References: <509C304B.1030708@redhat.com>
	<1354066999-17464-1-git-send-email-P@draigBrady.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 28 Nov 2012 01:43:41 -0000

mostly running through indent
---
 src/copy.c    |   25 +++++----
 src/cp.c      |   42 ++++++++------
 src/install.c |   27 +++++----
 src/local.mk  |    3 +-
 src/mkdir.c   |   16 +++---
 src/mkfifo.c  |   16 +++---
 src/mknod.c   |   16 +++---
 src/mv.c      |    9 ++-
 src/runcon.c  |    7 +-
 src/selinux.c |  175 +++++++++++++++++++++++++++++++--------------------------
 src/selinux.h |    7 +-
 11 files changed, 187 insertions(+), 156 deletions(-)

diff --git a/src/copy.c b/src/copy.c
index 501801c..2ecc32a 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -838,18 +838,21 @@ copy_reg (char const *src_name, char const *dst_name,
          1) the src context may prohibit writing, and
          2) because it's more consistent to use the same context
          that is used when the destination file doesn't already exist.  */
-      if ((x->set_security_context || x->preserve_security_context) && 0 <= dest_desc)
+      if ((x->set_security_context || x->preserve_security_context)
+          && 0 <= dest_desc)
         {
           bool all_errors = (!x->data_copy_required
                              || x->require_preserve_context);
           bool some_errors = !all_errors && !x->reduce_diagnostics;
 
-          if (restorecon(dst_name, 0, x->preserve_security_context) < 0)  {
-            if (all_errors || (some_errors && !errno_unsupported (errno)))
-              error (0, errno, _("failed to set file system context on %s"), quote_n (0, dst_name));
-            return_val = false;
-            goto close_src_and_dst_desc;
-          }
+          if (restorecon (dst_name, 0, x->preserve_security_context) < 0)
+            {
+              if (all_errors || (some_errors && !errno_unsupported (errno)))
+                error (0, errno, _("failed to set file system context on %s"),
+                       quote_n (0, dst_name));
+              return_val = false;
+              goto close_src_and_dst_desc;
+            }
         }
 
       if (dest_desc < 0 && x->unlink_dest_after_failed_open)
@@ -871,7 +874,7 @@ copy_reg (char const *src_name, char const *dst_name,
   if (*new_dst)
     {
       if (x->set_security_context && (! x->require_preserve_context))
-        defaultcon(dst_name, dst_mode);
+        defaultcon (dst_name, dst_mode);
 
     open_with_O_CREAT:;
 
@@ -956,7 +959,7 @@ copy_reg (char const *src_name, char const *dst_name,
     }
 
   if (x->set_security_context && ! x->preserve_security_context)
-    restorecon(dst_name, 1, false);
+    restorecon (dst_name, 1, false);
 
   /* --attributes-only overrides --reflink.  */
   if (data_copy_required && x->reflink_mode)
@@ -2077,7 +2080,7 @@ copy_internal (char const *src_name, char const *dst_name,
                           backup_succeeded ? dst_backup : NULL);
 
           if (x->set_security_context)
-            restorecon(dst_name, 1, false);
+            restorecon (dst_name, 1, false);
 
           if (rename_succeeded)
             *rename_succeeded = true;
@@ -2221,7 +2224,7 @@ copy_internal (char const *src_name, char const *dst_name,
   else
   {
     if (x->set_security_context)
-      restorecon(dst_name, 1, false);
+      restorecon (dst_name, 1, false);
   }
 
   if (S_ISDIR (src_mode))
diff --git a/src/cp.c b/src/cp.c
index 365fad4..77d04e6 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -879,10 +879,11 @@ decode_preserve_arg (char const *arg, struct cp_options *x, bool on_off)
           break;
 
         case PRESERVE_CONTEXT:
-          if (! x->set_security_context) {
-            x->preserve_security_context = on_off;
-            x->require_preserve_context = on_off;
-          }
+          if (! x->set_security_context)
+            {
+              x->preserve_security_context = on_off;
+              x->require_preserve_context = on_off;
+            }
           break;
 
         case PRESERVE_XATTR:
@@ -1098,20 +1099,25 @@ main (int argc, char **argv)
 
 
         case 'Z':
-          /* politely decline if we're not on a selinux-enabled kernel. */
-          if( selinux_enabled ) {
-                  if (optarg) {
-                          /* if there's a security_context given set new path
-                             components to that context, too */
-                          if ( setfscreatecon(optarg) < 0 ) {
-                                  (void) fprintf(stderr, _("cannot set default security context %s\n"), optarg);
-                                  exit( 1 );
-                          }
-                  }
-                  x.set_security_context = true;
-                  x.preserve_security_context = false;
-          }
-         break;
+          /* politely decline if we're not on a selinux-enabled kernel.  */
+          if (selinux_enabled)
+            {
+              if (optarg)
+                {
+                  /* if there's a security_context given set new path
+                     components to that context, too.  */
+                  if (setfscreatecon (optarg) < 0)
+                    {
+                      fprintf (stderr,
+                               _("cannot set default security context %s\n"),
+                               optarg);
+                      exit (1);
+                    }
+                }
+                x.set_security_context = true;
+                x.preserve_security_context = false;
+            }
+          break;
 
         case 'S':
           make_backups = true;
diff --git a/src/install.c b/src/install.c
index 0b9b317..ed870f2 100644
--- a/src/install.c
+++ b/src/install.c
@@ -854,26 +854,29 @@ main (int argc, char **argv)
           break;
 
         case PRESERVE_CONTEXT_OPTION:
-          if ( ! selinux_enabled)
+          if (! selinux_enabled)
             {
               error (0, 0, _("WARNING: ignoring --preserve-context; "
                              "this kernel is not SELinux-enabled"));
               break;
             }
-          if ( x.set_security_context || scontext ) {
-             (void) fprintf(stderr, "%s: cannot force target context and preserve it\n", argv[0]);
-             exit( 1 );
-          }
+          if (x.set_security_context || scontext)
+            {
+              fprintf (stderr,
+                       "%s: cannot force target context and preserve it\n",
+                       argv[0]);
+              exit (1);
+            }
           x.preserve_security_context = true;
           break;
         case 'Z':
-          if ( selinux_enabled )
-          {
-                  if (optarg)
-                          scontext = optarg;
-                  else
-                          x.set_security_context = true;
-          }
+          if (selinux_enabled)
+            {
+              if (optarg)
+                scontext = optarg;
+              else
+                x.set_security_context = true;
+            }
           break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
diff --git a/src/local.mk b/src/local.mk
index bd6711e..d72f7f2 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -322,7 +322,8 @@ copy_sources = \
 # to install before applying any user-specified name transformations.
 
 transform = s/ginstall/install/; $(program_transform_name)
-src_ginstall_SOURCES = src/install.c src/prog-fprintf.c $(copy_sources) $(selinux_sources)
+src_ginstall_SOURCES = src/install.c src/prog-fprintf.c $(copy_sources) \
+		       $(selinux_sources)
 
 # This is for the '[' program.  Automake transliterates '[' and '/' to '_'.
 src___SOURCES = src/lbracket.c
diff --git a/src/mkdir.c b/src/mkdir.c
index 548030c..94ec3f6 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -119,7 +119,7 @@ make_ancestor (char const *dir, char const *component, void *options)
   struct mkdir_options const *o = options;
 
   if (o->set_security_context)
-    defaultcon(dir, S_IFDIR);
+    defaultcon (dir, S_IFDIR);
   int r = mkdir (component, o->ancestor_mode);
   if (r == 0)
     {
@@ -177,13 +177,13 @@ main (int argc, char **argv)
           options.created_directory_format = _("created directory %s");
           break;
         case 'Z':
-          if ( is_selinux_enabled() > 0 )
-          {
-            if (optarg)
-              scontext = optarg;
-            else
-              options.set_security_context = true;
-          }
+          if (is_selinux_enabled () > 0)
+            {
+              if (optarg)
+                scontext = optarg;
+              else
+                options.set_security_context = true;
+            }
           break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
diff --git a/src/mkfifo.c b/src/mkfifo.c
index 3253640..f657ca0 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -96,13 +96,13 @@ main (int argc, char **argv)
           specified_mode = optarg;
           break;
         case 'Z':
-          if ( is_selinux_enabled() > 0 )
-          {
-            if (optarg)
-              scontext = optarg;
-            else
-              set_security_context = true;
-          }
+          if (is_selinux_enabled () > 0)
+            {
+              if (optarg)
+                scontext = optarg;
+              else
+                set_security_context = true;
+            }
           break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
@@ -137,7 +137,7 @@ main (int argc, char **argv)
 
   for (; optind < argc; ++optind)
     if (set_security_context)
-      defaultcon(argv[optind], S_IFIFO);
+      defaultcon (argv[optind], S_IFIFO);
     if (mkfifo (argv[optind], newmode) != 0)
       {
         error (0, errno, _("cannot create fifo %s"), quote (argv[optind]));
diff --git a/src/mknod.c b/src/mknod.c
index 6977ba8..404385a 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -113,13 +113,13 @@ main (int argc, char **argv)
           specified_mode = optarg;
           break;
         case 'Z':
-          if ( is_selinux_enabled() > 0 )
-          {
-            if (optarg)
-              scontext = optarg;
-            else
-              set_security_context = true;
-          }
+          if (is_selinux_enabled () > 0)
+            {
+              if (optarg)
+                scontext = optarg;
+              else
+                set_security_context = true;
+            }
           break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
@@ -221,7 +221,7 @@ main (int argc, char **argv)
 #endif
 
         if (set_security_context)
-          defaultcon(argv[optind], node_type);
+          defaultcon (argv[optind], node_type);
 
         if (mknod (argv[optind], newmode | node_type, device) != 0)
           error (EXIT_FAILURE, errno, "%s", quote (argv[optind]));
diff --git a/src/mv.c b/src/mv.c
index 683c649..da9009f 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -424,10 +424,11 @@ main (int argc, char **argv)
           break;
         case 'Z':
           /* politely decline if we're not on a selinux-enabled kernel. */
-          if( selinux_enabled ) {
-            x.preserve_security_context = false;
-            x.set_security_context = true;
-          }
+          if (selinux_enabled)
+            {
+              x.preserve_security_context = false;
+              x.set_security_context = true;
+            }
           break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
diff --git a/src/runcon.c b/src/runcon.c
index 7162f65..df1ad8e 100644
--- a/src/runcon.c
+++ b/src/runcon.c
@@ -193,8 +193,8 @@ main (int argc, char **argv)
     }
 
   if (is_selinux_enabled () != 1)
-    error (EXIT_FAILURE, 0,
-           _("%s may be used only on a SELinux kernel"), program_name);
+    error (EXIT_FAILURE, 0, _("%s may be used only on a SELinux kernel"),
+           program_name);
 
   if (context)
     {
@@ -219,8 +219,7 @@ main (int argc, char **argv)
           /* compute result of process transition */
           if (security_compute_create (cur_context, file_context,
                                        SECCLASS_PROCESS, &new_context) != 0)
-            error (EXIT_FAILURE, errno,
-                   _("failed to compute a new context"));
+            error (EXIT_FAILURE, errno, _("failed to compute a new context"));
           /* free contexts */
           freecon (file_context);
           freecon (cur_context);
diff --git a/src/selinux.c b/src/selinux.c
index 6045dd5..4e1e2f5 100644
--- a/src/selinux.c
+++ b/src/selinux.c
@@ -41,24 +41,26 @@
   Translates a mode into an Internal SELinux security_class definition.
   Returns 0 on failure, with errno set to EINVAL.
 */
-static security_class_t mode_to_security_class(mode_t m) {
-
-  if (S_ISREG(m))
-    return string_to_security_class("file");
-  if (S_ISDIR(m))
-    return string_to_security_class("dir");
-  if (S_ISCHR(m))
-    return string_to_security_class("chr_file");
-  if (S_ISBLK(m))
-    return string_to_security_class("blk_file");
-  if (S_ISFIFO(m))
-    return string_to_security_class("fifo_file");
-  if (S_ISLNK(m))
-    return string_to_security_class("lnk_file");
-  if (S_ISSOCK(m))
-    return string_to_security_class("sock_file");
-
-  errno=EINVAL;
+static security_class_t
+mode_to_security_class (mode_t m)
+{
+
+  if (S_ISREG (m))
+    return string_to_security_class ("file");
+  if (S_ISDIR (m))
+    return string_to_security_class ("dir");
+  if (S_ISCHR (m))
+    return string_to_security_class ("chr_file");
+  if (S_ISBLK (m))
+    return string_to_security_class ("blk_file");
+  if (S_ISFIFO (m))
+    return string_to_security_class ("fifo_file");
+  if (S_ISLNK (m))
+    return string_to_security_class ("lnk_file");
+  if (S_ISSOCK (m))
+    return string_to_security_class ("sock_file");
+
+  errno = EINVAL;
   return 0;
 }
 
@@ -70,28 +72,30 @@ static security_class_t mode_to_security_class(mode_t m) {
   Returns -1 on failure. errno will be set approptiately.
 */
 
-static int computecon(char const *path, mode_t mode, security_context_t *con) {
+static int
+computecon (char const *path, mode_t mode, security_context_t * con)
+{
   security_context_t scon = NULL;
   security_context_t tcon = NULL;
   security_class_t tclass;
   int rc = -1;
 
-  char *dir = strdup(path);
+  char *dir = strdup (path);
   if (!dir)
     goto quit;
-  if (getcon(&scon) < 0)
+  if (getcon (&scon) < 0)
     goto quit;
-  if (getfilecon(dirname((char *) dir), &tcon) < 0)
+  if (getfilecon (dirname ((char *) dir), &tcon) < 0)
     goto quit;
-  tclass = mode_to_security_class(mode);
+  tclass = mode_to_security_class (mode);
   if (!tclass)
     goto quit;
-  rc = security_compute_create(scon, tcon, tclass, con);
+  rc = security_compute_create (scon, tcon, tclass, con);
 
 quit:
-  free(dir);
-  freecon(scon);
-  freecon(tcon);
+  free (dir);
+  freecon (scon);
+  freecon (tcon);
   return rc;
 }
 
@@ -104,36 +108,38 @@ quit:
 
   Returns -1 on failure. errno will be set approptiately.
 */
-int defaultcon (char const *path, mode_t mode) {
+int
+defaultcon (char const *path, mode_t mode)
+{
   int rc = -1;
   security_context_t scon = NULL, tcon = NULL;
   context_t scontext = NULL, tcontext = NULL;
 
-  rc = matchpathcon(path, mode,  &scon);
+  rc = matchpathcon (path, mode, &scon);
   if (rc < 0)
     goto quit;
-  rc = computecon(path, mode,  &tcon);
+  rc = computecon (path, mode, &tcon);
   if (rc < 0)
     goto quit;
-  scontext = context_new(scon);
+  scontext = context_new (scon);
   rc = -1;
   if (!scontext)
     goto quit;
-  tcontext = context_new(tcon);
+  tcontext = context_new (tcon);
   if (!tcontext)
     goto quit;
 
-  context_type_set(tcontext, context_type_get(scontext));
-  rc = setfscreatecon (context_str(tcontext));
+  context_type_set (tcontext, context_type_get (scontext));
+  rc = setfscreatecon (context_str (tcontext));
 
 //  printf("defaultcon %s %s\n", path, context_str(tcontext));
 quit:
   if (scontext)
-    context_free(scontext);
+    context_free (scontext);
   if (scontext)
-    context_free(tcontext);
-  freecon(scon);
-  freecon(tcon);
+    context_free (tcontext);
+  freecon (scon);
+  freecon (tcon);
   return rc;
 }
 
@@ -149,72 +155,81 @@ quit:
 
   Returns -1 on failure. errno will be set approptiately.
 */
-static int restorecon_private (char const *path, bool preserve) {
+static int
+restorecon_private (char const *path, bool preserve)
+{
   int rc = -1;
   struct stat sb;
   security_context_t scon = NULL, tcon = NULL;
   context_t scontext = NULL, tcontext = NULL;
   int fd;
 
-  if (preserve) {
-    if (getfscreatecon (&tcon) < 0)
+  if (preserve)
+    {
+      if (getfscreatecon (&tcon) < 0)
+        return rc;
+      rc = lsetfilecon (path, tcon);
+      freecon (tcon);
       return rc;
-    rc = lsetfilecon (path, tcon);
-    freecon(tcon);
-    return rc;
-  }
+    }
 
   fd = open (path, O_RDONLY | O_NOFOLLOW);
   if (!fd && (errno != ELOOP))
     goto quit;
 
-  if (fd) {
-    rc = fstat (fd, &sb);
-    if (rc < 0)
-      goto quit;
-  } else {
-    rc = lstat (path, &sb);
-    if (rc < 0)
-      goto quit;
-  }
-
-  rc = matchpathcon(path, sb.st_mode,  &scon);
+  if (fd)
+    {
+      rc = fstat (fd, &sb);
+      if (rc < 0)
+        goto quit;
+    }
+  else
+    {
+      rc = lstat (path, &sb);
+      if (rc < 0)
+        goto quit;
+    }
+
+  rc = matchpathcon (path, sb.st_mode, &scon);
   if (rc < 0)
     goto quit;
-  scontext = context_new(scon);
+  scontext = context_new (scon);
   rc = -1;
   if (!scontext)
     goto quit;
 
-  if (fd) {
-    rc = fgetfilecon (fd, &tcon);
-    if (!rc)
-      goto quit;
-  } else  {
-    rc = lgetfilecon (path, &tcon);
-    if (!rc)
-      goto quit;
-  }
-  tcontext = context_new(tcon);
+  if (fd)
+    {
+      rc = fgetfilecon (fd, &tcon);
+      if (!rc)
+        goto quit;
+    }
+  else
+    {
+      rc = lgetfilecon (path, &tcon);
+      if (!rc)
+        goto quit;
+    }
+  tcontext = context_new (tcon);
   if (!tcontext)
     goto quit;
 
-  context_type_set(tcontext, context_type_get(scontext));
+  context_type_set (tcontext, context_type_get (scontext));
 
   if (fd)
-        rc = fsetfilecon (fd, context_str(tcontext));
+    rc = fsetfilecon (fd, context_str (tcontext));
   else
-        rc = lsetfilecon (path, context_str(tcontext));
+    rc = lsetfilecon (path, context_str (tcontext));
 
 //  printf("restorcon %s %s\n", path, context_str(tcontext));
 quit:
-  close(fd);
+  close (fd);
   if (scontext)
-    context_free(scontext);
+    context_free (scontext);
   if (scontext)
-    context_free(tcontext);
-  freecon(scon);
-  freecon(tcon);
+    context_free (tcontext);
+  freecon (scon);
+  freecon (tcon);
   return rc;
 }
 
@@ -231,15 +246,17 @@ quit:
 
   Returns false on failure. errno will be set approptiately.
 */
-bool restorecon (char const *path, bool recurse, bool preserve) {
+bool
+restorecon (char const *path, bool recurse, bool preserve)
+{
   const char *mypath[2] = { path, NULL };
   FTS *fts;
   bool ok = true;
 
   if (!recurse)
-    return restorecon_private(path, preserve);
+    return restorecon_private (path, preserve);
 
-  fts = fts_open ((char *const *)mypath, FTS_PHYSICAL, NULL);
+  fts = fts_open ((char *const *) mypath, FTS_PHYSICAL, NULL);
   while (1)
     {
       FTSENT *ent;
@@ -256,7 +273,7 @@ bool restorecon (char const *path, bool recurse, bool preserve) {
           break;
         }
 
-      ok &= restorecon_private(fts->fts_path, preserve);
+      ok &= restorecon_private (fts->fts_path, preserve);
     }
 
   if (fts_close (fts) != 0)
diff --git a/src/selinux.h b/src/selinux.h
index c032c05..2d8e22e 100644
--- a/src/selinux.h
+++ b/src/selinux.h
@@ -17,10 +17,11 @@
 /* Written by Daniel Walsh <dwalsh@redhat.com> */
 
 #ifndef COREUTILS_SELINUX_H
-#define COREUTILS_SELINUX_H
+# define COREUTILS_SELINUX_H
+
+# include <stdbool.h>
+# include <sys/stat.h>
 
-#include <stdbool.h>
-#include <sys/stat.h>
 extern bool restorecon (char const *path, bool recurse, bool preserve);
 extern int defaultcon (char const *path, mode_t mode);
 #endif
-- 
1.7.6.4



From MAILER-DAEMON Tue Nov 27 20:43:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TdWgg-0007dM-6a
	for mharc-coreutils@gnu.org; Tue, 27 Nov 2012 20:43:42 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58900)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgd-0007WO-O1
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:40 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgc-0000dS-QE
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:39 -0500
Received: from mx1.redhat.com ([209.132.183.28]:39065)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgc-0000cF-Dj
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:38 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAS1haut004511
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 27 Nov 2012 20:43:36 -0500
Received: from pb-n5110.redhat.com (ovpn-116-35.ams2.redhat.com [10.36.116.35])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAS1hP10021669; Tue, 27 Nov 2012 20:43:35 -0500
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH 8/9] cp: -Z: fix a logic error due to incorrect braces in
	mkfifo
Date: Wed, 28 Nov 2012 01:43:18 +0000
Message-Id: <1354066999-17464-9-git-send-email-P@draigBrady.com>
In-Reply-To: <1354066999-17464-1-git-send-email-P@draigBrady.com>
References: <509C304B.1030708@redhat.com>
	<1354066999-17464-1-git-send-email-P@draigBrady.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 28 Nov 2012 01:43:40 -0000

src/mkfifo.c (main): Call mkfifo() for all args rather than the last.
---
 src/mkfifo.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/mkfifo.c b/src/mkfifo.c
index 9e80a20..a392459 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -137,13 +137,15 @@ main (int argc, char **argv)
     }
 
   for (; optind < argc; ++optind)
-    if (set_security_context)
-      defaultcon (argv[optind], S_IFIFO);
-    if (mkfifo (argv[optind], newmode) != 0)
-      {
-        error (0, errno, _("cannot create fifo %s"), quote (argv[optind]));
-        exit_status = EXIT_FAILURE;
-      }
+    {
+      if (set_security_context)
+        defaultcon (argv[optind], S_IFIFO);
+      if (mkfifo (argv[optind], newmode) != 0)
+        {
+          error (0, errno, _("cannot create fifo %s"), quote (argv[optind]));
+          exit_status = EXIT_FAILURE;
+        }
+    }
 
   exit (exit_status);
 }
-- 
1.7.6.4



From MAILER-DAEMON Tue Nov 27 20:43:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TdWgi-0007jN-5O
	for mharc-coreutils@gnu.org; Tue, 27 Nov 2012 20:43:44 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58927)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWge-0007Yo-IU
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:41 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgd-0000e6-Oz
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:40 -0500
Received: from mx1.redhat.com ([209.132.183.28]:33721)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgd-0000dr-Gi
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:39 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAS1hbl1011206
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 27 Nov 2012 20:43:37 -0500
Received: from pb-n5110.redhat.com (ovpn-116-35.ams2.redhat.com [10.36.116.35])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAS1hP11021669; Tue, 27 Nov 2012 20:43:36 -0500
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH 9/9] cp: -Z: adjust an existing selinux test to the new scheme
Date: Wed, 28 Nov 2012 01:43:19 +0000
Message-Id: <1354066999-17464-10-git-send-email-P@draigBrady.com>
In-Reply-To: <1354066999-17464-1-git-send-email-P@draigBrady.com>
References: <509C304B.1030708@redhat.com>
	<1354066999-17464-1-git-send-email-P@draigBrady.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 28 Nov 2012 01:43:42 -0000

* tests/mkdir/selinux.sh: s/-Z/--context=/
---
 tests/mkdir/selinux.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/mkdir/selinux.sh b/tests/mkdir/selinux.sh
index bb1aab9..a6deb36 100755
--- a/tests/mkdir/selinux.sh
+++ b/tests/mkdir/selinux.sh
@@ -32,7 +32,7 @@ msg="failed to set default file creation context to '$c':"
 for cmd_w_arg in 'mkdir dir' 'mknod b p' 'mkfifo f'; do
   # In OpenBSD's /bin/sh, mknod is a shell built-in.
   # Running via "env" ensures we run our program and not the built-in.
-  env -- $cmd_w_arg -Z $c 2> out && fail=1
+  env -- $cmd_w_arg --context=$c 2> out && fail=1
   set $cmd_w_arg; cmd=$1
   echo "$cmd: $msg" > exp || fail=1
 
-- 
1.7.6.4



From MAILER-DAEMON Tue Nov 27 20:43:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TdWgg-0007er-LL
	for mharc-coreutils@gnu.org; Tue, 27 Nov 2012 20:43:42 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58836)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgb-0007Os-3t
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:40 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgX-0000ZR-GS
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:37 -0500
Received: from mx1.redhat.com ([209.132.183.28]:50415)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TdWgS-0000Yy-Ob
	for coreutils@gnu.org; Tue, 27 Nov 2012 20:43:29 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAS1hSjf011175
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <coreutils@gnu.org>; Tue, 27 Nov 2012 20:43:28 -0500
Received: from pb-n5110.redhat.com (ovpn-116-35.ams2.redhat.com [10.36.116.35])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qAS1hP0r021669; Tue, 27 Nov 2012 20:43:26 -0500
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH 1/9] cp: -Z: adjust utils to run restorecon with -Z
Date: Wed, 28 Nov 2012 01:43:11 +0000
Message-Id: <1354066999-17464-2-git-send-email-P@draigBrady.com>
In-Reply-To: <1354066999-17464-1-git-send-email-P@draigBrady.com>
References: <509C304B.1030708@redhat.com>
	<1354066999-17464-1-git-send-email-P@draigBrady.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Daniel J Walsh <dwalsh@redhat.com>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 28 Nov 2012 01:43:41 -0000

From: Daniel J Walsh <dwalsh@redhat.com>

TODO: details
---
 src/chcon.c   |    2 +-
 src/copy.c    |   52 +++++-------
 src/copy.h    |    3 +
 src/cp.c      |   32 ++++++-
 src/install.c |   26 +++---
 src/local.mk  |   15 +++-
 src/mkdir.c   |   22 ++++-
 src/mkfifo.c  |   16 +++-
 src/mknod.c   |   17 +++-
 src/mv.c      |   13 +++-
 src/runcon.c  |    2 +-
 src/selinux.c |  269 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/selinux.h |   26 ++++++
 src/system.h  |    2 +-
 14 files changed, 432 insertions(+), 65 deletions(-)
 create mode 100644 src/selinux.c
 create mode 100644 src/selinux.h

diff --git a/src/chcon.c b/src/chcon.c
index 66075f5..17d40d7 100644
--- a/src/chcon.c
+++ b/src/chcon.c
@@ -355,7 +355,7 @@ Usage: %s [OPTION]... CONTEXT FILE...\n\
 "),
         program_name, program_name, program_name);
       fputs (_("\
-Change the security context of each FILE to CONTEXT.\n\
+Change the SELinux security context of each FILE to CONTEXT.\n\
 With --reference, change the security context of each FILE to that of RFILE.\n\
 \n\
 "), stdout);
diff --git a/src/copy.c b/src/copy.c
index 7a35414..501801c 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -60,6 +60,7 @@
 #include "write-any-file.h"
 #include "areadlink.h"
 #include "yesno.h"
+#include "selinux.h"
 
 #if USE_XATTR
 # include <attr/error_context.h>
@@ -837,41 +838,18 @@ copy_reg (char const *src_name, char const *dst_name,
          1) the src context may prohibit writing, and
          2) because it's more consistent to use the same context
          that is used when the destination file doesn't already exist.  */
-      if (x->preserve_security_context && 0 <= dest_desc)
+      if ((x->set_security_context || x->preserve_security_context) && 0 <= dest_desc)
         {
           bool all_errors = (!x->data_copy_required
                              || x->require_preserve_context);
           bool some_errors = !all_errors && !x->reduce_diagnostics;
-          security_context_t con = NULL;
 
-          if (getfscreatecon (&con) < 0)
-            {
-              if (all_errors || (some_errors && !errno_unsupported (errno)))
-                error (0, errno, _("failed to get file system create context"));
-              if (x->require_preserve_context)
-                {
-                  return_val = false;
-                  goto close_src_and_dst_desc;
-                }
-            }
-
-          if (con)
-            {
-              if (fsetfilecon (dest_desc, con) < 0)
-                {
-                  if (all_errors || (some_errors && !errno_unsupported (errno)))
-                    error (0, errno,
-                           _("failed to set the security context of %s to %s"),
-                           quote_n (0, dst_name), quote_n (1, con));
-                  if (x->require_preserve_context)
-                    {
-                      return_val = false;
-                      freecon (con);
-                      goto close_src_and_dst_desc;
-                    }
-                }
-              freecon (con);
-            }
+          if (restorecon(dst_name, 0, x->preserve_security_context) < 0)  {
+            if (all_errors || (some_errors && !errno_unsupported (errno)))
+              error (0, errno, _("failed to set file system context on %s"), quote_n (0, dst_name));
+            return_val = false;
+            goto close_src_and_dst_desc;
+          }
         }
 
       if (dest_desc < 0 && x->unlink_dest_after_failed_open)
@@ -892,6 +870,9 @@ copy_reg (char const *src_name, char const *dst_name,
 
   if (*new_dst)
     {
+      if (x->set_security_context && (! x->require_preserve_context))
+        defaultcon(dst_name, dst_mode);
+
     open_with_O_CREAT:;
 
       int open_flags = O_WRONLY | O_CREAT | O_BINARY;
@@ -974,6 +955,9 @@ copy_reg (char const *src_name, char const *dst_name,
       goto close_src_and_dst_desc;
     }
 
+  if (x->set_security_context && ! x->preserve_security_context)
+    restorecon(dst_name, 1, false);
+
   /* --attributes-only overrides --reflink.  */
   if (data_copy_required && x->reflink_mode)
     {
@@ -2092,6 +2076,9 @@ copy_internal (char const *src_name, char const *dst_name,
             emit_verbose (src_name, dst_name,
                           backup_succeeded ? dst_backup : NULL);
 
+          if (x->set_security_context)
+            restorecon(dst_name, 1, false);
+
           if (rename_succeeded)
             *rename_succeeded = true;
 
@@ -2231,6 +2218,11 @@ copy_internal (char const *src_name, char const *dst_name,
             return false;
         }
     }
+  else
+  {
+    if (x->set_security_context)
+      restorecon(dst_name, 1, false);
+  }
 
   if (S_ISDIR (src_mode))
     {
diff --git a/src/copy.h b/src/copy.h
index 440d3bb..d6044aa 100644
--- a/src/copy.h
+++ b/src/copy.h
@@ -159,6 +159,9 @@ struct cp_options
   bool preserve_timestamps;
   bool explicit_no_preserve_mode;
 
+  /* If true, attempt to set specified security context */
+  bool set_security_context;
+
   /* Enabled for mv, and for cp by the --preserve=links option.
      If true, attempt to preserve in the destination files any
      logical hard links between the source files.  If used with cp's
diff --git a/src/cp.c b/src/cp.c
index 231d6a3..365fad4 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -141,6 +141,7 @@ static struct option const long_opts[] =
   {"target-directory", required_argument, NULL, 't'},
   {"update", no_argument, NULL, 'u'},
   {"verbose", no_argument, NULL, 'v'},
+  {GETOPT_SELINUX_CONTEXT_OPTION_DECL},
   {GETOPT_HELP_OPTION_DECL},
   {GETOPT_VERSION_OPTION_DECL},
   {NULL, 0, NULL, 0}
@@ -228,6 +229,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
                                  destination file is missing\n\
   -v, --verbose                explain what is being done\n\
   -x, --one-file-system        stay on this file system\n\
+  -Z, --context[=CTX]      set security context of destination file to default type or to CTX if specified\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -785,6 +787,7 @@ cp_option_init (struct cp_options *x)
   x->explicit_no_preserve_mode = false;
   x->preserve_security_context = false;
   x->require_preserve_context = false;
+  x->set_security_context = false;
   x->preserve_xattr = false;
   x->reduce_diagnostics = false;
   x->require_preserve_xattr = false;
@@ -876,8 +879,10 @@ decode_preserve_arg (char const *arg, struct cp_options *x, bool on_off)
           break;
 
         case PRESERVE_CONTEXT:
-          x->preserve_security_context = on_off;
-          x->require_preserve_context = on_off;
+          if (! x->set_security_context) {
+            x->preserve_security_context = on_off;
+            x->require_preserve_context = on_off;
+          }
           break;
 
         case PRESERVE_XATTR:
@@ -891,7 +896,7 @@ decode_preserve_arg (char const *arg, struct cp_options *x, bool on_off)
           x->preserve_ownership = on_off;
           x->preserve_links = on_off;
           x->explicit_no_preserve_mode = !on_off;
-          if (selinux_enabled)
+          if (selinux_enabled && (! x->set_security_context))
             x->preserve_security_context = on_off;
           x->preserve_xattr = on_off;
           break;
@@ -934,7 +939,7 @@ main (int argc, char **argv)
      we'll actually use backup_suffix_string.  */
   backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
 
-  while ((c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:T",
+  while ((c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:TZ",
                            long_opts, NULL))
          != -1)
     {
@@ -961,7 +966,7 @@ main (int argc, char **argv)
           x.preserve_mode = true;
           x.preserve_timestamps = true;
           x.require_preserve = true;
-          if (selinux_enabled)
+          if (selinux_enabled && (! x.set_security_context))
              x.preserve_security_context = true;
           x.preserve_xattr = true;
           x.reduce_diagnostics = true;
@@ -1091,6 +1096,23 @@ main (int argc, char **argv)
           x.one_file_system = true;
           break;
 
+
+        case 'Z':
+          /* politely decline if we're not on a selinux-enabled kernel. */
+          if( selinux_enabled ) {
+                  if (optarg) {
+                          /* if there's a security_context given set new path
+                             components to that context, too */
+                          if ( setfscreatecon(optarg) < 0 ) {
+                                  (void) fprintf(stderr, _("cannot set default security context %s\n"), optarg);
+                                  exit( 1 );
+                          }
+                  }
+                  x.set_security_context = true;
+                  x.preserve_security_context = false;
+          }
+         break;
+
         case 'S':
           make_backups = true;
           backup_suffix_string = optarg;
diff --git a/src/install.c b/src/install.c
index 8ea5491..0b9b317 100644
--- a/src/install.c
+++ b/src/install.c
@@ -280,6 +280,7 @@ cp_option_init (struct cp_options *x)
   x->data_copy_required = true;
   x->require_preserve = false;
   x->require_preserve_context = false;
+  x->set_security_context = false;
   x->require_preserve_xattr = false;
   x->recursive = false;
   x->sparse_mode = SPARSE_AUTO;
@@ -641,8 +642,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
 "), stdout);
       fputs (_("\
       --preserve-context  preserve SELinux security context\n\
-  -Z, --context=CONTEXT  set SELinux security context of files and directories\
-\n\
+  -Z, --context[=CTX]      set security context of destination file to default type or to CTX if specified\n\
 "), stdout);
 
       fputs (HELP_OPTION_DESCRIPTION, stdout);
@@ -783,7 +783,7 @@ main (int argc, char **argv)
      we'll actually use backup_suffix_string.  */
   backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
 
-  while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pt:TvS:Z:", long_options,
+  while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pt:TvS:Z", long_options,
                               NULL)) != -1)
     {
       switch (optc)
@@ -860,18 +860,20 @@ main (int argc, char **argv)
                              "this kernel is not SELinux-enabled"));
               break;
             }
+          if ( x.set_security_context || scontext ) {
+             (void) fprintf(stderr, "%s: cannot force target context and preserve it\n", argv[0]);
+             exit( 1 );
+          }
           x.preserve_security_context = true;
-          use_default_selinux_context = false;
           break;
         case 'Z':
-          if ( ! selinux_enabled)
-            {
-              error (0, 0, _("WARNING: ignoring --context (-Z); "
-                             "this kernel is not SELinux-enabled"));
-              break;
-            }
-          scontext = optarg;
-          use_default_selinux_context = false;
+          if ( selinux_enabled )
+          {
+                  if (optarg)
+                          scontext = optarg;
+                  else
+                          x.set_security_context = true;
+          }
           break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
diff --git a/src/local.mk b/src/local.mk
index ead3b8b..bd6711e 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -307,6 +307,10 @@ RELEASE_YEAR = \
   `sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \
     $(top_srcdir)/lib/version-etc.c`
 
+selinux_sources = \
+  src/selinux.c \
+  src/selinux.h
+
 copy_sources = \
   src/copy.c \
   src/cp-hash.c \
@@ -318,12 +322,12 @@ copy_sources = \
 # to install before applying any user-specified name transformations.
 
 transform = s/ginstall/install/; $(program_transform_name)
-src_ginstall_SOURCES = src/install.c src/prog-fprintf.c $(copy_sources)
+src_ginstall_SOURCES = src/install.c src/prog-fprintf.c $(copy_sources) $(selinux_sources)
 
 # This is for the '[' program.  Automake transliterates '[' and '/' to '_'.
 src___SOURCES = src/lbracket.c
 
-src_cp_SOURCES = src/cp.c $(copy_sources)
+src_cp_SOURCES = src/cp.c $(copy_sources) $(selinux_sources)
 src_dir_SOURCES = src/ls.c src/ls-dir.c
 src_vdir_SOURCES = src/ls.c src/ls-vdir.c
 src_id_SOURCES = src/id.c src/group-list.c
@@ -336,12 +340,15 @@ src_kill_SOURCES = src/kill.c src/operand2sig.c
 src_realpath_SOURCES = src/realpath.c src/relpath.c src/relpath.h
 src_timeout_SOURCES = src/timeout.c src/operand2sig.c
 
-src_mv_SOURCES = src/mv.c src/remove.c $(copy_sources)
+src_mv_SOURCES = src/mv.c src/remove.c $(copy_sources) $(selinux_sources)
 src_rm_SOURCES = src/rm.c src/remove.c
 
-src_mkdir_SOURCES = src/mkdir.c src/prog-fprintf.c
+src_mkdir_SOURCES = src/mkdir.c src/prog-fprintf.c $(selinux_sources)
 src_rmdir_SOURCES = src/rmdir.c src/prog-fprintf.c
 
+src_mkfifo_SOURCES = src/mkfifo.c $(selinux_sources)
+src_mknod_SOURCES = src/mknod.c $(selinux_sources)
+
 src_df_SOURCES = src/df.c src/find-mount-point.c
 src_stat_SOURCES = src/stat.c src/find-mount-point.c
 
diff --git a/src/mkdir.c b/src/mkdir.c
index 32f79d4..548030c 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -29,6 +29,7 @@
 #include "prog-fprintf.h"
 #include "quote.h"
 #include "savewd.h"
+#include "selinux.h"
 
 /* The official name of this program (e.g., no 'g' prefix).  */
 #define PROGRAM_NAME "mkdir"
@@ -65,8 +66,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -m, --mode=MODE   set file mode (as in chmod), not a=rwx - umask\n\
   -p, --parents     no error if existing, make parent directories as needed\n\
   -v, --verbose     print a message for each created directory\n\
-  -Z, --context=CTX  set the SELinux security context of each created\n\
-                      directory to CTX\n\
+  -Z, --context[=CTX]  set the SELinux security context of each created\n\
+                      directory to default type or to CTX if specified\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -91,6 +92,9 @@ struct mkdir_options
   /* File mode bits affected by MODE.  */
   mode_t mode_bits;
 
+  /* Set the SELinux File Context.  */
+  int set_security_context;
+
   /* If not null, format to use when reporting newly made directories.  */
   char const *created_directory_format;
 };
@@ -113,6 +117,9 @@ static int
 make_ancestor (char const *dir, char const *component, void *options)
 {
   struct mkdir_options const *o = options;
+
+  if (o->set_security_context)
+    defaultcon(dir, S_IFDIR);
   int r = mkdir (component, o->ancestor_mode);
   if (r == 0)
     {
@@ -146,6 +153,7 @@ main (int argc, char **argv)
   options.mode = S_IRWXUGO;
   options.mode_bits = 0;
   options.created_directory_format = NULL;
+  options.set_security_context = false;
 
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
@@ -155,7 +163,7 @@ main (int argc, char **argv)
 
   atexit (close_stdout);
 
-  while ((optc = getopt_long (argc, argv, "pm:vZ:", longopts, NULL)) != -1)
+  while ((optc = getopt_long (argc, argv, "pm:vZ", longopts, NULL)) != -1)
     {
       switch (optc)
         {
@@ -169,7 +177,13 @@ main (int argc, char **argv)
           options.created_directory_format = _("created directory %s");
           break;
         case 'Z':
-          scontext = optarg;
+          if ( is_selinux_enabled() > 0 )
+          {
+            if (optarg)
+              scontext = optarg;
+            else
+              options.set_security_context = true;
+          }
           break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
diff --git a/src/mkfifo.c b/src/mkfifo.c
index e524c44..3253640 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -26,6 +26,7 @@
 #include "error.h"
 #include "modechange.h"
 #include "quote.h"
+#include "selinux.h"
 
 /* The official name of this program (e.g., no 'g' prefix).  */
 #define PROGRAM_NAME "mkfifo"
@@ -60,7 +61,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -m, --mode=MODE    set file permission bits to MODE, not a=rw - umask\n\
 "), stdout);
       fputs (_("\
-  -Z, --context=CTX  set the SELinux security context of each NAME to CTX\n\
+  -Z, --context[=CTX]  set the SELinux security context of each NAME to default type or CTX if specified\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -74,6 +75,7 @@ main (int argc, char **argv)
 {
   mode_t newmode;
   char const *specified_mode = NULL;
+  int set_security_context = false;
   int exit_status = EXIT_SUCCESS;
   int optc;
   security_context_t scontext = NULL;
@@ -86,7 +88,7 @@ main (int argc, char **argv)
 
   atexit (close_stdout);
 
-  while ((optc = getopt_long (argc, argv, "m:Z:", longopts, NULL)) != -1)
+  while ((optc = getopt_long (argc, argv, "m:Z", longopts, NULL)) != -1)
     {
       switch (optc)
         {
@@ -94,7 +96,13 @@ main (int argc, char **argv)
           specified_mode = optarg;
           break;
         case 'Z':
-          scontext = optarg;
+          if ( is_selinux_enabled() > 0 )
+          {
+            if (optarg)
+              scontext = optarg;
+            else
+              set_security_context = true;
+          }
           break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
@@ -128,6 +136,8 @@ main (int argc, char **argv)
     }
 
   for (; optind < argc; ++optind)
+    if (set_security_context)
+      defaultcon(argv[optind], S_IFIFO);
     if (mkfifo (argv[optind], newmode) != 0)
       {
         error (0, errno, _("cannot create fifo %s"), quote (argv[optind]));
diff --git a/src/mknod.c b/src/mknod.c
index dc158b4..6977ba8 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -27,6 +27,7 @@
 #include "modechange.h"
 #include "quote.h"
 #include "xstrtol.h"
+#include "selinux.h"
 
 /* The official name of this program (e.g., no 'g' prefix).  */
 #define PROGRAM_NAME "mknod"
@@ -62,7 +63,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -m, --mode=MODE    set file permission bits to MODE, not a=rw - umask\n\
 "), stdout);
       fputs (_("\
-  -Z, --context=CTX  set the SELinux security context of NAME to CTX\n\
+  -Z, --context[=CTX]  set the SELinux security context of NAME to default type or to CTX if specified\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -94,6 +95,7 @@ main (int argc, char **argv)
   int expected_operands;
   mode_t node_type;
   security_context_t scontext = NULL;
+  int set_security_context = false;
 
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
@@ -103,7 +105,7 @@ main (int argc, char **argv)
 
   atexit (close_stdout);
 
-  while ((optc = getopt_long (argc, argv, "m:Z:", longopts, NULL)) != -1)
+  while ((optc = getopt_long (argc, argv, "m:Z", longopts, NULL)) != -1)
     {
       switch (optc)
         {
@@ -111,7 +113,13 @@ main (int argc, char **argv)
           specified_mode = optarg;
           break;
         case 'Z':
-          scontext = optarg;
+          if ( is_selinux_enabled() > 0 )
+          {
+            if (optarg)
+              scontext = optarg;
+            else
+              set_security_context = true;
+          }
           break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
@@ -212,6 +220,9 @@ main (int argc, char **argv)
           error (EXIT_FAILURE, 0, _("invalid device %s %s"), s_major, s_minor);
 #endif
 
+        if (set_security_context)
+          defaultcon(argv[optind], node_type);
+
         if (mknod (argv[optind], newmode | node_type, device) != 0)
           error (EXIT_FAILURE, errno, "%s", quote (argv[optind]));
       }
diff --git a/src/mv.c b/src/mv.c
index 5b08fdd..683c649 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -55,6 +55,7 @@ static bool remove_trailing_slashes;
 static struct option const long_options[] =
 {
   {"backup", optional_argument, NULL, 'b'},
+  {"context", no_argument, NULL, 'Z'},
   {"force", no_argument, NULL, 'f'},
   {"interactive", no_argument, NULL, 'i'},
   {"no-clobber", no_argument, NULL, 'n'},
@@ -120,6 +121,7 @@ cp_option_init (struct cp_options *x)
   x->preserve_timestamps = true;
   x->explicit_no_preserve_mode= false;
   x->preserve_security_context = selinux_enabled;
+  x->set_security_context = false;
   x->reduce_diagnostics = false;
   x->data_copy_required = true;
   x->require_preserve = false;  /* FIXME: maybe make this an option */
@@ -317,6 +319,7 @@ If you specify more than one of -i, -f, -n, only the final one takes effect.\n\
                                  than the destination file or when the\n\
                                  destination file is missing\n\
   -v, --verbose                explain what is being done\n\
+  -Z, --context                set security context of destination file to default type\n \
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -351,6 +354,7 @@ main (int argc, char **argv)
   bool no_target_directory = false;
   int n_files;
   char **file;
+  bool selinux_enabled = (0 < is_selinux_enabled ());
 
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
@@ -369,7 +373,7 @@ main (int argc, char **argv)
      we'll actually use backup_suffix_string.  */
   backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
 
-  while ((c = getopt_long (argc, argv, "bfint:uvS:T", long_options, NULL))
+  while ((c = getopt_long (argc, argv, "bfint:uvS:TZ", long_options, NULL))
          != -1)
     {
       switch (c)
@@ -418,6 +422,13 @@ main (int argc, char **argv)
           make_backups = true;
           backup_suffix_string = optarg;
           break;
+        case 'Z':
+          /* politely decline if we're not on a selinux-enabled kernel. */
+          if( selinux_enabled ) {
+            x.preserve_security_context = false;
+            x.set_security_context = true;
+          }
+          break;
         case_GETOPT_HELP_CHAR;
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
         default:
diff --git a/src/runcon.c b/src/runcon.c
index 875441f..7162f65 100644
--- a/src/runcon.c
+++ b/src/runcon.c
@@ -85,7 +85,7 @@ Usage: %s CONTEXT COMMAND [args]\n\
   or:  %s [ -c ] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n\
 "), program_name, program_name);
       fputs (_("\
-Run a program in a different security context.\n\
+Run a program in a different SELinux security context.\n\
 With neither CONTEXT nor COMMAND, print the current security context.\n\
 \n\
   CONTEXT            Complete security context\n\
diff --git a/src/selinux.c b/src/selinux.c
new file mode 100644
index 0000000..6045dd5
--- /dev/null
+++ b/src/selinux.c
@@ -0,0 +1,269 @@
+/* selinux - core functions for maintaining SELinux labelking
+   Copyright (C) 2012 Red Hat, 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 <http://www.gnu.org/licenses/>.  */
+
+/* Written by Daniel Walsh <dwalsh@redhat.com> */
+
+#include <config.h>
+#include <selinux/selinux.h>
+#include <selinux/flask.h>
+#include <selinux/context.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <libgen.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <unistd.h>
+#include "selinux.h"
+
+#include "error.h"
+#include "system.h"
+#include "fts.h"
+
+/*
+  This function has being added to libselinux-2.1.12-5, but is here
+  for support with older versions of SELinux
+
+  Translates a mode into an Internal SELinux security_class definition.
+  Returns 0 on failure, with errno set to EINVAL.
+*/
+static security_class_t mode_to_security_class(mode_t m) {
+
+  if (S_ISREG(m))
+    return string_to_security_class("file");
+  if (S_ISDIR(m))
+    return string_to_security_class("dir");
+  if (S_ISCHR(m))
+    return string_to_security_class("chr_file");
+  if (S_ISBLK(m))
+    return string_to_security_class("blk_file");
+  if (S_ISFIFO(m))
+    return string_to_security_class("fifo_file");
+  if (S_ISLNK(m))
+    return string_to_security_class("lnk_file");
+  if (S_ISSOCK(m))
+    return string_to_security_class("sock_file");
+
+  errno=EINVAL;
+  return 0;
+}
+
+/*
+  This function takes a path and a mode and then asks SELinux what the label
+  of the path object would be if the current process label created it.
+  it then returns the label.
+
+  Returns -1 on failure. errno will be set approptiately.
+*/
+
+static int computecon(char const *path, mode_t mode, security_context_t *con) {
+  security_context_t scon = NULL;
+  security_context_t tcon = NULL;
+  security_class_t tclass;
+  int rc = -1;
+
+  char *dir = strdup(path);
+  if (!dir)
+    goto quit;
+  if (getcon(&scon) < 0)
+    goto quit;
+  if (getfilecon(dirname((char *) dir), &tcon) < 0)
+    goto quit;
+  tclass = mode_to_security_class(mode);
+  if (!tclass)
+    goto quit;
+  rc = security_compute_create(scon, tcon, tclass, con);
+
+quit:
+  free(dir);
+  freecon(scon);
+  freecon(tcon);
+  return rc;
+}
+
+/*
+  This function takes a path and a mode, it asks calls computecon to get the
+  label of the path object if the current process created it, then it calls
+  matchpathcon to get the default type for the object.  It substitutes the
+  default type into label.  It tells the SELinux Kernel to label all new file
+  system objects created by the current process with this label.
+
+  Returns -1 on failure. errno will be set approptiately.
+*/
+int defaultcon (char const *path, mode_t mode) {
+  int rc = -1;
+  security_context_t scon = NULL, tcon = NULL;
+  context_t scontext = NULL, tcontext = NULL;
+
+  rc = matchpathcon(path, mode,  &scon);
+  if (rc < 0)
+    goto quit;
+  rc = computecon(path, mode,  &tcon);
+  if (rc < 0)
+    goto quit;
+  scontext = context_new(scon);
+  rc = -1;
+  if (!scontext)
+    goto quit;
+  tcontext = context_new(tcon);
+  if (!tcontext)
+    goto quit;
+
+  context_type_set(tcontext, context_type_get(scontext));
+  rc = setfscreatecon (context_str(tcontext));
+
+//  printf("defaultcon %s %s\n", path, context_str(tcontext));
+quit:
+  if (scontext)
+    context_free(scontext);
+  if (scontext)
+    context_free(tcontext);
+  freecon(scon);
+  freecon(tcon);
+  return rc;
+}
+
+/*
+  This function takes a path of an existing file system object, and a boolean
+  that indicates whether the function should preserve the objects label or
+  generate a new label using matchpathcon.  If the function
+  is called with preserve, it will ask the SELinux Kernel what the default label
+  for all objects created should be and then sets the label on the object.
+  Otherwise it calls matchpathcon on the object to ask the system what the
+  default label should be, extracts the type field and then modifies the file
+  system object.
+
+  Returns -1 on failure. errno will be set approptiately.
+*/
+static int restorecon_private (char const *path, bool preserve) {
+  int rc = -1;
+  struct stat sb;
+  security_context_t scon = NULL, tcon = NULL;
+  context_t scontext = NULL, tcontext = NULL;
+  int fd;
+
+  if (preserve) {
+    if (getfscreatecon (&tcon) < 0)
+      return rc;
+    rc = lsetfilecon (path, tcon);
+    freecon(tcon);
+    return rc;
+  }
+
+  fd = open (path, O_RDONLY | O_NOFOLLOW);
+  if (!fd && (errno != ELOOP))
+    goto quit;
+
+  if (fd) {
+    rc = fstat (fd, &sb);
+    if (rc < 0)
+      goto quit;
+  } else {
+    rc = lstat (path, &sb);
+    if (rc < 0)
+      goto quit;
+  }
+
+  rc = matchpathcon(path, sb.st_mode,  &scon);
+  if (rc < 0)
+    goto quit;
+  scontext = context_new(scon);
+  rc = -1;
+  if (!scontext)
+    goto quit;
+
+  if (fd) {
+    rc = fgetfilecon (fd, &tcon);
+    if (!rc)
+      goto quit;
+  } else  {
+    rc = lgetfilecon (path, &tcon);
+    if (!rc)
+      goto quit;
+  }
+  tcontext = context_new(tcon);
+  if (!tcontext)
+    goto quit;
+
+  context_type_set(tcontext, context_type_get(scontext));
+
+  if (fd)
+        rc = fsetfilecon (fd, context_str(tcontext));
+  else
+        rc = lsetfilecon (path, context_str(tcontext));
+
+//  printf("restorcon %s %s\n", path, context_str(tcontext));
+quit:
+  close(fd);
+  if (scontext)
+    context_free(scontext);
+  if (scontext)
+    context_free(tcontext);
+  freecon(scon);
+  freecon(tcon);
+  return rc;
+}
+
+/*
+  This function takes three parameters:
+  Path of an existing file system object.
+  A boolean indicating whether it should call restorecon_private recursively
+  or not.
+  A boolean that indicates whether the function should preserve the objects
+  label or generate a new label using matchpathcon.
+
+  If Recurse is selected and the file system object is a directory, restorecon
+  calls restorecon_private on every file system object in the directory.
+
+  Returns false on failure. errno will be set approptiately.
+*/
+bool restorecon (char const *path, bool recurse, bool preserve) {
+  const char *mypath[2] = { path, NULL };
+  FTS *fts;
+  bool ok = true;
+
+  if (!recurse)
+    return restorecon_private(path, preserve);
+
+  fts = fts_open ((char *const *)mypath, FTS_PHYSICAL, NULL);
+  while (1)
+    {
+      FTSENT *ent;
+
+      ent = fts_read (fts);
+      if (ent == NULL)
+        {
+          if (errno != 0)
+            {
+              /* FIXME: try to give a better message  */
+              error (0, errno, _("fts_read failed"));
+              ok = false;
+            }
+          break;
+        }
+
+      ok &= restorecon_private(fts->fts_path, preserve);
+    }
+
+  if (fts_close (fts) != 0)
+    {
+      error (0, errno, _("fts_close failed"));
+      ok = false;
+    }
+
+  return ok;
+}
diff --git a/src/selinux.h b/src/selinux.h
new file mode 100644
index 0000000..c032c05
--- /dev/null
+++ b/src/selinux.h
@@ -0,0 +1,26 @@
+/* selinux - core functions for maintaining SELinux labelking
+   Copyright (C) 2012 Red Hat, 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 <http://www.gnu.org/licenses/>.  */
+
+/* Written by Daniel Walsh <dwalsh@redhat.com> */
+
+#ifndef COREUTILS_SELINUX_H
+#define COREUTILS_SELINUX_H
+
+#include <stdbool.h>
+#include <sys/stat.h>
+extern bool restorecon (char const *path, bool recurse, bool preserve);
+extern int defaultcon (char const *path, mode_t mode);
+#endif
diff --git a/src/system.h b/src/system.h
index 06cc803..b5d750c 100644
--- a/src/system.h
+++ b/src/system.h
@@ -330,7 +330,7 @@ enum
 #define GETOPT_VERSION_OPTION_DECL \
   "version", no_argument, NULL, GETOPT_VERSION_CHAR
 #define GETOPT_SELINUX_CONTEXT_OPTION_DECL \
-  "context", required_argument, NULL, 'Z'
+  "context", optional_argument, NULL, 'Z'
 
 #define case_GETOPT_HELP_CHAR			\
   case GETOPT_HELP_CHAR:			\
-- 
1.7.6.4



From MAILER-DAEMON Wed Nov 28 07:48:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Tdh4E-0004DJ-BV
	for mharc-coreutils@gnu.org; Wed, 28 Nov 2012 07:48:42 -0500
Received: from eggs.gnu.org ([208.118.235.92]:47848)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Tdh48-0004Bl-PD
	for coreutils@gnu.org; Wed, 28 Nov 2012 07:48:41 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Tdh47-0006XJ-Df
	for coreutils@gnu.org; Wed, 28 Nov 2012 07:48:36 -0500
Received: from mx1.redhat.com ([209.132.183.28]:47448)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Tdh47-0006Ww-5u
	for coreutils@gnu.org; Wed, 28 Nov 2012 07:48:35 -0500
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
	(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qASCmQ1D004581
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 28 Nov 2012 07:48:26 -0500
Received: from pb-n5110.redhat.com (ovpn-116-83.ams2.redhat.com [10.36.116.83])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id qASCmNAv027365; Wed, 28 Nov 2012 07:48:24 -0500
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH] cp: -Z: fix memory leak edge case
Date: Wed, 28 Nov 2012 12:48:16 +0000
Message-Id: <1354106896-24816-1-git-send-email-P@draigBrady.com>
In-Reply-To: <1354066999-17464-1-git-send-email-P@draigBrady.com>
References: <1354066999-17464-1-git-send-email-P@draigBrady.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
Cc: Bernhard Voelker <mail@bernhard-voelker.de>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 28 Nov 2012 12:48:41 -0000

From: Bernhard Voelker <mail@bernhard-voelker.de>

src/selinux.c (defaultcon): In edge cases where scontext is
allocated, while tcontext is not, ensure both are deallocated.
Also remove the redundant NULL guard to context_free().
(restorecon_private): Likewise.
---
 src/selinux.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/selinux.c b/src/selinux.c
index bbb9999..e708b55 100644
--- a/src/selinux.c
+++ b/src/selinux.c
@@ -128,10 +128,8 @@ defaultcon (char const *path, mode_t mode)
 
 //  printf("defaultcon %s %s\n", path, context_str(tcontext));
 quit:
-  if (scontext)
-    context_free (scontext);
-  if (scontext)
-    context_free (tcontext);
+  context_free (scontext);
+  context_free (tcontext);
   freecon (scon);
   freecon (tcon);
   return rc;
@@ -218,10 +216,8 @@ restorecon_private (char const *path, bool preserve)
 //  printf("restorcon %s %s\n", path, context_str(tcontext));
 quit:
   close (fd);
-  if (scontext)
-    context_free (scontext);
-  if (scontext)
-    context_free (tcontext);
+  context_free (scontext);
+  context_free (tcontext);
   freecon (scon);
   freecon (tcon);
   return rc;
-- 
1.7.6.4



From MAILER-DAEMON Thu Nov 29 02:50:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Tdytb-0001bh-8X
	for mharc-coreutils@gnu.org; Thu, 29 Nov 2012 02:50:55 -0500
Received: from eggs.gnu.org ([208.118.235.92]:52382)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TdytY-0001aa-Mq
	for coreutils@gnu.org; Thu, 29 Nov 2012 02:50:53 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TdytX-0006AH-Db
	for coreutils@gnu.org; Thu, 29 Nov 2012 02:50:52 -0500
Received: from moutng.kundenserver.de ([212.227.17.10]:64134)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1TdytW-0006A7-O2
	for coreutils@gnu.org; Thu, 29 Nov 2012 02:50:51 -0500
Received: from [192.168.1.11] (p4FF76E7F.dip.t-dialin.net [79.247.110.127])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0LqrfL-1SzfvS3dGl-00eXAQ; Thu, 29 Nov 2012 08:50:46 +0100
Message-ID: <50B713D4.3010503@bernhard-voelker.de>
Date: Thu, 29 Nov 2012 08:50:44 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: Hide rootfs filesystem in df
References: <20120924104509.6825b8ec@viper.suse.cz>
	<A75C39900FCF0B42A2CE8B26F837D2C306C226@MCHP02MSX.global-ad.net>
	<20120924155240.63607bc0@viper.suse.cz>
	<A75C39900FCF0B42A2CE8B26F837D2C306C26A@MCHP02MSX.global-ad.net>
	<20120924164902.6a4af494@viper.suse.cz>
	<A75C39900FCF0B42A2CE8B26F837D2C306C2EA@MCHP02MSX.global-ad.net>
	<87zk4cdfr3.fsf@rho.meyering.net>
In-Reply-To: <87zk4cdfr3.fsf@rho.meyering.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:XfjJQ2C24kyqgFgpRJCwjdz/dmZsIvoBSfsVRnISjaK
	kLPy/bmUUbvA2lDq8IATDnwldk9W0CrsyqTT42zfYTdpJAu1R8
	K9MhlVTEo3VlG/1lK/yXbocIlgBEm4d8/qPqz3lufTSYpi5pnr
	vBv0qiybKA7eZzpziOBq2BV6OtGi+Kx/4k8VG2zPGSIVVIk/Td
	FKJDj093wHlRSe+y4mhf+3S+Ezip6M/jmNYL33v5bJA3ROQUbG
	CEUGxMxffGCxHT7Ru5eJsiTGU6q6+0qYv87jG5vEHTp9nYJsEd
	zEK5uZA4AXi1NM7HDY3dVENryiTqNYZUFRVSF+a3hfDuP83ELW
	9+JR1LFrp6r9woVLm5mYHaU6Pm6drwWJ3r/x1gmnQ
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.17.10
Cc: Robert Milasan <rmilasan@suse.com>, "coreutils@gnu.org" <coreutils@gnu.org>
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 29 Nov 2012 07:50:53 -0000

On 09/26/2012 04:24 PM, Jim Meyering wrote:
> Voelker, Bernhard wrote:
> 
>> Robert Milasan wrote:
>>
>>> That has been fixed, at least in 12.1 and 12.2 (even if it's not fixed
>>> there is not rootfs entry in /proc/self/mountinfo):
>>
>> I know.
>> The problem is that mount from util-linux has it's own
>> wrapper for the mount entries which is using mountinfo
>> while coreutils' df is just calling get_fs_usage() from
>> gnulib which in turn is reading /etc/mtab - which is
>> a symlink to /proc/self/mounts in this case.
>> And that file has both entries.
>>
>> So the question is:
>> * is it a kernel thing to not expose rootfs to
>>   /proc/self/mounts?
>> * should gnulib's get_fs_usage() switch to reading
>>   mountinfo?
>> * is it a gnulib thing to not filter the rootfs
>>   entry?
>> * is it up to coreutils to filter out the rootfs
>>   entry?
>> * should coreutils' df switch to reading mountinfo?
>>
>> There are several possibilities here.
>>
>> Jim?
> 
> Hi Bernie,
> I'm away from home for a day or so more,
> so have less time than usual.  I'll be back on Friday.

Hi Jim,

as Robert wrote, it's the easiest way to fix it.
The only situation it can fail is during early boot when
no other file system is mounted yet, but I doubt anyone
will try to use df in that case.
So I'm 60:40 for adding it.
WDYT?

Have a nice day,
Berny


From MAILER-DAEMON Thu Nov 29 11:50:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Te7JK-0008Px-Kb
	for mharc-coreutils@gnu.org; Thu, 29 Nov 2012 11:50:02 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45269)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Te7JI-0008PJ-BL
	for coreutils@gnu.org; Thu, 29 Nov 2012 11:50:01 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Te7JC-0006pw-KJ
	for coreutils@gnu.org; Thu, 29 Nov 2012 11:50:00 -0500
Received: from mx.meyering.net ([88.168.87.75]:58047)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Te7JC-0006nb-DE
	for coreutils@gnu.org; Thu, 29 Nov 2012 11:49:54 -0500
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id CEE0060085;
	Thu, 29 Nov 2012 17:49:52 +0100 (CET)
From: Jim Meyering <jim@meyering.net>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: Make mv work better with SELinux.
In-Reply-To: <1354066999-17464-1-git-send-email-P@draigBrady.com>
	(=?iso-8859-1?Q?=22P=E1draig?=
	Brady"'s message of "Wed, 28 Nov 2012 01:43:10 +0000")
References: <509C304B.1030708@redhat.com>
	<1354066999-17464-1-git-send-email-P@draigBrady.com>
Date: Thu, 29 Nov 2012 17:49:52 +0100
Message-ID: <87obig1hhr.fsf@rho.meyering.net>
Lines: 14
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 88.168.87.75
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 29 Nov 2012 16:50:01 -0000

P=E1draig Brady wrote:
> Sorry for the slowness of my review of this.
> I had a spare hour there, and added these plumbing
> patches to better integrate your patch into coreutils.
> I'll squash these into your patch when finished.
>
> Still todo is:
>   actually analyze/test the meat of the patch
>   write docs
>   write tests
>   Use mode_to_security_class() from libselinux if available

Your clean-up patches all look fine.
Thanks for attending to all of those tedious details.


From MAILER-DAEMON Thu Nov 29 12:45:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Te8B2-00045R-4J
	for mharc-coreutils@gnu.org; Thu, 29 Nov 2012 12:45:32 -0500
Received: from eggs.gnu.org ([208.118.235.92]:60498)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Te8Au-00042y-1Q
	for coreutils@gnu.org; Thu, 29 Nov 2012 12:45:30 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Te8Ao-0007Qv-Fi
	for coreutils@gnu.org; Thu, 29 Nov 2012 12:45:23 -0500
Received: from moutng.kundenserver.de ([212.227.17.9]:60751)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Te8Ao-0007Qn-51
	for coreutils@gnu.org; Thu, 29 Nov 2012 12:45:18 -0500
Received: from [192.168.1.11] (p4FF76E7F.dip.t-dialin.net [79.247.110.127])
	by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis)
	id 0Lr4CZ-1SzYEK0zAp-00eS37; Thu, 29 Nov 2012 18:45:16 +0100
Message-ID: <50B79F29.8060609@bernhard-voelker.de>
Date: Thu, 29 Nov 2012 18:45:13 +0100
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: df command should suppress duplicates
References: <502BC320.8080106@redhat.com>
	<502C967C.7070009@bernhard-voelker.de>
	<506DC909.1090603@redhat.com>
In-Reply-To: <506DC909.1090603@redhat.com>
Content-Type: multipart/mixed; boundary="------------030503040904060903020507"
X-Provags-ID: V02:K0:n55EerxZNiuTgsm0xsudCxvrET797FwPfR1jk4dAZdX
	4gAQdgpyhc8XVEjoKrJrhKfzkRNjYEHCJ4TuSmyr3X8MJVMW4a
	u/atcueIx8k/cReSssHDNWguE/JM0wW0JCS7ySU3ur4eZNYGNh
	+S/Ed+oIAF88n9sfRLyMxF7Hp8hfTa9z01Z1mYApBMQ3gD6+/4
	wlUBrueWJvxliVs5LZfZaiEcBc02jlXwhf8N1xAoSwibsNhLHn
	zYIhHo6tQpzePPS6ZcC3E+UaB7//Kp7FMfUDiRSnXgYBxdCnEd
	igtsM6YsE4DbTncTiX79wBFzDoUBpoEdENGeIyPiyAN/6rpM+V
	SI49uINd+fpgB+9Y0MPpDu4GuW+cJT5TwNj3fQT8s
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.17.9
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 29 Nov 2012 17:45:30 -0000

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

On 10/04/2012 07:36 PM, Ondrej Oprala wrote:
> Hi, I haven't heard from this thread in a while, are there still things 
> to be done here?

Hi Ondrej,

FWIW, I've rebased your patch to Git master.
(The only change I made - besides resolving the conflicts -
was to declare devlist_head static to make syntax-check happy.)

However, that implementation needs further discussion:

* IMO, "df -a" should not skip bind mounts, and instead
  print all of the lines.

* It doesn't play well with Robert's suggestion for hiding
  the 'rootfs' entry, because dev_examined() already added
  the entry for the '/' file system before the rootfs entry is
  skipped, which makes the real '/' entry also be skipped.
  http://lists.gnu.org/archive/html/coreutils/2012-11/msg00091.html

  But also Robert's patch deserves further discussion.
  IMO e.g. "df -t rootfs" and again "df -a" should not skip
  rootfs. And read_file_system_list must be called with true
  param to make it work.

* It still allocates one devlist entry more than needed.

Have a nice day,
Berny

--------------030503040904060903020507
Content-Type: text/plain; charset=UTF-8;
 name="DIFF2"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="DIFF2"

RnJvbSA3ZDJjNTZlNTJiMGE4YzJjZGM4MDI1NzZiMzNiMjg3MDYyMWIxMWM1IE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBPbmRyZWogT3ByYWxhIDxvb3ByYWxhQHJlZGhhdC5j
b20+CkRhdGU6IFRodSwgMjkgTm92IDIwMTIgMTg6MjE6MjcgKzAxMDAKU3ViamVjdDogW1BB
VENIXSBkZjogRml4IG91dHB1dHRpbmcgZmlsZXN5c3RlbSBkdXBsaWNpdGllcyBjYXVzZWQg
YnkKIGJpbmQtbW91bnRzCgoqIE5FV1M6IE1lbnRpb24gdGhlIGZpeC4KKiBzcmMvZGYuYyAo
ZGV2bGlzdF9hZGQpOiBBZGQgYW5vdGhlciBlbnRyeSB0byB0aGUgZ2xvYmFsCmRldmljZSBu
dW1iZXIgbGlzdC4KKGRldl9leGFtaW5lZCk6IENoZWNrIGlmIGEgZmlsZXN5c3RlbSBoYXMg
YmVlbiBleGFtaW5lZCBhbHJlYWR5LgoqIHRlc3RzL2RmL2RmLWR1cC1yZW1vdmUuc2g6IEFk
ZCBhIG5ldyB0ZXN0IHNpbXVsYXRpbmcgbXRhYiBlbnRyaWVzLgoqIHRlc3RzL2xvY2FsLm1r
OiBBZGQgdGhlIHRlc3QgdG8gdGhlIGxpc3QuCi0tLQogTkVXUyAgICAgICAgICAgICAgICAg
ICAgICB8ICAgIDMgKysKIHNyYy9kZi5jICAgICAgICAgICAgICAgICAgfCAgIDcwICsrKysr
KysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKystCiB0ZXN0cy9kZi9kZi1k
dXAtcmVtb3ZlLnNoIHwgICA2OSArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr
KysrKysrKysrKwogdGVzdHMvbG9jYWwubWsgICAgICAgICAgICB8ICAgIDEgKwogNCBmaWxl
cyBjaGFuZ2VkLCAxNDEgaW5zZXJ0aW9ucygrKSwgMiBkZWxldGlvbnMoLSkKIGNyZWF0ZSBt
b2RlIDEwMDc1NSB0ZXN0cy9kZi9kZi1kdXAtcmVtb3ZlLnNoCgpkaWZmIC0tZ2l0IGEvTkVX
UyBiL05FV1MKaW5kZXggZDRhZWJlYi4uZDBlMTNmNiAxMDA2NDQKLS0tIGEvTkVXUworKysg
Yi9ORVdTCkBAIC0yMiw2ICsyMiw5IEBAIEdOVSBjb3JldXRpbHMgTkVXUyAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgIC0qLSBvdXRsaW5lIC0qLQogICBhbm90aGVyIHJh
bmdlLiAgQmVmb3JlLCAiZWNobyAxMjN8Y3V0IC0tb3V0cHV0LWRlbGltPTogLWIyLSwzIiB3
b3VsZCBwcmludAogICAiMjozIi4gIE5vdyBpdCBwcmludHMgIjIzIi4gIFtidWcgaW50cm9k
dWNlZCBpbiA1LjMuMF0KIAorICBkZiBub3cgcHJvcGVybHkgb3V0cHV0cyBmaWxlc3lzdGVt
IGluZm9ybWF0aW9uIHdpdGggYmluZCBtb3VudHMKKyAgcHJlc2VudCBvbiB0aGUgc3lzdGVt
LgorCiAgIGluc3RhbGwgLW0gTSBTT1VSQ0UgREVTVCBubyBsb25nZXIgaGFzIGEgcmFjZSBj
b25kaXRpb24gd2hlcmUgREVTVCdzCiAgIHBlcm1pc3Npb25zIGFyZSB0ZW1wb3JhcmlseSBk
ZXJpdmVkIGZyb20gU09VUkNFIGluc3RlYWQgb2YgZnJvbSBNLgogCmRpZmYgLS1naXQgYS9z
cmMvZGYuYyBiL3NyYy9kZi5jCmluZGV4IGNhYzI2YjcuLjBhMWE2OTEgMTAwNjQ0Ci0tLSBh
L3NyYy9kZi5jCisrKyBiL3NyYy9kZi5jCkBAIC00Myw2ICs0MywxNyBAQAogICBwcm9wZXJf
bmFtZSAoIkRhdmlkIE1hY0tlbnppZSIpLCBcCiAgIHByb3Blcl9uYW1lICgiUGF1bCBFZ2dl
cnQiKQogCisvKiBGaWxsZWQgd2l0aCBkZXZpY2UgbnVtYmVycyBvZiBleGFtaW5lZCBmaWxl
c3lzdGVtcyB0byBhdm9pZAorICAgZHVwbGljaXRpZXMgaW4gb3V0cHV0LiAgKi8KK3N0cnVj
dCBkZXZsaXN0Cit7CisgIGRldl90IGRldl9udW07CisgIHN0cnVjdCBkZXZsaXN0ICpkZXZf
bmV4dDsKK307CisKKy8qIERldmljZSBsaXN0IGhlbHAgcG9pbnRlci4gICovCitzdGF0aWMg
c3RydWN0IGRldmxpc3QgKmRldmxpc3RfaGVhZDsKKwogLyogSWYgdHJ1ZSwgc2hvdyBldmVu
IGZpbGUgc3lzdGVtcyB3aXRoIHplcm8gc2l6ZSBvcgogICAgdW5pbnRlcmVzdGluZyB0eXBl
cy4gICovCiBzdGF0aWMgYm9vbCBzaG93X2FsbF9mczsKQEAgLTEwNzYsNiArMTA4Nyw0OCBA
QCBnZXRfZW50cnkgKGNoYXIgY29uc3QgKm5hbWUsIHN0cnVjdCBzdGF0IGNvbnN0ICpzdGF0
cCkKICAgZ2V0X3BvaW50IChuYW1lLCBzdGF0cCk7CiB9CiAKKy8qIEFkZCBhIGRldmljZSBu
dW1iZXIgb2YgdGhlIHNvb24tdG8tYmUgZXhhbWluZWQKKyAgIGZpbGVzeXN0ZW0gdG8gdGhl
IGdsb2JhbCBsaXN0IGRldmxpc3QuICAqLworCitzdGF0aWMgdm9pZAorZGV2bGlzdF9hZGQg
KGRldl90IGRldl9udW0pCit7CisgIHN0cnVjdCBkZXZsaXN0ICpkZXZsaXN0ID0gZGV2bGlz
dF9oZWFkOworICB3aGlsZSAoZGV2bGlzdC0+ZGV2X25leHQpCisgICAgZGV2bGlzdCA9IGRl
dmxpc3QtPmRldl9uZXh0OworCisgIGlmICghZGV2bGlzdC0+ZGV2X251bSkKKyAgICAgIGRl
dmxpc3QtPmRldl9udW0gPSBkZXZfbnVtOworICBlbHNlCisgICAgeworICAgICAgZGV2bGlz
dC0+ZGV2X25leHQgPSB4bWFsbG9jIChzaXplb2YgKmRldmxpc3QpOworICAgICAgZGV2bGlz
dCA9IGRldmxpc3QtPmRldl9uZXh0OworICAgICAgZGV2bGlzdC0+ZGV2X251bSA9IGRldl9u
dW07CisgICAgICBkZXZsaXN0LT5kZXZfbmV4dCA9IE5VTEw7CisgICAgfQorfQorCisvKiBD
aGVjayBpZiB0aGUgZGV2aWNlIHdhcyBhbHJlYWR5IGV4YW1pbmVkLiAgKi8KKworc3RhdGlj
IGJvb2wKK2Rldl9leGFtaW5lZCAoc3RydWN0IGRldmxpc3QgKmRldmxpc3QsIGNoYXIgKm1v
dW50X2RpcikKK3sKKyAgZGV2X3QgZGV2X251bTsKKyAgc3RydWN0IHN0YXQgYnVmOworICBz
dGF0IChtb3VudF9kaXIsICZidWYpOworCisgIGRldl9udW0gPSBidWYuc3RfZGV2OworICB3
aGlsZSAoZGV2bGlzdCkKKyAgICB7CisgICAgICBpZiAoZGV2bGlzdC0+ZGV2X251bSA9PSBk
ZXZfbnVtKQorICAgICAgICByZXR1cm4gdHJ1ZTsKKyAgICAgIGRldmxpc3QgPSBkZXZsaXN0
LT5kZXZfbmV4dDsKKyAgICB9CisKKyAgZGV2bGlzdF9hZGQgKGRldl9udW0pOworICByZXR1
cm4gZmFsc2U7Cit9CisKIC8qIFNob3cgYWxsIG1vdW50ZWQgZmlsZSBzeXN0ZW1zLCBleGNl
cHQgcGVyaGFwcyB0aG9zZSB0aGF0IGFyZSBvZgogICAgYW4gdW5zZWxlY3RlZCB0eXBlIG9y
IGFyZSBlbXB0eS4gICovCiAKQEAgLTEwODMsMTAgKzExMzYsMjMgQEAgc3RhdGljIHZvaWQK
IGdldF9hbGxfZW50cmllcyAodm9pZCkKIHsKICAgc3RydWN0IG1vdW50X2VudHJ5ICptZTsK
KyAgc3RydWN0IGRldmxpc3QgKmRldmxpc3QgPSB4bWFsbG9jIChzaXplb2YgKmRldmxpc3Qp
OworICBkZXZsaXN0X2hlYWQgPSBkZXZsaXN0OworCisgIGRldmxpc3QtPmRldl9udW0gPSAw
OworICBkZXZsaXN0LT5kZXZfbmV4dCA9IE5VTEw7CiAKICAgZm9yIChtZSA9IG1vdW50X2xp
c3Q7IG1lOyBtZSA9IG1lLT5tZV9uZXh0KQotICAgIGdldF9kZXYgKG1lLT5tZV9kZXZuYW1l
LCBtZS0+bWVfbW91bnRkaXIsIE5VTEwsIG1lLT5tZV90eXBlLAotICAgICAgICAgICAgIG1l
LT5tZV9kdW1teSwgbWUtPm1lX3JlbW90ZSwgTlVMTCwgdHJ1ZSk7CisgICAgaWYgKCFkZXZf
ZXhhbWluZWQgKGRldmxpc3QsIG1lLT5tZV9tb3VudGRpcikpCisgICAgICBnZXRfZGV2ICht
ZS0+bWVfZGV2bmFtZSwgbWUtPm1lX21vdW50ZGlyLCBOVUxMLCBtZS0+bWVfdHlwZSwKKyAg
ICAgICAgICAgICAgIG1lLT5tZV9kdW1teSwgbWUtPm1lX3JlbW90ZSwgTlVMTCwgdHJ1ZSk7
CisKKyAgd2hpbGUgKGRldmxpc3QpCisgICAgeworICAgICAgZGV2bGlzdCA9IGRldmxpc3Qt
PmRldl9uZXh0OworICAgICAgZnJlZSAoZGV2bGlzdF9oZWFkKTsKKyAgICAgIGRldmxpc3Rf
aGVhZCA9IGRldmxpc3Q7CisgICAgfQogfQogCiAvKiBBZGQgRlNUWVBFIHRvIHRoZSBsaXN0
IG9mIGZpbGUgc3lzdGVtIHR5cGVzIHRvIGRpc3BsYXkuICAqLwpkaWZmIC0tZ2l0IGEvdGVz
dHMvZGYvZGYtZHVwLXJlbW92ZS5zaCBiL3Rlc3RzL2RmL2RmLWR1cC1yZW1vdmUuc2gKbmV3
IGZpbGUgbW9kZSAxMDA3NTUKaW5kZXggMDAwMDAwMC4uZDA5N2Q0YQotLS0gL2Rldi9udWxs
CisrKyBiL3Rlc3RzL2RmL2RmLWR1cC1yZW1vdmUuc2gKQEAgLTAsMCArMSw2OSBAQAorIyEv
YmluL3NoCisjIFRlc3QgZGYncyBiZWhhdmlvdXIgd2hlbiB0aGUgbW91bnQgbGlzdCBjb250
YWlucyBkdXBsaWNpdCBlbnRyaWVzLgorIyBUaGlzIHRlc3QgaXMgc2tpcHBlZCBvbiBzeXN0
ZW1zIHRoYXQgbGFjayBMRF9QUkVMT0FEIHN1cHBvcnQ7IHRoYXQncyBmaW5lLgorCisjIENv
cHlyaWdodCAoQykgMjAxMiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4KKworIyBU
aGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQg
YW5kL29yIG1vZGlmeQorIyBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFs
IFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieQorIyB0aGUgRnJlZSBTb2Z0d2FyZSBG
b3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZSBMaWNlbnNlLCBvcgorIyAoYXQg
eW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLgorCisjIFRoaXMgcHJvZ3JhbSBpcyBk
aXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAorIyBidXQg
V0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50
eSBvZgorIyBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBV
UlBPU0UuICBTZWUgdGhlCisjIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3Jl
IGRldGFpbHMuCisKKyMgWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUg
R05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKKyMgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0u
ICBJZiBub3QsIHNlZSA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzLz4uCisKKy4gIiR7
c3JjZGlyPS59L3Rlc3RzL2luaXQuc2giOyBwYXRoX3ByZXBlbmRfIC4vc3JjCitwcmludF92
ZXJfIGRmCisKK2RmIHx8IHNraXBfICJkZiBmYWlscyIKKworIyBTaW11bGF0ZSAibXRhYiIg
ZmFpbHVyZS4KK2NhdCA+IGsuYyA8PCdFT0YnIHx8IGZyYW1ld29ya19mYWlsdXJlXworI2lu
Y2x1ZGUgPHN0ZGlvLmg+CisjaW5jbHVkZSA8bW50ZW50Lmg+CisKK3N0cnVjdCBtbnRlbnQg
KmdldG1udGVudCAoRklMRSAqZnApCit7CisgIC8qIFByb3ZlIHRoYXQgTERfUFJFTE9BRCB3
b3Jrcy4gKi8KKyAgc3RhdGljIGludCBkb25lID0gMDsKKyAgaWYgKCFkb25lKQorICAgIHsK
KyAgICAgIGZjbG9zZSAoZm9wZW4gKCJ4IiwgInciKSk7CisgICAgICArK2RvbmU7CisgICAg
fQorICAvKiBOb3cgc2ltdWxhdGUgYW4gbXRhYiBmaWxlIHdpdGgKKyAgdHdvIGVudHJpZXMu
ICAqLworCisgIHN0YXRpYyBzdHJ1Y3QgbW50ZW50IG1udGVudDsKKworICB3aGlsZSAoZG9u
ZSsrIDwgMykKKyAgICB7CisgICAgICBtbnRlbnQubW50X2ZzbmFtZSA9ICJmc25hbWUiOwor
ICAgICAgbW50ZW50Lm1udF9kaXIgPSAiLyI7CisgICAgICBtbnRlbnQubW50X3R5cGUgPSAi
LSI7CisKKyAgICAgIHJldHVybiAmbW50ZW50OworICAgIH0KKyAgcmV0dXJuIE5VTEw7Cit9
CitFT0YKKworIyBUaGVuIGNvbXBpbGUvbGluayBpdDoKK2djYyAtLXN0ZD1nbnU5OSAtc2hh
cmVkIC1mUElDIC1sZGwgLU8yIGsuYyAtbyBrLnNvIFwKKyAgfHwgc2tpcF8gImdldG1udGVu
dCBoYWNrIGRvZXMgbm90IHdvcmsgb24gdGhpcyBwbGF0Zm9ybSIKKworIyBUZXN0IGlmIExE
X1BSRUxPQUQgd29ya3M6CitMRF9QUkVMT0FEPS4vay5zbyBkZgordGVzdCAtZiB4IHx8IHNr
aXBfICJpbnRlcm5hbCB0ZXN0IGZhaWx1cmU6IG1heWJlIExEX1BSRUxPQUQgZG9lc24ndCB3
b3JrPyIKKworI1RoZSBmYWtlIG10YWIgZmlsZSBzaG91bGQgb25seSBjb250YWluIDIgZW50
cmllcywgYm90aAorI2hhdmluZyB0aGUgc2FtZSBkZXZpY2UgbnVtYmVyOyB0aHVzIHRoZSBv
dXRwdXQgc2hvdWxkCisjY29uc2lzdCBvZiBhIGhlYWRlciBhbmQgb25lIGVudHJ5Cit0ZXN0
ICQoTERfUFJFTE9BRD0uL2suc28gZGYgfCB3YyAtbCkgLWVxIDIgfHwgZmFpbD0xCisKK0V4
aXQgJGZhaWwKZGlmZiAtLWdpdCBhL3Rlc3RzL2xvY2FsLm1rIGIvdGVzdHMvbG9jYWwubWsK
aW5kZXggMWIwYWNlNC4uOGY1ZGVmMiAxMDA2NDQKLS0tIGEvdGVzdHMvbG9jYWwubWsKKysr
IGIvdGVzdHMvbG9jYWwubWsKQEAgLTQ1Nyw2ICs0NTcsNyBAQCBhbGxfdGVzdHMgPQkJCQkJ
XAogICB0ZXN0cy9kZi91bnJlYWRhYmxlLnNoCQkJXAogICB0ZXN0cy9kZi90b3RhbC11bnBy
b2Nlc3NlZC5zaAkJCVwKICAgdGVzdHMvZGYvbm8tbXRhYi1zdGF0dXMuc2gJCQlcCisgIHRl
c3RzL2RmL2RmLWR1cC1yZW1vdmUuc2gJCQlcCiAgIHRlc3RzL2RkL2RpcmVjdC5zaAkJCQlc
CiAgIHRlc3RzL2RkL21pc2Muc2gJCQkJXAogICB0ZXN0cy9kZC9ub2NhY2hlLnNoCQkJCVwK
LS0gCjEuNy43Cgo=
--------------030503040904060903020507--


From MAILER-DAEMON Fri Nov 30 10:11:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1TeSF3-000451-KB
	for mharc-coreutils@gnu.org; Fri, 30 Nov 2012 10:11:01 -0500
Received: from eggs.gnu.org ([208.118.235.92]:37829)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TeSEx-00040k-OU
	for coreutils@gnu.org; Fri, 30 Nov 2012 10:10:59 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TeSEp-000864-QQ
	for coreutils@gnu.org; Fri, 30 Nov 2012 10:10:55 -0500
Received: from mx1.redhat.com ([209.132.183.28]:37508)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1TeSEp-00083P-Fl
	for coreutils@gnu.org; Fri, 30 Nov 2012 10:10:47 -0500
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
	(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAUFAeS0022113
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 30 Nov 2012 10:10:41 -0500
Received: from pb-n5110.redhat.com (ovpn-116-79.ams2.redhat.com [10.36.116.79])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id qAUFAdvw021347; Fri, 30 Nov 2012 10:10:40 -0500
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH] maint: remove a redundant odd sized alloc from factor.c
Date: Fri, 30 Nov 2012 15:10:37 +0000
Message-Id: <1354288237-23271-1-git-send-email-P@draigBrady.com>
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 209.132.183.28
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 30 Nov 2012 15:10:59 -0000

* src/factor.c (mp_factor_init): Init the pointers with NULL,
which xrealloc (or realloc) handles fine.
---
 src/factor.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/factor.c b/src/factor.c
index 6d1d17a..90af1c4 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -573,8 +573,8 @@ static void mp_factor (mpz_t, struct mp_factors *);
 static void
 mp_factor_init (struct mp_factors *factors)
 {
-  factors->p = xmalloc (1);
-  factors->e = xmalloc (1);
+  factors->p = NULL;
+  factors->e = NULL;
   factors->nfactors = 0;
 }
 
-- 
1.7.6.4



From MAILER-DAEMON Fri Nov 30 23:45:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Teewq-0001fa-50
	for mharc-coreutils@gnu.org; Fri, 30 Nov 2012 23:45:04 -0500
Received: from eggs.gnu.org ([208.118.235.92]:34611)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Teewn-0001eL-PI
	for coreutils@gnu.org; Fri, 30 Nov 2012 23:45:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Teewm-0000LY-Qz
	for coreutils@gnu.org; Fri, 30 Nov 2012 23:45:01 -0500
Received: from mx.meyering.net ([88.168.87.75]:60577)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Teewm-0000LE-KH
	for coreutils@gnu.org; Fri, 30 Nov 2012 23:45:00 -0500
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 59D996011C;
	Sat,  1 Dec 2012 05:44:59 +0100 (CET)
From: Jim Meyering <jim@meyering.net>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: [PATCH] maint: remove a redundant odd sized alloc from factor.c
In-Reply-To: <1354288237-23271-1-git-send-email-P@draigBrady.com>
	(=?iso-8859-1?Q?=22P=E1draig?=
	Brady"'s message of "Fri, 30 Nov 2012 15:10:37 +0000")
References: <1354288237-23271-1-git-send-email-P@draigBrady.com>
Date: Sat, 01 Dec 2012 05:44:59 +0100
Message-ID: <871ufa4bzo.fsf@rho.meyering.net>
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 88.168.87.75
Cc: coreutils@gnu.org
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
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, 01 Dec 2012 04:45:02 -0000

P=E1draig Brady wrote:
> * src/factor.c (mp_factor_init): Init the pointers with NULL,
> which xrealloc (or realloc) handles fine.
> ---
>  src/factor.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/factor.c b/src/factor.c
> index 6d1d17a..90af1c4 100644
> --- a/src/factor.c
> +++ b/src/factor.c
> @@ -573,8 +573,8 @@ static void mp_factor (mpz_t, struct mp_factors *);
>  static void
>  mp_factor_init (struct mp_factors *factors)
>  {
> -  factors->p =3D xmalloc (1);
> -  factors->e =3D xmalloc (1);
> +  factors->p =3D NULL;
> +  factors->e =3D NULL;

Good clean-up.
Thanks.


