From MAILER-DAEMON Wed Aug 01 02:19:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwSHj-0000DE-7T
	for mharc-coreutils@gnu.org; Wed, 01 Aug 2012 02:19:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48608)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwSHg-0000Aa-NB
	for coreutils@gnu.org; Wed, 01 Aug 2012 02:19:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwSHf-0004YY-Lc
	for coreutils@gnu.org; Wed, 01 Aug 2012 02:19:52 -0400
Received: from mx.meyering.net ([88.168.87.75]:41462)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwSHf-0004YU-F4
	for coreutils@gnu.org; Wed, 01 Aug 2012 02:19:51 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id D683A60103;
	Wed,  1 Aug 2012 08:19:50 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Pierre-Jean <sygne@ombres.eu>
Subject: Re: sort -V and accents
In-Reply-To: <5017b26d.iELWZqTYPECu4TXF%sygne@ombres.eu> (Pierre-Jean's
	message of "Tue, 31 Jul 2012 12:24:45 +0200")
References: <5017b26d.iELWZqTYPECu4TXF%sygne@ombres.eu>
Date: Wed, 01 Aug 2012 08:19:50 +0200
Message-ID: <87fw87uoah.fsf@rho.meyering.net>
Lines: 73
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: Genre and OS details not
	recognized.
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: Wed, 01 Aug 2012 06:19:53 -0000

Pierre-Jean wrote:
> I'm trying to sort a file containing accents and numbers,
> but can't find a way to do this correctly:
>
> - Without -V option, accents are correctly sorted, but not
>   numbers.
> - With -V option, numbers are correctly sorted, but not
>   accents.
>
> Here is an example:
>
> echo "
> A 10
> A 9
> E 10
> E 9
> e 10
> e 9
> =E9 10
> =E9 9
> F 10
> f 9 " | sort -f
>
> Return:
>
> A 10
> A 9
> e 10
> E 10
> =E9 10
> e 9
> E 9
> =E9 9
> F 10
> f 9
>
> --> Here accents are correctly sorted according to my
> locale: they are considered as a non accentuated letter.
> But numbers are not sorted in mathematical order.
>
> `sort -f -V` return:

The trick is to specify sorting with "-f" for the first column
and "-V" for the second.  Then it does what you seem to want:

    echo "
    A 10
    A 9
    E 10
    E 9
    e 10
    e 9
    =E9 10
    =E9 9
    F 10
    f 9" | sort -k1,1f -k2,2V

    A 9
    A 10
    e 9
    E 9
    e 10
    E 10
    =E9 9
    =E9 10
    f 9
    F 10

There are several examples showing how to use sort in the
documentation.  Run "info coreutils sort" to display it,
or find it on-line:

  https://www.gnu.org/s/coreutils/manual/html_node/sort-invocation.html


From MAILER-DAEMON Wed Aug 01 06:49:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwWUN-0001qL-5f
	for mharc-coreutils@gnu.org; Wed, 01 Aug 2012 06:49:15 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54945)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <sygne@ombres.eu>) id 1SwWUG-0001q2-Lh
	for coreutils@gnu.org; Wed, 01 Aug 2012 06:49:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <sygne@ombres.eu>) id 1SwWUA-0002PR-RL
	for coreutils@gnu.org; Wed, 01 Aug 2012 06:49:08 -0400
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:47508)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <sygne@ombres.eu>) id 1SwWUA-0002P6-KP
	for coreutils@gnu.org; Wed, 01 Aug 2012 06:49:02 -0400
X-Originating-IP: 217.70.178.136
Received: from mfilter7-d.gandi.net (mfilter7-d.gandi.net [217.70.178.136])
	by relay3-d.mail.gandi.net (Postfix) with ESMTP id 78682A80B9;
	Wed,  1 Aug 2012 12:49:00 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mfilter7-d.gandi.net
Received: from relay3-d.mail.gandi.net ([217.70.183.195])
	by mfilter7-d.gandi.net (mfilter7-d.gandi.net [10.0.15.180])
	(amavisd-new, port 10024)
	with ESMTP id roD8AXD2qo2y; Wed,  1 Aug 2012 12:48:59 +0200 (CEST)
X-Originating-IP: 109.190.47.174
Received: from localhost.localdomain (174-47-190-109.dsl.ovh.fr
	[109.190.47.174]) (Authenticated sender: sygne@ombres.eu)
	by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 01E91A80B5;
	Wed,  1 Aug 2012 12:48:58 +0200 (CEST)
Date: Wed, 01 Aug 2012 12:48:22 +0200
From: Pierre-Jean <sygne@ombres.eu>
To: jim@meyering.net
Subject: Re: sort -V and accents
Message-ID: <50190976.NGnV9A0WLX1Ddy1P%sygne@ombres.eu>
References: <5017b26d.iELWZqTYPECu4TXF%sygne@ombres.eu>
	<87fw87uoah.fsf@rho.meyering.net>
In-Reply-To: <87fw87uoah.fsf@rho.meyering.net>
User-Agent: Heirloom mailx 12.5 7/5/10
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: Genre and OS details not
	recognized.
X-Received-From: 217.70.183.195
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, 01 Aug 2012 10:49:14 -0000

Jim Meyering <jim@meyering.net> wrote:

> Pierre-Jean wrote:

> > I'm trying to sort a file containing accents and numbers,
> > but can't find a way to do this correctly:


> The trick is to specify sorting with "-f" for the first column
> and "-V" for the second.  Then it does what you seem to want:
>
>     echo "
>     A 10
>     A 9
>     E 10
>     E 9
>     e 10
>     e 9
>     =E9 10
>     =E9 9
>     F 10
>     f 9" | sort -k1,1f -k2,2V
>
>     A 9
>     A 10
>     e 9
>     E 9
>     e 10
>     E 10
>     =E9 9
>     =E9 10
>     f 9
>     F 10

This is better, but still not perfect: "=E9 9" should be
before "e 10", like "E 9" is before "e 10", as in a
dictionnary, where "=E9a" is before "eb". That means that
e=3DE=3D=E9=3D=E8=3D=C9=3D=C8 if something after makes a diff=E9rence.

Look at this example:

echo "
=E9 9
e 10
=E9a
eb
E 9" | sort -k1,1f -k2,2V

E 9
e 10
=E9 9
=E9a
eb

"E 9" is correctly moved on first place, but the placement of
"=E9 9" doesn't follow the same law.

I probably can do with that "unperfect" order, because such
situation are not frequent in real life, but if there's a
solution, I'd be happy to know it.

> There are several examples showing how to use sort in the
> documentation.  Run "info coreutils sort" to display it,
> or find it on-line:
>
>   https://www.gnu.org/s/coreutils/manual/html_node/sort-invocation.html

This is nice, because I had misunderstood the usage of -k by
reading the man page.

Cheers,

Pierre-Jean.



From MAILER-DAEMON Wed Aug 01 07:08:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwWn5-0005Hl-9n
	for mharc-coreutils@gnu.org; Wed, 01 Aug 2012 07:08:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51970)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwWn2-0005Hb-Ez
	for coreutils@gnu.org; Wed, 01 Aug 2012 07:08:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwWmx-00087W-A6
	for coreutils@gnu.org; Wed, 01 Aug 2012 07:08:32 -0400
Received: from mx.meyering.net ([88.168.87.75]:42220)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwWmw-00087S-Oq
	for coreutils@gnu.org; Wed, 01 Aug 2012 07:08:27 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 18790600C4;
	Wed,  1 Aug 2012 13:08:26 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: RFE: hash-type in sum utils
In-Reply-To: <338213340.1265439.1343736773521.JavaMail.root@redhat.com>
	(Ondrej Oprala's message of "Tue, 31 Jul 2012 08:12:53 -0400 (EDT)")
References: <338213340.1265439.1343736773521.JavaMail.root@redhat.com>
Date: Wed, 01 Aug 2012 13:08:26 +0200
Message-ID: <87pq7auaxh.fsf@rho.meyering.net>
Lines: 605
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, 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, 01 Aug 2012 11:08:34 -0000

Ondrej Oprala wrote:
> Here's the patch.

Thanks.
I've adjusted the NEWS patch so that it only inserts the
new 3-line entry (rather than also removing many others),
and adjusted the wording slightly:

diff --git a/NEWS b/NEWS
index f1255ea..51ebc63 100644
--- a/NEWS
+++ b/NEWS
@@ -41,6 +41,10 @@ GNU coreutils NEWS                                    -*- outline -*-

 ** New features

+  md5sum now accepts the --tag option to print BSD-style output with GNU
+  file name escaping.  This also affects sha1sum, sha224sum, sha256sum,
+  sha384sum and sha512sum.
+
   stat -f recognizes the new remote file system types: aufs, panfs.

 ** Changes in behavior
-----------------------------------------------

I noticed that "make syntax-check" failed with this:

                      fputs(" (", stdout);
    *** src/md5sum.c
    maint.mk: the above files lack a space-before-open-paren
    make: *** [sc_space_before_open_paren] Error 1
    make: *** Waiting for unfinished jobs....

That prompted me to look for other formatting problems.
There was an improperly indented line and a stray empty line.
Here are the fixes:
(but see below, "Finally...", for a complete change-set)

diff --git a/src/md5sum.c b/src/md5sum.c
index eecf2c7..735e8ed 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -356,7 +356,6 @@ split_3 (char *s, size_t s_len,
   else if (escaped_filename && (s[i] == ' ' || s[i + 1] == ' '))
     return false;

-
   /* Ignore this line if it is too short.
      Each line must have at least 'min_digest_line_length - 1' (or one more, if
      the first is a backslash) more characters to contain correct message digest
@@ -364,7 +363,7 @@ split_3 (char *s, size_t s_len,
   if (s_len - i < min_digest_line_length + (s[i] == '\\'))
     return false;

-    *hex_digest = (unsigned char *) &s[i];
+  *hex_digest = (unsigned char *) &s[i];

   /* The first field has to be the n-character hexadecimal
      representation of the message digest.  If it is not followed
@@ -815,7 +814,7 @@ main (int argc, char **argv)
                   if (!file_is_binary)
                     putchar (' ');
                   fputs (DIGEST_TYPE_STRING, stdout);
-                  fputs(" (", stdout);
+                  fputs (" (", stdout);
                   print_filename (file);
                   fputs (") = ", stdout);
                 }
-----------------------------------------------

Your patch lacks a commit log.
Also, any time we add a new option, we must document it
in two places: in --help output (i.e., the usage function)
and in doc/coreutils.texi.  The --help addition will be
minimal, and coreutils.texi will give more detail, e.g.,
explaining how md5sum --tag output differs from that produced
by the BSD md5 program.

Thanks for adding the tests.  Are you willing to add a few more
to get proper coverage of this new feature?  For example,
we'll need cases that show what happens with files whose
names contain backslash and newline, as well as what
md5sum --check does with inputs where the name is escaped
but contains say "\t" or ends in a single backslash.

In rewriting the description of your filename_unescape
function, I realized that it could be simpler, so eliminated its
third parameter and made it return S (or NULL) instead of a boolean.

diff --git a/src/md5sum.c b/src/md5sum.c
index 735e8ed..22efac0 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -217,16 +217,17 @@ space for text), and name for each FILE.\n"),

 #define ISWHITE(c) ((c) == ' ' || (c) == '\t')

-/* Translate each '\n' string in the file name beginning
-   at string S (of length S_LEN)  to a NEWLINE,
-   and each '\\' string to a backslash; FILE_NAME becoming
-   the pointer used to print the actual file name. Return
-   true unless file name is invalid.  */
-
-static bool
-filename_unescape (char *s, size_t s_len, char **file_name)
+/* Given a file name, S of length S_LEN, that is not NUL-terminated,
+   modify it in place, performing the equivalent of this sed substitution:
+   's/\\n/\n/g;s/\\\\/\\/g' i.e., replacing each "\\n" string with a newline
+   and each "\\\\" with a single backslash, NUL-terminate it and return S.
+   If S is not a valid escaped file name, i.e., if it ends with an odd number
+   of backslashes or if it contains a backslash followed by anything other
+   than "n" or another backslash, return NULL.  */
+
+static char *
+filename_unescape (char *s, size_t s_len)
 {
-
   char *dst = s;
   size_t i = 0;

@@ -238,7 +239,7 @@ filename_unescape (char *s, size_t s_len, char **file_name)
           if (i == s_len - 1)
             {
               /* A valid line does not end with a backslash.  */
-              return false;
+              return NULL;
             }
           ++i;
           switch (s[i++])
@@ -251,13 +252,13 @@ filename_unescape (char *s, size_t s_len, char **file_name)
               break;
             default:
               /* Only '\' or 'n' may follow a backslash.  */
-              return false;
+              return NULL;
             }
           break;

         case '\0':
           /* The file name may not contain a NUL.  */
-          return false;
+          return NULL;

         default:
           *dst++ = s[i++];
@@ -266,9 +267,7 @@ filename_unescape (char *s, size_t s_len, char **file_name)
     }
   *dst = '\0';

-  *file_name = s;
-
-  return true;
+  return s;
 }

 /* Split the checksum string S (of length S_LEN) from a BSD 'md5' or
@@ -284,7 +283,7 @@ bsd_split_3 (char *s, size_t s_len, unsigned char **hex_digest,
   if (s_len == 0)
     return false;
   /* Find end of filename. The BSD 'md5' and 'sha1' commands do not escape
-     filenames, so search backwards for the last ')'. */
+     file names, so search backwards for the last ')'.  */
   i = s_len - 1;
   while (i && s[i] != ')')
     i--;
@@ -294,9 +293,8 @@ bsd_split_3 (char *s, size_t s_len, unsigned char **hex_digest,

   *file_name = s;

-  if (escaped_filename)
-    if (!filename_unescape (s, i, file_name))
-      return false;
+  if (escaped_filename && filename_unescape (s, i) == NULL)
+    return false;

   s[i++] = '\0';

@@ -398,7 +396,7 @@ split_3 (char *s, size_t s_len,
   *file_name = &s[i];

   if (escaped_filename)
-    return filename_unescape (&s[i], s_len - i, file_name);
+    return filename_unescape (&s[i], s_len - i) != NULL;

   return true;
 }

===============================================================
Also, here's a change to make filename_unescape use a for-loop,
since factoring out the two bottom-of-loop "i++" expressions is cleaner:

diff --git a/src/md5sum.c b/src/md5sum.c
index 22efac0..5fdc98a 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -229,20 +229,19 @@ static char *
 filename_unescape (char *s, size_t s_len)
 {
   char *dst = s;
-  size_t i = 0;

-  while (i < s_len)
+  for (size_t i = 0; i < s_len; i++)
     {
       switch (s[i])
         {
         case '\\':
           if (i == s_len - 1)
             {
-              /* A valid line does not end with a backslash.  */
+              /* File name ends with an unescaped backslash: invalid.  */
               return NULL;
             }
           ++i;
-          switch (s[i++])
+          switch (s[i])
             {
             case 'n':
               *dst++ = '\n';
@@ -261,7 +260,7 @@ filename_unescape (char *s, size_t s_len)
           return NULL;

         default:
-          *dst++ = s[i++];
+          *dst++ = s[i];
           break;
         }
     }


===============================================================
Finally, here's a change-set relative to the latest in git
that you can apply using "git am FILE".
Please use this as a starting point for any additional changes.

>From c199ef3890e1eb8679a2577cabec34801e276b09 Mon Sep 17 00:00:00 2001
From: Ondrej Oprala <ooprala@redhat.com>
Date: Tue, 31 Jul 2012 13:57:48 +0200
Subject: [PATCH] md5sum: add the --tag option to *sum utils for BSD-like
 output

* src/md5sum.c (filename_unescape): New function.
FIXME: say more here
* NEWS (New features): Mention it.
* tests/misc/md5sum-bsd: Add tests.
---
 NEWS                  |   4 +
 src/md5sum.c          | 202 +++++++++++++++++++++++++++++++-------------------
 tests/misc/md5sum-bsd |  11 +++
 3 files changed, 139 insertions(+), 78 deletions(-)

diff --git a/NEWS b/NEWS
index f1255ea..51ebc63 100644
--- a/NEWS
+++ b/NEWS
@@ -41,6 +41,10 @@ GNU coreutils NEWS                                    -*- outline -*-

 ** New features

+  md5sum now accepts the --tag option to print BSD-style output with GNU
+  file name escaping.  This also affects sha1sum, sha224sum, sha256sum,
+  sha384sum and sha512sum.
+
   stat -f recognizes the new remote file system types: aufs, panfs.

 ** Changes in behavior
diff --git a/src/md5sum.c b/src/md5sum.c
index f7e0849..5fdc98a 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -135,7 +135,8 @@ enum
 {
   STATUS_OPTION = CHAR_MAX + 1,
   QUIET_OPTION,
-  STRICT_OPTION
+  STRICT_OPTION,
+  TAG_OPTION
 };

 static struct option const long_options[] =
@@ -147,6 +148,7 @@ static struct option const long_options[] =
   { "text", no_argument, NULL, 't' },
   { "warn", no_argument, NULL, 'w' },
   { "strict", no_argument, NULL, STRICT_OPTION },
+  { "tag", no_argument, NULL, TAG_OPTION },
   { GETOPT_HELP_OPTION_DECL },
   { GETOPT_VERSION_OPTION_DECL },
   { NULL, 0, NULL, 0 }
@@ -215,23 +217,72 @@ space for text), and name for each FILE.\n"),

 #define ISWHITE(c) ((c) == ' ' || (c) == '\t')

+/* Given a file name, S of length S_LEN, that is not NUL-terminated,
+   modify it in place, performing the equivalent of this sed substitution:
+   's/\\n/\n/g;s/\\\\/\\/g' i.e., replacing each "\\n" string with a newline
+   and each "\\\\" with a single backslash, NUL-terminate it and return S.
+   If S is not a valid escaped file name, i.e., if it ends with an odd number
+   of backslashes or if it contains a backslash followed by anything other
+   than "n" or another backslash, return NULL.  */
+
+static char *
+filename_unescape (char *s, size_t s_len)
+{
+  char *dst = s;
+
+  for (size_t i = 0; i < s_len; i++)
+    {
+      switch (s[i])
+        {
+        case '\\':
+          if (i == s_len - 1)
+            {
+              /* File name ends with an unescaped backslash: invalid.  */
+              return NULL;
+            }
+          ++i;
+          switch (s[i])
+            {
+            case 'n':
+              *dst++ = '\n';
+              break;
+            case '\\':
+              *dst++ = '\\';
+              break;
+            default:
+              /* Only '\' or 'n' may follow a backslash.  */
+              return NULL;
+            }
+          break;
+
+        case '\0':
+          /* The file name may not contain a NUL.  */
+          return NULL;
+
+        default:
+          *dst++ = s[i];
+          break;
+        }
+    }
+  *dst = '\0';
+
+  return s;
+}
+
 /* Split the checksum string S (of length S_LEN) from a BSD 'md5' or
    'sha1' command into two parts: a hexadecimal digest, and the file
    name.  S is modified.  Return true if successful.  */

 static bool
 bsd_split_3 (char *s, size_t s_len, unsigned char **hex_digest,
-             char **file_name)
+             char **file_name, bool escaped_filename)
 {
   size_t i;

   if (s_len == 0)
     return false;
-
-  *file_name = s;
-
   /* Find end of filename. The BSD 'md5' and 'sha1' commands do not escape
-     filenames, so search backwards for the last ')'. */
+     file names, so search backwards for the last ')'.  */
   i = s_len - 1;
   while (i && s[i] != ')')
     i--;
@@ -239,6 +290,11 @@ bsd_split_3 (char *s, size_t s_len, unsigned char **hex_digest,
   if (s[i] != ')')
     return false;

+  *file_name = s;
+
+  if (escaped_filename && filename_unescape (s, i) == NULL)
+    return false;
+
   s[i++] = '\0';

   while (ISWHITE (s[i]))
@@ -271,7 +327,16 @@ split_3 (char *s, size_t s_len,
   while (ISWHITE (s[i]))
     ++i;

+  if (s[i] == '\\')
+    {
+      ++i;
+      escaped_filename = true;
+    }
+
   /* Check for BSD-style checksum line. */
+  if (s[i] == ' ')
+    ++i;
+
   algo_name_len = strlen (DIGEST_TYPE_STRING);
   if (STREQ_LEN (s + i, DIGEST_TYPE_STRING, algo_name_len))
     {
@@ -282,9 +347,11 @@ split_3 (char *s, size_t s_len,
           *binary = 0;
           return bsd_split_3 (s +      i + algo_name_len + 1,
                               s_len - (i + algo_name_len + 1),
-                              hex_digest, file_name);
+                              hex_digest, file_name, escaped_filename);
         }
     }
+  else if (escaped_filename && (s[i] == ' ' || s[i + 1] == ' '))
+    return false;

   /* Ignore this line if it is too short.
      Each line must have at least 'min_digest_line_length - 1' (or one more, if
@@ -293,11 +360,6 @@ split_3 (char *s, size_t s_len,
   if (s_len - i < min_digest_line_length + (s[i] == '\\'))
     return false;

-  if (s[i] == '\\')
-    {
-      ++i;
-      escaped_filename = true;
-    }
   *hex_digest = (unsigned char *) &s[i];

   /* The first field has to be the n-character hexadecimal
@@ -333,49 +395,8 @@ split_3 (char *s, size_t s_len,
   *file_name = &s[i];

   if (escaped_filename)
-    {
-      /* Translate each '\n' string in the file name to a NEWLINE,
-         and each '\\' string to a backslash.  */
-
-      char *dst = &s[i];
-
-      while (i < s_len)
-        {
-          switch (s[i])
-            {
-            case '\\':
-              if (i == s_len - 1)
-                {
-                  /* A valid line does not end with a backslash.  */
-                  return false;
-                }
-              ++i;
-              switch (s[i++])
-                {
-                case 'n':
-                  *dst++ = '\n';
-                  break;
-                case '\\':
-                  *dst++ = '\\';
-                  break;
-                default:
-                  /* Only '\' or 'n' may follow a backslash.  */
-                  return false;
-                }
-              break;
+    return filename_unescape (&s[i], s_len - i) != NULL;

-            case '\0':
-              /* The file name may not contain a NUL.  */
-              return false;
-              break;
-
-            default:
-              *dst++ = s[i++];
-              break;
-            }
-        }
-      *dst = '\0';
-    }
   return true;
 }

@@ -636,6 +657,31 @@ digest_check (const char *checkfile_name)
           && (!strict || n_improperly_formatted_lines == 0));
 }

+static void
+print_filename (char const *file)
+{
+  /* Translate each NEWLINE byte to the string, "\\n",
+     and each backslash to "\\\\".  */
+  while (*file)
+    {
+      switch (*file)
+        {
+        case '\n':
+          fputs ("\\n", stdout);
+          break;
+
+        case '\\':
+          fputs ("\\\\", stdout);
+          break;
+
+        default:
+          putchar (*file);
+          break;
+        }
+      file++;
+    }
+}
+
 int
 main (int argc, char **argv)
 {
@@ -646,6 +692,7 @@ main (int argc, char **argv)
   int opt;
   bool ok = true;
   int binary = -1;
+  bool prefix_tag = false;

   /* Setting values of global variables.  */
   initialize_main (&argc, &argv);
@@ -690,6 +737,9 @@ main (int argc, char **argv)
       case STRICT_OPTION:
         strict = true;
         break;
+      case TAG_OPTION:
+        prefix_tag = true;
+        break;
       case_GETOPT_HELP_CHAR;
       case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
       default:
@@ -754,41 +804,37 @@ main (int argc, char **argv)
             ok = false;
           else
             {
+              if (prefix_tag)
+                {
+                  if (strchr (file, '\n') || strchr (file, '\\'))
+                    putchar ('\\');
+                  if (!file_is_binary)
+                    putchar (' ');
+                  fputs (DIGEST_TYPE_STRING, stdout);
+                  fputs (" (", stdout);
+                  print_filename (file);
+                  fputs (") = ", stdout);
+                }
+
               size_t i;

               /* Output a leading backslash if the file name contains
                  a newline or backslash.  */
-              if (strchr (file, '\n') || strchr (file, '\\'))
+              if (!prefix_tag && (strchr (file, '\n') || strchr (file, '\\')))
                 putchar ('\\');

               for (i = 0; i < (digest_hex_bytes / 2); ++i)
                 printf ("%02x", bin_buffer[i]);

-              putchar (' ');
-              if (file_is_binary)
-                putchar ('*');
-              else
-                putchar (' ');
-
-              /* Translate each NEWLINE byte to the string, "\\n",
-                 and each backslash to "\\\\".  */
-              for (i = 0; i < strlen (file); ++i)
+              if (!prefix_tag)
                 {
-                  switch (file[i])
-                    {
-                    case '\n':
-                      fputs ("\\n", stdout);
-                      break;
-
-                    case '\\':
-                      fputs ("\\\\", stdout);
-                      break;
-
-                    default:
-                      putchar (file[i]);
-                      break;
-                    }
+                  putchar (' ');
+
+                  putchar (file_is_binary ? '*' : ' ');
+
+                  print_filename (file);
                 }
+
               putchar ('\n');
             }
         }
diff --git a/tests/misc/md5sum-bsd b/tests/misc/md5sum-bsd
index 8226d7a..6497933 100755
--- a/tests/misc/md5sum-bsd
+++ b/tests/misc/md5sum-bsd
@@ -38,4 +38,15 @@ md5sum --strict -c check.md5 || fail=1
 # an option to avoid the ambiguity.
 tail -n+2 check.md5 | md5sum --strict -c && fail=1

+#--tag option test
+
+for i in 'a' ' b' '*c' 'dd' ' '; do
+  echo "$i" > "$i"
+  md5sum --tag "$i" >> check.md5sum
+done
+sed 's/  / /' check.md5sum > check.md5
+
+md5sum --strict -c check.md5sum || fail=1
+md5sum --strict -c check.md5 || fail=1
+
 Exit $fail
--
1.7.12.rc1.10.g97c7934


From MAILER-DAEMON Wed Aug 01 07:41:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwXIu-000812-RC
	for mharc-coreutils@gnu.org; Wed, 01 Aug 2012 07:41:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52214)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwXIn-00080Y-Rb
	for coreutils@gnu.org; Wed, 01 Aug 2012 07:41:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwXIj-0000tT-B2
	for coreutils@gnu.org; Wed, 01 Aug 2012 07:41:21 -0400
Received: from mx.meyering.net ([88.168.87.75]:42319)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwXIj-0000tJ-2x
	for coreutils@gnu.org; Wed, 01 Aug 2012 07:41:17 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 398AF600B2
	for <coreutils@gnu.org>; Wed,  1 Aug 2012 13:41:16 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: coreutils-8.18: ready for release?
Date: Wed, 01 Aug 2012 13:41:16 +0200
Message-ID: <873946u9er.fsf@rho.meyering.net>
Lines: 15
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Wed, 01 Aug 2012 11:41:27 -0000

Now that util-linux has made a v2.22-rc release with improved "su"[1],
I'd like to make a coreutils release (which removes su altogether).

There's enough new code in md5sum --tag that I will defer
adding that feature until after 8.18.

I've just remembered that I have one more minor tail fix, and I'll
post that shortly.  And I'll have to update to latest gnulib
and address a new FP syntax-check failure that induces.
Does anyone else have something to add?


[1] As you may recall, I was ready to release a month or so ago, but
since this release removes su.c altogether, we decided to wait for su
in util-linux to get all the required features.


From MAILER-DAEMON Wed Aug 01 08:08:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwXiv-0007lc-6o
	for mharc-coreutils@gnu.org; Wed, 01 Aug 2012 08:08:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57847)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SwXit-0007lR-72
	for coreutils@gnu.org; Wed, 01 Aug 2012 08:08:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SwXio-0000wt-89
	for coreutils@gnu.org; Wed, 01 Aug 2012 08:08:19 -0400
Received: from mx1.redhat.com ([209.132.183.28]:50215)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SwXin-0000wi-Ve
	for coreutils@gnu.org; Wed, 01 Aug 2012 08:08:14 -0400
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 q71C8CFL023807
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 1 Aug 2012 08:08:12 -0400
Received: from [10.3.113.77] (ovpn-113-77.phx2.redhat.com [10.3.113.77])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q71C8CDA002982; Wed, 1 Aug 2012 08:08:12 -0400
Message-ID: <50191C2A.7030405@redhat.com>
Date: Wed, 01 Aug 2012 06:08:10 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Pierre-Jean <sygne@ombres.eu>
Subject: Re: sort -V and accents
References: <5017b26d.iELWZqTYPECu4TXF%sygne@ombres.eu>
	<87fw87uoah.fsf@rho.meyering.net>
	<50190976.NGnV9A0WLX1Ddy1P%sygne@ombres.eu>
In-Reply-To: <50190976.NGnV9A0WLX1Ddy1P%sygne@ombres.eu>
X-Enigmail-Version: 1.4.3
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig351BACB704E00B37C4DA1FEC"
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 01 Aug 2012 12:08:20 -0000

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

On 08/01/2012 04:48 AM, Pierre-Jean wrote:
> Jim Meyering <jim@meyering.net> wrote:
>=20
>> Pierre-Jean wrote:
>=20
>>> I'm trying to sort a file containing accents and numbers,
>>> but can't find a way to do this correctly:
>=20
>=20
>> The trick is to specify sorting with "-f" for the first column
>> and "-V" for the second.  Then it does what you seem to want:
>=20
> This is better, but still not perfect: "=E9 9" should be
> before "e 10", like "E 9" is before "e 10", as in a
> dictionnary, where "=E9a" is before "eb". That means that
> e=3DE=3D=E9=3D=E8=3D=C9=3D=C8 if something after makes a diff=E9rence.

Are you using 'sort --debug' while experimenting with this?  Also be
open to the idea that it might be a bug in your locale definition, where
the rules picked by your choice of LC_COLLATE could be tuned to better
give you the sorting you want.

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


--------------enig351BACB704E00B37C4DA1FEC
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://enigmail.mozdev.org/

iQEcBAEBCAAGBQJQGRwqAAoJEKeha0olJ0NqI68IAKpcS/5WxHbZSbHkhgF+ws6T
Mu140GmClewUDYy7W3yhDB0rWxVUWvquUaKAHh36whI5EaTWrfCCU8NfRP2HPh+L
RWMHMQpMxdads+xnRJoN/8wIAU7E6rsAitMlC/8Qm2X9fLZnes0RAjk3PT72L3M0
MSwSWsRLpbtim9UdxtXvLjL9JGLa58/5yFLQb903keInrxTPD4VStMlOfAk9GJX2
WTOq4TEGk/VqJzYKWq1Z9LrNPatL4FP4ALECFg+AS2iK41LDMriBjQjIJBgQABPC
4VdsICNXqJfGFn7/+D8qliP7zPgkX1v4Zj1yU3U+iyElrWzKBKcEoMF88K/X0Eo=
=oI4W
-----END PGP SIGNATURE-----

--------------enig351BACB704E00B37C4DA1FEC--


From MAILER-DAEMON Wed Aug 01 08:08:51 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwXjP-0007sJ-Bi
	for mharc-coreutils@gnu.org; Wed, 01 Aug 2012 08:08:51 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57940)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwXjI-0007qA-Bz
	for coreutils@gnu.org; Wed, 01 Aug 2012 08:08:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwXjB-0000zF-Nc
	for coreutils@gnu.org; Wed, 01 Aug 2012 08:08:44 -0400
Received: from mx.meyering.net ([88.168.87.75]:42391)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwXjB-0000z9-GM
	for coreutils@gnu.org; Wed, 01 Aug 2012 08:08:37 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id AF5F160096;
	Wed,  1 Aug 2012 14:08:36 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Pierre-Jean <sygne@ombres.eu>
Subject: Re: sort -V and accents
In-Reply-To: <50190976.NGnV9A0WLX1Ddy1P%sygne@ombres.eu> (Pierre-Jean's
	message of "Wed, 01 Aug 2012 12:48:22 +0200")
References: <5017b26d.iELWZqTYPECu4TXF%sygne@ombres.eu>
	<87fw87uoah.fsf@rho.meyering.net>
	<50190976.NGnV9A0WLX1Ddy1P%sygne@ombres.eu>
Date: Wed, 01 Aug 2012 14:08:36 +0200
Message-ID: <87vch2stkr.fsf@rho.meyering.net>
Lines: 80
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: Genre and OS details not
	recognized.
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: Wed, 01 Aug 2012 12:08:50 -0000

Pierre-Jean wrote:

> Jim Meyering <jim@meyering.net> wrote:
>
>> Pierre-Jean wrote:
>
>> > I'm trying to sort a file containing accents and numbers,
>> > but can't find a way to do this correctly:
>
>
>> The trick is to specify sorting with "-f" for the first column
>> and "-V" for the second.  Then it does what you seem to want:
>>
>>     echo "
>>     A 10
>>     A 9
>>     E 10
>>     E 9
>>     e 10
>>     e 9
>>     =E9 10
>>     =E9 9
>>     F 10
>>     f 9" | sort -k1,1f -k2,2V
>>
>>     A 9
>>     A 10
>>     e 9
>>     E 9
>>     e 10
>>     E 10
>>     =E9 9
>>     =E9 10
>>     f 9
>>     F 10
>
> This is better, but still not perfect: "=E9 9" should be
> before "e 10", like "E 9" is before "e 10", as in a
> dictionnary, where "=E9a" is before "eb". That means that
> e=3DE=3D=E9=3D=E8=3D=C9=3D=C8 if something after makes a diff=E9rence.
>
> Look at this example:
>
> echo "
> =E9 9
> e 10
> =E9a
> eb
> E 9" | sort -k1,1f -k2,2V
>
> E 9
> e 10
> =E9 9
> =E9a
> eb
>
> "E 9" is correctly moved on first place, but the placement of
> "=E9 9" doesn't follow the same law.
>
> I probably can do with that "unperfect" order, because such
> situation are not frequent in real life, but if there's a
> solution, I'd be happy to know it.

I left out an important option: you should use -t' ', to tell sort
to use a space as field separator:

      | sort -t' ' -k1,1f -k2,2V

If I'd used sort's --debug option, I would have had a hint about that probl=
em.

Regarding accented and non-accented characters, I would not expect
sort's -f (--ignore-case) option to accomplish what you want.
Ignoring case does not ignore the presence of an accent.

However, there is another option, -d, --dictionary-order,
that you might think would be relevant.  Unfortunately not,
since it merely tells sort to consider only blanks
and alphanumeric characters (ignoring all else).

I don't know how sort can do that.


From MAILER-DAEMON Wed Aug 01 08:17:27 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwXrj-0001pS-Nh
	for mharc-coreutils@gnu.org; Wed, 01 Aug 2012 08:17:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39511)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwXrd-0001na-5Z
	for coreutils@gnu.org; Wed, 01 Aug 2012 08:17:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwXrX-0004HW-3b
	for coreutils@gnu.org; Wed, 01 Aug 2012 08:17:21 -0400
Received: from mx.meyering.net ([88.168.87.75]:42413)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwXrW-0004HQ-SI
	for coreutils@gnu.org; Wed, 01 Aug 2012 08:17:15 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 41A4F600C4
	for <coreutils@gnu.org>; Wed,  1 Aug 2012 14:17:14 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: Re: coreutils-8.18: ready for release?
In-Reply-To: <873946u9er.fsf@rho.meyering.net> (Jim Meyering's message of
	"Wed, 01 Aug 2012 13:41:16 +0200")
References: <873946u9er.fsf@rho.meyering.net>
Date: Wed, 01 Aug 2012 14:17:14 +0200
Message-ID: <87pq7ast6d.fsf@rho.meyering.net>
Lines: 82
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Wed, 01 Aug 2012 12:17:27 -0000

Jim Meyering wrote:

> Now that util-linux has made a v2.22-rc release with improved "su"[1],
> I'd like to make a coreutils release (which removes su altogether).
>
> There's enough new code in md5sum --tag that I will defer
> adding that feature until after 8.18.
>
> I've just remembered that I have one more minor tail fix, and I'll
> post that shortly.  And I'll have to update to latest gnulib
> and address a new FP syntax-check failure that induces.
> Does anyone else have something to add?
>
>
> [1] As you may recall, I was ready to release a month or so ago, but
> since this release removes su.c altogether, we decided to wait for su
> in util-linux to get all the required features.

As always, the NEWS is here,

  http://git.sv.gnu.org/cgit/coreutils.git/tree/NEWS

Here's a list of the entries since 8.17:

** Bug fixes

  cksum now prints checksums atomically so that concurrent
  processes will not intersperse their output.
  [the bug dates back to the initial implementation]

  date -d "$(printf '\xb0')" would print 00:00:00 with today's date
  rather than diagnosing the invalid input.  Now it reports this:
  date: invalid date '\260'
  [This bug was present in "the beginning".]

  df no longer outputs control characters present in the mount point name.
  Such characters are replaced with '?', so for example, scripts consuming
  lines output by df, can work reliably.
  [This bug was present in "the beginning".]

  head --lines=-N (-n-N) now resets the read pointer of a seekable input file.
  This means that "head -n-3" no longer consumes all of its input, and lines
  not output by head may be processed by other programs.  For example, this
  command now prints the final line, 2, while before it would print nothing:
    seq 2 > k; (head -n-1 > /dev/null; cat) < k
  [This bug was present in "the beginning".]

  ls --color would mis-color relative-named symlinks in /
  [bug introduced in coreutils-8.17]

  split now ensures it doesn't overwrite the input file with generated output.
  [the bug dates back to the initial implementation]

  stat and df now report the correct file system usage,
  in all situations on GNU/Linux, by correctly determining the block size.
  [df bug since coreutils-5.0.91, stat bug since the initial implementation]

  tail -f no longer tries to use inotify on AUFS or PanFS file systems
  [you might say this was introduced in coreutils-7.5, along with inotify
   support, but even now, its magic number isn't in the usual place.]

** New features

  stat -f recognizes the new remote file system types: aufs, panfs.

** Changes in behavior

  su: this program has been removed.  We stopped installing "su" by
  default with the release of coreutils-6.9.90 on 2007-12-01.  Now,
  that the util-linux package has the union of the Suse and Fedora
  patches as well as enough support to build on the Hurd, we no longer
  have any reason to include it here.

** Improvements

  sort avoids redundant processing in the presence of inaccessible inputs,
  or unwritable output.  Sort now diagnoses certain errors at start-up,
  rather than after potentially expensive processing.

  sort now allocates no more than 75% of physical memory by default,
  to better share system resources, and thus operate more efficiently.
  [The default max memory usage changed from 50% to 100% in coreutils-8.16]


From MAILER-DAEMON Wed Aug 01 10:00:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwZTT-0004JI-1s
	for mharc-coreutils@gnu.org; Wed, 01 Aug 2012 10:00:31 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51163)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SwZTP-0004G2-AQ
	for coreutils@gnu.org; Wed, 01 Aug 2012 10:00:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SwZTL-0003ag-80
	for coreutils@gnu.org; Wed, 01 Aug 2012 10:00:27 -0400
Received: from mx1.redhat.com ([209.132.183.28]:60508)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SwZTK-0003Zc-VR
	for coreutils@gnu.org; Wed, 01 Aug 2012 10:00:23 -0400
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 q71E0J2P012026
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 1 Aug 2012 10:00:19 -0400
Received: from [10.36.116.70] (ovpn-116-70.ams2.redhat.com [10.36.116.70])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q71E0Hbi016530
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 1 Aug 2012 10:00:18 -0400
Message-ID: <50193671.4080202@draigBrady.com>
Date: Wed, 01 Aug 2012 15:00:17 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: coreutils-8.18: ready for release?
References: <873946u9er.fsf@rho.meyering.net>
In-Reply-To: <873946u9er.fsf@rho.meyering.net>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
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
	q71E0J2P012026
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 01 Aug 2012 14:00:29 -0000

On 08/01/2012 12:41 PM, Jim Meyering wrote:
> Now that util-linux has made a v2.22-rc release with improved "su"[1],
> I'd like to make a coreutils release (which removes su altogether).
>=20
> There's enough new code in md5sum --tag that I will defer
> adding that feature until after 8.18.
>=20
> I've just remembered that I have one more minor tail fix, and I'll
> post that shortly.  And I'll have to update to latest gnulib
> and address a new FP syntax-check failure that induces.
> Does anyone else have something to add?
>=20
>=20
> [1] As you may recall, I was ready to release a month or so ago, but
> since this release removes su.c altogether, we decided to wait for su
> in util-linux to get all the required features.

I've no pending bug fix patches.

cheers,
P=E1draig.


From MAILER-DAEMON Wed Aug 01 10:07:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwZa5-0002fq-2K
	for mharc-coreutils@gnu.org; Wed, 01 Aug 2012 10:07:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39943)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <goswin-v-b@web.de>) id 1SwV0J-0001dM-9r
	for coreutils@gnu.org; Wed, 01 Aug 2012 05:14:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <goswin-v-b@web.de>) id 1SwV0A-0007Kv-Ki
	for coreutils@gnu.org; Wed, 01 Aug 2012 05:14:07 -0400
Received: from mout.web.de ([212.227.15.3]:51678)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <goswin-v-b@web.de>) id 1SwV0A-0007Kh-An
	for coreutils@gnu.org; Wed, 01 Aug 2012 05:13:58 -0400
Received: from frosties.localnet ([95.208.118.96]) by smtp.web.de (mrweb101)
	with ESMTPSA (Nemesis) id 0MfHsM-1T7y6r28kc-00P9By;
	Wed, 01 Aug 2012 11:13:48 +0200
Received: from mrvn by frosties.localnet with local (Exim 4.80)
	(envelope-from <goswin-v-b@web.de>)
	id 1SwUzy-0007Fh-H8; Wed, 01 Aug 2012 11:13:46 +0200
Date: Wed, 1 Aug 2012 11:13:46 +0200
From: Goswin von Brederlow <goswin-v-b@web.de>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: Bug#682969: timeout 20 /usr/sbin/ntpd -g -q gives wrong return
	code
Message-ID: <20120801091346.GA27509@frosties>
References: <20120727135313.29004.75757.reportbug@frosties.localnet>
	<87lii587nc.fsf@rho.meyering.net> <5012DBB7.60502@draigBrady.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <5012DBB7.60502@draigBrady.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Provags-ID: V02:K0:Ta0gn6BGpu05+xge8Cy+bZyla4K+kT82mL4mAvMh/U1
	UzEAwuBfmlGZ74pnmGbnHaQQfp1T3DZl2PXP6B4EOLTf/PVz/m
	RDA+L/dzHyRC0pD/xQz64yuHZFHSx6BQXjl6BeVA4ZfQ0FA3/r
	IezL92PrJLL3jsf+jpaZ86s5QniQj0kQYDR76foqo4gforH7si
	ngghszIHUXXUFf1msmaxQ==
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.15.3
X-Mailman-Approved-At: Wed, 01 Aug 2012 10:07:20 -0400
Cc: 682969@bugs.debian.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: Wed, 01 Aug 2012 09:14:08 -0000

On Fri, Jul 27, 2012 at 07:19:35PM +0100, Pádraig Brady wrote:
> On 07/27/2012 05:56 PM, Jim Meyering wrote:
> > Goswin von Brederlow wrote:
> >> Package: coreutils
> >> Version: 8.13-3.2
> >> Severity: normal
> >> File: /usr/bin/timeout
> >>
> >> I'm trying to set the time during boot. Unfortunately ntpd hangs forever
> >> if the timeserver is unavailable. So I added a timeout to it so the
> >> system still continues to boot without the correct time.
> >>
> >> But I would like to log the error. Timeout is supposed to return 124 if the
> >> time was exceeded. But if ntpd corrects the time by more than the timeout
> >> then the return value is 124 despite the fact the real time passed was less.
> >>
> >> Wouldn't it be possible to detect this case and return the exit code of
> >> ntpd instead of a false timeout error?
> > 
> > Thanks for the report.
> > Did you experience an actual problem?

I got a timeout message:

----------------------------------------------------------------------
SERVER=$(grep "^server" /etc/ntp.conf | cut -d" " -f2-)

ERR=124
COUNT=0

while [ $ERR = 124 ]; do
  ERR=0
  if [ $COUNT -gt 0 ]; then
    echo >/dev/console "[$COUNT] Timeout from ntp server ($SERVER), still trying ..."
  fi
  COUNT=$((COUNT+1))
  timeout 10 /usr/sbin/ntpd -g -q || ERR=$?
  if grep -q no-ntp /proc/cmdline; then
    break;
  fi
done
----------------------------------------------------------------------

At boot the loop did run twice and print a timeout message.

> > When I try to trigger such misbehavior, timeout seems to work fine
> > on a system (Fedora 17) with a working timer_settime function:
> > 
> >     $ timeout 2 date --set=$(LC_ALL=C date -d 10\ sec +@%s); echo $?
> >     0
> > 
> > I.e., when timeout's child terminates, the clock says
> > 10 seconds have elapsed, yet it exits 0, because the
> > duration was less than 2 seconds.
> > 
> > I'm using the timeout from coreutils-8.17, but nothing
> > has changed in this area since before 8.13.
> > 
> > I even rebuilt my timeout binary, simulating no timer_settime
> > function so that it would take the alarm-using path.  Same result.
> 
> Note timeout(1) currently uses timer_create(CLOCK_REALTIME).
> That could jump and cause signals to fire.
> Though I can't reproduce here, even when pushing the
> updated system clock down to the hardware:
> 
> # timeout 3 sh -c 'date --set=$(LC_ALL=C date -d 10\ sec +@%s); hwclock -w; sleep 1'
> # echo $?
> 0

Does ntpd -g -q use a different method to adjust time compared to
date? I know normaly ntpd adjust the time gradually so time doesn't
jump. But not -q. Also this was inside kvm. Maybe the clock behaves
differently there too.

If it isn't that then maybe I'm just overestimating the speed of ntpd
and it actually takes too long under load with cold caches:

beo-04:~# date --set=$(LC_ALL=C date -d -1000\ sec +@%s)
Wed Aug  1 10:42:35 CEST 2012
beo-04:~# timeout 10 ntpd -g -q; echo $?
ntpd: time set +1000.683261s
0

So I can't reproduce the bug myself on a booted system.

Must have been a strange timeing so that ntpd did just manage to set
the time and print its message within the timeout but not enough time
to actualy exit. Sorry for the noise.

> I was wondering about using CLOCK_MONOTONIC instead,
> though I'd need to test how that functions over a suspend/resume.
> I suspect it only counts up while the system is running.
> Maybe we should default to system running time, rather than
> wall clock time, though then we'd have to look at/document
> the inconsistency on systems without CLOCK_MONOTONIC.
> 
> Goswin what's the output from uname -a
> as a matter of interest?
> 
> cheers,
> Pádraig.

Linux beo-04 2.6.32.59-ql-nfsroot-42 #1 SMP Mon Jul 23 16:55:30 CEST 2012 x86_64 GNU/Linux

Any kernel options that would affect this?

MfG
	Goswin


From MAILER-DAEMON Wed Aug 01 10:07:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwZa5-0002gK-9F
	for mharc-coreutils@gnu.org; Wed, 01 Aug 2012 10:07:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47777)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jari.m.v@gmail.com>) id 1SwZIY-0003wG-DG
	for coreutils@gnu.org; Wed, 01 Aug 2012 09:49:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jari.m.v@gmail.com>) id 1SwZIX-0008AY-J5
	for coreutils@gnu.org; Wed, 01 Aug 2012 09:49:14 -0400
Received: from mail-qa0-f41.google.com ([209.85.216.41]:64588)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jari.m.v@gmail.com>) id 1SwZIX-0008AT-EM
	for coreutils@gnu.org; Wed, 01 Aug 2012 09:49:13 -0400
Received: by qabg27 with SMTP id g27so3020108qab.0
	for <coreutils@gnu.org>; Wed, 01 Aug 2012 06:49:12 -0700 (PDT)
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=a/y1DNM20VnxJl4sHjWAA79Da7MP08f7B+Vi0EyTEQE=;
	b=JOsRJq66qcVq0spmObZQrR0AyH2HNHVuNVOUsGU0Gs92PvB5ayQRfPpjSSmeTCQbyh
	ab6YcSgNwwE5Rkds1qZhdLcV+pRZetkXaYPZvy2C8MN4tkXJwAcVYDMOkPy6/8FbnpKN
	0be2CPrHiz/XlRBGUsp/XYOfxVhBOMrE7lgiOM2YWfKCguzsvRmms+EEgWvYO7bap4d9
	Eg7iaBbfpps2DIaOpxCfxFmcXnWbnsLf9Q4W4Fv92P4l1KpHlzQlNF/VcOLb5CyVFWu7
	A+H6RW0mjVDL17cX63UKn6AxULzXlg4/H1B6F9Cn7vPYpY/DqyLA1Tpyhtl4Pq9xtRKG
	cVsA==
MIME-Version: 1.0
Received: by 10.229.137.77 with SMTP id v13mr9317126qct.65.1343828952645; Wed,
	01 Aug 2012 06:49:12 -0700 (PDT)
Received: by 10.229.117.72 with HTTP; Wed, 1 Aug 2012 06:49:12 -0700 (PDT)
Date: Wed, 1 Aug 2012 16:49:12 +0300
Message-ID: <CAOEi3umi42SH+ycnSJLZ74hMvCcNQTP=kt3DnF-xu1hr25Z9sw@mail.gmail.com>
Subject: expr: expr 3 \* 4 -> expr 3 x 4 ?
From: Jari Vuoksenranta <jari.m.v@gmail.com>
To: coreutils@gnu.org
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.216.41
X-Mailman-Approved-At: Wed, 01 Aug 2012 10:07:20 -0400
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, 01 Aug 2012 13:49:21 -0000

Would it break anything if "*" was replaced with a "x" (on command line ONLY)?
I mostly use expr in such easy div / mul tasks...

"expr (GNU coreutils) 8.15 Packaged by Cygwin (8.15-1)"


From MAILER-DAEMON Wed Aug 01 10:13:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwZg5-0002h6-KU
	for mharc-coreutils@gnu.org; Wed, 01 Aug 2012 10:13:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41835)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SwZfy-0002cM-46
	for coreutils@gnu.org; Wed, 01 Aug 2012 10:13:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SwZfx-0008BK-2k
	for coreutils@gnu.org; Wed, 01 Aug 2012 10:13:26 -0400
Received: from mx1.redhat.com ([209.132.183.28]:36076)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1SwZfw-0008B6-Oy
	for coreutils@gnu.org; Wed, 01 Aug 2012 10:13:24 -0400
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 q71EDNh5032675
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 1 Aug 2012 10:13:23 -0400
Received: from [10.3.113.77] (ovpn-113-77.phx2.redhat.com [10.3.113.77])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q71EDMrx022819; Wed, 1 Aug 2012 10:13:23 -0400
Message-ID: <50193982.9070104@redhat.com>
Date: Wed, 01 Aug 2012 08:13:22 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Jari Vuoksenranta <jari.m.v@gmail.com>
Subject: Re: expr: expr 3 \* 4 -> expr 3 x 4 ?
References: <CAOEi3umi42SH+ycnSJLZ74hMvCcNQTP=kt3DnF-xu1hr25Z9sw@mail.gmail.com>
In-Reply-To: <CAOEi3umi42SH+ycnSJLZ74hMvCcNQTP=kt3DnF-xu1hr25Z9sw@mail.gmail.com>
X-Enigmail-Version: 1.4.3
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig6531341F08B0F7E8E967413D"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 01 Aug 2012 14:13:32 -0000

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

On 08/01/2012 07:49 AM, Jari Vuoksenranta wrote:
> Would it break anything if "*" was replaced with a "x" (on command line=
 ONLY)?
> I mostly use expr in such easy div / mul tasks...

I suppose such an extension would be okay, however, how would you
reliably know whether you have a new enough coreutils providing the
extension, when you might as well just stick with the syntax
standardized by POSIX?

>=20
> "expr (GNU coreutils) 8.15 Packaged by Cygwin (8.15-1)"

Furthermore, why are you using 'expr' in the first place?  Spawning a
new process is expensive, and it is much faster to use shell built-in
arithmetic (also guaranteed by POSIX and present on cygwin).  Change
your script from:

expr 3 \* 4

to

echo $((3 * 4))

for faster execution, and so that you no longer have to escape the *,
all without proposing any changes to expr.

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


--------------enig6531341F08B0F7E8E967413D
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://enigmail.mozdev.org/

iQEcBAEBCAAGBQJQGTmCAAoJEKeha0olJ0Nq9UEH/jBB1QpjcL5S2mOrh1RPDskn
hy1i8ZV7PqwYFgs6O2MDXv1CF9tutgTlO6P8Exj1HrEJafUAfESjGuA7ieBXi5yE
l0ytWCdNeIIVa4C6MgZVAQC7tlo/5Fh6w9fzG1T4pQCuH0VBO0f64Yw/+Y5luspS
X740SP/AyLb5W1kO0ddp/HFsP6zapw2k5QF/yUXKn6Sajn1J8sgAyJyWWE2TZ3Tu
7sLJ+VB6qoemoWsfkWYMtgH1fsl2b632RrzCAgauB0kh/zw8fBKRf9WT7dSSzjw2
10rq/J9IXAzn/4I9yGp6a3ehtvwGY1PBWCza7qHhU6AYzzOWzcFRV24AYVx4+Ck=
=PQAr
-----END PGP SIGNATURE-----

--------------enig6531341F08B0F7E8E967413D--


From MAILER-DAEMON Wed Aug 01 14:06:18 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwdJK-0000KP-GE
	for mharc-coreutils@gnu.org; Wed, 01 Aug 2012 14:06:18 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49435)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <sygne@ombres.eu>) id 1SwdJH-0000If-J8
	for coreutils@gnu.org; Wed, 01 Aug 2012 14:06:16 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <sygne@ombres.eu>) id 1SwdJG-0006FU-Lu
	for coreutils@gnu.org; Wed, 01 Aug 2012 14:06:15 -0400
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:50642)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <sygne@ombres.eu>) id 1SwdJG-0006FJ-F9
	for coreutils@gnu.org; Wed, 01 Aug 2012 14:06:14 -0400
X-Originating-IP: 217.70.178.129
Received: from mfilter12-d.gandi.net (mfilter12-d.gandi.net [217.70.178.129])
	by relay4-d.mail.gandi.net (Postfix) with ESMTP id 607971720A4;
	Wed,  1 Aug 2012 20:06:13 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mfilter12-d.gandi.net
Received: from relay4-d.mail.gandi.net ([217.70.183.196])
	by mfilter12-d.gandi.net (mfilter12-d.gandi.net [10.0.15.180])
	(amavisd-new, port 10024)
	with ESMTP id AC15S3argCQH; Wed,  1 Aug 2012 20:06:12 +0200 (CEST)
X-Originating-IP: 109.190.47.174
Received: from localhost.localdomain (174-47-190-109.dsl.ovh.fr
	[109.190.47.174]) (Authenticated sender: sygne@ombres.eu)
	by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id D6D7217209F;
	Wed,  1 Aug 2012 20:06:11 +0200 (CEST)
Date: Wed, 01 Aug 2012 20:05:35 +0200
From: Pierre-Jean <sygne@ombres.eu>
To: eblake@redhat.com
Subject: Re: sort -V and accents
Message-ID: <50196fef.x4AkARdWix7Sm8dg%sygne@ombres.eu>
References: <5017b26d.iELWZqTYPECu4TXF%sygne@ombres.eu>
	<87fw87uoah.fsf@rho.meyering.net>
	<50190976.NGnV9A0WLX1Ddy1P%sygne@ombres.eu>
	<50191C2A.7030405@redhat.com>
In-Reply-To: <50191C2A.7030405@redhat.com>
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 217.70.183.196
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, 01 Aug 2012 18:06:16 -0000

Eric Blake <eblake@redhat.com> wrote:
> >> Pierre-Jean wrote:
> > 
> >>> I'm trying to sort a file containing accents and numbers,
> >>> but can't find a way to do this correctly:

> Also be
> open to the idea that it might be a bug in your locale definition, where
> the rules picked by your choice of LC_COLLATE could be tuned to better
> give you the sorting you want.

You're right. I have tested with heirloom sort, and I get
the same order as gnu sort.

I'm gonna look at LC_COLLATE rules, but I think I'd better
follow these standard rules, even if the output seems
strange to me.

Thanks you, and thanks Jim Meyering.

Cheers,

Pierre-Jean.



From MAILER-DAEMON Thu Aug 02 07:42:05 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Swtn3-0006ez-5K
	for mharc-coreutils@gnu.org; Thu, 02 Aug 2012 07:42:05 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55995)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1Swtmv-0006dj-U7
	for coreutils@gnu.org; Thu, 02 Aug 2012 07:42:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1Swtmn-0005bw-Mv
	for coreutils@gnu.org; Thu, 02 Aug 2012 07:41:57 -0400
Received: from mx4-phx2.redhat.com ([209.132.183.25]:60123)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1Swtmn-0005Ye-2x
	for coreutils@gnu.org; Thu, 02 Aug 2012 07:41:49 -0400
Received: from zmail19.collab.prod.int.phx2.redhat.com
	(zmail19.collab.prod.int.phx2.redhat.com [10.5.83.22])
	by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q72Bfi2M017718;
	Thu, 2 Aug 2012 07:41:44 -0400
Date: Thu, 2 Aug 2012 07:41:44 -0400 (EDT)
From: Ondrej Oprala <ooprala@redhat.com>
To: Jim Meyering <jim@meyering.net>
Message-ID: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
In-Reply-To: <87pq7auaxh.fsf@rho.meyering.net>
Subject: Re: RFE: hash-type in sum utils
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1645271_1704551222.1343907704769"
X-Originating-IP: [10.34.4.237]
X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - FF3.0 (Linux)/7.2.0_GA_2669)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 209.132.183.25
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, 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, 02 Aug 2012 11:42:03 -0000

------=_Part_1645271_1704551222.1343907704769
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Here's the new patch. Everything should (hopefully) be in order now :) .
Cheers,
 Ondrej

----- Original Message -----
From: "Jim Meyering" <jim@meyering.net>
To: "Ondrej Oprala" <ooprala@redhat.com>
Cc: "P=C3=A1draig Brady" <P@draigBrady.com>, "D Yu Bolkhovityanov" <D.Yu.Bo=
lkhovityanov@inp.nsk.su>, coreutils@gnu.org
Sent: Wednesday, August 1, 2012 1:08:26 PM
Subject: Re: RFE: hash-type in sum utils

Ondrej Oprala wrote:
> Here's the patch.

Thanks.
I've adjusted the NEWS patch so that it only inserts the
new 3-line entry (rather than also removing many others),
and adjusted the wording slightly:

diff --git a/NEWS b/NEWS
index f1255ea..51ebc63 100644
--- a/NEWS
+++ b/NEWS
@@ -41,6 +41,10 @@ GNU coreutils NEWS                                    -*=
- outline -*-

 ** New features

+  md5sum now accepts the --tag option to print BSD-style output with GNU
+  file name escaping.  This also affects sha1sum, sha224sum, sha256sum,
+  sha384sum and sha512sum.
+
   stat -f recognizes the new remote file system types: aufs, panfs.

 ** Changes in behavior
-----------------------------------------------

I noticed that "make syntax-check" failed with this:

                      fputs(" (", stdout);
    *** src/md5sum.c
    maint.mk: the above files lack a space-before-open-paren
    make: *** [sc_space_before_open_paren] Error 1
    make: *** Waiting for unfinished jobs....

That prompted me to look for other formatting problems.
There was an improperly indented line and a stray empty line.
Here are the fixes:
(but see below, "Finally...", for a complete change-set)

diff --git a/src/md5sum.c b/src/md5sum.c
index eecf2c7..735e8ed 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -356,7 +356,6 @@ split_3 (char *s, size_t s_len,
   else if (escaped_filename && (s[i] =3D=3D ' ' || s[i + 1] =3D=3D ' '))
     return false;

-
   /* Ignore this line if it is too short.
      Each line must have at least 'min_digest_line_length - 1' (or one mor=
e, if
      the first is a backslash) more characters to contain correct message =
digest
@@ -364,7 +363,7 @@ split_3 (char *s, size_t s_len,
   if (s_len - i < min_digest_line_length + (s[i] =3D=3D '\\'))
     return false;

-    *hex_digest =3D (unsigned char *) &s[i];
+  *hex_digest =3D (unsigned char *) &s[i];

   /* The first field has to be the n-character hexadecimal
      representation of the message digest.  If it is not followed
@@ -815,7 +814,7 @@ main (int argc, char **argv)
                   if (!file_is_binary)
                     putchar (' ');
                   fputs (DIGEST_TYPE_STRING, stdout);
-                  fputs(" (", stdout);
+                  fputs (" (", stdout);
                   print_filename (file);
                   fputs (") =3D ", stdout);
                 }
-----------------------------------------------

Your patch lacks a commit log.
Also, any time we add a new option, we must document it
in two places: in --help output (i.e., the usage function)
and in doc/coreutils.texi.  The --help addition will be
minimal, and coreutils.texi will give more detail, e.g.,
explaining how md5sum --tag output differs from that produced
by the BSD md5 program.

Thanks for adding the tests.  Are you willing to add a few more
to get proper coverage of this new feature?  For example,
we'll need cases that show what happens with files whose
names contain backslash and newline, as well as what
md5sum --check does with inputs where the name is escaped
but contains say "\t" or ends in a single backslash.

In rewriting the description of your filename_unescape
function, I realized that it could be simpler, so eliminated its
third parameter and made it return S (or NULL) instead of a boolean.

diff --git a/src/md5sum.c b/src/md5sum.c
index 735e8ed..22efac0 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -217,16 +217,17 @@ space for text), and name for each FILE.\n"),

 #define ISWHITE(c) ((c) =3D=3D ' ' || (c) =3D=3D '\t')

-/* Translate each '\n' string in the file name beginning
-   at string S (of length S_LEN)  to a NEWLINE,
-   and each '\\' string to a backslash; FILE_NAME becoming
-   the pointer used to print the actual file name. Return
-   true unless file name is invalid.  */
-
-static bool
-filename_unescape (char *s, size_t s_len, char **file_name)
+/* Given a file name, S of length S_LEN, that is not NUL-terminated,
+   modify it in place, performing the equivalent of this sed substitution:
+   's/\\n/\n/g;s/\\\\/\\/g' i.e., replacing each "\\n" string with a newli=
ne
+   and each "\\\\" with a single backslash, NUL-terminate it and return S.
+   If S is not a valid escaped file name, i.e., if it ends with an odd num=
ber
+   of backslashes or if it contains a backslash followed by anything other
+   than "n" or another backslash, return NULL.  */
+
+static char *
+filename_unescape (char *s, size_t s_len)
 {
-
   char *dst =3D s;
   size_t i =3D 0;

@@ -238,7 +239,7 @@ filename_unescape (char *s, size_t s_len, char **file_n=
ame)
           if (i =3D=3D s_len - 1)
             {
               /* A valid line does not end with a backslash.  */
-              return false;
+              return NULL;
             }
           ++i;
           switch (s[i++])
@@ -251,13 +252,13 @@ filename_unescape (char *s, size_t s_len, char **file=
_name)
               break;
             default:
               /* Only '\' or 'n' may follow a backslash.  */
-              return false;
+              return NULL;
             }
           break;

         case '\0':
           /* The file name may not contain a NUL.  */
-          return false;
+          return NULL;

         default:
           *dst++ =3D s[i++];
@@ -266,9 +267,7 @@ filename_unescape (char *s, size_t s_len, char **file_n=
ame)
     }
   *dst =3D '\0';

-  *file_name =3D s;
-
-  return true;
+  return s;
 }

 /* Split the checksum string S (of length S_LEN) from a BSD 'md5' or
@@ -284,7 +283,7 @@ bsd_split_3 (char *s, size_t s_len, unsigned char **hex=
_digest,
   if (s_len =3D=3D 0)
     return false;
   /* Find end of filename. The BSD 'md5' and 'sha1' commands do not escape
-     filenames, so search backwards for the last ')'. */
+     file names, so search backwards for the last ')'.  */
   i =3D s_len - 1;
   while (i && s[i] !=3D ')')
     i--;
@@ -294,9 +293,8 @@ bsd_split_3 (char *s, size_t s_len, unsigned char **hex=
_digest,

   *file_name =3D s;

-  if (escaped_filename)
-    if (!filename_unescape (s, i, file_name))
-      return false;
+  if (escaped_filename && filename_unescape (s, i) =3D=3D NULL)
+    return false;

   s[i++] =3D '\0';

@@ -398,7 +396,7 @@ split_3 (char *s, size_t s_len,
   *file_name =3D &s[i];

   if (escaped_filename)
-    return filename_unescape (&s[i], s_len - i, file_name);
+    return filename_unescape (&s[i], s_len - i) !=3D NULL;

   return true;
 }

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Also, here's a change to make filename_unescape use a for-loop,
since factoring out the two bottom-of-loop "i++" expressions is cleaner:

diff --git a/src/md5sum.c b/src/md5sum.c
index 22efac0..5fdc98a 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -229,20 +229,19 @@ static char *
 filename_unescape (char *s, size_t s_len)
 {
   char *dst =3D s;
-  size_t i =3D 0;

-  while (i < s_len)
+  for (size_t i =3D 0; i < s_len; i++)
     {
       switch (s[i])
         {
         case '\\':
           if (i =3D=3D s_len - 1)
             {
-              /* A valid line does not end with a backslash.  */
+              /* File name ends with an unescaped backslash: invalid.  */
               return NULL;
             }
           ++i;
-          switch (s[i++])
+          switch (s[i])
             {
             case 'n':
               *dst++ =3D '\n';
@@ -261,7 +260,7 @@ filename_unescape (char *s, size_t s_len)
           return NULL;

         default:
-          *dst++ =3D s[i++];
+          *dst++ =3D s[i];
           break;
         }
     }


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Finally, here's a change-set relative to the latest in git
that you can apply using "git am FILE".
Please use this as a starting point for any additional changes.

>From c199ef3890e1eb8679a2577cabec34801e276b09 Mon Sep 17 00:00:00 2001
From: Ondrej Oprala <ooprala@redhat.com>
Date: Tue, 31 Jul 2012 13:57:48 +0200
Subject: [PATCH] md5sum: add the --tag option to *sum utils for BSD-like
 output

* src/md5sum.c (filename_unescape): New function.
FIXME: say more here
* NEWS (New features): Mention it.
* tests/misc/md5sum-bsd: Add tests.
---
 NEWS                  |   4 +
 src/md5sum.c          | 202 +++++++++++++++++++++++++++++++---------------=
----
 tests/misc/md5sum-bsd |  11 +++
 3 files changed, 139 insertions(+), 78 deletions(-)

diff --git a/NEWS b/NEWS
index f1255ea..51ebc63 100644
--- a/NEWS
+++ b/NEWS
@@ -41,6 +41,10 @@ GNU coreutils NEWS                                    -*=
- outline -*-

 ** New features

+  md5sum now accepts the --tag option to print BSD-style output with GNU
+  file name escaping.  This also affects sha1sum, sha224sum, sha256sum,
+  sha384sum and sha512sum.
+
   stat -f recognizes the new remote file system types: aufs, panfs.

 ** Changes in behavior
diff --git a/src/md5sum.c b/src/md5sum.c
index f7e0849..5fdc98a 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -135,7 +135,8 @@ enum
 {
   STATUS_OPTION =3D CHAR_MAX + 1,
   QUIET_OPTION,
-  STRICT_OPTION
+  STRICT_OPTION,
+  TAG_OPTION
 };

 static struct option const long_options[] =3D
@@ -147,6 +148,7 @@ static struct option const long_options[] =3D
   { "text", no_argument, NULL, 't' },
   { "warn", no_argument, NULL, 'w' },
   { "strict", no_argument, NULL, STRICT_OPTION },
+  { "tag", no_argument, NULL, TAG_OPTION },
   { GETOPT_HELP_OPTION_DECL },
   { GETOPT_VERSION_OPTION_DECL },
   { NULL, 0, NULL, 0 }
@@ -215,23 +217,72 @@ space for text), and name for each FILE.\n"),

 #define ISWHITE(c) ((c) =3D=3D ' ' || (c) =3D=3D '\t')

+/* Given a file name, S of length S_LEN, that is not NUL-terminated,
+   modify it in place, performing the equivalent of this sed substitution:
+   's/\\n/\n/g;s/\\\\/\\/g' i.e., replacing each "\\n" string with a newli=
ne
+   and each "\\\\" with a single backslash, NUL-terminate it and return S.
+   If S is not a valid escaped file name, i.e., if it ends with an odd num=
ber
+   of backslashes or if it contains a backslash followed by anything other
+   than "n" or another backslash, return NULL.  */
+
+static char *
+filename_unescape (char *s, size_t s_len)
+{
+  char *dst =3D s;
+
+  for (size_t i =3D 0; i < s_len; i++)
+    {
+      switch (s[i])
+        {
+        case '\\':
+          if (i =3D=3D s_len - 1)
+            {
+              /* File name ends with an unescaped backslash: invalid.  */
+              return NULL;
+            }
+          ++i;
+          switch (s[i])
+            {
+            case 'n':
+              *dst++ =3D '\n';
+              break;
+            case '\\':
+              *dst++ =3D '\\';
+              break;
+            default:
+              /* Only '\' or 'n' may follow a backslash.  */
+              return NULL;
+            }
+          break;
+
+        case '\0':
+          /* The file name may not contain a NUL.  */
+          return NULL;
+
+        default:
+          *dst++ =3D s[i];
+          break;
+        }
+    }
+  *dst =3D '\0';
+
+  return s;
+}
+
 /* Split the checksum string S (of length S_LEN) from a BSD 'md5' or
    'sha1' command into two parts: a hexadecimal digest, and the file
    name.  S is modified.  Return true if successful.  */

 static bool
 bsd_split_3 (char *s, size_t s_len, unsigned char **hex_digest,
-             char **file_name)
+             char **file_name, bool escaped_filename)
 {
   size_t i;

   if (s_len =3D=3D 0)
     return false;
-
-  *file_name =3D s;
-
   /* Find end of filename. The BSD 'md5' and 'sha1' commands do not escape
-     filenames, so search backwards for the last ')'. */
+     file names, so search backwards for the last ')'.  */
   i =3D s_len - 1;
   while (i && s[i] !=3D ')')
     i--;
@@ -239,6 +290,11 @@ bsd_split_3 (char *s, size_t s_len, unsigned char **he=
x_digest,
   if (s[i] !=3D ')')
     return false;

+  *file_name =3D s;
+
+  if (escaped_filename && filename_unescape (s, i) =3D=3D NULL)
+    return false;
+
   s[i++] =3D '\0';

   while (ISWHITE (s[i]))
@@ -271,7 +327,16 @@ split_3 (char *s, size_t s_len,
   while (ISWHITE (s[i]))
     ++i;

+  if (s[i] =3D=3D '\\')
+    {
+      ++i;
+      escaped_filename =3D true;
+    }
+
   /* Check for BSD-style checksum line. */
+  if (s[i] =3D=3D ' ')
+    ++i;
+
   algo_name_len =3D strlen (DIGEST_TYPE_STRING);
   if (STREQ_LEN (s + i, DIGEST_TYPE_STRING, algo_name_len))
     {
@@ -282,9 +347,11 @@ split_3 (char *s, size_t s_len,
           *binary =3D 0;
           return bsd_split_3 (s +      i + algo_name_len + 1,
                               s_len - (i + algo_name_len + 1),
-                              hex_digest, file_name);
+                              hex_digest, file_name, escaped_filename);
         }
     }
+  else if (escaped_filename && (s[i] =3D=3D ' ' || s[i + 1] =3D=3D ' '))
+    return false;

   /* Ignore this line if it is too short.
      Each line must have at least 'min_digest_line_length - 1' (or one mor=
e, if
@@ -293,11 +360,6 @@ split_3 (char *s, size_t s_len,
   if (s_len - i < min_digest_line_length + (s[i] =3D=3D '\\'))
     return false;

-  if (s[i] =3D=3D '\\')
-    {
-      ++i;
-      escaped_filename =3D true;
-    }
   *hex_digest =3D (unsigned char *) &s[i];

   /* The first field has to be the n-character hexadecimal
@@ -333,49 +395,8 @@ split_3 (char *s, size_t s_len,
   *file_name =3D &s[i];

   if (escaped_filename)
-    {
-      /* Translate each '\n' string in the file name to a NEWLINE,
-         and each '\\' string to a backslash.  */
-
-      char *dst =3D &s[i];
-
-      while (i < s_len)
-        {
-          switch (s[i])
-            {
-            case '\\':
-              if (i =3D=3D s_len - 1)
-                {
-                  /* A valid line does not end with a backslash.  */
-                  return false;
-                }
-              ++i;
-              switch (s[i++])
-                {
-                case 'n':
-                  *dst++ =3D '\n';
-                  break;
-                case '\\':
-                  *dst++ =3D '\\';
-                  break;
-                default:
-                  /* Only '\' or 'n' may follow a backslash.  */
-                  return false;
-                }
-              break;
+    return filename_unescape (&s[i], s_len - i) !=3D NULL;

-            case '\0':
-              /* The file name may not contain a NUL.  */
-              return false;
-              break;
-
-            default:
-              *dst++ =3D s[i++];
-              break;
-            }
-        }
-      *dst =3D '\0';
-    }
   return true;
 }

@@ -636,6 +657,31 @@ digest_check (const char *checkfile_name)
           && (!strict || n_improperly_formatted_lines =3D=3D 0));
 }

+static void
+print_filename (char const *file)
+{
+  /* Translate each NEWLINE byte to the string, "\\n",
+     and each backslash to "\\\\".  */
+  while (*file)
+    {
+      switch (*file)
+        {
+        case '\n':
+          fputs ("\\n", stdout);
+          break;
+
+        case '\\':
+          fputs ("\\\\", stdout);
+          break;
+
+        default:
+          putchar (*file);
+          break;
+        }
+      file++;
+    }
+}
+
 int
 main (int argc, char **argv)
 {
@@ -646,6 +692,7 @@ main (int argc, char **argv)
   int opt;
   bool ok =3D true;
   int binary =3D -1;
+  bool prefix_tag =3D false;

   /* Setting values of global variables.  */
   initialize_main (&argc, &argv);
@@ -690,6 +737,9 @@ main (int argc, char **argv)
       case STRICT_OPTION:
         strict =3D true;
         break;
+      case TAG_OPTION:
+        prefix_tag =3D true;
+        break;
       case_GETOPT_HELP_CHAR;
       case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
       default:
@@ -754,41 +804,37 @@ main (int argc, char **argv)
             ok =3D false;
           else
             {
+              if (prefix_tag)
+                {
+                  if (strchr (file, '\n') || strchr (file, '\\'))
+                    putchar ('\\');
+                  if (!file_is_binary)
+                    putchar (' ');
+                  fputs (DIGEST_TYPE_STRING, stdout);
+                  fputs (" (", stdout);
+                  print_filename (file);
+                  fputs (") =3D ", stdout);
+                }
+
               size_t i;

               /* Output a leading backslash if the file name contains
                  a newline or backslash.  */
-              if (strchr (file, '\n') || strchr (file, '\\'))
+              if (!prefix_tag && (strchr (file, '\n') || strchr (file, '\\=
')))
                 putchar ('\\');

               for (i =3D 0; i < (digest_hex_bytes / 2); ++i)
                 printf ("%02x", bin_buffer[i]);

-              putchar (' ');
-              if (file_is_binary)
-                putchar ('*');
-              else
-                putchar (' ');
-
-              /* Translate each NEWLINE byte to the string, "\\n",
-                 and each backslash to "\\\\".  */
-              for (i =3D 0; i < strlen (file); ++i)
+              if (!prefix_tag)
                 {
-                  switch (file[i])
-                    {
-                    case '\n':
-                      fputs ("\\n", stdout);
-                      break;
-
-                    case '\\':
-                      fputs ("\\\\", stdout);
-                      break;
-
-                    default:
-                      putchar (file[i]);
-                      break;
-                    }
+                  putchar (' ');
+
+                  putchar (file_is_binary ? '*' : ' ');
+
+                  print_filename (file);
                 }
+
               putchar ('\n');
             }
         }
diff --git a/tests/misc/md5sum-bsd b/tests/misc/md5sum-bsd
index 8226d7a..6497933 100755
--- a/tests/misc/md5sum-bsd
+++ b/tests/misc/md5sum-bsd
@@ -38,4 +38,15 @@ md5sum --strict -c check.md5 || fail=3D1
 # an option to avoid the ambiguity.
 tail -n+2 check.md5 | md5sum --strict -c && fail=3D1

+#--tag option test
+
+for i in 'a' ' b' '*c' 'dd' ' '; do
+  echo "$i" > "$i"
+  md5sum --tag "$i" >> check.md5sum
+done
+sed 's/  / /' check.md5sum > check.md5
+
+md5sum --strict -c check.md5sum || fail=3D1
+md5sum --strict -c check.md5 || fail=3D1
+
 Exit $fail
--
1.7.12.rc1.10.g97c7934

------=_Part_1645271_1704551222.1343907704769
Content-Type: application/mbox; name=DIFF
Content-Disposition: attachment; filename=DIFF
Content-Transfer-Encoding: base64

RnJvbSA3NjlhZGE4ZjBjOGI0MjE2ZjQwZGMzZjA0ZDMxMWZlY2JmZGE1NjA1IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBPbmRyZWogT3ByYWxhIDxvb3ByYWxhQHJlZGhhdC5jb20+CkRh
dGU6IFRodSwgMiBBdWcgMjAxMiAxMzozMTo1MCArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIG1kNXN1
bSxzaGExc3VtLHNoYTIyNHN1bSxzaGEyNTZzdW0sc2hhMzg0c3VtLHNoYTUxMnN1bTogYWRkCiAt
LXRhZyBvcHRpb24KCiogTkVXUzogQWRkIG5ldyBmZWF0dXJlIGluZm8KKiBkb2MvY29yZXV0aWxz
LnRleGkgKG1kNXN1bSBpbnZvY2F0aW9uKTogQWRkIGRldGFpbGVkIGluZm9ybWF0aW9uCmFib3V0
IHRoZSBuZXcgLS10YWcgb3B0aW9uCiogc3JjL21kNXN1bS5jOiBBZGQgdGhlIG5ldyAtLXRhZyBv
cHRpb24gZm9yIEJTRC1zdHlsZSBvdXRwdXQKKiB0ZXN0cy9taXNjL21kNXN1bS1ic2Q6IEFkZCB0
ZXN0cyBmb3IgdGhlIG5ldyBmZWF0dXJlCi0tLQogTkVXUyAgICAgICAgICAgICAgICAgIHwgICA0
ICsKIGRvYy9jb3JldXRpbHMudGV4aSAgICB8ICAgOSArKysKIHNyYy9tZDVzdW0uYyAgICAgICAg
ICB8IDIwNSArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrLS0tLS0tLS0tLS0tLS0tLS0t
LQogdGVzdHMvbWlzYy9tZDVzdW0tYnNkIHwgIDIwICsrKysrCiA0IGZpbGVzIGNoYW5nZWQsIDE2
MCBpbnNlcnRpb25zKCspLCA3OCBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9ORVdTIGIvTkVX
UwppbmRleCBmMTI1NWVhLi41MWViYzYzIDEwMDY0NAotLS0gYS9ORVdTCisrKyBiL05FV1MKQEAg
LTQxLDYgKzQxLDEwIEBAIEdOVSBjb3JldXRpbHMgTkVXUyAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIC0qLSBvdXRsaW5lIC0qLQogCiAqKiBOZXcgZmVhdHVyZXMKIAorICBtZDVz
dW0gbm93IGFjY2VwdHMgdGhlIC0tdGFnIG9wdGlvbiB0byBwcmludCBCU0Qtc3R5bGUgb3V0cHV0
IHdpdGggR05VCisgIGZpbGUgbmFtZSBlc2NhcGluZy4gIFRoaXMgYWxzbyBhZmZlY3RzIHNoYTFz
dW0sIHNoYTIyNHN1bSwgc2hhMjU2c3VtLAorICBzaGEzODRzdW0gYW5kIHNoYTUxMnN1bS4KKwog
ICBzdGF0IC1mIHJlY29nbml6ZXMgdGhlIG5ldyByZW1vdGUgZmlsZSBzeXN0ZW0gdHlwZXM6IGF1
ZnMsIHBhbmZzLgogCiAqKiBDaGFuZ2VzIGluIGJlaGF2aW9yCmRpZmYgLS1naXQgYS9kb2MvY29y
ZXV0aWxzLnRleGkgYi9kb2MvY29yZXV0aWxzLnRleGkKaW5kZXggNTE2ZWM3My4uZjhjNmYxMSAx
MDA2NDQKLS0tIGEvZG9jL2NvcmV1dGlscy50ZXhpCisrKyBiL2RvYy9jb3JldXRpbHMudGV4aQpA
QCAtMzcwNSw2ICszNzA1LDE1IEBAIElmIGFsbCBsaXN0ZWQgZmlsZXMgYXJlIHJlYWRhYmxlIGFu
ZCBhcmUgY29uc2lzdGVudCB3aXRoIHRoZSBhc3NvY2lhdGVkCiBNRDUgY2hlY2tzdW1zLCBleGl0
IHN1Y2Nlc3NmdWxseS4gIE90aGVyd2lzZSBleGl0IHdpdGggYSBzdGF0dXMgY29kZQogaW5kaWNh
dGluZyB0aGVyZSB3YXMgYSBmYWlsdXJlLgogCitAaXRlbSAtLXRhZworQG9waW5kZXggLS10YWcK
K0BjaW5kZXggQlNEIG91dHB1dAorQ3JlYXRlIGEgQlNEIHN0eWxlIG91dHB1dC4gSWYgdGhlIGZp
bGUgaXMgbm90IGJpbmFyeSwgcHV0IGEgbGVhZGluZword2hpdGVzcGFjZSBiZWZvcmUgdGhlIGFs
Z29yaXRobSdzIG5hbWUuICBJZiB0aGUgZmlsZSBuYW1lIGNvbnRhaW5zCithICdcJyBvciBhIG5l
d2xpbmUsIHB1dCBhICdcJyBhdCB0aGUgYmVnaW5uaW5nIG9mIHRoZSBjb3JyZXNwb25kaW5nCits
aW5lLiBGaWxlbmFtZXMgY29udGFpbmluZyB0aGVzZSBjaGFyYWN0ZXJzIHdpbGwgYWxzbyBiZSBl
c2NhcGVkCitqdXN0IGFzIHRoZXkgd291bGQgYmUgd2l0aG91dCB0aGUgQG9wdGlvbnstLXRhZ30u
CisKIEBpdGVtIC10CiBAaXRlbXggLS10ZXh0CiBAb3BpbmRleCAtdApkaWZmIC0tZ2l0IGEvc3Jj
L21kNXN1bS5jIGIvc3JjL21kNXN1bS5jCmluZGV4IGY3ZTA4NDkuLjhkZGIwNzYgMTAwNjQ0Ci0t
LSBhL3NyYy9tZDVzdW0uYworKysgYi9zcmMvbWQ1c3VtLmMKQEAgLTEzNSw3ICsxMzUsOCBAQCBl
bnVtCiB7CiAgIFNUQVRVU19PUFRJT04gPSBDSEFSX01BWCArIDEsCiAgIFFVSUVUX09QVElPTiwK
LSAgU1RSSUNUX09QVElPTgorICBTVFJJQ1RfT1BUSU9OLAorICBUQUdfT1BUSU9OCiB9OwogCiBz
dGF0aWMgc3RydWN0IG9wdGlvbiBjb25zdCBsb25nX29wdGlvbnNbXSA9CkBAIC0xNDcsNiArMTQ4
LDcgQEAgc3RhdGljIHN0cnVjdCBvcHRpb24gY29uc3QgbG9uZ19vcHRpb25zW10gPQogICB7ICJ0
ZXh0Iiwgbm9fYXJndW1lbnQsIE5VTEwsICd0JyB9LAogICB7ICJ3YXJuIiwgbm9fYXJndW1lbnQs
IE5VTEwsICd3JyB9LAogICB7ICJzdHJpY3QiLCBub19hcmd1bWVudCwgTlVMTCwgU1RSSUNUX09Q
VElPTiB9LAorICB7ICJ0YWciLCBub19hcmd1bWVudCwgTlVMTCwgVEFHX09QVElPTiB9LAogICB7
IEdFVE9QVF9IRUxQX09QVElPTl9ERUNMIH0sCiAgIHsgR0VUT1BUX1ZFUlNJT05fT1BUSU9OX0RF
Q0wgfSwKICAgeyBOVUxMLCAwLCBOVUxMLCAwIH0KQEAgLTE3OSw2ICsxODEsOSBAQCBXaXRoIG5v
IEZJTEUsIG9yIHdoZW4gRklMRSBpcyAtLCByZWFkIHN0YW5kYXJkIGlucHV0LlxuXAogICAgICAg
cHJpbnRmIChfKCJcCiAgIC1jLCAtLWNoZWNrICAgICAgICAgIHJlYWQgJXMgc3VtcyBmcm9tIHRo
ZSBGSUxFcyBhbmQgY2hlY2sgdGhlbVxuIiksCiAgICAgICAgICAgICAgIERJR0VTVF9UWVBFX1NU
UklORyk7CisgICAgICBmcHV0cyAoXygiXAorICAgICAgLS10YWcgICAgICAgICAgICBjcmVhdGUg
YSBCU0Qtc3R5bGUgY2hlY2tzdW1cblwKKyIpLCBzdGRvdXQpOwogICAgICAgaWYgKE9fQklOQVJZ
KQogICAgICAgICBmcHV0cyAoXygiXAogICAtdCwgLS10ZXh0ICAgICAgICAgICByZWFkIGluIHRl
eHQgbW9kZSAoZGVmYXVsdCBpZiByZWFkaW5nIHR0eSBzdGRpbilcblwKQEAgLTIxNSwyMyArMjIw
LDcyIEBAIHNwYWNlIGZvciB0ZXh0KSwgYW5kIG5hbWUgZm9yIGVhY2ggRklMRS5cbiIpLAogCiAj
ZGVmaW5lIElTV0hJVEUoYykgKChjKSA9PSAnICcgfHwgKGMpID09ICdcdCcpCiAKKy8qIEdpdmVu
IGEgZmlsZSBuYW1lLCBTIG9mIGxlbmd0aCBTX0xFTiwgdGhhdCBpcyBub3QgTlVMLXRlcm1pbmF0
ZWQsCisgICBtb2RpZnkgaXQgaW4gcGxhY2UsIHBlcmZvcm1pbmcgdGhlIGVxdWl2YWxlbnQgb2Yg
dGhpcyBzZWQgc3Vic3RpdHV0aW9uOgorICAgJ3MvXFxuL1xuL2c7cy9cXFxcL1xcL2cnIGkuZS4s
IHJlcGxhY2luZyBlYWNoICJcXG4iIHN0cmluZyB3aXRoIGEgbmV3bGluZQorICAgYW5kIGVhY2gg
IlxcXFwiIHdpdGggYSBzaW5nbGUgYmFja3NsYXNoLCBOVUwtdGVybWluYXRlIGl0IGFuZCByZXR1
cm4gUy4KKyAgIElmIFMgaXMgbm90IGEgdmFsaWQgZXNjYXBlZCBmaWxlIG5hbWUsIGkuZS4sIGlm
IGl0IGVuZHMgd2l0aCBhbiBvZGQgbnVtYmVyCisgICBvZiBiYWNrc2xhc2hlcyBvciBpZiBpdCBj
b250YWlucyBhIGJhY2tzbGFzaCBmb2xsb3dlZCBieSBhbnl0aGluZyBvdGhlcgorICAgdGhhbiAi
biIgb3IgYW5vdGhlciBiYWNrc2xhc2gsIHJldHVybiBOVUxMLiAgKi8KKworc3RhdGljIGNoYXIg
KgorZmlsZW5hbWVfdW5lc2NhcGUgKGNoYXIgKnMsIHNpemVfdCBzX2xlbikKK3sKKyAgY2hhciAq
ZHN0ID0gczsKKworICBmb3IgKHNpemVfdCBpID0gMDsgaSA8IHNfbGVuOyBpKyspCisgICAgewor
ICAgICAgc3dpdGNoIChzW2ldKQorICAgICAgICB7CisgICAgICAgIGNhc2UgJ1xcJzoKKyAgICAg
ICAgICBpZiAoaSA9PSBzX2xlbiAtIDEpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgIC8q
IEZpbGUgbmFtZSBlbmRzIHdpdGggYW4gdW5lc2NhcGVkIGJhY2tzbGFzaDogaW52YWxpZC4gICov
CisgICAgICAgICAgICAgIHJldHVybiBOVUxMOworICAgICAgICAgICAgfQorICAgICAgICAgICsr
aTsKKyAgICAgICAgICBzd2l0Y2ggKHNbaV0pCisgICAgICAgICAgICB7CisgICAgICAgICAgICBj
YXNlICduJzoKKyAgICAgICAgICAgICAgKmRzdCsrID0gJ1xuJzsKKyAgICAgICAgICAgICAgYnJl
YWs7CisgICAgICAgICAgICBjYXNlICdcXCc6CisgICAgICAgICAgICAgICpkc3QrKyA9ICdcXCc7
CisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAg
ICAgLyogT25seSAnXCcgb3IgJ24nIG1heSBmb2xsb3cgYSBiYWNrc2xhc2guICAqLworICAgICAg
ICAgICAgICByZXR1cm4gTlVMTDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBicmVhazsKKwor
ICAgICAgICBjYXNlICdcMCc6CisgICAgICAgICAgLyogVGhlIGZpbGUgbmFtZSBtYXkgbm90IGNv
bnRhaW4gYSBOVUwuICAqLworICAgICAgICAgIHJldHVybiBOVUxMOworCisgICAgICAgIGRlZmF1
bHQ6CisgICAgICAgICAgKmRzdCsrID0gc1tpXTsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAg
fQorICAgIH0KKyAgKmRzdCA9ICdcMCc7CisKKyAgcmV0dXJuIHM7Cit9CisKIC8qIFNwbGl0IHRo
ZSBjaGVja3N1bSBzdHJpbmcgUyAob2YgbGVuZ3RoIFNfTEVOKSBmcm9tIGEgQlNEICdtZDUnIG9y
CiAgICAnc2hhMScgY29tbWFuZCBpbnRvIHR3byBwYXJ0czogYSBoZXhhZGVjaW1hbCBkaWdlc3Qs
IGFuZCB0aGUgZmlsZQogICAgbmFtZS4gIFMgaXMgbW9kaWZpZWQuICBSZXR1cm4gdHJ1ZSBpZiBz
dWNjZXNzZnVsLiAgKi8KIAogc3RhdGljIGJvb2wKIGJzZF9zcGxpdF8zIChjaGFyICpzLCBzaXpl
X3Qgc19sZW4sIHVuc2lnbmVkIGNoYXIgKipoZXhfZGlnZXN0LAotICAgICAgICAgICAgIGNoYXIg
KipmaWxlX25hbWUpCisgICAgICAgICAgICAgY2hhciAqKmZpbGVfbmFtZSwgYm9vbCBlc2NhcGVk
X2ZpbGVuYW1lKQogewogICBzaXplX3QgaTsKIAogICBpZiAoc19sZW4gPT0gMCkKICAgICByZXR1
cm4gZmFsc2U7Ci0KLSAgKmZpbGVfbmFtZSA9IHM7Ci0KICAgLyogRmluZCBlbmQgb2YgZmlsZW5h
bWUuIFRoZSBCU0QgJ21kNScgYW5kICdzaGExJyBjb21tYW5kcyBkbyBub3QgZXNjYXBlCi0gICAg
IGZpbGVuYW1lcywgc28gc2VhcmNoIGJhY2t3YXJkcyBmb3IgdGhlIGxhc3QgJyknLiAqLworICAg
ICBmaWxlIG5hbWVzLCBzbyBzZWFyY2ggYmFja3dhcmRzIGZvciB0aGUgbGFzdCAnKScuICAqLwog
ICBpID0gc19sZW4gLSAxOwogICB3aGlsZSAoaSAmJiBzW2ldICE9ICcpJykKICAgICBpLS07CkBA
IC0yMzksNiArMjkzLDExIEBAIGJzZF9zcGxpdF8zIChjaGFyICpzLCBzaXplX3Qgc19sZW4sIHVu
c2lnbmVkIGNoYXIgKipoZXhfZGlnZXN0LAogICBpZiAoc1tpXSAhPSAnKScpCiAgICAgcmV0dXJu
IGZhbHNlOwogCisgICpmaWxlX25hbWUgPSBzOworCisgIGlmIChlc2NhcGVkX2ZpbGVuYW1lICYm
IGZpbGVuYW1lX3VuZXNjYXBlIChzLCBpKSA9PSBOVUxMKQorICAgIHJldHVybiBmYWxzZTsKKwog
ICBzW2krK10gPSAnXDAnOwogCiAgIHdoaWxlIChJU1dISVRFIChzW2ldKSkKQEAgLTI3MSw3ICsz
MzAsMTYgQEAgc3BsaXRfMyAoY2hhciAqcywgc2l6ZV90IHNfbGVuLAogICB3aGlsZSAoSVNXSElU
RSAoc1tpXSkpCiAgICAgKytpOwogCisgIGlmIChzW2ldID09ICdcXCcpCisgICAgeworICAgICAg
KytpOworICAgICAgZXNjYXBlZF9maWxlbmFtZSA9IHRydWU7CisgICAgfQorCiAgIC8qIENoZWNr
IGZvciBCU0Qtc3R5bGUgY2hlY2tzdW0gbGluZS4gKi8KKyAgaWYgKHNbaV0gPT0gJyAnKQorICAg
ICsraTsKKwogICBhbGdvX25hbWVfbGVuID0gc3RybGVuIChESUdFU1RfVFlQRV9TVFJJTkcpOwog
ICBpZiAoU1RSRVFfTEVOIChzICsgaSwgRElHRVNUX1RZUEVfU1RSSU5HLCBhbGdvX25hbWVfbGVu
KSkKICAgICB7CkBAIC0yODIsOSArMzUwLDExIEBAIHNwbGl0XzMgKGNoYXIgKnMsIHNpemVfdCBz
X2xlbiwKICAgICAgICAgICAqYmluYXJ5ID0gMDsKICAgICAgICAgICByZXR1cm4gYnNkX3NwbGl0
XzMgKHMgKyAgICAgIGkgKyBhbGdvX25hbWVfbGVuICsgMSwKICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIHNfbGVuIC0gKGkgKyBhbGdvX25hbWVfbGVuICsgMSksCi0gICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICBoZXhfZGlnZXN0LCBmaWxlX25hbWUpOworICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgaGV4X2RpZ2VzdCwgZmlsZV9uYW1lLCBlc2NhcGVkX2ZpbGVuYW1lKTsK
ICAgICAgICAgfQogICAgIH0KKyAgZWxzZSBpZiAoZXNjYXBlZF9maWxlbmFtZSAmJiAoc1tpXSA9
PSAnICcgfHwgc1tpICsgMV0gPT0gJyAnKSkKKyAgICByZXR1cm4gZmFsc2U7CiAKICAgLyogSWdu
b3JlIHRoaXMgbGluZSBpZiBpdCBpcyB0b28gc2hvcnQuCiAgICAgIEVhY2ggbGluZSBtdXN0IGhh
dmUgYXQgbGVhc3QgJ21pbl9kaWdlc3RfbGluZV9sZW5ndGggLSAxJyAob3Igb25lIG1vcmUsIGlm
CkBAIC0yOTMsMTEgKzM2Myw2IEBAIHNwbGl0XzMgKGNoYXIgKnMsIHNpemVfdCBzX2xlbiwKICAg
aWYgKHNfbGVuIC0gaSA8IG1pbl9kaWdlc3RfbGluZV9sZW5ndGggKyAoc1tpXSA9PSAnXFwnKSkK
ICAgICByZXR1cm4gZmFsc2U7CiAKLSAgaWYgKHNbaV0gPT0gJ1xcJykKLSAgICB7Ci0gICAgICAr
K2k7Ci0gICAgICBlc2NhcGVkX2ZpbGVuYW1lID0gdHJ1ZTsKLSAgICB9CiAgICpoZXhfZGlnZXN0
ID0gKHVuc2lnbmVkIGNoYXIgKikgJnNbaV07CiAKICAgLyogVGhlIGZpcnN0IGZpZWxkIGhhcyB0
byBiZSB0aGUgbi1jaGFyYWN0ZXIgaGV4YWRlY2ltYWwKQEAgLTMzMyw0OSArMzk4LDggQEAgc3Bs
aXRfMyAoY2hhciAqcywgc2l6ZV90IHNfbGVuLAogICAqZmlsZV9uYW1lID0gJnNbaV07CiAKICAg
aWYgKGVzY2FwZWRfZmlsZW5hbWUpCi0gICAgewotICAgICAgLyogVHJhbnNsYXRlIGVhY2ggJ1xu
JyBzdHJpbmcgaW4gdGhlIGZpbGUgbmFtZSB0byBhIE5FV0xJTkUsCi0gICAgICAgICBhbmQgZWFj
aCAnXFwnIHN0cmluZyB0byBhIGJhY2tzbGFzaC4gICovCi0KLSAgICAgIGNoYXIgKmRzdCA9ICZz
W2ldOwotCi0gICAgICB3aGlsZSAoaSA8IHNfbGVuKQotICAgICAgICB7Ci0gICAgICAgICAgc3dp
dGNoIChzW2ldKQotICAgICAgICAgICAgewotICAgICAgICAgICAgY2FzZSAnXFwnOgotICAgICAg
ICAgICAgICBpZiAoaSA9PSBzX2xlbiAtIDEpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAg
ICAgICAgICAgLyogQSB2YWxpZCBsaW5lIGRvZXMgbm90IGVuZCB3aXRoIGEgYmFja3NsYXNoLiAg
Ki8KLSAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKLSAgICAgICAgICAgICAgICB9Ci0g
ICAgICAgICAgICAgICsraTsKLSAgICAgICAgICAgICAgc3dpdGNoIChzW2krK10pCi0gICAgICAg
ICAgICAgICAgewotICAgICAgICAgICAgICAgIGNhc2UgJ24nOgotICAgICAgICAgICAgICAgICAg
KmRzdCsrID0gJ1xuJzsKLSAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAg
IGNhc2UgJ1xcJzoKLSAgICAgICAgICAgICAgICAgICpkc3QrKyA9ICdcXCc7Ci0gICAgICAgICAg
ICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgICAg
ICAgLyogT25seSAnXCcgb3IgJ24nIG1heSBmb2xsb3cgYSBiYWNrc2xhc2guICAqLwotICAgICAg
ICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAg
ICAgYnJlYWs7Ci0KLSAgICAgICAgICAgIGNhc2UgJ1wwJzoKLSAgICAgICAgICAgICAgLyogVGhl
IGZpbGUgbmFtZSBtYXkgbm90IGNvbnRhaW4gYSBOVUwuICAqLwotICAgICAgICAgICAgICByZXR1
cm4gZmFsc2U7Ci0gICAgICAgICAgICAgIGJyZWFrOworICAgIHJldHVybiBmaWxlbmFtZV91bmVz
Y2FwZSAoJnNbaV0sIHNfbGVuIC0gaSkgIT0gTlVMTDsKIAotICAgICAgICAgICAgZGVmYXVsdDoK
LSAgICAgICAgICAgICAgKmRzdCsrID0gc1tpKytdOwotICAgICAgICAgICAgICBicmVhazsKLSAg
ICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgKmRzdCA9ICdcMCc7Ci0gICAgfQogICByZXR1
cm4gdHJ1ZTsKIH0KIApAQCAtNjM2LDYgKzY2MCwzMSBAQCBkaWdlc3RfY2hlY2sgKGNvbnN0IGNo
YXIgKmNoZWNrZmlsZV9uYW1lKQogICAgICAgICAgICYmICghc3RyaWN0IHx8IG5faW1wcm9wZXJs
eV9mb3JtYXR0ZWRfbGluZXMgPT0gMCkpOwogfQogCitzdGF0aWMgdm9pZAorcHJpbnRfZmlsZW5h
bWUgKGNoYXIgY29uc3QgKmZpbGUpCit7CisgIC8qIFRyYW5zbGF0ZSBlYWNoIE5FV0xJTkUgYnl0
ZSB0byB0aGUgc3RyaW5nLCAiXFxuIiwKKyAgICAgYW5kIGVhY2ggYmFja3NsYXNoIHRvICJcXFxc
Ii4gICovCisgIHdoaWxlICgqZmlsZSkKKyAgICB7CisgICAgICBzd2l0Y2ggKCpmaWxlKQorICAg
ICAgICB7CisgICAgICAgIGNhc2UgJ1xuJzoKKyAgICAgICAgICBmcHV0cyAoIlxcbiIsIHN0ZG91
dCk7CisgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSAnXFwnOgorICAgICAgICAgIGZw
dXRzICgiXFxcXCIsIHN0ZG91dCk7CisgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgZGVmYXVs
dDoKKyAgICAgICAgICBwdXRjaGFyICgqZmlsZSk7CisgICAgICAgICAgYnJlYWs7CisgICAgICAg
IH0KKyAgICAgIGZpbGUrKzsKKyAgICB9Cit9CisKIGludAogbWFpbiAoaW50IGFyZ2MsIGNoYXIg
Kiphcmd2KQogewpAQCAtNjQ2LDYgKzY5NSw3IEBAIG1haW4gKGludCBhcmdjLCBjaGFyICoqYXJn
dikKICAgaW50IG9wdDsKICAgYm9vbCBvayA9IHRydWU7CiAgIGludCBiaW5hcnkgPSAtMTsKKyAg
Ym9vbCBwcmVmaXhfdGFnID0gZmFsc2U7CiAKICAgLyogU2V0dGluZyB2YWx1ZXMgb2YgZ2xvYmFs
IHZhcmlhYmxlcy4gICovCiAgIGluaXRpYWxpemVfbWFpbiAoJmFyZ2MsICZhcmd2KTsKQEAgLTY5
MCw2ICs3NDAsOSBAQCBtYWluIChpbnQgYXJnYywgY2hhciAqKmFyZ3YpCiAgICAgICBjYXNlIFNU
UklDVF9PUFRJT046CiAgICAgICAgIHN0cmljdCA9IHRydWU7CiAgICAgICAgIGJyZWFrOworICAg
ICAgY2FzZSBUQUdfT1BUSU9OOgorICAgICAgICBwcmVmaXhfdGFnID0gdHJ1ZTsKKyAgICAgICAg
YnJlYWs7CiAgICAgICBjYXNlX0dFVE9QVF9IRUxQX0NIQVI7CiAgICAgICBjYXNlX0dFVE9QVF9W
RVJTSU9OX0NIQVIgKFBST0dSQU1fTkFNRSwgQVVUSE9SUyk7CiAgICAgICBkZWZhdWx0OgpAQCAt
NzU0LDQxICs4MDcsMzcgQEAgbWFpbiAoaW50IGFyZ2MsIGNoYXIgKiphcmd2KQogICAgICAgICAg
ICAgb2sgPSBmYWxzZTsKICAgICAgICAgICBlbHNlCiAgICAgICAgICAgICB7CisgICAgICAgICAg
ICAgIGlmIChwcmVmaXhfdGFnKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAg
IGlmIChzdHJjaHIgKGZpbGUsICdcbicpIHx8IHN0cmNociAoZmlsZSwgJ1xcJykpCisgICAgICAg
ICAgICAgICAgICAgIHB1dGNoYXIgKCdcXCcpOworICAgICAgICAgICAgICAgICAgaWYgKCFmaWxl
X2lzX2JpbmFyeSkKKyAgICAgICAgICAgICAgICAgICAgcHV0Y2hhciAoJyAnKTsKKyAgICAgICAg
ICAgICAgICAgIGZwdXRzIChESUdFU1RfVFlQRV9TVFJJTkcsIHN0ZG91dCk7CisgICAgICAgICAg
ICAgICAgICBmcHV0cyAoIiAoIiwgc3Rkb3V0KTsKKyAgICAgICAgICAgICAgICAgIHByaW50X2Zp
bGVuYW1lIChmaWxlKTsKKyAgICAgICAgICAgICAgICAgIGZwdXRzICgiKSA9ICIsIHN0ZG91dCk7
CisgICAgICAgICAgICAgICAgfQorCiAgICAgICAgICAgICAgIHNpemVfdCBpOwogCiAgICAgICAg
ICAgICAgIC8qIE91dHB1dCBhIGxlYWRpbmcgYmFja3NsYXNoIGlmIHRoZSBmaWxlIG5hbWUgY29u
dGFpbnMKICAgICAgICAgICAgICAgICAgYSBuZXdsaW5lIG9yIGJhY2tzbGFzaC4gICovCi0gICAg
ICAgICAgICAgIGlmIChzdHJjaHIgKGZpbGUsICdcbicpIHx8IHN0cmNociAoZmlsZSwgJ1xcJykp
CisgICAgICAgICAgICAgIGlmICghcHJlZml4X3RhZyAmJiAoc3RyY2hyIChmaWxlLCAnXG4nKSB8
fCBzdHJjaHIgKGZpbGUsICdcXCcpKSkKICAgICAgICAgICAgICAgICBwdXRjaGFyICgnXFwnKTsK
IAogICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgKGRpZ2VzdF9oZXhfYnl0ZXMgLyAyKTsg
KytpKQogICAgICAgICAgICAgICAgIHByaW50ZiAoIiUwMngiLCBiaW5fYnVmZmVyW2ldKTsKIAot
ICAgICAgICAgICAgICBwdXRjaGFyICgnICcpOwotICAgICAgICAgICAgICBpZiAoZmlsZV9pc19i
aW5hcnkpCi0gICAgICAgICAgICAgICAgcHV0Y2hhciAoJyonKTsKLSAgICAgICAgICAgICAgZWxz
ZQotICAgICAgICAgICAgICAgIHB1dGNoYXIgKCcgJyk7Ci0KLSAgICAgICAgICAgICAgLyogVHJh
bnNsYXRlIGVhY2ggTkVXTElORSBieXRlIHRvIHRoZSBzdHJpbmcsICJcXG4iLAotICAgICAgICAg
ICAgICAgICBhbmQgZWFjaCBiYWNrc2xhc2ggdG8gIlxcXFwiLiAgKi8KLSAgICAgICAgICAgICAg
Zm9yIChpID0gMDsgaSA8IHN0cmxlbiAoZmlsZSk7ICsraSkKKyAgICAgICAgICAgICAgaWYgKCFw
cmVmaXhfdGFnKQogICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgIHN3aXRjaCAo
ZmlsZVtpXSkKLSAgICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBjYXNl
ICdcbic6Ci0gICAgICAgICAgICAgICAgICAgICAgZnB1dHMgKCJcXG4iLCBzdGRvdXQpOwotICAg
ICAgICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICAgICAgICAgIGNhc2UgJ1xc
JzoKLSAgICAgICAgICAgICAgICAgICAgICBmcHV0cyAoIlxcXFwiLCBzdGRvdXQpOwotICAgICAg
ICAgICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6Ci0g
ICAgICAgICAgICAgICAgICAgICAgcHV0Y2hhciAoZmlsZVtpXSk7Ci0gICAgICAgICAgICAgICAg
ICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgIHB1
dGNoYXIgKCcgJyk7CisKKyAgICAgICAgICAgICAgICAgIHB1dGNoYXIgKGZpbGVfaXNfYmluYXJ5
ID8gJyonIDogJyAnKTsKKworICAgICAgICAgICAgICAgICAgcHJpbnRfZmlsZW5hbWUgKGZpbGUp
OwogICAgICAgICAgICAgICAgIH0KKwogICAgICAgICAgICAgICBwdXRjaGFyICgnXG4nKTsKICAg
ICAgICAgICAgIH0KICAgICAgICAgfQpkaWZmIC0tZ2l0IGEvdGVzdHMvbWlzYy9tZDVzdW0tYnNk
IGIvdGVzdHMvbWlzYy9tZDVzdW0tYnNkCmluZGV4IDgyMjZkN2EuLjEwYjcxZjIgMTAwNzU1Ci0t
LSBhL3Rlc3RzL21pc2MvbWQ1c3VtLWJzZAorKysgYi90ZXN0cy9taXNjL21kNXN1bS1ic2QKQEAg
LTM4LDQgKzM4LDI0IEBAIG1kNXN1bSAtLXN0cmljdCAtYyBjaGVjay5tZDUgfHwgZmFpbD0xCiAj
IGFuIG9wdGlvbiB0byBhdm9pZCB0aGUgYW1iaWd1aXR5LgogdGFpbCAtbisyIGNoZWNrLm1kNSB8
IG1kNXN1bSAtLXN0cmljdCAtYyAmJiBmYWlsPTEKIAorIy0tdGFnIG9wdGlvbiB0ZXN0CisKK2Zv
ciBpIGluICdhJyAnIGInICcqYycgJ2RkJyAnICc7IGRvCisgIGVjaG8gIiRpIiA+ICIkaSIKKyAg
bWQ1c3VtIC0tdGFnICIkaSIgPj4gY2hlY2subWQ1c3VtCitkb25lCitzZWQgJ3MvICAvIC8nIGNo
ZWNrLm1kNXN1bSA+IGNoZWNrLm1kNQorCittZDVzdW0gLS1zdHJpY3QgLWMgY2hlY2subWQ1c3Vt
IHx8IGZhaWw9MQorbWQ1c3VtIC0tc3RyaWN0IC1jIGNoZWNrLm1kNSB8fCBmYWlsPTEKKworIy0t
dGFnIHRlc3RpbmcgZmlsZW5hbWVzIHdpdGggXHQgXG4gYW5kIHRyYWlsaW5nIFwKKworZm9yIGkg
aW4gJ2FcYicgJ2FcJyBhJCdcbidiIGEkJ1x0J2I7IGRvCisgIDo+ICIkaSIKKyAgbWQ1c3VtIC0t
dGFnICIkaSIgPj4gY2hlY2subWQ1c3VtCitkb25lCisKK21kNXN1bSAtLXN0cmljdCAtYyBjaGVj
ay5tZDVzdW0gfHwgZmFpbD0xCisKIEV4aXQgJGZhaWwKLS0gCjEuNy4xMS4yCgo=
------=_Part_1645271_1704551222.1343907704769--


From MAILER-DAEMON Thu Aug 02 10:52:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Swwli-0006bh-QO
	for mharc-coreutils@gnu.org; Thu, 02 Aug 2012 10:52:54 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41118)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Swwlb-0006Y7-Os
	for coreutils@gnu.org; Thu, 02 Aug 2012 10:52:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwwlX-0003Nu-O9
	for coreutils@gnu.org; Thu, 02 Aug 2012 10:52:47 -0400
Received: from mx.meyering.net ([88.168.87.75]:46528)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwwlX-0003Nq-Gd
	for coreutils@gnu.org; Thu, 02 Aug 2012 10:52:43 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 330AF600C4
	for <coreutils@gnu.org>; Thu,  2 Aug 2012 16:52:42 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH] tail: avoid rare error-path FD leak
Date: Thu, 02 Aug 2012 16:52:42 +0200
Message-ID: <87boituz0l.fsf@rho.meyering.net>
Lines: 31
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Thu, 02 Aug 2012 14:52:53 -0000

FYI,

>From 81806035310c5c16b1b11c88709bf066305ed160 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Fri, 27 Jul 2012 23:42:05 +0200
Subject: [PATCH] tail: avoid rare error-path FD leak

* src/tail.c (tail_forever): Close FD to avoid leak after a
failed fstat.
---
 src/tail.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/tail.c b/src/tail.c
index 1935605..290ada4 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -1139,10 +1139,11 @@ tail_forever (struct File_spec *f, size_t n_files, double sleep_interval)
               if (fstat (fd, &stats) != 0)
                 {
                   f[i].fd = -1;
                   f[i].errnum = errno;
                   error (0, errno, "%s", name);
+                  close (fd); /* ignore failure */
                   continue;
                 }

               if (f[i].mode == stats.st_mode
                   && (! S_ISREG (stats.st_mode) || f[i].size == stats.st_size)
--
1.7.12.rc1.10.g97c7934


From MAILER-DAEMON Thu Aug 02 11:03:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwwwH-0003rg-IL
	for mharc-coreutils@gnu.org; Thu, 02 Aug 2012 11:03:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55366)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Swww7-0003rK-96
	for coreutils@gnu.org; Thu, 02 Aug 2012 11:03:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Swww1-00073t-G0
	for coreutils@gnu.org; Thu, 02 Aug 2012 11:03:39 -0400
Received: from mx1.redhat.com ([209.132.183.28]:43482)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Swww0-00073e-VD
	for coreutils@gnu.org; Thu, 02 Aug 2012 11:03:33 -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 q72F3UNN015786
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 2 Aug 2012 11:03:30 -0400
Received: from [10.36.116.74] (ovpn-116-74.ams2.redhat.com [10.36.116.74])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q72F3SOL012362
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 2 Aug 2012 11:03:30 -0400
Message-ID: <501A96C0.5000900@draigBrady.com>
Date: Thu, 02 Aug 2012 16:03:28 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] tail: avoid rare error-path FD leak
References: <87boituz0l.fsf@rho.meyering.net>
In-Reply-To: <87boituz0l.fsf@rho.meyering.net>
X-Enigmail-Version: 1.3.2
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
	q72F3UNN015786
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 02 Aug 2012 15:03:48 -0000

On 08/02/2012 03:52 PM, Jim Meyering wrote:
> FYI,
>=20
>>From 81806035310c5c16b1b11c88709bf066305ed160 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering@redhat.com>
> Date: Fri, 27 Jul 2012 23:42:05 +0200
> Subject: [PATCH] tail: avoid rare error-path FD leak
>=20
> * src/tail.c (tail_forever): Close FD to avoid leak after a
> failed fstat.
> ---
>  src/tail.c | 1 +
>  1 file changed, 1 insertion(+)
>=20
> diff --git a/src/tail.c b/src/tail.c
> index 1935605..290ada4 100644
> --- a/src/tail.c
> +++ b/src/tail.c
> @@ -1139,10 +1139,11 @@ tail_forever (struct File_spec *f, size_t n_fil=
es, double sleep_interval)
>                if (fstat (fd, &stats) !=3D 0)
>                  {
>                    f[i].fd =3D -1;
>                    f[i].errnum =3D errno;
>                    error (0, errno, "%s", name);
> +                  close (fd); /* ignore failure */
>                    continue;
>                  }
>=20
>                if (f[i].mode =3D=3D stats.st_mode
>                    && (! S_ISREG (stats.st_mode) || f[i].size =3D=3D st=
ats.st_size)
> --
> 1.7.12.rc1.10.g97c7934
>=20
>=20

static analysis or eagle eyes?
Change looks good.

cheers,
P=E1draig


From MAILER-DAEMON Thu Aug 02 11:22:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwxDw-0000a5-89
	for mharc-coreutils@gnu.org; Thu, 02 Aug 2012 11:22:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59850)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwxDt-0000Zt-OG
	for coreutils@gnu.org; Thu, 02 Aug 2012 11:22:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwxDs-0004h5-PN
	for coreutils@gnu.org; Thu, 02 Aug 2012 11:22:01 -0400
Received: from mx.meyering.net ([88.168.87.75]:46614)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SwxDs-0004gc-Iq
	for coreutils@gnu.org; Thu, 02 Aug 2012 11:22:00 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id A5CA060441;
	Thu,  2 Aug 2012 17:21:57 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: [PATCH] tail: avoid rare error-path FD leak
In-Reply-To: <501A96C0.5000900@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?=
	=?iso-8859-1?Q?g?= Brady"'s message of
	"Thu, 02 Aug 2012 16:03:28 +0100")
References: <87boituz0l.fsf@rho.meyering.net> <501A96C0.5000900@draigBrady.com>
Date: Thu, 02 Aug 2012 17:21:57 +0200
Message-ID: <876291uxnu.fsf@rho.meyering.net>
Lines: 18
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: Genre and OS details not
	recognized.
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, 02 Aug 2012 15:22:03 -0000

P=E1draig Brady wrote:
> On 08/02/2012 03:52 PM, Jim Meyering wrote:
>> FYI,
>>
>> Subject: [PATCH] tail: avoid rare error-path FD leak
>>
>> * src/tail.c (tail_forever): Close FD to avoid leak after a
>> failed fstat.
...
> static analysis or eagle eyes?
> Change looks good.

Thanks.

I noticed it while working on another patch that I'll post soon,
to address this TODO entry:

    tail: don't use xlseek; it *exits*.


From MAILER-DAEMON Fri Aug 03 08:53:13 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxHNR-00040l-0k
	for mharc-coreutils@gnu.org; Fri, 03 Aug 2012 08:53:13 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51066)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxHNP-0003z5-3Y
	for coreutils@gnu.org; Fri, 03 Aug 2012 08:53:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxHNK-0006p3-Mq
	for coreutils@gnu.org; Fri, 03 Aug 2012 08:53:11 -0400
Received: from mx.meyering.net ([88.168.87.75]:49923)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxHNK-0006or-G8
	for coreutils@gnu.org; Fri, 03 Aug 2012 08:53:06 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 218BE60253
	for <coreutils@gnu.org>; Fri,  3 Aug 2012 14:53:05 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH] split: plug a nominal leak
Date: Fri, 03 Aug 2012 14:53:05 +0200
Message-ID: <87ipd0qgr2.fsf@rho.meyering.net>
Lines: 76
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 03 Aug 2012 12:53:12 -0000

I ran "make check" on valgrind-wrapped tools (took most of a day on a
6/12-core system) and saw split at the top of the list of "definitely lost
buffer" leaks.  So far, the only ones I've investigated are not important,
but at least now, they are plugged and will not distract us further:


>From 32f7dd1ad64165cdde0c8d90997c2a6445965c00 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Thu, 2 Aug 2012 19:31:36 +0200
Subject: [PATCH 1/2] split: free a lines/round-robin chunk processing buffer

* src/split.c (lines_rr): Plug a harmless leak.
---
 src/split.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/split.c b/src/split.c
index 7ba743c..778949f 100644
--- a/src/split.c
+++ b/src/split.c
@@ -1044,6 +1044,7 @@ no_filters:
           files[i_file].ofd = OFD_APPEND;
         }
     }
+  free (files);
 }

 #define FAIL_ONLY_ONE_WAY()					\
--
1.7.12.rc1.10.g97c7934


>From 8aaa2fb61287b92562edd0f1d1520719fb13c9ff Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Fri, 3 Aug 2012 12:20:03 +0200
Subject: [PATCH 2/2] split: plug a nominal leak

* src/split.c (main): Free a usually-small (~70KB) buffer just before
exit, mainly to take this off the radar of leak-detecting tools.
---
 src/split.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/split.c b/src/split.c
index 778949f..43cce6c 100644
--- a/src/split.c
+++ b/src/split.c
@@ -1076,7 +1076,6 @@ main (int argc, char **argv)
 {
   enum Split_type split_type = type_undef;
   size_t in_blk_size = 0;	/* optimal block size of input file device */
-  char *buf;			/* file i/o buffer */
   size_t page_size = getpagesize ();
   uintmax_t k_units = 0;
   uintmax_t n_units;
@@ -1383,7 +1382,8 @@ main (int argc, char **argv)
       file_size = MAX (file_size, n_units);
     }

-  buf = ptr_align (xmalloc (in_blk_size + 1 + page_size - 1), page_size);
+  void *b = xmalloc (in_blk_size + 1 + page_size - 1);
+  char *buf = ptr_align (b, page_size);

   /* When filtering, closure of one pipe must not terminate the process,
      as there may still be other streams expecting input from us.  */
@@ -1433,6 +1433,8 @@ main (int argc, char **argv)
       abort ();
     }

+  free (b);
+
   if (close (STDIN_FILENO) != 0)
     error (EXIT_FAILURE, errno, "%s", infile);
   closeout (NULL, output_desc, filter_pid, outfile);
--
1.7.12.rc1.10.g97c7934


From MAILER-DAEMON Fri Aug 03 10:36:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxIzq-0006Ln-PP
	for mharc-coreutils@gnu.org; Fri, 03 Aug 2012 10:36:58 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38150)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxIzk-0006LZ-4U
	for coreutils@gnu.org; Fri, 03 Aug 2012 10:36:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxIze-0000Y9-59
	for coreutils@gnu.org; Fri, 03 Aug 2012 10:36:51 -0400
Received: from mx.meyering.net ([88.168.87.75]:50205)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxIzd-0000XN-UX
	for coreutils@gnu.org; Fri, 03 Aug 2012 10:36:46 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 41B3A60096
	for <coreutils@gnu.org>; Fri,  3 Aug 2012 16:36:45 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH] tests: avoid FP ulimit failure with valgrind-wrapped tools
Date: Fri, 03 Aug 2012 16:36:45 +0200
Message-ID: <87mx2coxdu.fsf@rho.meyering.net>
Lines: 37
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 03 Aug 2012 14:36:57 -0000

All ulimit-requiring tests would be skipped
when running against valgrind-wrapped tools.
This adjusts the heuristic to avoid that:

>From 5367b398b0dc203e84e4210c647f4b03ed4dcfe2 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Thu, 2 Aug 2012 19:12:18 +0200
Subject: [PATCH] tests: avoid FP ulimit failure with valgrind-wrapped tools

* tests/init.cfg (require_ulimit_): Raise VM limit from 10MiB to
20MiB, to accommodate overhead of a valgrind-wrapped date program.
---
 tests/init.cfg | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/init.cfg b/tests/init.cfg
index c1cb92f..6c16fff 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -108,12 +108,13 @@ require_openat_support_()
 require_ulimit_()
 {
   ulimit_works=yes
-  # Expect to be able to exec a program in 10MB of virtual memory,
+  # Expect to be able to exec a program in 20MB of virtual memory,
+  # (10MB is usually plenty, but valgrind-wrapped date requires 1900KiB)
   # but not in 20KB.  I chose "date".  It must not be a shell built-in
   # function, so you can't use echo, printf, true, etc.
   # Of course, in coreutils, I could use $top_builddir/src/true,
   # but this should be able to work for other projects, too.
-  ( ulimit -v 10000; date ) > /dev/null 2>&1 || ulimit_works=no
+  ( ulimit -v 20000; date ) > /dev/null 2>&1 || ulimit_works=no
   ( ulimit -v 20;    date ) > /dev/null 2>&1 && ulimit_works=no

   test $ulimit_works = no \
--
1.7.12.rc1.10.g97c7934


From MAILER-DAEMON Fri Aug 03 10:45:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxJ82-0001UQ-F4
	for mharc-coreutils@gnu.org; Fri, 03 Aug 2012 10:45:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34020)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxJ7y-0001Te-RA
	for coreutils@gnu.org; Fri, 03 Aug 2012 10:45:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxJ7r-0004i4-SA
	for coreutils@gnu.org; Fri, 03 Aug 2012 10:45:22 -0400
Received: from mx.meyering.net ([88.168.87.75]:50227)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxJ7r-0004hq-GJ
	for coreutils@gnu.org; Fri, 03 Aug 2012 10:45:15 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id A8A8260096
	for <coreutils@gnu.org>; Fri,  3 Aug 2012 16:45:14 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH] tail: do not let failed lseek cause immediate exit
Date: Fri, 03 Aug 2012 16:45:14 +0200
Message-ID: <87haskowzp.fsf@rho.meyering.net>
Lines: 205
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 03 Aug 2012 14:45:24 -0000

Here is a proposed patch.
It's a nice-to-have change, but big and complicated enough
that it's not a shoe-in this close to a release.
I'm posting it for the record, but am inclined not to push it
until after 8.18.

Also, it doesn't have a NEWS entry, though considering how hard
it is to trigger an lseek failure on a known-open-and-valid
read-only file descriptor, maybe it doesn't deserve one.
WDYT?


>From a714f9a350a3b69aec03ee2a0c74b627d8138542 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Wed, 25 Jul 2012 18:26:35 +0200
Subject: [PATCH] tail: do not let failed lseek cause immediate exit

It is long-standing coreutils policy that an error in operating on
one of many input files must not terminate execution when it can be
useful to continue processing the remaining input files.  However,
tail has been using an lseek wrapper (xlseek) that exits upon failure.
That could make tail exit before processing all files listed on
the command line, or (with -f) make tail terminate.
* src/tail.c (xlseek): Don't exit.  Return offset or -1.
Adjust most uses.
Convert one use to a simple lseek call with diagnosed failure.
* TODO: Remove corresponding entry.
---
 TODO       |  3 ---
 src/tail.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++-------------
 2 files changed, 46 insertions(+), 16 deletions(-)

diff --git a/TODO b/TODO
index cd434e5..1326f0e 100644
--- a/TODO
+++ b/TODO
@@ -64,9 +64,6 @@ I don't plan to do that, since a few tests demonstrate no significant benefit.

 printf: consider adapting builtins/printf.def from bash

-tail: don't use xlseek; it *exits*.
-  Instead, maybe use a macro and return nonzero.
-
 tr: support nontrivial equivalence classes, e.g. [=e=] with LC_COLLATE=fr_FR

 lib/strftime.c: Since %N is the only format that we need but that
diff --git a/src/tail.c b/src/tail.c
index 290ada4..0b47453 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -430,7 +430,7 @@ dump_remainder (const char *pretty_filename, int fd, uintmax_t n_bytes)

 /* Call lseek with the specified arguments, where file descriptor FD
    corresponds to the file, FILENAME.
-   Give a diagnostic and exit nonzero if lseek fails.
+   Give a diagnostic and return -1 if lseek fails.
    Otherwise, return the resulting offset.  */

 static off_t
@@ -461,8 +461,7 @@ xlseek (int fd, off_t offset, int whence, char const *filename)
     default:
       abort ();
     }
-
-  exit (EXIT_FAILURE);
+  return new_offset;
 }

 /* Print the last N_LINES lines from the end of file FD.
@@ -493,7 +492,8 @@ file_lines (const char *pretty_filename, int fd, uintmax_t n_lines,
   /* Make 'pos' a multiple of 'BUFSIZ' (0 if the file is short), so that all
      reads will be on block boundaries, which might increase efficiency.  */
   pos -= bytes_read;
-  xlseek (fd, pos, SEEK_SET, pretty_filename);
+  if (xlseek (fd, pos, SEEK_SET, pretty_filename) < 0)
+    return false;
   bytes_read = safe_read (fd, buffer, bytes_read);
   if (bytes_read == SAFE_READ_ERROR)
     {
@@ -535,13 +535,15 @@ file_lines (const char *pretty_filename, int fd, uintmax_t n_lines,
         {
           /* Not enough lines in the file; print everything from
              start_pos to the end.  */
-          xlseek (fd, start_pos, SEEK_SET, pretty_filename);
+          if (xlseek (fd, start_pos, SEEK_SET, pretty_filename) < 0)
+            return false;
           *read_pos = start_pos + dump_remainder (pretty_filename, fd,
                                                   end_pos);
           return true;
         }
       pos -= BUFSIZ;
-      xlseek (fd, pos, SEEK_SET, pretty_filename);
+      if (xlseek (fd, pos, SEEK_SET, pretty_filename) < 0)
+        return false;

       bytes_read = safe_read (fd, buffer, BUFSIZ);
       if (bytes_read == SAFE_READ_ERROR)
@@ -1050,7 +1052,14 @@ recheck (struct File_spec *f, bool blocking)
     {
       /* Start at the beginning of the file.  */
       record_open_fd (f, fd, 0, &new_stats, (is_stdin ? -1 : blocking));
-      xlseek (fd, 0, SEEK_SET, pretty_name (f));
+      if (xlseek (fd, 0, SEEK_SET, pretty_name (f)) < 0)
+        {
+          f->errnum = -1;
+          f->ignore = true;
+          close_fd (fd, pretty_name (f));
+          close_fd (f->fd, pretty_name (f));
+          f->fd = -1;
+        }
     }
 }

@@ -1172,7 +1181,15 @@ tail_forever (struct File_spec *f, size_t n_files, double sleep_interval)
                 {
                   error (0, 0, _("%s: file truncated"), name);
                   last = i;
-                  xlseek (fd, stats.st_size, SEEK_SET, name);
+                  if (lseek (fd, stats.st_size, SEEK_SET) < 0)
+                    {
+                      f[i].errnum = errno;
+                      f[i].fd = -1;
+                      error (0, errno,
+                             _("%s: failed to lseek to new end of file"), name);
+                      close (fd); /* ignore failure */
+                      continue;
+                    }
                   f[i].size = stats.st_size;
                   continue;
                 }
@@ -1286,8 +1303,14 @@ check_fspec (struct File_spec *fspec, int wd, int *prev_wd)
   if (S_ISREG (fspec->mode) && stats.st_size < fspec->size)
     {
       error (0, 0, _("%s: file truncated"), name);
+      if (xlseek (fspec->fd, stats.st_size, SEEK_SET, name) < 0)
+        {
+          fspec->errnum = errno;
+          close_fd (fspec->fd, name);
+          fspec->fd = -1;
+          return;
+        }
       *prev_wd = wd;
-      xlseek (fspec->fd, stats.st_size, SEEK_SET, name);
       fspec->size = stats.st_size;
     }
   else if (S_ISREG (fspec->mode) && stats.st_size == fspec->size
@@ -1599,7 +1622,8 @@ tail_bytes (const char *pretty_filename, int fd, uintmax_t n_bytes,
       if ( ! presume_input_pipe
            && S_ISREG (stats.st_mode) && n_bytes <= OFF_T_MAX)
         {
-          xlseek (fd, n_bytes, SEEK_CUR, pretty_filename);
+          if (xlseek (fd, n_bytes, SEEK_CUR, pretty_filename) < 0)
+            return false;
           *read_pos += n_bytes;
         }
       else
@@ -1617,11 +1641,14 @@ tail_bytes (const char *pretty_filename, int fd, uintmax_t n_bytes,
         {
           off_t current_pos = xlseek (fd, 0, SEEK_CUR, pretty_filename);
           off_t end_pos = xlseek (fd, 0, SEEK_END, pretty_filename);
+          if (current_pos < 0 || end_pos < 0)
+            return false;
           off_t diff = end_pos - current_pos;
           /* Be careful here.  The current position may actually be
              beyond the end of the file.  */
           off_t bytes_remaining = diff < 0 ? 0 : diff;
           off_t nb = n_bytes;
+          off_t pos;

           if (bytes_remaining <= nb)
             {
@@ -1629,14 +1656,17 @@ tail_bytes (const char *pretty_filename, int fd, uintmax_t n_bytes,
                  more bytes than have been requested.  So reposition the
                  file pointer to the incoming current position and print
                  everything after that.  */
-              *read_pos = xlseek (fd, current_pos, SEEK_SET, pretty_filename);
+              pos = xlseek (fd, current_pos, SEEK_SET, pretty_filename);
             }
           else
             {
               /* There are more bytes remaining than were requested.
                  Back up.  */
-              *read_pos = xlseek (fd, -nb, SEEK_END, pretty_filename);
+              pos = xlseek (fd, -nb, SEEK_END, pretty_filename);
             }
+          if (pos < 0)
+            return false;
+          *read_pos = pos;
           *read_pos += dump_remainder (pretty_filename, fd, n_bytes);
         }
       else
@@ -1692,7 +1722,10 @@ tail_lines (const char *pretty_filename, int fd, uintmax_t n_lines,
              via the 'lseek (...SEEK_END)' above.  In that case, reposition
              the file pointer back to start_pos before calling pipe_lines.  */
           if (start_pos != -1)
-            xlseek (fd, start_pos, SEEK_SET, pretty_filename);
+            {
+              if (xlseek (fd, start_pos, SEEK_SET, pretty_filename) < 0)
+                return false;
+            }

           return pipe_lines (pretty_filename, fd, n_lines, read_pos);
         }
--
1.7.12.rc1.10.g97c7934


From MAILER-DAEMON Fri Aug 03 11:30:11 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxJpL-0004w8-RL
	for mharc-coreutils@gnu.org; Fri, 03 Aug 2012 11:30:11 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44856)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxJpF-0004st-B0
	for coreutils@gnu.org; Fri, 03 Aug 2012 11:30:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxJp8-00038d-VW
	for coreutils@gnu.org; Fri, 03 Aug 2012 11:30:04 -0400
Received: from mx1.redhat.com ([209.132.183.28]:38946)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxJp8-00038A-NR
	for coreutils@gnu.org; Fri, 03 Aug 2012 11:29:58 -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 q73FTuUT008096
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 3 Aug 2012 11:29:56 -0400
Received: from [10.36.116.72] (ovpn-116-72.ams2.redhat.com [10.36.116.72])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q73FTspM017175
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 3 Aug 2012 11:29:55 -0400
Message-ID: <501BEE71.7040907@draigBrady.com>
Date: Fri, 03 Aug 2012 16:29:53 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] split: plug a nominal leak
References: <87ipd0qgr2.fsf@rho.meyering.net>
In-Reply-To: <87ipd0qgr2.fsf@rho.meyering.net>
X-Enigmail-Version: 1.3.2
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
	q73FTuUT008096
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 03 Aug 2012 15:30:11 -0000

On 08/03/2012 01:53 PM, Jim Meyering wrote:
> I ran "make check" on valgrind-wrapped tools (took most of a day on a
> 6/12-core system) and saw split at the top of the list of "definitely l=
ost
> buffer" leaks.  So far, the only ones I've investigated are not importa=
nt,
> but at least now, they are plugged and will not distract us further:

Yes, these are only wasted cycles before exit().
I'd suggest wrapping in IF_LINT ();
as we do in df.c and sort.c

cheers,
P=E1draig.


From MAILER-DAEMON Fri Aug 03 19:11:57 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxR2D-0001EY-7d
	for mharc-coreutils@gnu.org; Fri, 03 Aug 2012 19:11:57 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57777)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1SxR2A-0001C5-G7
	for coreutils@gnu.org; Fri, 03 Aug 2012 19:11:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1SxR29-0004HM-1L
	for coreutils@gnu.org; Fri, 03 Aug 2012 19:11:54 -0400
Received: from moutng.kundenserver.de ([212.227.17.9]:62508)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1SxR28-0004HG-NX
	for coreutils@gnu.org; Fri, 03 Aug 2012 19:11:52 -0400
Received: from [192.168.2.108] (p4FF775E3.dip.t-dialin.net [79.247.117.227])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0MLVSQ-1Sxyzs10vy-000ZpH; Sat, 04 Aug 2012 01:11:50 +0200
Message-ID: <501C5AB4.90004@bernhard-voelker.de>
Date: Sat, 04 Aug 2012 01:11:48 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: [PATCH] df: fix exit code and ensure printing "unprocessed" msg when
	totaling
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:/OZR3qMGu8uFx5yBCYEUYwLVfmKs+E/GtifpZ+db7u3
	On4HJm57Ae72h4Qbu+mrfzEJqit6bT/ASs3AAkRgsR6uJ6mfzz
	IqTqj+LHD/PgxZYndHQQosXuRAsfuV6osCrRvdL3ZbxltjQtDc
	X9CYyS/KWkFGKLmRJso9nGRe4bpBJG+t23bJNX/afRKfzgtiGm
	8zQOjTryR/WJS3rLyWQ9ci4eqoL4cFkSqDEbuaviVTr8Iivsgs
	Ug/X6okcTNyWt/o59oCi2utDDg5xh/IYiTaaEjsS2OZew8E0Uw
	0BoThRTbwwD20YCAyBQajtzxBsdLvmhKV45yTip7Ka4YSCN6x1
	YLBg+IxALxzglq6Fk0bcT85GtPbCyt1IDcGifJA+B
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.17.9
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, 03 Aug 2012 23:11:55 -0000

sorry for the long subject.

Have a nice day,
Berny

>From e3978a7c2cd0f6da265f62809cf82174cd03d431 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Sat, 4 Aug 2012 01:09:22 +0200
Subject: [PATCH] df: fix exit code and ensure printing "unprocessed" msg when
 totaling

When the combination of the file system options with given files or
devices does not lead to output, "df --total" would exit successfully
although it should not.

Examples:
  $ df --total --type=xfs /          # when / is not an XFS file system
  $ df --total --local -t nfs  DIR   # nfs is remote per se ...
  $ df --total -t qwerty /dev/sdb5   # typo in file system type

Furthermore, "df --total" would not print the error message "no file
systems processed" when the file argument does not exist or is otherwise
not accessible.

Example:
  $ df --total __not_exist__

These 2 bugs are present since --total was added by commit
v6.12-166-gea2887b.

* src/df.c (get_dev): Do not set file_systems_processed to true when
force_fsu is true, i.e. when the row for the "total" line is processed.
* tests/df/total-unprocessed: Add a new test.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the fix.
---
 NEWS                       |    7 +++++++
 src/df.c                   |    3 ++-
 tests/Makefile.am          |    1 +
 tests/df/total-unprocessed |   38 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 48 insertions(+), 1 deletions(-)
 create mode 100755 tests/df/total-unprocessed

diff --git a/NEWS b/NEWS
index f1255ea..2ad5fc2 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,13 @@ GNU coreutils NEWS                                    -*- outline -*-
   lines output by df, can work reliably.
   [This bug was present in "the beginning".]

+  df --total would exit 0 when the include/exclude FS options do not
+  lead to a processed file system. Now it exits with the appropriate
+  error code.
+  Furthermore, df --total would not print "no file systems processed"
+  when it should.
+  [This bug dates back to when --total was added in coreutils-7.0]
+
   head --lines=-N (-n-N) now resets the read pointer of a seekable input file.
   This means that "head -n-3" no longer consumes all of its input, and lines
   not output by head may be processed by other programs.  For example, this
diff --git a/src/df.c b/src/df.c
index 5dc3d2d..f7e481e 100644
--- a/src/df.c
+++ b/src/df.c
@@ -515,7 +515,8 @@ get_dev (char const *disk, char const *mount_point,

   if (! file_systems_processed)
     {
-      file_systems_processed = true;
+      if (! force_fsu)
+        file_systems_processed = true;
       get_header ();
     }

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4e7ea58..edc04b4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -375,6 +375,7 @@ TESTS =						\
   df/header					\
   df/df-P					\
   df/unreadable					\
+  df/total-unprocessed				\
   dd/direct					\
   dd/misc					\
   dd/nocache					\
diff --git a/tests/df/total-unprocessed b/tests/df/total-unprocessed
new file mode 100755
index 0000000..f4b9934
--- /dev/null
+++ b/tests/df/total-unprocessed
@@ -0,0 +1,38 @@
+#!/bin/sh
+# Ensure that df exits non-Zero and writes an error message when
+# --total is used but no filesystem has been processed.
+
+
+# Copyright (C) 2012 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+print_ver_ df
+
+cat <<\EOF > exp || fail=1
+df: no file systems processed
+EOF
+
+# The following simply finds no match for the combination
+# of the options --local and FS-type nfs together with the
+# argument ".". It must exit non-Zero nonetheless.
+df --local -t nfs --total "." 2>out && fail=1
+compare exp out || fail=1
+
+# Ensure that df writes the error message also in the following case.
+df --total _does_not_exist_ 2>out2 && fail=1
+compare exp out2 || fail=1
+
+Exit $fail
-- 
1.7.7




From MAILER-DAEMON Sat Aug 04 05:06:11 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxaJH-00008K-3r
	for mharc-coreutils@gnu.org; Sat, 04 Aug 2012 05:06:11 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39543)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxaJE-00005l-L5
	for coreutils@gnu.org; Sat, 04 Aug 2012 05:06:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxaJD-0003M4-Mz
	for coreutils@gnu.org; Sat, 04 Aug 2012 05:06:08 -0400
Received: from mx.meyering.net ([88.168.87.75]:53027)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxaJD-0003Ln-Fh
	for coreutils@gnu.org; Sat, 04 Aug 2012 05:06:07 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id C10A760098
	for <coreutils@gnu.org>; Sat,  4 Aug 2012 11:06:06 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH] truncate: don't leak a file descriptor with --ref=PIPE
Date: Sat, 04 Aug 2012 11:06:06 +0200
Message-ID: <87r4rnni0x.fsf@rho.meyering.net>
Lines: 32
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Sat, 04 Aug 2012 09:06:09 -0000

FYI,

>From 0ee727e612ae202e5b47e39062f6604d65a76074 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Sat, 4 Aug 2012 11:02:40 +0200
Subject: [PATCH] truncate: don't leak a file descriptor with --ref=PIPE

* src/truncate.c (main): For a user who makes the mistake of
using a non-seekable file as a reference for the desired length,
truncate would open that file, attempt to seek to its end, but
upon seek failure would neglect to close the file descriptor.
Reverse conjuncts, so the close is unconditional.
Spotted by coverity.
---
 src/truncate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/truncate.c b/src/truncate.c
index c1e9666..6e1747d 100644
--- a/src/truncate.c
+++ b/src/truncate.c
@@ -370,7 +370,7 @@ main (int argc, char **argv)
           if (0 <= ref_fd)
             {
               off_t file_end = lseek (ref_fd, 0, SEEK_END);
-              if (0 <= file_end && close (ref_fd) == 0)
+              if (close (ref_fd) == 0 && 0 <= file_end)
                 file_size = file_end;
             }
         }
--
1.7.12.rc1.10.g97c7934


From MAILER-DAEMON Sat Aug 04 05:12:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxaPS-0000zL-04
	for mharc-coreutils@gnu.org; Sat, 04 Aug 2012 05:12:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46024)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxaPQ-0000yc-0j
	for coreutils@gnu.org; Sat, 04 Aug 2012 05:12:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxaPO-0005Er-S7
	for coreutils@gnu.org; Sat, 04 Aug 2012 05:12:31 -0400
Received: from mx.meyering.net ([88.168.87.75]:53047)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxaPO-0005Ej-KJ
	for coreutils@gnu.org; Sat, 04 Aug 2012 05:12:30 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 9A98060098;
	Sat,  4 Aug 2012 11:12:29 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: [PATCH] split: plug a nominal leak
In-Reply-To: <501BEE71.7040907@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?=
	=?iso-8859-1?Q?g?= Brady"'s message of
	"Fri, 03 Aug 2012 16:29:53 +0100")
References: <87ipd0qgr2.fsf@rho.meyering.net> <501BEE71.7040907@draigBrady.com>
Date: Sat, 04 Aug 2012 11:12:29 +0200
Message-ID: <87k3xfnhqa.fsf@rho.meyering.net>
Lines: 73
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: Genre and OS details not
	recognized.
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, 04 Aug 2012 09:12:33 -0000

P=E1draig Brady wrote:
> On 08/03/2012 01:53 PM, Jim Meyering wrote:
>> I ran "make check" on valgrind-wrapped tools (took most of a day on a
>> 6/12-core system) and saw split at the top of the list of "definitely lo=
st
>> buffer" leaks.  So far, the only ones I've investigated are not importan=
t,
>> but at least now, they are plugged and will not distract us further:
>
> Yes, these are only wasted cycles before exit().
> I'd suggest wrapping in IF_LINT ();
> as we do in df.c and sort.c

Good point.  Thanks for the reminder.
I've also combined those two into a single commit:

>From e85aab8c33abcfe32bf46fa97c214baa9a60b7cd Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Thu, 2 Aug 2012 19:31:36 +0200
Subject: [PATCH] split: plug nominal leaks
MIME-Version: 1.0
Content-Type: text/plain; charset=3DUTF-8
Content-Transfer-Encoding: 8bit

* src/split.c (lines_rr) [IF_LINT]: Plug a harmless leak.
(main) [IF_LINT]: Free a usually-small (~70KB) buffer
just before exit, mainly to take this off the radar of
leak-detecting tools.

Improved-by: P=E1draig Brady.
---
 src/split.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/split.c b/src/split.c
index 7ba743c..d1037ec 100644
--- a/src/split.c
+++ b/src/split.c
@@ -1044,6 +1044,7 @@ no_filters:
           files[i_file].ofd =3D OFD_APPEND;
         }
     }
+  IF_LINT (free (files));
 }

 #define FAIL_ONLY_ONE_WAY()					\
@@ -1075,7 +1076,6 @@ main (int argc, char **argv)
 {
   enum Split_type split_type =3D type_undef;
   size_t in_blk_size =3D 0;	/* optimal block size of input file device */
-  char *buf;			/* file i/o buffer */
   size_t page_size =3D getpagesize ();
   uintmax_t k_units =3D 0;
   uintmax_t n_units;
@@ -1382,7 +1382,8 @@ main (int argc, char **argv)
       file_size =3D MAX (file_size, n_units);
     }

-  buf =3D ptr_align (xmalloc (in_blk_size + 1 + page_size - 1), page_size);
+  void *b =3D xmalloc (in_blk_size + 1 + page_size - 1);
+  char *buf =3D ptr_align (b, page_size);

   /* When filtering, closure of one pipe must not terminate the process,
      as there may still be other streams expecting input from us.  */
@@ -1432,6 +1433,8 @@ main (int argc, char **argv)
       abort ();
     }

+  IF_LINT (free (b));
+
   if (close (STDIN_FILENO) !=3D 0)
     error (EXIT_FAILURE, errno, "%s", infile);
   closeout (NULL, output_desc, filter_pid, outfile);
--
1.7.12.rc1.10.g97c7934


From MAILER-DAEMON Sat Aug 04 05:16:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxaTg-0001Y1-F5
	for mharc-coreutils@gnu.org; Sat, 04 Aug 2012 05:16:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41248)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxaTe-0001Xk-E9
	for coreutils@gnu.org; Sat, 04 Aug 2012 05:16:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxaTd-0006d0-Fm
	for coreutils@gnu.org; Sat, 04 Aug 2012 05:16:54 -0400
Received: from mx1.redhat.com ([209.132.183.28]:56603)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxaTd-0006cm-7I
	for coreutils@gnu.org; Sat, 04 Aug 2012 05:16:53 -0400
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 q749GqV2014880
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Sat, 4 Aug 2012 05:16:52 -0400
Received: from [10.36.116.20] (ovpn-116-20.ams2.redhat.com [10.36.116.20])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q749Gnqx029783
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Sat, 4 Aug 2012 05:16:51 -0400
Message-ID: <501CE881.10705@draigBrady.com>
Date: Sat, 04 Aug 2012 10:16:49 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] split: plug a nominal leak
References: <87ipd0qgr2.fsf@rho.meyering.net> <501BEE71.7040907@draigBrady.com>
	<87k3xfnhqa.fsf@rho.meyering.net>
In-Reply-To: <87k3xfnhqa.fsf@rho.meyering.net>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
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
	q749GqV2014880
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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: Sat, 04 Aug 2012 09:16:56 -0000

On 08/04/2012 10:12 AM, Jim Meyering wrote:
> P=E1draig Brady wrote:
>> On 08/03/2012 01:53 PM, Jim Meyering wrote:
>>> I ran "make check" on valgrind-wrapped tools (took most of a day on a
>>> 6/12-core system) and saw split at the top of the list of "definitely=
 lost
>>> buffer" leaks.  So far, the only ones I've investigated are not impor=
tant,
>>> but at least now, they are plugged and will not distract us further:
>>
>> Yes, these are only wasted cycles before exit().
>> I'd suggest wrapping in IF_LINT ();
>> as we do in df.c and sort.c
>=20
> Good point.  Thanks for the reminder.
> I've also combined those two into a single commit:

Looks good,

cheers,
P=E1draig.


From MAILER-DAEMON Sat Aug 04 05:38:05 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sxao9-0004Ft-7w
	for mharc-coreutils@gnu.org; Sat, 04 Aug 2012 05:38:05 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48230)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sxao7-0004FG-5H
	for coreutils@gnu.org; Sat, 04 Aug 2012 05:38:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sxao6-0004CP-6T
	for coreutils@gnu.org; Sat, 04 Aug 2012 05:38:03 -0400
Received: from mx1.redhat.com ([209.132.183.28]:48593)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sxao5-0004CL-Uu
	for coreutils@gnu.org; Sat, 04 Aug 2012 05:38:02 -0400
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 q749c1DT005690
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Sat, 4 Aug 2012 05:38:01 -0400
Received: from [10.36.116.20] (ovpn-116-20.ams2.redhat.com [10.36.116.20])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q749bwQh002153
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Sat, 4 Aug 2012 05:38:00 -0400
Message-ID: <501CED76.50806@draigBrady.com>
Date: Sat, 04 Aug 2012 10:37:58 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] truncate: don't leak a file descriptor with --ref=PIPE
References: <87r4rnni0x.fsf@rho.meyering.net>
In-Reply-To: <87r4rnni0x.fsf@rho.meyering.net>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
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
	q749c1DT005690
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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: Sat, 04 Aug 2012 09:38:04 -0000

On 08/04/2012 10:06 AM, Jim Meyering wrote:
> FYI,
>=20
>>From 0ee727e612ae202e5b47e39062f6604d65a76074 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering@redhat.com>
> Date: Sat, 4 Aug 2012 11:02:40 +0200
> Subject: [PATCH] truncate: don't leak a file descriptor with --ref=3DPI=
PE
>=20
> * src/truncate.c (main): For a user who makes the mistake of
> using a non-seekable file as a reference for the desired length,
> truncate would open that file, attempt to seek to its end, but
> upon seek failure would neglect to close the file descriptor.
> Reverse conjuncts, so the close is unconditional.
> Spotted by coverity.

Cool.
Not worth a news entry because we exit() right after
(as file_size will be left at -1 in this case).

Hmm, but I just noticed that close() may clear
the errno of an lseek() failure, so we'd get
the classic "Error: success" in this case?

cheers,
P=E1draig.


From MAILER-DAEMON Sat Aug 04 06:05:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxbER-00082B-07
	for mharc-coreutils@gnu.org; Sat, 04 Aug 2012 06:05:15 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47040)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxbEO-00080O-11
	for coreutils@gnu.org; Sat, 04 Aug 2012 06:05:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxbEM-0002mf-MA
	for coreutils@gnu.org; Sat, 04 Aug 2012 06:05:11 -0400
Received: from mx.meyering.net ([88.168.87.75]:53182)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxbEM-0002mQ-BJ
	for coreutils@gnu.org; Sat, 04 Aug 2012 06:05:10 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id F36EB600BD
	for <coreutils@gnu.org>; Sat,  4 Aug 2012 12:05:07 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: Re: [PATCH] tests: avoid FP ulimit failure with valgrind-wrapped tools
In-Reply-To: <87mx2coxdu.fsf@rho.meyering.net> (Jim Meyering's message of
	"Fri, 03 Aug 2012 16:36:45 +0200")
References: <87mx2coxdu.fsf@rho.meyering.net>
Date: Sat, 04 Aug 2012 12:05:07 +0200
Message-ID: <87boirnfak.fsf@rho.meyering.net>
Lines: 130
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Sat, 04 Aug 2012 10:05:13 -0000

Jim Meyering wrote:
> All ulimit-requiring tests would be skipped
> when running against valgrind-wrapped tools.
> This adjusts the heuristic to avoid that:
>
> Subject: [PATCH] tests: avoid FP ulimit failure with valgrind-wrapped tools
>
> * tests/init.cfg (require_ulimit_): Raise VM limit from 10MiB to
> 20MiB, to accommodate overhead of a valgrind-wrapped date program.
> ---
>  tests/init.cfg | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/init.cfg b/tests/init.cfg
> index c1cb92f..6c16fff 100644
> --- a/tests/init.cfg
> +++ b/tests/init.cfg
> @@ -108,12 +108,13 @@ require_openat_support_()
>  require_ulimit_()
>  {
>    ulimit_works=yes
> -  # Expect to be able to exec a program in 10MB of virtual memory,
> +  # Expect to be able to exec a program in 20MB of virtual memory,
> +  # (10MB is usually plenty, but valgrind-wrapped date requires 1900KiB)
>    # but not in 20KB.  I chose "date".  It must not be a shell built-in
>    # function, so you can't use echo, printf, true, etc.
>    # Of course, in coreutils, I could use $top_builddir/src/true,
>    # but this should be able to work for other projects, too.
> -  ( ulimit -v 10000; date ) > /dev/null 2>&1 || ulimit_works=no
> +  ( ulimit -v 20000; date ) > /dev/null 2>&1 || ulimit_works=no
>    ( ulimit -v 20;    date ) > /dev/null 2>&1 && ulimit_works=no

I realized that I shouldn't be relaxing this test unconditionally.
Think about it... how often do people test valgrind-wrap tools?
Almost never ;-)

Instead, relax it only when it looks like we're running under valgrind.
Currently I see this added to the environment when run via valgrind:

  LD_PRELOAD=/usr/lib64/valgrind/vgpreload_core-amd64-linux.so:/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so

So I'm amending the patch above with the following.
Full patch below.

>From 2ae9e7228c77f326f59c3a125030380a382b5a9b Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Sat, 4 Aug 2012 11:31:35 +0200
Subject: [PATCH] maint: init.cfg for ulimit

---
 tests/init.cfg | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/tests/init.cfg b/tests/init.cfg
index 6c16fff..506c9b3 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -107,15 +107,19 @@ require_openat_support_()

 require_ulimit_()
 {
-  ulimit_works=yes
-  # Expect to be able to exec a program in 20MB of virtual memory,
-  # (10MB is usually plenty, but valgrind-wrapped date requires 1900KiB)
-  # but not in 20KB.  I chose "date".  It must not be a shell built-in
+  local ulimit_works=yes
+  # Expect to be able to exec a program in 10MiB of virtual memory,
+  # (10MiB is usually plenty, but valgrind-wrapped date requires 19000KiB,
+  # so allow more in that case)
+  # but not in 20KiB.  I chose "date".  It must not be a shell built-in
   # function, so you can't use echo, printf, true, etc.
   # Of course, in coreutils, I could use $top_builddir/src/true,
   # but this should be able to work for other projects, too.
-  ( ulimit -v 20000; date ) > /dev/null 2>&1 || ulimit_works=no
-  ( ulimit -v 20;    date ) > /dev/null 2>&1 && ulimit_works=no
+  local vm
+  case $(printenv LD_PRELOAD) in */valgrind/*) vm=22000;; *) vm=10000;; esac
+
+  ( ulimit -v $vm; date ) > /dev/null 2>&1 || ulimit_works=no
+  ( ulimit -v 20;  date ) > /dev/null 2>&1 && ulimit_works=no

   test $ulimit_works = no \
     && skip_ "this shell lacks ulimit support"
--
1.7.12.rc1.10.g97c7934


>From 4bee223d96fe34fd5290575ddb6eba7c9c7d7418 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Thu, 2 Aug 2012 19:12:18 +0200
Subject: [PATCH] tests: avoid FP ulimit failure with valgrind-wrapped tools

* tests/init.cfg (require_ulimit_): Raise VM limit from 10MiB to
20MiB, to accommodate overhead of a valgrind-wrapped date program.
Also declare this function's local variables "local".
---
 tests/init.cfg | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/tests/init.cfg b/tests/init.cfg
index c1cb92f..506c9b3 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -107,14 +107,19 @@ require_openat_support_()

 require_ulimit_()
 {
-  ulimit_works=yes
-  # Expect to be able to exec a program in 10MB of virtual memory,
-  # but not in 20KB.  I chose "date".  It must not be a shell built-in
+  local ulimit_works=yes
+  # Expect to be able to exec a program in 10MiB of virtual memory,
+  # (10MiB is usually plenty, but valgrind-wrapped date requires 19000KiB,
+  # so allow more in that case)
+  # but not in 20KiB.  I chose "date".  It must not be a shell built-in
   # function, so you can't use echo, printf, true, etc.
   # Of course, in coreutils, I could use $top_builddir/src/true,
   # but this should be able to work for other projects, too.
-  ( ulimit -v 10000; date ) > /dev/null 2>&1 || ulimit_works=no
-  ( ulimit -v 20;    date ) > /dev/null 2>&1 && ulimit_works=no
+  local vm
+  case $(printenv LD_PRELOAD) in */valgrind/*) vm=22000;; *) vm=10000;; esac
+
+  ( ulimit -v $vm; date ) > /dev/null 2>&1 || ulimit_works=no
+  ( ulimit -v 20;  date ) > /dev/null 2>&1 && ulimit_works=no

   test $ulimit_works = no \
     && skip_ "this shell lacks ulimit support"
--
1.7.12.rc1.10.g97c7934


From MAILER-DAEMON Sat Aug 04 06:26:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxbZQ-00038G-4p
	for mharc-coreutils@gnu.org; Sat, 04 Aug 2012 06:26:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39220)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxbZN-00038A-Hr
	for coreutils@gnu.org; Sat, 04 Aug 2012 06:26:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxbZM-0000lC-CX
	for coreutils@gnu.org; Sat, 04 Aug 2012 06:26:53 -0400
Received: from mx.meyering.net ([88.168.87.75]:53229)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxbZM-0000l8-4c
	for coreutils@gnu.org; Sat, 04 Aug 2012 06:26:52 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 79AB3600BD;
	Sat,  4 Aug 2012 12:26:51 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: [PATCH] truncate: don't leak a file descriptor with --ref=PIPE
In-Reply-To: <501CED76.50806@draigBrady.com> (=?iso-8859-1?Q?=22P=E1draig?=
	Brady"'s message of "Sat, 04 Aug 2012 10:37:58 +0100")
References: <87r4rnni0x.fsf@rho.meyering.net> <501CED76.50806@draigBrady.com>
Date: Sat, 04 Aug 2012 12:26:51 +0200
Message-ID: <878vdvneac.fsf@rho.meyering.net>
Lines: 79
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: Genre and OS details not
	recognized.
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, 04 Aug 2012 10:26:54 -0000

P=E1draig Brady wrote:
> On 08/04/2012 10:06 AM, Jim Meyering wrote:
...
>> Subject: [PATCH] truncate: don't leak a file descriptor with --ref=3DPIPE
>>
>> * src/truncate.c (main): For a user who makes the mistake of
>> using a non-seekable file as a reference for the desired length,
>> truncate would open that file, attempt to seek to its end, but
>> upon seek failure would neglect to close the file descriptor.
>> Reverse conjuncts, so the close is unconditional.
>> Spotted by coverity.
>
> Cool.
> Not worth a news entry because we exit() right after
> (as file_size will be left at -1 in this case).
>
> Hmm, but I just noticed that close() may clear
> the errno of an lseek() failure, so we'd get
> the classic "Error: success" in this case?

Good catch.
That close call *could* technically clobber errno.
For the record, on linux it does not clear it upon success:

    $ mkfifo F && ./truncate --ref=3DF k & echo > F
    ./truncate: cannot get the size of 'F': Illegal seek

Hmm...
do we really care if the close fails for a read-only FD
for which our lseek (the important call) succeeded?

I don't think so.
How about this improved patch:

>From c1d56ce2beb1bf0f2e8232db5a3673cf95a87eb4 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Sat, 4 Aug 2012 11:02:40 +0200
Subject: [PATCH] truncate: don't leak a file descriptor with --ref=3DPIPE
MIME-Version: 1.0
Content-Type: text/plain; charset=3DUTF-8
Content-Transfer-Encoding: 8bit

* src/truncate.c (main): For a user who makes the mistake of
using a non-seekable file as a reference for the desired length,
truncate would open that file, attempt to seek to its end, but
upon seek failure would neglect to close the file descriptor.
Close the file descriptor even when lseek fails.
In addition, ignore failure to close that reference FD, since as
long as the lseek succeeds, a close failure doesn't matter.
Coverity spotted the potential FD leak.

Improved-by: P=E1draig Brady.
---
 src/truncate.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/truncate.c b/src/truncate.c
index c1e9666..d638993 100644
--- a/src/truncate.c
+++ b/src/truncate.c
@@ -370,8 +370,15 @@ main (int argc, char **argv)
           if (0 <=3D ref_fd)
             {
               off_t file_end =3D lseek (ref_fd, 0, SEEK_END);
-              if (0 <=3D file_end && close (ref_fd) =3D=3D 0)
+              int saved_errno =3D errno;
+              close (ref_fd); /* ignore failure */
+              if (0 <=3D file_end)
                 file_size =3D file_end;
+              else
+                {
+                  /* restore, in case close clobbered it. */
+                  errno =3D saved_errno;
+                }
             }
         }
       if (file_size < 0)
--
1.7.12.rc1.10.g97c7934


From MAILER-DAEMON Sat Aug 04 06:45:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxbrI-0005Zd-Hn
	for mharc-coreutils@gnu.org; Sat, 04 Aug 2012 06:45:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59835)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxbrF-0005Z7-LG
	for coreutils@gnu.org; Sat, 04 Aug 2012 06:45:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxbrE-0005Dw-J2
	for coreutils@gnu.org; Sat, 04 Aug 2012 06:45:21 -0400
Received: from mx1.redhat.com ([209.132.183.28]:16777)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxbrE-0005Di-Ar
	for coreutils@gnu.org; Sat, 04 Aug 2012 06:45:20 -0400
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 q74AjIcS029782
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Sat, 4 Aug 2012 06:45:18 -0400
Received: from [10.36.116.20] (ovpn-116-20.ams2.redhat.com [10.36.116.20])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q74AjGY6017770
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Sat, 4 Aug 2012 06:45:17 -0400
Message-ID: <501CFD3B.2080706@draigBrady.com>
Date: Sat, 04 Aug 2012 11:45:15 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] truncate: don't leak a file descriptor with --ref=PIPE
References: <87r4rnni0x.fsf@rho.meyering.net> <501CED76.50806@draigBrady.com>
	<878vdvneac.fsf@rho.meyering.net>
In-Reply-To: <878vdvneac.fsf@rho.meyering.net>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
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
	q74AjIcS029782
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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: Sat, 04 Aug 2012 10:45:22 -0000

On 08/04/2012 11:26 AM, Jim Meyering wrote:
> P=E1draig Brady wrote:
>> On 08/04/2012 10:06 AM, Jim Meyering wrote:
> ...
>>> Subject: [PATCH] truncate: don't leak a file descriptor with --ref=3D=
PIPE
>>>
>>> * src/truncate.c (main): For a user who makes the mistake of
>>> using a non-seekable file as a reference for the desired length,
>>> truncate would open that file, attempt to seek to its end, but
>>> upon seek failure would neglect to close the file descriptor.
>>> Reverse conjuncts, so the close is unconditional.
>>> Spotted by coverity.
>>
>> Cool.
>> Not worth a news entry because we exit() right after
>> (as file_size will be left at -1 in this case).
>>
>> Hmm, but I just noticed that close() may clear
>> the errno of an lseek() failure, so we'd get
>> the classic "Error: success" in this case?
>=20
> Good catch.
> That close call *could* technically clobber errno.
> For the record, on linux it does not clear it upon success:
>=20
>     $ mkfifo F && ./truncate --ref=3DF k & echo > F
>     ./truncate: cannot get the size of 'F': Illegal seek
>=20
> Hmm...
> do we really care if the close fails for a read-only FD
> for which our lseek (the important call) succeeded?
>=20
> I don't think so.
> How about this improved patch:

+1

cheers,
P=E1draig.


From MAILER-DAEMON Sat Aug 04 07:02:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sxc8C-0007yp-94
	for mharc-coreutils@gnu.org; Sat, 04 Aug 2012 07:02:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51201)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sxc7Z-0007xW-TK
	for coreutils@gnu.org; Sat, 04 Aug 2012 07:02:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sxc72-00015c-3g
	for coreutils@gnu.org; Sat, 04 Aug 2012 07:02:13 -0400
Received: from mx.meyering.net ([88.168.87.75]:53313)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sxc71-00014W-Tg
	for coreutils@gnu.org; Sat, 04 Aug 2012 07:01:40 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 6CFEB6015E;
	Sat,  4 Aug 2012 13:01:38 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: [PATCH] truncate: don't leak a file descriptor with --ref=PIPE
In-Reply-To: <501CFD3B.2080706@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?=
	=?iso-8859-1?Q?g?= Brady"'s message of
	"Sat, 04 Aug 2012 11:45:15 +0100")
References: <87r4rnni0x.fsf@rho.meyering.net> <501CED76.50806@draigBrady.com>
	<878vdvneac.fsf@rho.meyering.net> <501CFD3B.2080706@draigBrady.com>
Date: Sat, 04 Aug 2012 13:01:38 +0200
Message-ID: <871ujmor8t.fsf@rho.meyering.net>
Lines: 39
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: Genre and OS details not
	recognized.
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, 04 Aug 2012 11:02:50 -0000

P=E1draig Brady wrote:
> On 08/04/2012 11:26 AM, Jim Meyering wrote:
>> P=E1draig Brady wrote:
>>> On 08/04/2012 10:06 AM, Jim Meyering wrote:
>> ...
>>>> Subject: [PATCH] truncate: don't leak a file descriptor with --ref=3DP=
IPE
>>>>
>>>> * src/truncate.c (main): For a user who makes the mistake of
>>>> using a non-seekable file as a reference for the desired length,
>>>> truncate would open that file, attempt to seek to its end, but
>>>> upon seek failure would neglect to close the file descriptor.
>>>> Reverse conjuncts, so the close is unconditional.
>>>> Spotted by coverity.
>>>
>>> Cool.
>>> Not worth a news entry because we exit() right after
>>> (as file_size will be left at -1 in this case).
>>>
>>> Hmm, but I just noticed that close() may clear
>>> the errno of an lseek() failure, so we'd get
>>> the classic "Error: success" in this case?
>>
>> Good catch.
>> That close call *could* technically clobber errno.
>> For the record, on linux it does not clear it upon success:
>>
>>     $ mkfifo F && ./truncate --ref=3DF k & echo > F
>>     ./truncate: cannot get the size of 'F': Illegal seek
>>
>> Hmm...
>> do we really care if the close fails for a read-only FD
>> for which our lseek (the important call) succeeded?
>>
>> I don't think so.
>> How about this improved patch:
>
> +1

Thanks for all the speedy feedback!


From MAILER-DAEMON Sat Aug 04 07:13:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxcI2-0000vS-RG
	for mharc-coreutils@gnu.org; Sat, 04 Aug 2012 07:13:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33221)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxcI1-0000uH-2l
	for coreutils@gnu.org; Sat, 04 Aug 2012 07:13:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxcHz-0004Pr-Ii
	for coreutils@gnu.org; Sat, 04 Aug 2012 07:13:01 -0400
Received: from mx1.redhat.com ([209.132.183.28]:39055)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxcHz-0004Pl-Aq
	for coreutils@gnu.org; Sat, 04 Aug 2012 07:12:59 -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 q74BCtBG004198
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Sat, 4 Aug 2012 07:12:55 -0400
Received: from [10.36.116.20] (ovpn-116-20.ams2.redhat.com [10.36.116.20])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q74BCrxh020286
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Sat, 4 Aug 2012 07:12:55 -0400
Message-ID: <501D03B4.7080902@draigBrady.com>
Date: Sat, 04 Aug 2012 12:12:52 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] df: fix exit code and ensure printing "unprocessed" msg
	when totaling
References: <501C5AB4.90004@bernhard-voelker.de>
In-Reply-To: <501C5AB4.90004@bernhard-voelker.de>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
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
	q74BCtBG004198
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 04 Aug 2012 11:13:02 -0000

On 08/04/2012 12:11 AM, Bernhard Voelker wrote:
> sorry for the long subject.
>=20
> Have a nice day,
> Berny
>=20
>>From e3978a7c2cd0f6da265f62809cf82174cd03d431 Mon Sep 17 00:00:00 2001
> From: Bernhard Voelker <mail@bernhard-voelker.de>
> Date: Sat, 4 Aug 2012 01:09:22 +0200
> Subject: [PATCH] df: fix exit code and ensure printing "unprocessed" ms=
g when
>  totaling
>=20
> When the combination of the file system options with given files or
> devices does not lead to output, "df --total" would exit successfully
> although it should not.
>=20
> Examples:
>   $ df --total --type=3Dxfs /          # when / is not an XFS file syst=
em
>   $ df --total --local -t nfs  DIR   # nfs is remote per se ...
>   $ df --total -t qwerty /dev/sdb5   # typo in file system type
>=20
> Furthermore, "df --total" would not print the error message "no file
> systems processed" when the file argument does not exist or is otherwis=
e
> not accessible.
>=20
> Example:
>   $ df --total __not_exist__
>=20
> These 2 bugs are present since --total was added by commit
> v6.12-166-gea2887b.

Great stuff,
thanks for all the detail and the test.
I was half wondering if it should exit(SUCCESS) if
anything was processed, but I think your patch is best as is,
at least for consistency with df without --total, and du --total.

I'll apply in a little while, after I review fully.

cheers,
P=E1draig.


From MAILER-DAEMON Sat Aug 04 07:25:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxcTt-0002jy-Ey
	for mharc-coreutils@gnu.org; Sat, 04 Aug 2012 07:25:17 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53520)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxcTr-0002f2-1w
	for coreutils@gnu.org; Sat, 04 Aug 2012 07:25:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxcTq-0007yL-1x
	for coreutils@gnu.org; Sat, 04 Aug 2012 07:25:14 -0400
Received: from mx.meyering.net ([88.168.87.75]:53373)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxcTp-0007y9-QR
	for coreutils@gnu.org; Sat, 04 Aug 2012 07:25:13 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id D52DE600B2;
	Sat,  4 Aug 2012 13:25:12 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: [PATCH] df: fix exit code and ensure printing "unprocessed" msg
	when totaling
In-Reply-To: <501D03B4.7080902@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?=
	=?iso-8859-1?Q?g?= Brady"'s message of
	"Sat, 04 Aug 2012 12:12:52 +0100")
References: <501C5AB4.90004@bernhard-voelker.de>
	<501D03B4.7080902@draigBrady.com>
Date: Sat, 04 Aug 2012 13:25:12 +0200
Message-ID: <87vcgynbl3.fsf@rho.meyering.net>
Lines: 79
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: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
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: Sat, 04 Aug 2012 11:25:16 -0000

P=E1draig Brady wrote:
> On 08/04/2012 12:11 AM, Bernhard Voelker wrote:
...
>> Subject: [PATCH] df: fix exit code and ensure printing "unprocessed" msg=
 when
>>  totaling
>>
>> When the combination of the file system options with given files or
>> devices does not lead to output, "df --total" would exit successfully
>> although it should not.
>>
>> Examples:
>>   $ df --total --type=3Dxfs /          # when / is not an XFS file system
>>   $ df --total --local -t nfs  DIR   # nfs is remote per se ...
>>   $ df --total -t qwerty /dev/sdb5   # typo in file system type
>>
>> Furthermore, "df --total" would not print the error message "no file
>> systems processed" when the file argument does not exist or is otherwise
>> not accessible.
>>
>> Example:
>>   $ df --total __not_exist__
>>
>> These 2 bugs are present since --total was added by commit
>> v6.12-166-gea2887b.
>
> Great stuff,
> thanks for all the detail and the test.

Seconded!

> I was half wondering if it should exit(SUCCESS) if
> anything was processed, but I think your patch is best as is,
> at least for consistency with df without --total, and du --total.

I agree.

> I'll apply in a little while, after I review fully.

Here are a couple of potential changes to consider:

When there has already been a diagnostic (e.g., "no such file"),
I prefer not to print the "no file systems processed" diagnostic
since the presence of the latter may make someone miss the former
("real") error.

Also, with --total, there's no point in printing totals
when we've done nothing and are about to fail with the
"no file systems processed" diagnostic.

Of course, with these changes, the new tests would have
to be adjusted, and maybe extended.

diff --git a/src/df.c b/src/df.c
index f7e481e..b796568 100644
--- a/src/df.c
+++ b/src/df.c
@@ -1125,7 +1125,8 @@ main (int argc, char **argv)
   else
     get_all_entries ();

-  if (print_grand_total)
+  /* With --total, don't print totals if we've processed no FS.  */
+  if (print_grand_total && file_systems_processed)
     {
       if (inode_format)
         grand_fsu.fsu_blocks =3D 1;
@@ -1134,7 +1135,9 @@ main (int argc, char **argv)

   print_table ();

-  if (! file_systems_processed)
+  /* Print the "no FS processed" diagnostic only if there was no preceding
+     diagnostic, e.g., if all have been excluded.  */
+  if (exit_status =3D=3D 0 && ! file_systems_processed)
     error (EXIT_FAILURE, 0, _("no file systems processed"));

   exit (exit_status);
--
1.7.12.rc1.10.g97c7934


From MAILER-DAEMON Sat Aug 04 12:34:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxhJM-0006UV-AM
	for mharc-coreutils@gnu.org; Sat, 04 Aug 2012 12:34:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40965)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxhJK-0006UO-7Q
	for coreutils@gnu.org; Sat, 04 Aug 2012 12:34:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxhJJ-0006kS-0i
	for coreutils@gnu.org; Sat, 04 Aug 2012 12:34:42 -0400
Received: from mx1.redhat.com ([209.132.183.28]:56383)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SxhJI-0006kH-PI
	for coreutils@gnu.org; Sat, 04 Aug 2012 12:34:40 -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 q74GYYor014043
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Sat, 4 Aug 2012 12:34:35 -0400
Received: from [10.36.116.20] (ovpn-116-20.ams2.redhat.com [10.36.116.20])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q74GYUjJ021282
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Sat, 4 Aug 2012 12:34:33 -0400
Message-ID: <501D4F16.3030603@draigBrady.com>
Date: Sat, 04 Aug 2012 17:34:30 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] df: fix exit code and ensure printing "unprocessed" msg
	when totaling
References: <501C5AB4.90004@bernhard-voelker.de>
	<501D03B4.7080902@draigBrady.com> <87vcgynbl3.fsf@rho.meyering.net>
In-Reply-To: <87vcgynbl3.fsf@rho.meyering.net>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
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
	q74GYYor014043
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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: Sat, 04 Aug 2012 16:34:43 -0000

Pushed with Jim's improvement.
http://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommit;h=3D3b8139e

cheers,
P=E1draig.


From MAILER-DAEMON Sat Aug 04 12:40:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SxhPL-0007Ux-F4
	for mharc-coreutils@gnu.org; Sat, 04 Aug 2012 12:40:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35782)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxhPI-0007TD-Jz
	for coreutils@gnu.org; Sat, 04 Aug 2012 12:40:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxhPH-00008e-HG
	for coreutils@gnu.org; Sat, 04 Aug 2012 12:40:52 -0400
Received: from mx.meyering.net ([88.168.87.75]:54180)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SxhPH-00008S-AY
	for coreutils@gnu.org; Sat, 04 Aug 2012 12:40:51 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 9882D60195;
	Sat,  4 Aug 2012 18:40:50 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: [PATCH] df: fix exit code and ensure printing "unprocessed" msg
	when totaling
In-Reply-To: <501D4F16.3030603@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?=
	=?iso-8859-1?Q?g?= Brady"'s message of
	"Sat, 04 Aug 2012 17:34:30 +0100")
References: <501C5AB4.90004@bernhard-voelker.de>
	<501D03B4.7080902@draigBrady.com> <87vcgynbl3.fsf@rho.meyering.net>
	<501D4F16.3030603@draigBrady.com>
Date: Sat, 04 Aug 2012 18:40:50 +0200
Message-ID: <87hasik3u5.fsf@rho.meyering.net>
Lines: 13
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: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
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: Sat, 04 Aug 2012 16:40:53 -0000

P=E1draig Brady wrote:
> Pushed with Jim's improvement.
> http://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommit;h=3D3b8139e

I see you adjusted the test and fixed this for me:

  -  if (exit_status =3D=3D 0 && ! file_systems_processed)
  +  if (exit_status =3D=3D EXIT_SUCCESS && ! file_systems_processed)

Thanks!

With that, I think we're ready for 8.18,
though I haven't done any portability testing recently...


From MAILER-DAEMON Sun Aug 05 05:23:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sxx3Y-0000kQ-NC
	for mharc-coreutils@gnu.org; Sun, 05 Aug 2012 05:23:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50990)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sxx3X-0000kI-4U
	for coreutils@gnu.org; Sun, 05 Aug 2012 05:23:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sxx3W-0002t8-5A
	for coreutils@gnu.org; Sun, 05 Aug 2012 05:23:27 -0400
Received: from moutng.kundenserver.de ([212.227.126.186]:61015)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sxx3V-0002t1-Ro
	for coreutils@gnu.org; Sun, 05 Aug 2012 05:23:26 -0400
Received: from oxbaltgw56.schlund.de (oxbaltgw56.schlund.de [172.19.246.180])
	by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis)
	id 0MK3ZF-1Sx86a1fML-002AHA; Sun, 05 Aug 2012 11:23:17 +0200
Date: Sun, 5 Aug 2012 11:23:17 +0200 (CEST)
From: Bernhard Voelker <mail@bernhard-voelker.de>
To: =?UTF-8?Q?=22P=C3=A1draig_Brady=22?= <P@draigBrady.com>, 
	Jim Meyering <jim@meyering.net>
Message-ID: <916558928.81966.1344158597578.JavaMail.open-xchange@email.1und1.de>
In-Reply-To: <87hasik3u5.fsf@rho.meyering.net>
References: <501C5AB4.90004@bernhard-voelker.de>
	<501D03B4.7080902@draigBrady.com> <87vcgynbl3.fsf@rho.meyering.net>
	<501D4F16.3030603@draigBrady.com> <87hasik3u5.fsf@rho.meyering.net>
Subject: Re: [PATCH] df: fix exit code and ensure printing "unprocessed" msg
	when totaling
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.5-Rev1
X-Provags-ID: V02:K0:Ji1Dm0P1RtH8AtPugWYg702mj15elvZkcVWVDKOstPT
	6/Ieo84iiRl6rHuOCZyMl4CTqC8wivrftZGR2XFY7NIDmYAqao
	X/WJkJw0VdK7ZsV+QPNzf7zER5+gGrX64s2gKdKTIJ0E/W97Ns
	+hTrxaOOSZEfjCysT8bMVZocNDXoWo9UTpY5rT2b4vfviJBGAz
	Zv0TPkQWqGhNr71bTDyC/9g8aEKoJALRZ5Dsof7t9aj5clpx7H
	FpDWrFw+Kj6J7i4hFITisVXvJdfUnwoYm2cLI9diAXkJrImaYj
	lo4rCawR/pPwW9qaemg2lbAWnMDU+582lprZMejwRlUCdEJJyd
	59ftuhY8qO8ZsQhahL3zc08g4Csy0sN8HIqyMW5vubmhR7eAO5
	3cz2bdo+aCImY7qZKYExL/cdcctk/nVfR7KzgCX+1uZgiR7WTy 9yiX4
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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
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: Sun, 05 Aug 2012 09:23:27 -0000




On August 4, 2012 at 6:40 PM Jim Meyering <jim@meyering.net> wrote:

>
> Thanks!
>
>

Thanks for the review and for the improvement!

Have a nice day,
Berny


From MAILER-DAEMON Sun Aug 05 09:33:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sy0xa-00087J-64
	for mharc-coreutils@gnu.org; Sun, 05 Aug 2012 09:33:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39768)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sy0xX-000872-Hq
	for coreutils@gnu.org; Sun, 05 Aug 2012 09:33:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sy0xW-00010a-K5
	for coreutils@gnu.org; Sun, 05 Aug 2012 09:33:31 -0400
Received: from mx.meyering.net ([88.168.87.75]:57170)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>)
	id 1Sy0xW-00010V-BX; Sun, 05 Aug 2012 09:33:30 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 2F734600BC;
	Sun,  5 Aug 2012 15:33:29 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: "Nelson H. F. Beebe" <beebe@math.utah.edu>
Subject: Re: coreutils-8.15.74-be17e3 build failure on FreeBSD 9.0 x86
In-Reply-To: <CMM.0.95.0.1331993442.beebe@psi.math.utah.edu> (Nelson
	H. F. Beebe's message of "Sat, 17 Mar 2012 08:10:42 -0600 (MDT)")
References: <CMM.0.95.0.1331993442.beebe@psi.math.utah.edu>
Date: Sun, 05 Aug 2012 15:33:29 +0200
Message-ID: <87zk69h39y.fsf@rho.meyering.net>
Lines: 58
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: platform-testers@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: Sun, 05 Aug 2012 13:33:32 -0000

Nelson H. F. Beebe wrote:
> My normal builds of coreutils-8.15.74-be17e3 failed on
> FreeBSD 9.0 x86 like this:
...
> That got further, then died with
>
> 	  CCLD     timeout
> 	timeout.o: In function `settimeout':
> 	/local/build/cc/coreutils-8.15.74-be17e3/src/timeout.c:118: undefined reference to `timer_create'
> 	/local/build/cc/coreutils-8.15.74-be17e3/src/timeout.c:120: undefined reference to `timer_settime'
> 	/local/build/cc/coreutils-8.15.74-be17e3/src/timeout.c:125: undefined reference to `timer_delete'
>
> I tried again with
>
> 	% make LIBS=-lpthread
>
> but the same failure occurred.
>
> Yet another try with
>
> 	% make LIBS='-lpthread -lrt'
>
> still failed; the symbols in -lrt provide these names:
>
> 	00000100 T __timer_create
> 	000000a0 T __timer_delete
> 	00000060 T __timer_getoverrun
> 	00000080 T __timer_gettime
> 	00000030 T __timer_oshandle
> 	00000040 T __timer_settime

Hi Nelson,

In preparing for coreutils-8.18, I tried to build on that same
FreeBSD 9.0 system, and it still failed just as it did for you, above.

The root cause is that you have an empty /usr/local/lib/librt.a, but
configure found that -lrt worked before it added the -L/usr/local/lib
it required in order to get a working -liconv.
The problem: using -L/usr/local/lib meant our -lrt (required for the timer_*
functions) would then resolve to the empty /usr/local/lib/librt.a:

    freebsd$ nm /usr/local/lib/librt.a

    empty.o:
    00000000 T empty

We want the one in /usr/lib:

    freebsd$ nm /usr/lib/librt.a|grep timer_c
             U __sys_ktimer_create
    00000100 T __timer_create
    00000100 W _timer_create
    00000100 W timer_create

If you simply remove the empty library, all should be well:

    rm -f /usr/local/lib/librt.a


From MAILER-DAEMON Sun Aug 05 10:29:18 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sy1pW-0006yf-NU
	for mharc-coreutils@gnu.org; Sun, 05 Aug 2012 10:29:18 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52971)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sy1pU-0006to-Bj
	for coreutils@gnu.org; Sun, 05 Aug 2012 10:29:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sy1pS-0007G8-Qs
	for coreutils@gnu.org; Sun, 05 Aug 2012 10:29:16 -0400
Received: from mx.meyering.net ([88.168.87.75]:57306)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sy1pS-0007G3-KJ
	for coreutils@gnu.org; Sun, 05 Aug 2012 10:29:14 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id E53A760178
	for <coreutils@gnu.org>; Sun,  5 Aug 2012 16:29:13 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH] tests: printf-surprise: avoid unwarranted failure on FreeBSD
	9.0
Date: Sun, 05 Aug 2012 16:29:13 +0200
Message-ID: <87mx29h0p2.fsf@rho.meyering.net>
Lines: 36
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 05 Aug 2012 14:29:17 -0000

The printf-surprise test failed on FreeBSD 9.0 not because of
a printf problem per se, but because the cost of running printf
there has just surpassed our semi-arbitrary ulimit of 10,000KiB.
Here's the fix:

>From c3b777e07d175713745a162d60acd11af427e159 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Sun, 5 Aug 2012 16:10:09 +0200
Subject: [PATCH] tests: printf-surprise: avoid unwarranted failure on FreeBSD
 9.0

* tests/misc/printf-surprise: A VM size of 10,000KiB was too
little in which to run "env printf ..." on FreeBSD 9.0-p3.
Increase it to 15,000.
---
 tests/misc/printf-surprise | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/misc/printf-surprise b/tests/misc/printf-surprise
index d15987b..b6f6275 100755
--- a/tests/misc/printf-surprise
+++ b/tests/misc/printf-surprise
@@ -55,7 +55,10 @@ mkfifo_or_skip_ fifo
 export MALLOC_PERTURB_=0

 head -c 10 fifo > out &
-( ulimit -v 10000; env $prog %20000000f 0 2>err-msg > fifo )
+
+# Choosing the virtual memory limit, 11000 is enough, but 10000 is too
+# little and provokes a "memory exhausted" diagnostic on FreeBSD 9.0-p3.
+( ulimit -v 15000; env $prog %20000000f 0 2>err-msg > fifo )
 exit=$?

 # Map this longer, and rarer, diagnostic to the common one.
--
1.7.12.rc1.10.g97c7934


From MAILER-DAEMON Sun Aug 05 14:31:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sy5bo-00074G-L1
	for mharc-coreutils@gnu.org; Sun, 05 Aug 2012 14:31:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37656)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sy5bm-00073y-4j
	for coreutils@gnu.org; Sun, 05 Aug 2012 14:31:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sy5bk-0006cK-Sg
	for coreutils@gnu.org; Sun, 05 Aug 2012 14:31:22 -0400
Received: from mx1.redhat.com ([209.132.183.28]:64900)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sy5bk-0006c7-L2
	for coreutils@gnu.org; Sun, 05 Aug 2012 14:31:20 -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 q75IVHxN014774
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <coreutils@gnu.org>; Sun, 5 Aug 2012 14:31:17 -0400
Received: from pb-n5110.redhat.com (ovpn-116-36.ams2.redhat.com [10.36.116.36])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q75IVGrY010298
	for <coreutils@gnu.org>; Sun, 5 Aug 2012 14:31:16 -0400
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: RFC: enable potential checksum output buffering improvements
Date: Sun,  5 Aug 2012 19:31:09 +0100
Message-Id: <1344191470-25541-1-git-send-email-P@draigBrady.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
	q75IVHxN014774
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 05 Aug 2012 18:31:23 -0000


Perhaps useful for some future release?

I noticed one of my scripts for processing checksums
of many small files was using lots of CPU.
In particular 'sed' was showing up in top.
I replaced 'sed' with 'tee dbg | sed' and then
tee started using the CPU.
This indicated that the previous process in the pipe
(md5sum) was causing excessive context switching.
Note the Linux kernel behavior of encouraging wakup
of the process reading from a pipe when the pipe is written to,
does seem sensible to me.
I confirmed reduced CPU usage by removing the
setvbuf(..,_IOLBF,..) call in md5sum.

Now we only use this to ensure atomic line output,
and the existing setvbuf() interface seems rich enough
to express just this requirement, by also specifying a
buffer size to use with _IOLBF.  So I proposed such
an augmentation of the stdio implementation in glibc here:
http://sourceware.org/bugzilla/show_bug.cgi?id=3D14433

This patch would enable such logic, but could
be applied at any stage.

cheers,
P=C3=A1draig.


From MAILER-DAEMON Sun Aug 05 14:31:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sy5bv-00078l-Rs
	for mharc-coreutils@gnu.org; Sun, 05 Aug 2012 14:31:31 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37703)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sy5bt-00078e-Ph
	for coreutils@gnu.org; Sun, 05 Aug 2012 14:31:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sy5br-0006eR-Tp
	for coreutils@gnu.org; Sun, 05 Aug 2012 14:31:29 -0400
Received: from mx1.redhat.com ([209.132.183.28]:47277)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sy5br-0006e4-KB
	for coreutils@gnu.org; Sun, 05 Aug 2012 14:31:27 -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 q75IVPBn025253
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Sun, 5 Aug 2012 14:31:25 -0400
Received: from pb-n5110.redhat.com (ovpn-116-36.ams2.redhat.com [10.36.116.36])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q75IVGrZ010298; Sun, 5 Aug 2012 14:31:23 -0400
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
To: coreutils@gnu.org
Subject: [PATCH] wc,*sum: indicate potentially more performant buffering
Date: Sun,  5 Aug 2012 19:31:10 +0100
Message-Id: <1344191470-25541-2-git-send-email-P@draigBrady.com>
In-Reply-To: <1344191470-25541-1-git-send-email-P@draigBrady.com>
References: <1344191470-25541-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: Genre and OS details not
	recognized.
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, 05 Aug 2012 18:31:30 -0000

We already use _IOLBF so that we output lines atomically.
However there is no need to output lines _immediately_
and doing so can cause overhead.  For example on
recent GNU/Linux systems, processes writing to a pipe,
will encourage the process reading the pipe to wake up.
Thus if processing many small files, these utilties
can induce excessive context switching.

Now the existing setvbuf() interface is rich enough
to express atomic but not immediate line output,
by specifying a size along with the _IOLBF mode.
Unfortunately glibc-2.14.1 at least just ignores a size
when specified with _IOLBF.  By introducing a size here,
we will take advantage of possible improved processing
on other or later glibc systems.

* src/cksum.c (main): Add BUFSIZ to setvbuf(..,_IOLBLF,..).
 src/md5sum.c: Likewise.
 src/sum.c: Likewise.
 src/wc.c: Likewise.
---
 src/cksum.c  |    2 +-
 src/md5sum.c |    2 +-
 src/sum.c    |    2 +-
 src/wc.c     |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/cksum.c b/src/cksum.c
index 332f41d..58b5162 100644
--- a/src/cksum.c
+++ b/src/cksum.c
@@ -292,7 +292,7 @@ main (int argc, char **argv)
 
   /* Line buffer stdout to ensure lines are written atomically and immediately
      so that processes running in parallel do not intersperse their output.  */
-  setvbuf (stdout, NULL, _IOLBF, 0);
+  setvbuf (stdout, NULL, _IOLBF, BUFSIZ);
 
   parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, Version,
                       usage, AUTHORS, (char const *) NULL);
diff --git a/src/md5sum.c b/src/md5sum.c
index f7e0849..b6ae69e 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -658,7 +658,7 @@ main (int argc, char **argv)
 
   /* Line buffer stdout to ensure lines are written atomically and immediately
      so that processes running in parallel do not intersperse their output.  */
-  setvbuf (stdout, NULL, _IOLBF, 0);
+  setvbuf (stdout, NULL, _IOLBF, BUFSIZ);
 
   while ((opt = getopt_long (argc, argv, "bctw", long_options, NULL)) != -1)
     switch (opt)
diff --git a/src/sum.c b/src/sum.c
index df01207..4fb24da 100644
--- a/src/sum.c
+++ b/src/sum.c
@@ -236,7 +236,7 @@ main (int argc, char **argv)
 
   /* Line buffer stdout to ensure lines are written atomically and immediately
      so that processes running in parallel do not intersperse their output.  */
-  setvbuf (stdout, NULL, _IOLBF, 0);
+  setvbuf (stdout, NULL, _IOLBF, BUFSIZ);
 
   have_read_stdin = false;
 
diff --git a/src/wc.c b/src/wc.c
index 5017377..17b784c 100644
--- a/src/wc.c
+++ b/src/wc.c
@@ -608,7 +608,7 @@ main (int argc, char **argv)
 
   /* Line buffer stdout to ensure lines are written atomically and immediately
      so that processes running in parallel do not intersperse their output.  */
-  setvbuf (stdout, NULL, _IOLBF, 0);
+  setvbuf (stdout, NULL, _IOLBF, BUFSIZ);
 
   print_lines = print_words = print_chars = print_bytes = false;
   print_linelength = false;
-- 
1.7.6.4



From MAILER-DAEMON Mon Aug 06 07:29:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SyLUw-0006uZ-Pr
	for mharc-coreutils@gnu.org; Mon, 06 Aug 2012 07:29:22 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49525)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SyLUu-0006uT-NM
	for coreutils@gnu.org; Mon, 06 Aug 2012 07:29:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SyLUt-0001LZ-JG
	for coreutils@gnu.org; Mon, 06 Aug 2012 07:29:20 -0400
Received: from mx4-phx2.redhat.com ([209.132.183.25]:35095)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SyLUt-0001LQ-B2
	for coreutils@gnu.org; Mon, 06 Aug 2012 07:29:19 -0400
Received: from zmail19.collab.prod.int.phx2.redhat.com
	(zmail19.collab.prod.int.phx2.redhat.com [10.5.83.22])
	by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q76BTHVm010126
	for <coreutils@gnu.org>; Mon, 6 Aug 2012 07:29:17 -0400
Date: Mon, 6 Aug 2012 07:29:17 -0400 (EDT)
From: Ondrej Oprala <ooprala@redhat.com>
To: coreutils@gnu.org
Message-ID: <430842887.95219.1344252557898.JavaMail.root@redhat.com>
In-Reply-To: <1736393714.94804.1344252217976.JavaMail.root@redhat.com>
Subject: cp preserves mode with --no-preserve=mode
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_95217_1728288999.1344252557896"
X-Originating-IP: [10.34.4.237]
X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - FF3.0 (Linux)/7.2.0_GA_2669)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 209.132.183.25
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, 06 Aug 2012 11:29:21 -0000

------=_Part_95217_1728288999.1344252557896
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Hi, I'd like to propose a fix for a bug mentioned in the redhat bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=755508
The patch adds another boolean instead of a proposed tristate, thus not
upsetting any existing code.
Also, if the behaviour proposed in the bugzilla entry when --no-preserve=mode option
is specified is correct, I think the last test in cp/link-preserve should be changed.
Shouldn't the --no-preserve=mode always create permissions of 0666 & ~umask? The test
seems to assume that a 0777 & ~umask mode should be set.

Cheers,
  Ondrej
------=_Part_95217_1728288999.1344252557896
Content-Type: application/mbox; name=DIFF
Content-Disposition: attachment; filename=DIFF
Content-Transfer-Encoding: base64

RnJvbSBkYmUxZjc3Nzc1MDM3ZjFmYmNmYzg5YTg0YTU4ZmE0OGRjYmE1YjI4IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBPbmRyZWogT3ByYWxhIDxvb3ByYWxhQHJlZGhhdC5jb20+CkRh
dGU6IE1vbiwgNiBBdWcgMjAxMiAxMzoxODoyMiArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIGNwOiBG
aXggdGhlIC0tbm8tcHJlc2VydmU9bW9kZSBvcHRpb24KCiogTkVXUzogTWVudGlvbiB0aGUgZml4
LgoqIHNyYy9jb3B5LmMgKHByZXNlcnZlX21ldGFkYXRhKTogQWRkIGEgY29uZGl0aW9uIHRvIHBy
b3Blcmx5CmhhbmRsZSB0aGUgLS1uby1wcmVzZXJ2ZT1tb2RlIG9wdGlvbi4KKiBzcmMvY29weS5o
IChzdHJ1Y3QgY3Bfb3B0aW9ucyk6IEFkZCBhIG5ldyBib29sZWFuLgoqIHNyYy9jcC5jIChjcF9v
cHRpb25faW5pdCxkZWNvZGVfcHJlc2VydmVfYXJnKTogU2V0IHRoZQpuZXcgYm9vbGVhbiB2YWx1
ZSBhY2NvcmRpbmcgdG8gc3BlY2lmaWVkIG9wdGlvbnMuCi0tLQogTkVXUyAgICAgICB8IDMgKysr
CiBzcmMvY29weS5jIHwgNSArKysrKwogc3JjL2NvcHkuaCB8IDEgKwogc3JjL2NwLmMgICB8IDIg
KysKIDQgZmlsZXMgY2hhbmdlZCwgMTEgaW5zZXJ0aW9ucygrKQoKZGlmZiAtLWdpdCBhL05FV1Mg
Yi9ORVdTCmluZGV4IGNhNDU2OGEuLmJhMzIwZTggMTAwNjQ0Ci0tLSBhL05FV1MKKysrIGIvTkVX
UwpAQCAtNCw2ICs0LDkgQEAgR05VIGNvcmV1dGlscyBORVdTICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgLSotIG91dGxpbmUgLSotCiAKICoqIEJ1ZyBmaXhlcwogCisgIGNwIC0t
bm8tcHJlc2VydmU9bW9kZSBub3cgbm8gbG9uZ2VyIHByZXNlcnZlcyB0aGUgb3JpZ2luYWwgZmls
ZSdzCisgIHBlcm1pc3Npb25zIGJ1dCBjb3JyZWN0bHkgc2V0cyBtb2RlIHNwZWNpZmllZCBieSAw
NjY2ICYgfnVtYXNrCisKICAgY2tzdW0gbm93IHByaW50cyBjaGVja3N1bXMgYXRvbWljYWxseSBz
byB0aGF0IGNvbmN1cnJlbnQKICAgcHJvY2Vzc2VzIHdpbGwgbm90IGludGVyc3BlcnNlIHRoZWly
IG91dHB1dC4KICAgW3RoZSBidWcgZGF0ZXMgYmFjayB0byB0aGUgaW5pdGlhbCBpbXBsZW1lbnRh
dGlvbl0KZGlmZiAtLWdpdCBhL3NyYy9jb3B5LmMgYi9zcmMvY29weS5jCmluZGV4IDI1NThmZWEu
LjliMjc0NmYgMTAwNjQ0Ci0tLSBhL3NyYy9jb3B5LmMKKysrIGIvc3JjL2NvcHkuYwpAQCAtMTE1
MSw2ICsxMTUxLDExIEBAIHByZXNlcnZlX21ldGFkYXRhOgogICAgICAgaWYgKHNldF9hY2wgKGRz
dF9uYW1lLCBkZXN0X2Rlc2MsIHgtPm1vZGUpICE9IDApCiAgICAgICAgIHJldHVybl92YWwgPSBm
YWxzZTsKICAgICB9CisgIGVsc2UgaWYgKHgtPmV4cGxpY2l0X25vX3ByZXNlcnZlKQorICAgIHsK
KyAgICAgIHNldF9hY2woZHN0X25hbWUsIGRlc3RfZGVzYywgMDY2NiAmIH5jYWNoZWRfdW1hc2sg
KCkpOworICAgICAgcmV0dXJuX3ZhbCA9IGZhbHNlOworICAgIH0KICAgZWxzZSBpZiAob21pdHRl
ZF9wZXJtaXNzaW9ucykKICAgICB7CiAgICAgICBvbWl0dGVkX3Blcm1pc3Npb25zICY9IH4gY2Fj
aGVkX3VtYXNrICgpOwpkaWZmIC0tZ2l0IGEvc3JjL2NvcHkuaCBiL3NyYy9jb3B5LmgKaW5kZXgg
ZDcwYzA5ZS4uZTkzMzY2YyAxMDA2NDQKLS0tIGEvc3JjL2NvcHkuaAorKysgYi9zcmMvY29weS5o
CkBAIC0xNTcsNiArMTU3LDcgQEAgc3RydWN0IGNwX29wdGlvbnMKICAgYm9vbCBwcmVzZXJ2ZV9v
d25lcnNoaXA7CiAgIGJvb2wgcHJlc2VydmVfbW9kZTsKICAgYm9vbCBwcmVzZXJ2ZV90aW1lc3Rh
bXBzOworICBib29sIGV4cGxpY2l0X25vX3ByZXNlcnZlOwogCiAgIC8qIEVuYWJsZWQgZm9yIG12
LCBhbmQgZm9yIGNwIGJ5IHRoZSAtLXByZXNlcnZlPWxpbmtzIG9wdGlvbi4KICAgICAgSWYgdHJ1
ZSwgYXR0ZW1wdCB0byBwcmVzZXJ2ZSBpbiB0aGUgZGVzdGluYXRpb24gZmlsZXMgYW55CmRpZmYg
LS1naXQgYS9zcmMvY3AuYyBiL3NyYy9jcC5jCmluZGV4IDY2NDlhZjIuLmJmNzBmOWUgMTAwNjQ0
Ci0tLSBhL3NyYy9jcC5jCisrKyBiL3NyYy9jcC5jCkBAIC03ODMsNiArNzgzLDcgQEAgY3Bfb3B0
aW9uX2luaXQgKHN0cnVjdCBjcF9vcHRpb25zICp4KQogICB4LT5wcmVzZXJ2ZV9saW5rcyA9IGZh
bHNlOwogICB4LT5wcmVzZXJ2ZV9tb2RlID0gZmFsc2U7CiAgIHgtPnByZXNlcnZlX3RpbWVzdGFt
cHMgPSBmYWxzZTsKKyAgeC0+ZXhwbGljaXRfbm9fcHJlc2VydmUgPSBmYWxzZTsKICAgeC0+cHJl
c2VydmVfc2VjdXJpdHlfY29udGV4dCA9IGZhbHNlOwogICB4LT5yZXF1aXJlX3ByZXNlcnZlX2Nv
bnRleHQgPSBmYWxzZTsKICAgeC0+cHJlc2VydmVfeGF0dHIgPSBmYWxzZTsKQEAgLTg2MCw2ICs4
NjEsNyBAQCBkZWNvZGVfcHJlc2VydmVfYXJnIChjaGFyIGNvbnN0ICphcmcsIHN0cnVjdCBjcF9v
cHRpb25zICp4LCBib29sIG9uX29mZikKICAgICAgICAgewogICAgICAgICBjYXNlIFBSRVNFUlZF
X01PREU6CiAgICAgICAgICAgeC0+cHJlc2VydmVfbW9kZSA9IG9uX29mZjsKKyAgICAgICAgICB4
LT5leHBsaWNpdF9ub19wcmVzZXJ2ZSA9IH5vbl9vZmY7CiAgICAgICAgICAgYnJlYWs7CiAKICAg
ICAgICAgY2FzZSBQUkVTRVJWRV9USU1FU1RBTVBTOgotLSAKMS43LjExLjIKCg==
------=_Part_95217_1728288999.1344252557896--


From MAILER-DAEMON Tue Aug 07 05:18:36 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Syfvw-00075f-DQ
	for mharc-coreutils@gnu.org; Tue, 07 Aug 2012 05:18:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40743)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Syfvq-00073m-Hf
	for coreutils@gnu.org; Tue, 07 Aug 2012 05:18:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Syfvi-00024s-IT
	for coreutils@gnu.org; Tue, 07 Aug 2012 05:18:30 -0400
Received: from mx.meyering.net ([88.168.87.75]:35458)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Syfvi-00024Y-BL
	for coreutils@gnu.org; Tue, 07 Aug 2012 05:18:22 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 6A7A160073;
	Tue,  7 Aug 2012 11:18:21 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: cp preserves mode with --no-preserve=mode
In-Reply-To: <430842887.95219.1344252557898.JavaMail.root@redhat.com> (Ondrej
	Oprala's message of "Mon, 6 Aug 2012 07:29:17 -0400 (EDT)")
References: <430842887.95219.1344252557898.JavaMail.root@redhat.com>
Date: Tue, 07 Aug 2012 11:18:21 +0200
Message-ID: <87pq73awma.fsf@rho.meyering.net>
Lines: 31
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Tue, 07 Aug 2012 09:18:34 -0000

Ondrej Oprala wrote:
> Hi, I'd like to propose a fix for a bug mentioned in the redhat bugzilla:
> https://bugzilla.redhat.com/show_bug.cgi?id=3D755508
> The patch adds another boolean instead of a proposed tristate, thus not
> upsetting any existing code.

Hi Ond=C5=99ej,

Thanks for working on this.
Your approach seems fine.

However, any new cp_options member must be initialized also in mv.c
and install.c.  Otherwise, it would be used uninitialized.

Also, please add a test in a new file just for this change.
That test should fail before your change and succeed with patched cp.

Finally, also adjust your commit to remove this entry from TODO:

    cp --no-preserve=3DX should not attempt to preserve attribute X
      reported by Andreas Schwab

> Also, if the behaviour proposed in the bugzilla entry when
> --no-preserve=3Dmode option
> is specified is correct, I think the last test in cp/link-preserve
> should be changed.
> Shouldn't the --no-preserve=3Dmode always create permissions of 0666 &
> ~umask? The test
> seems to assume that a 0777 & ~umask mode should be set.

I'll look at this part later.


From MAILER-DAEMON Tue Aug 07 05:47:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SygOI-0006nd-0N
	for mharc-coreutils@gnu.org; Tue, 07 Aug 2012 05:47:54 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48237)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SygOF-0006n9-TL
	for coreutils@gnu.org; Tue, 07 Aug 2012 05:47:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SygOE-0002L8-QF
	for coreutils@gnu.org; Tue, 07 Aug 2012 05:47:51 -0400
Received: from mx1.redhat.com ([209.132.183.28]:43432)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SygOE-0002Kc-IR
	for coreutils@gnu.org; Tue, 07 Aug 2012 05:47:50 -0400
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 q779lmF5018913
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <coreutils@gnu.org>; Tue, 7 Aug 2012 05:47:48 -0400
Received: from [10.36.116.69] (ovpn-116-69.ams2.redhat.com [10.36.116.69])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q779ljbD003582
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Tue, 7 Aug 2012 05:47:47 -0400
Message-ID: <5020E441.8010509@draigBrady.com>
Date: Tue, 07 Aug 2012 10:47:45 +0100
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: cp preserves mode with --no-preserve=mode
References: <430842887.95219.1344252557898.JavaMail.root@redhat.com>
In-Reply-To: <430842887.95219.1344252557898.JavaMail.root@redhat.com>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=UTF-8
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
	q779lmF5018913
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 07 Aug 2012 09:47:53 -0000

On 08/06/2012 12:29 PM, Ondrej Oprala wrote:
> Hi, I'd like to propose a fix for a bug mentioned in the redhat bugzill=
a:
> https://bugzilla.redhat.com/show_bug.cgi?id=3D755508
> The patch adds another boolean instead of a proposed tristate, thus not
> upsetting any existing code.
> Also, if the behaviour proposed in the bugzilla entry when --no-preserv=
e=3Dmode option
> is specified is correct, I think the last test in cp/link-preserve shou=
ld be changed.
> Shouldn't the --no-preserve=3Dmode always create permissions of 0666 & =
~umask? The test
> seems to assume that a 0777 & ~umask mode should be set.

I agree with the behavior and approach of the patch.
The NEWS item might be best in the "change in behavior" section?

Also this line should use logical rather than bitwise operators.

  x->explicit_no_preserve =3D ~on_off;

cheers,
P=C3=A1draig.


From MAILER-DAEMON Tue Aug 07 06:33:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SygVC-0002q6-UZ
	for mharc-coreutils@gnu.org; Tue, 07 Aug 2012 05:55:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42292)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SygVA-0002iN-8w
	for coreutils@gnu.org; Tue, 07 Aug 2012 05:55:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SygV9-0004Tp-2W
	for coreutils@gnu.org; Tue, 07 Aug 2012 05:55:00 -0400
Received: from mx.meyering.net ([88.168.87.75]:35556)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SygV8-0004Ta-Rv
	for coreutils@gnu.org; Tue, 07 Aug 2012 05:54:58 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id EA32A6029E;
	Tue,  7 Aug 2012 11:54:57 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: cp preserves mode with --no-preserve=mode
In-Reply-To: <5020E441.8010509@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?=
	=?iso-8859-1?Q?g?= Brady"'s message of
	"Tue, 07 Aug 2012 10:47:45 +0100")
References: <430842887.95219.1344252557898.JavaMail.root@redhat.com>
	<5020E441.8010509@draigBrady.com>
Date: Tue, 07 Aug 2012 11:54:57 +0200
Message-ID: <87k3xbauxa.fsf@rho.meyering.net>
Lines: 25
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: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: coreutils@gnu.org, Ondrej Oprala <ooprala@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: Tue, 07 Aug 2012 09:55:01 -0000

P=E1draig Brady wrote:
> On 08/06/2012 12:29 PM, Ondrej Oprala wrote:
>> Hi, I'd like to propose a fix for a bug mentioned in the redhat bugzilla:
>> https://bugzilla.redhat.com/show_bug.cgi?id=3D755508
>> The patch adds another boolean instead of a proposed tristate, thus not
>> upsetting any existing code.
>> Also, if the behaviour proposed in the bugzilla entry when
>> --no-preserve=3Dmode option
>> is specified is correct, I think the last test in cp/link-preserve
>> should be changed.
>> Shouldn't the --no-preserve=3Dmode always create permissions of 0666 &
>> ~umask? The test
>> seems to assume that a 0777 & ~umask mode should be set.
>
> I agree with the behavior and approach of the patch.
> The NEWS item might be best in the "change in behavior" section?

Actually, I consider it a long-standing bug that
--no-preserve=3Dmode would fail to do what its name implies.

> Also this line should use logical rather than bitwise operators.
>
>   x->explicit_no_preserve =3D ~on_off;

Good point.


From MAILER-DAEMON Tue Aug 07 06:59:47 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SyhVr-00072O-DR
	for mharc-coreutils@gnu.org; Tue, 07 Aug 2012 06:59:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57679)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SyhVp-00072I-0H
	for coreutils@gnu.org; Tue, 07 Aug 2012 06:59:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SyhVl-0000Nl-0K
	for coreutils@gnu.org; Tue, 07 Aug 2012 06:59:44 -0400
Received: from mx4-phx2.redhat.com ([209.132.183.25]:45769)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SyhVk-0000Nd-LT
	for coreutils@gnu.org; Tue, 07 Aug 2012 06:59:40 -0400
Received: from zmail19.collab.prod.int.phx2.redhat.com
	(zmail19.collab.prod.int.phx2.redhat.com [10.5.83.22])
	by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q77AxbcP010259;
	Tue, 7 Aug 2012 06:59:37 -0400
Date: Tue, 7 Aug 2012 06:59:37 -0400 (EDT)
From: Ondrej Oprala <ooprala@redhat.com>
To: Jim Meyering <jim@meyering.net>
Message-ID: <946604029.289804.1344337177346.JavaMail.root@redhat.com>
In-Reply-To: <87k3xbauxa.fsf@rho.meyering.net>
Subject: Re: cp preserves mode with --no-preserve=mode
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_289802_768646667.1344337177345"
X-Originating-IP: [10.34.4.237]
X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - FF3.0 (Linux)/7.2.0_GA_2669)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 209.132.183.25
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, 07 Aug 2012 10:59:45 -0000

------=_Part_289802_768646667.1344337177345
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Hi,
 here's the new patch. Everything should be in order now.
Cheers,
 Ondrej.
------=_Part_289802_768646667.1344337177345
Content-Type: application/mbox; name=DIFF
Content-Disposition: attachment; filename=DIFF
Content-Transfer-Encoding: base64

RnJvbSA4ZjBkZDgxYTFjMWJiZjNmNGZlNzNjYTVjZmZmNmZiYjMyMThkODcyIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBPbmRyZWogT3ByYWxhIDxvb3ByYWxhQHJlZGhhdC5jb20+CkRh
dGU6IFR1ZSwgNyBBdWcgMjAxMiAxMjo1NDo0MSArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIGNwOiBG
aXggdGhlIC0tbm8tcHJlc2VydmU9bW9kZSBvcHRpb24KCiogTkVXUzogTWVudGlvbiB0aGUgZml4
LgoqIFRPRE86IFJlbW92ZSBhbiBlbnRyeS4KKiBzcmMvY29weS5jIChwcmVzZXJ2ZV9tZXRhZGF0
YSk6IEFkZCBhIGNvbmRpdGlvbiB0byBwcm9wZXJseQpoYW5kbGUgdGhlIC0tbm8tcHJlc2VydmU9
bW9kZSBvcHRpb24uCiogc3JjL2NvcHkuaCAoc3RydWN0IGNwX29wdGlvbnMpOiBBZGQgYSBuZXcg
Ym9vbGVhbi4KKiBzcmMvY3AuYyAoY3Bfb3B0aW9uX2luaXQsZGVjb2RlX3ByZXNlcnZlX2FyZyk6
IFNldCB0aGUKbmV3IGJvb2xlYW4gdmFsdWUgYWNjb3JkaW5nIHRvIHNwZWNpZmllZCBvcHRpb25z
LgoqIHNyYy9pbnN0YWxsLmMgKHN0cnVjdCBjcF9vcHRpb25zKTogSW5pdGlhbGl6ZSB0aGUgbmV3
IGJvb2xlYW4uCiogc3JjL212LmMgKHN0cnVjdCBjcF9vcHRpb25zKTogSW5pdGlhbGl6ZSB0aGUg
bmV3IGJvb2xlYW4uCiogdGVzdHMvTWFrZWZpbGUuYW06IEFkZCBhIHRlc3QgZW50cnkuCiogdGVz
dHMvY3AvcHJlc2VydmUtbW9kZTogQWRkIGEgbmV3IHRlc3QuCi0tLQogTkVXUyAgICAgICAgICAg
ICAgICAgICB8ICAzICsrKwogVE9ETyAgICAgICAgICAgICAgICAgICB8ICAzIC0tLQogc3JjL2Nv
cHkuYyAgICAgICAgICAgICB8ICA1ICsrKysrCiBzcmMvY29weS5oICAgICAgICAgICAgIHwgIDEg
Kwogc3JjL2NwLmMgICAgICAgICAgICAgICB8ICAyICsrCiBzcmMvaW5zdGFsbC5jICAgICAgICAg
IHwgIDEgKwogc3JjL212LmMgICAgICAgICAgICAgICB8ICAxICsKIHRlc3RzL01ha2VmaWxlLmFt
ICAgICAgfCAgMSArCiB0ZXN0cy9jcC9wcmVzZXJ2ZS1tb2RlIHwgMzIgKysrKysrKysrKysrKysr
KysrKysrKysrKysrKysrKysKIDkgZmlsZXMgY2hhbmdlZCwgNDYgaW5zZXJ0aW9ucygrKSwgMyBk
ZWxldGlvbnMoLSkKIGNyZWF0ZSBtb2RlIDEwMDY0NCB0ZXN0cy9jcC9wcmVzZXJ2ZS1tb2RlCgpk
aWZmIC0tZ2l0IGEvTkVXUyBiL05FV1MKaW5kZXggY2E0NTY4YS4uYmEzMjBlOCAxMDA2NDQKLS0t
IGEvTkVXUworKysgYi9ORVdTCkBAIC00LDYgKzQsOSBAQCBHTlUgY29yZXV0aWxzIE5FV1MgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtKi0gb3V0bGluZSAtKi0KIAogKiogQnVn
IGZpeGVzCiAKKyAgY3AgLS1uby1wcmVzZXJ2ZT1tb2RlIG5vdyBubyBsb25nZXIgcHJlc2VydmVz
IHRoZSBvcmlnaW5hbCBmaWxlJ3MKKyAgcGVybWlzc2lvbnMgYnV0IGNvcnJlY3RseSBzZXRzIG1v
ZGUgc3BlY2lmaWVkIGJ5IDA2NjYgJiB+dW1hc2sKKwogICBja3N1bSBub3cgcHJpbnRzIGNoZWNr
c3VtcyBhdG9taWNhbGx5IHNvIHRoYXQgY29uY3VycmVudAogICBwcm9jZXNzZXMgd2lsbCBub3Qg
aW50ZXJzcGVyc2UgdGhlaXIgb3V0cHV0LgogICBbdGhlIGJ1ZyBkYXRlcyBiYWNrIHRvIHRoZSBp
bml0aWFsIGltcGxlbWVudGF0aW9uXQpkaWZmIC0tZ2l0IGEvVE9ETyBiL1RPRE8KaW5kZXggY2Q0
MzRlNS4uMmRjYWYwOCAxMDA2NDQKLS0tIGEvVE9ETworKysgYi9UT0RPCkBAIC00Nyw5ICs0Nyw2
IEBAIGRvYy9jb3JldXRpbHMudGV4aToKIAogbHM6IGFkZCAtLWZvcm1hdD1GT1JNQVQgb3B0aW9u
IHRoYXQgY29udHJvbHMgaG93IGVhY2ggbGluZSBpcyBwcmludGVkLgogCi1jcCAtLW5vLXByZXNl
cnZlPVggc2hvdWxkIG5vdCBhdHRlbXB0IHRvIHByZXNlcnZlIGF0dHJpYnV0ZSBYCi0gIHJlcG9y
dGVkIGJ5IEFuZHJlYXMgU2Nod2FiCi0KIGNvcHkuYzogQWRkcmVzcyB0aGUgRklYTUUtbWF5YmUg
Y29tbWVudCBpbiBjb3B5X2ludGVybmFsLgogQW5kIG9uY2UgdGhhdCdzIGRvbmUsIGFkZCBhbiBl
eGNsdXNpb24gc28gdGhhdCAnY3AgLS1saW5rJwogbm8gbG9uZ2VyIGluY3VycyB0aGUgb3Zlcmhl
YWQgb2Ygc2F2aW5nIHNyYy4gZGV2L2lubyBhbmQgZGVzdC4gZmlsZW5hbWUKZGlmZiAtLWdpdCBh
L3NyYy9jb3B5LmMgYi9zcmMvY29weS5jCmluZGV4IDI1NThmZWEuLjk1ZmZhMjYgMTAwNjQ0Ci0t
LSBhL3NyYy9jb3B5LmMKKysrIGIvc3JjL2NvcHkuYwpAQCAtMTE1MSw2ICsxMTUxLDExIEBAIHBy
ZXNlcnZlX21ldGFkYXRhOgogICAgICAgaWYgKHNldF9hY2wgKGRzdF9uYW1lLCBkZXN0X2Rlc2Ms
IHgtPm1vZGUpICE9IDApCiAgICAgICAgIHJldHVybl92YWwgPSBmYWxzZTsKICAgICB9CisgIGVs
c2UgaWYgKHgtPmV4cGxpY2l0X25vX3ByZXNlcnZlKQorICAgIHsKKyAgICAgIHNldF9hY2wgKGRz
dF9uYW1lLCBkZXN0X2Rlc2MsIDA2NjYgJiB+Y2FjaGVkX3VtYXNrICgpKTsKKyAgICAgIHJldHVy
bl92YWwgPSBmYWxzZTsKKyAgICB9CiAgIGVsc2UgaWYgKG9taXR0ZWRfcGVybWlzc2lvbnMpCiAg
ICAgewogICAgICAgb21pdHRlZF9wZXJtaXNzaW9ucyAmPSB+IGNhY2hlZF91bWFzayAoKTsKZGlm
ZiAtLWdpdCBhL3NyYy9jb3B5LmggYi9zcmMvY29weS5oCmluZGV4IGQ3MGMwOWUuLmU5MzM2NmMg
MTAwNjQ0Ci0tLSBhL3NyYy9jb3B5LmgKKysrIGIvc3JjL2NvcHkuaApAQCAtMTU3LDYgKzE1Nyw3
IEBAIHN0cnVjdCBjcF9vcHRpb25zCiAgIGJvb2wgcHJlc2VydmVfb3duZXJzaGlwOwogICBib29s
IHByZXNlcnZlX21vZGU7CiAgIGJvb2wgcHJlc2VydmVfdGltZXN0YW1wczsKKyAgYm9vbCBleHBs
aWNpdF9ub19wcmVzZXJ2ZTsKIAogICAvKiBFbmFibGVkIGZvciBtdiwgYW5kIGZvciBjcCBieSB0
aGUgLS1wcmVzZXJ2ZT1saW5rcyBvcHRpb24uCiAgICAgIElmIHRydWUsIGF0dGVtcHQgdG8gcHJl
c2VydmUgaW4gdGhlIGRlc3RpbmF0aW9uIGZpbGVzIGFueQpkaWZmIC0tZ2l0IGEvc3JjL2NwLmMg
Yi9zcmMvY3AuYwppbmRleCA2NjQ5YWYyLi44NTZhMjBmIDEwMDY0NAotLS0gYS9zcmMvY3AuYwor
KysgYi9zcmMvY3AuYwpAQCAtNzgzLDYgKzc4Myw3IEBAIGNwX29wdGlvbl9pbml0IChzdHJ1Y3Qg
Y3Bfb3B0aW9ucyAqeCkKICAgeC0+cHJlc2VydmVfbGlua3MgPSBmYWxzZTsKICAgeC0+cHJlc2Vy
dmVfbW9kZSA9IGZhbHNlOwogICB4LT5wcmVzZXJ2ZV90aW1lc3RhbXBzID0gZmFsc2U7CisgIHgt
PmV4cGxpY2l0X25vX3ByZXNlcnZlID0gZmFsc2U7CiAgIHgtPnByZXNlcnZlX3NlY3VyaXR5X2Nv
bnRleHQgPSBmYWxzZTsKICAgeC0+cmVxdWlyZV9wcmVzZXJ2ZV9jb250ZXh0ID0gZmFsc2U7CiAg
IHgtPnByZXNlcnZlX3hhdHRyID0gZmFsc2U7CkBAIC04NjAsNiArODYxLDcgQEAgZGVjb2RlX3By
ZXNlcnZlX2FyZyAoY2hhciBjb25zdCAqYXJnLCBzdHJ1Y3QgY3Bfb3B0aW9ucyAqeCwgYm9vbCBv
bl9vZmYpCiAgICAgICAgIHsKICAgICAgICAgY2FzZSBQUkVTRVJWRV9NT0RFOgogICAgICAgICAg
IHgtPnByZXNlcnZlX21vZGUgPSBvbl9vZmY7CisgICAgICAgICAgeC0+ZXhwbGljaXRfbm9fcHJl
c2VydmUgPSAhb25fb2ZmOwogICAgICAgICAgIGJyZWFrOwogCiAgICAgICAgIGNhc2UgUFJFU0VS
VkVfVElNRVNUQU1QUzoKZGlmZiAtLWdpdCBhL3NyYy9pbnN0YWxsLmMgYi9zcmMvaW5zdGFsbC5j
CmluZGV4IDg1NDQzNmEuLjI5MDQ5YWQgMTAwNjQ0Ci0tLSBhL3NyYy9pbnN0YWxsLmMKKysrIGIv
c3JjL2luc3RhbGwuYwpAQCAtMjc1LDYgKzI3NSw3IEBAIGNwX29wdGlvbl9pbml0IChzdHJ1Y3Qg
Y3Bfb3B0aW9ucyAqeCkKICAgeC0+cHJlc2VydmVfbGlua3MgPSBmYWxzZTsKICAgeC0+cHJlc2Vy
dmVfbW9kZSA9IGZhbHNlOwogICB4LT5wcmVzZXJ2ZV90aW1lc3RhbXBzID0gZmFsc2U7CisgIHgt
PmV4cGxpY2l0X25vX3ByZXNlcnZlID0gZmFsc2U7CiAgIHgtPnJlZHVjZV9kaWFnbm9zdGljcz1m
YWxzZTsKICAgeC0+ZGF0YV9jb3B5X3JlcXVpcmVkID0gdHJ1ZTsKICAgeC0+cmVxdWlyZV9wcmVz
ZXJ2ZSA9IGZhbHNlOwpkaWZmIC0tZ2l0IGEvc3JjL212LmMgYi9zcmMvbXYuYwppbmRleCBlZTJm
NWExLi41ODNmMTJhIDEwMDY0NAotLS0gYS9zcmMvbXYuYworKysgYi9zcmMvbXYuYwpAQCAtMTE3
LDYgKzExNyw3IEBAIGNwX29wdGlvbl9pbml0IChzdHJ1Y3QgY3Bfb3B0aW9ucyAqeCkKICAgeC0+
cHJlc2VydmVfbGlua3MgPSB0cnVlOwogICB4LT5wcmVzZXJ2ZV9tb2RlID0gdHJ1ZTsKICAgeC0+
cHJlc2VydmVfdGltZXN0YW1wcyA9IHRydWU7CisgIHgtPmV4cGxpY2l0X25vX3ByZXNlcnZlPSBm
YWxzZTsKICAgeC0+cHJlc2VydmVfc2VjdXJpdHlfY29udGV4dCA9IHNlbGludXhfZW5hYmxlZDsK
ICAgeC0+cmVkdWNlX2RpYWdub3N0aWNzID0gZmFsc2U7CiAgIHgtPmRhdGFfY29weV9yZXF1aXJl
ZCA9IHRydWU7CmRpZmYgLS1naXQgYS90ZXN0cy9NYWtlZmlsZS5hbSBiL3Rlc3RzL01ha2VmaWxl
LmFtCmluZGV4IGVkYzA0YjQuLjEzOWFjMjAgMTAwNjQ0Ci0tLSBhL3Rlc3RzL01ha2VmaWxlLmFt
CisrKyBiL3Rlc3RzL01ha2VmaWxlLmFtCkBAIC0zNTgsNiArMzU4LDcgQEAgVEVTVFMgPQkJCQkJ
CVwKICAgY3AvcGVybQkJCQkJXAogICBjcC9wcmVzZXJ2ZS0yCQkJCQlcCiAgIGNwL3ByZXNlcnZl
LWxpbmsJCQkJXAorICBjcC9wcmVzZXJ2ZS1tb2RlCQkJCVwKICAgY3AvcHJlc2VydmUtc2xpbmst
dGltZQkJCVwKICAgY3AvcHJvYy1zaG9ydC1yZWFkCQkJCVwKICAgY3AvcHJvYy16ZXJvLWxlbgkJ
CQlcCmRpZmYgLS1naXQgYS90ZXN0cy9jcC9wcmVzZXJ2ZS1tb2RlIGIvdGVzdHMvY3AvcHJlc2Vy
dmUtbW9kZQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi41NjgwZDhjCi0tLSAv
ZGV2L251bGwKKysrIGIvdGVzdHMvY3AvcHJlc2VydmUtbW9kZQpAQCAtMCwwICsxLDMyIEBACisj
IS9iaW4vc2gKKyMgZW5zdXJlIHRoYXQgY3AncyAtLW5vLXByZXNlcnZlPW1vZGUgd29ya3MgY29y
cmVjdGx5CisKKyMgQ29weXJpZ2h0IChDKSAyMDAyLTIwMTIgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0
aW9uLCBJbmMuCisKKyMgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVk
aXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKKyMgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBH
TlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKKyMgdGhlIEZyZWUgU29m
dHdhcmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGUgTGljZW5zZSwgb3IKKyMg
KGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4KKworIyBUaGlzIHByb2dyYW0gaXMg
ZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwKKyMgYnV0IFdJ
VEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YK
KyMgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAg
U2VlIHRoZQorIyBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLgor
CisjIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1
YmxpYyBMaWNlbnNlCisjIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtLiAgSWYgbm90LCBzZWUgPGh0
dHA6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8+LgorCisuICIke3NyY2Rpcj0ufS9pbml0LnNoIjsg
cGF0aF9wcmVwZW5kXyAuLi9zcmMKK3ByaW50X3Zlcl8gY3AKKworcm0gYSBiIGMKK3VtYXNrIDAw
MjIKK3RvdWNoIGEKK3RvdWNoIGIKK2NobW9kIDYwMCBiCitjcCAtLW5vLXByZXNlcnZlPW1vZGUg
YiBjCittb2RlX2E9JChscyAtbCBhIHwgZ2F3ayAne3ByaW50ICQxfScpCittb2RlX2M9JChscyAt
bCBjIHwgZ2F3ayAne3ByaW50ICQxfScpCit0ZXN0ICIkbW9kZV9hIiA9ICIkbW9kZV9jIiB8fCBm
YWlsPTEKKworRXhpdCAkZmFpbAotLSAKMS43LjExLjIKCg==
------=_Part_289802_768646667.1344337177345--


From MAILER-DAEMON Tue Aug 07 07:33:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Syi20-0005x0-PU
	for mharc-coreutils@gnu.org; Tue, 07 Aug 2012 07:33:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55595)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Syi1z-0005wn-F7
	for coreutils@gnu.org; Tue, 07 Aug 2012 07:33:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Syi1y-0003G4-JV
	for coreutils@gnu.org; Tue, 07 Aug 2012 07:32:59 -0400
Received: from moutng.kundenserver.de ([212.227.17.8]:63771)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Syi1y-0003FL-A1
	for coreutils@gnu.org; Tue, 07 Aug 2012 07:32:58 -0400
Received: from [192.168.2.108] (p4FF73F61.dip.t-dialin.net [79.247.63.97])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0MARiQ-1SscPp3y5S-00B6Yc; Tue, 07 Aug 2012 13:32:53 +0200
Message-ID: <5020FCE3.1050603@bernhard-voelker.de>
Date: Tue, 07 Aug 2012 13:32:51 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: cp preserves mode with --no-preserve=mode
References: <946604029.289804.1344337177346.JavaMail.root@redhat.com>
In-Reply-To: <946604029.289804.1344337177346.JavaMail.root@redhat.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:2IJxmdf91kt2U8fWT7eusNTr2mDMzSLBPbMQufwqS6C
	lepUpPWHooLk8ApXICR5KnF6wVK97tsSPsah7s8g0epwtT6gzy
	Y9lA62rmTu0Bn0f06erTT/IRY8H6apHpQUWMQbNZH85UGOh/6y
	cCgymUx1ghy6iXj6oTf827w9t2K+RR9hZwKf3ItVU7BD/9f3M8
	iiyXZt3iNw3Y8N2halz+FUssqrsRUMrksOl/eQlwk9u2X7VYn/
	ozIhBOD7U2tZncXin53ez9ESfH3FbSuZqrYdtWf0NteXjOXnu3
	5iRBu0IyHbkg7r30vPAOinRRRtOw0aX7IocayRh44VUap0VAb4
	R/a+QOmSEa7R118+Cwf/csocejlfTXqQ8OuEo831F
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.17.8
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, 07 Aug 2012 11:33:00 -0000



On 08/07/2012 12:59 PM, Ondrej Oprala wrote:
> Hi,
>  here's the new patch. Everything should be in order now.
> Cheers,
>  Ondrej.
> 

As the new variable "explicit_no_preserve" is only used for
the mode, I find its name is a bit confusing (because it's
too general).

Furthermore (and more important), the bug is not yet fixed
for directories:

  $ mkdir d
  $ chmod 705 d
  $ touch d/x
  $ chmod 405 d/x
  $ src/cp --no-preserve=mode -r d d2
  $ find d d2 -ls
  15335447    4 drwx---r-x   2 berny    users        4096 Aug  7 13:28 d
  15335450    0 -r-----r-x   1 berny    users           0 Aug  7 13:28 d/x
  15335458    4 drwx---r-x   2 berny    users        4096 Aug  7 13:28 d2
  15335471    0 -rw-r--r--   1 berny    users           0 Aug  7 13:28 d2/x

The mode of d2 should be 755.

Have a nice day,
Berny


From MAILER-DAEMON Tue Aug 07 08:27:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Syisg-0008MB-JH
	for mharc-coreutils@gnu.org; Tue, 07 Aug 2012 08:27:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51575)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Syisb-0008M5-MN
	for coreutils@gnu.org; Tue, 07 Aug 2012 08:27:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SyisX-0005J7-MF
	for coreutils@gnu.org; Tue, 07 Aug 2012 08:27:21 -0400
Received: from mx.meyering.net ([88.168.87.75]:35939)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SyisX-0005J1-F2
	for coreutils@gnu.org; Tue, 07 Aug 2012 08:27:17 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 18FE6601A9;
	Tue,  7 Aug 2012 14:27:16 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: cp preserves mode with --no-preserve=mode
In-Reply-To: <5020FCE3.1050603@bernhard-voelker.de> (Bernhard Voelker's
	message of "Tue, 07 Aug 2012 13:32:51 +0200")
References: <946604029.289804.1344337177346.JavaMail.root@redhat.com>
	<5020FCE3.1050603@bernhard-voelker.de>
Date: Tue, 07 Aug 2012 14:27:16 +0200
Message-ID: <87txweanvf.fsf@rho.meyering.net>
Lines: 31
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: coreutils@gnu.org, Ondrej Oprala <ooprala@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: Tue, 07 Aug 2012 12:27:25 -0000

Bernhard Voelker wrote:

> On 08/07/2012 12:59 PM, Ondrej Oprala wrote:
>> Hi,
>>  here's the new patch. Everything should be in order now.

> As the new variable "explicit_no_preserve" is only used for
> the mode, I find its name is a bit confusing (because it's
> too general).

Good point.
Ond=C5=99ej, please add a comment before the declaration of
the new member, named explicit_no_preserve_mode, I suppose.

> Furthermore (and more important), the bug is not yet fixed
> for directories:
>
>   $ mkdir d
>   $ chmod 705 d
>   $ touch d/x
>   $ chmod 405 d/x
>   $ src/cp --no-preserve=3Dmode -r d d2
>   $ find d d2 -ls
>   15335447    4 drwx---r-x   2 berny    users        4096 Aug  7 13:28 d
>   15335450    0 -r-----r-x   1 berny    users           0 Aug  7 13:28 d/x
>   15335458    4 drwx---r-x   2 berny    users        4096 Aug  7 13:28 d2
>   15335471    0 -rw-r--r--   1 berny    users           0 Aug  7 13:28 d2=
/x
>
> The mode of d2 should be 755.

Good catch.  Thanks!


From MAILER-DAEMON Tue Aug 07 11:02:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SylIQ-0002sK-9c
	for mharc-coreutils@gnu.org; Tue, 07 Aug 2012 11:02:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43320)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SylIG-0002qV-LR
	for coreutils@gnu.org; Tue, 07 Aug 2012 11:02:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SylI8-0004Ns-QB
	for coreutils@gnu.org; Tue, 07 Aug 2012 11:02:00 -0400
Received: from mx3-phx2.redhat.com ([209.132.183.24]:59164)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SylI8-0004N5-FB
	for coreutils@gnu.org; Tue, 07 Aug 2012 11:01:52 -0400
Received: from zmail19.collab.prod.int.phx2.redhat.com
	(zmail19.collab.prod.int.phx2.redhat.com [10.5.83.22])
	by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q77F1ljd021554;
	Tue, 7 Aug 2012 11:01:48 -0400
Date: Tue, 7 Aug 2012 11:01:47 -0400 (EDT)
From: Ondrej Oprala <ooprala@redhat.com>
To: Jim Meyering <jim@meyering.net>
Message-ID: <1292257210.332170.1344351707927.JavaMail.root@redhat.com>
In-Reply-To: <87txweanvf.fsf@rho.meyering.net>
Subject: Re: cp preserves mode with --no-preserve=mode
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_332168_631374176.1344351707925"
X-Originating-IP: [10.34.4.237]
X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - FF3.0 (Linux)/7.2.0_GA_2669)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 209.132.183.24
Cc: Padraig Brady <pbrady@redhat.com>,
	Bernhard Voelker <mail@bernhard-voelker.de>, 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, 07 Aug 2012 15:02:08 -0000

------=_Part_332168_631374176.1344351707925
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Hi, I've renamed the variable to be more hinting of it's purpose
and --no-preserve=mode should now work properly with directories
as well.
Cheers,
 Ondrej
------=_Part_332168_631374176.1344351707925
Content-Type: application/mbox; name=DIFF
Content-Disposition: attachment; filename=DIFF
Content-Transfer-Encoding: base64

RnJvbSA2OTYzYzg2MzNlYzRhOTM0NjM3NjRiNTk2MGRmYjU0MzAwNTdhOThhIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBPbmRyZWogT3ByYWxhIDxvb3ByYWxhQHJlZGhhdC5jb20+CkRh
dGU6IFR1ZSwgNyBBdWcgMjAxMiAxNjo1Njo1MiArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIGNwOiBG
aXggdGhlIC0tbm8tcHJlc2VydmU9bW9kZSBvcHRpb24KCiogTkVXUzogTWVudGlvbiB0aGUgZml4
LgoqIFRPRE86IFJlbW92ZSBhbiBlbnRyeS4KKiBzcmMvY29weS5jIChwcmVzZXJ2ZV9tZXRhZGF0
YSk6IEFkZCBhIGNvbmRpdGlvbiB0byBwcm9wZXJseQpoYW5kbGUgdGhlIC0tbm8tcHJlc2VydmU9
bW9kZSBvcHRpb24uCiogc3JjL2NvcHkuaCAoc3RydWN0IGNwX29wdGlvbnMpOiBBZGQgYSBuZXcg
Ym9vbGVhbi4KKiBzcmMvY3AuYyAoY3Bfb3B0aW9uX2luaXQsZGVjb2RlX3ByZXNlcnZlX2FyZyk6
IFNldCB0aGUKbmV3IGJvb2xlYW4gdmFsdWUgYWNjb3JkaW5nIHRvIHNwZWNpZmllZCBvcHRpb25z
LgoqIHNyYy9pbnN0YWxsLmMgKHN0cnVjdCBjcF9vcHRpb25zKTogSW5pdGlhbGl6ZSB0aGUgbmV3
IGJvb2xlYW4uCiogc3JjL212LmMgKHN0cnVjdCBjcF9vcHRpb25zKTogSW5pdGlhbGl6ZSB0aGUg
bmV3IGJvb2xlYW4uCiogdGVzdHMvTWFrZWZpbGUuYW06IEFkZCBhIHRlc3QgZW50cnkuCiogdGVz
dHMvY3AvcHJlc2VydmUtbW9kZTogQWRkIGEgbmV3IHRlc3QuCi0tLQogTkVXUyAgICAgICAgICAg
ICAgICAgICB8ICAzICsrKwogVE9ETyAgICAgICAgICAgICAgICAgICB8ICAzIC0tLQogc3JjL2Nv
cHkuYyAgICAgICAgICAgICB8IDEwICsrKysrKysrKysKIHNyYy9jb3B5LmggICAgICAgICAgICAg
fCAgMSArCiBzcmMvY3AuYyAgICAgICAgICAgICAgIHwgIDIgKysKIHNyYy9pbnN0YWxsLmMgICAg
ICAgICAgfCAgMSArCiBzcmMvbXYuYyAgICAgICAgICAgICAgIHwgIDEgKwogdGVzdHMvTWFrZWZp
bGUuYW0gICAgICB8ICAxICsKIHRlc3RzL2NwL3ByZXNlcnZlLW1vZGUgfCAzMiArKysrKysrKysr
KysrKysrKysrKysrKysrKysrKysrKwogOSBmaWxlcyBjaGFuZ2VkLCA1MSBpbnNlcnRpb25zKCsp
LCAzIGRlbGV0aW9ucygtKQogY3JlYXRlIG1vZGUgMTAwNjQ0IHRlc3RzL2NwL3ByZXNlcnZlLW1v
ZGUKCmRpZmYgLS1naXQgYS9ORVdTIGIvTkVXUwppbmRleCBjYTQ1NjhhLi5iYTMyMGU4IDEwMDY0
NAotLS0gYS9ORVdTCisrKyBiL05FV1MKQEAgLTQsNiArNCw5IEBAIEdOVSBjb3JldXRpbHMgTkVX
UyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0qLSBvdXRsaW5lIC0qLQogCiAq
KiBCdWcgZml4ZXMKIAorICBjcCAtLW5vLXByZXNlcnZlPW1vZGUgbm93IG5vIGxvbmdlciBwcmVz
ZXJ2ZXMgdGhlIG9yaWdpbmFsIGZpbGUncworICBwZXJtaXNzaW9ucyBidXQgY29ycmVjdGx5IHNl
dHMgbW9kZSBzcGVjaWZpZWQgYnkgMDY2NiAmIH51bWFzaworCiAgIGNrc3VtIG5vdyBwcmludHMg
Y2hlY2tzdW1zIGF0b21pY2FsbHkgc28gdGhhdCBjb25jdXJyZW50CiAgIHByb2Nlc3NlcyB3aWxs
IG5vdCBpbnRlcnNwZXJzZSB0aGVpciBvdXRwdXQuCiAgIFt0aGUgYnVnIGRhdGVzIGJhY2sgdG8g
dGhlIGluaXRpYWwgaW1wbGVtZW50YXRpb25dCmRpZmYgLS1naXQgYS9UT0RPIGIvVE9ETwppbmRl
eCBjZDQzNGU1Li4yZGNhZjA4IDEwMDY0NAotLS0gYS9UT0RPCisrKyBiL1RPRE8KQEAgLTQ3LDkg
KzQ3LDYgQEAgZG9jL2NvcmV1dGlscy50ZXhpOgogCiBsczogYWRkIC0tZm9ybWF0PUZPUk1BVCBv
cHRpb24gdGhhdCBjb250cm9scyBob3cgZWFjaCBsaW5lIGlzIHByaW50ZWQuCiAKLWNwIC0tbm8t
cHJlc2VydmU9WCBzaG91bGQgbm90IGF0dGVtcHQgdG8gcHJlc2VydmUgYXR0cmlidXRlIFgKLSAg
cmVwb3J0ZWQgYnkgQW5kcmVhcyBTY2h3YWIKLQogY29weS5jOiBBZGRyZXNzIHRoZSBGSVhNRS1t
YXliZSBjb21tZW50IGluIGNvcHlfaW50ZXJuYWwuCiBBbmQgb25jZSB0aGF0J3MgZG9uZSwgYWRk
IGFuIGV4Y2x1c2lvbiBzbyB0aGF0ICdjcCAtLWxpbmsnCiBubyBsb25nZXIgaW5jdXJzIHRoZSBv
dmVyaGVhZCBvZiBzYXZpbmcgc3JjLiBkZXYvaW5vIGFuZCBkZXN0LiBmaWxlbmFtZQpkaWZmIC0t
Z2l0IGEvc3JjL2NvcHkuYyBiL3NyYy9jb3B5LmMKaW5kZXggMjU1OGZlYS4uMTZhZWQwMyAxMDA2
NDQKLS0tIGEvc3JjL2NvcHkuYworKysgYi9zcmMvY29weS5jCkBAIC0xMTUxLDYgKzExNTEsMTEg
QEAgcHJlc2VydmVfbWV0YWRhdGE6CiAgICAgICBpZiAoc2V0X2FjbCAoZHN0X25hbWUsIGRlc3Rf
ZGVzYywgeC0+bW9kZSkgIT0gMCkKICAgICAgICAgcmV0dXJuX3ZhbCA9IGZhbHNlOwogICAgIH0K
KyAgZWxzZSBpZiAoeC0+ZXhwbGljaXRfbm9fcHJlc2VydmVfbW9kZSkKKyAgICB7CisgICAgICBz
ZXRfYWNsIChkc3RfbmFtZSwgZGVzdF9kZXNjLCAwNjY2ICYgfmNhY2hlZF91bWFzayAoKSk7Cisg
ICAgICByZXR1cm5fdmFsID0gZmFsc2U7CisgICAgfQogICBlbHNlIGlmIChvbWl0dGVkX3Blcm1p
c3Npb25zKQogICAgIHsKICAgICAgIG9taXR0ZWRfcGVybWlzc2lvbnMgJj0gfiBjYWNoZWRfdW1h
c2sgKCk7CkBAIC0yNTcwLDYgKzI1NzUsMTEgQEAgY29weV9pbnRlcm5hbCAoY2hhciBjb25zdCAq
c3JjX25hbWUsIGNoYXIgY29uc3QgKmRzdF9uYW1lLAogICAgICAgaWYgKHNldF9hY2wgKGRzdF9u
YW1lLCAtMSwgeC0+bW9kZSkgIT0gMCkKICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgIH0KKyAg
ZWxzZSBpZiAoeC0+ZXhwbGljaXRfbm9fcHJlc2VydmVfbW9kZSkKKyAgICB7CisgICAgICBpZiAo
c2V0X2FjbCAoZHN0X25hbWUsIC0xLCAwNzc3ICYgfmNhY2hlZF91bWFzayAoKSkgIT0gMCkKKyAg
ICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KICAgZWxzZQogICAgIHsKICAgICAgIGlmIChvbWl0
dGVkX3Blcm1pc3Npb25zKQpkaWZmIC0tZ2l0IGEvc3JjL2NvcHkuaCBiL3NyYy9jb3B5LmgKaW5k
ZXggZDcwYzA5ZS4uNDQwZDNiYiAxMDA2NDQKLS0tIGEvc3JjL2NvcHkuaAorKysgYi9zcmMvY29w
eS5oCkBAIC0xNTcsNiArMTU3LDcgQEAgc3RydWN0IGNwX29wdGlvbnMKICAgYm9vbCBwcmVzZXJ2
ZV9vd25lcnNoaXA7CiAgIGJvb2wgcHJlc2VydmVfbW9kZTsKICAgYm9vbCBwcmVzZXJ2ZV90aW1l
c3RhbXBzOworICBib29sIGV4cGxpY2l0X25vX3ByZXNlcnZlX21vZGU7CiAKICAgLyogRW5hYmxl
ZCBmb3IgbXYsIGFuZCBmb3IgY3AgYnkgdGhlIC0tcHJlc2VydmU9bGlua3Mgb3B0aW9uLgogICAg
ICBJZiB0cnVlLCBhdHRlbXB0IHRvIHByZXNlcnZlIGluIHRoZSBkZXN0aW5hdGlvbiBmaWxlcyBh
bnkKZGlmZiAtLWdpdCBhL3NyYy9jcC5jIGIvc3JjL2NwLmMKaW5kZXggNjY0OWFmMi4uZDYzODQz
YyAxMDA2NDQKLS0tIGEvc3JjL2NwLmMKKysrIGIvc3JjL2NwLmMKQEAgLTc4Myw2ICs3ODMsNyBA
QCBjcF9vcHRpb25faW5pdCAoc3RydWN0IGNwX29wdGlvbnMgKngpCiAgIHgtPnByZXNlcnZlX2xp
bmtzID0gZmFsc2U7CiAgIHgtPnByZXNlcnZlX21vZGUgPSBmYWxzZTsKICAgeC0+cHJlc2VydmVf
dGltZXN0YW1wcyA9IGZhbHNlOworICB4LT5leHBsaWNpdF9ub19wcmVzZXJ2ZV9tb2RlID0gZmFs
c2U7CiAgIHgtPnByZXNlcnZlX3NlY3VyaXR5X2NvbnRleHQgPSBmYWxzZTsKICAgeC0+cmVxdWly
ZV9wcmVzZXJ2ZV9jb250ZXh0ID0gZmFsc2U7CiAgIHgtPnByZXNlcnZlX3hhdHRyID0gZmFsc2U7
CkBAIC04NjAsNiArODYxLDcgQEAgZGVjb2RlX3ByZXNlcnZlX2FyZyAoY2hhciBjb25zdCAqYXJn
LCBzdHJ1Y3QgY3Bfb3B0aW9ucyAqeCwgYm9vbCBvbl9vZmYpCiAgICAgICAgIHsKICAgICAgICAg
Y2FzZSBQUkVTRVJWRV9NT0RFOgogICAgICAgICAgIHgtPnByZXNlcnZlX21vZGUgPSBvbl9vZmY7
CisgICAgICAgICAgeC0+ZXhwbGljaXRfbm9fcHJlc2VydmVfbW9kZSA9ICFvbl9vZmY7CiAgICAg
ICAgICAgYnJlYWs7CiAKICAgICAgICAgY2FzZSBQUkVTRVJWRV9USU1FU1RBTVBTOgpkaWZmIC0t
Z2l0IGEvc3JjL2luc3RhbGwuYyBiL3NyYy9pbnN0YWxsLmMKaW5kZXggODU0NDM2YS4uOGVhNTQ5
MSAxMDA2NDQKLS0tIGEvc3JjL2luc3RhbGwuYworKysgYi9zcmMvaW5zdGFsbC5jCkBAIC0yNzUs
NiArMjc1LDcgQEAgY3Bfb3B0aW9uX2luaXQgKHN0cnVjdCBjcF9vcHRpb25zICp4KQogICB4LT5w
cmVzZXJ2ZV9saW5rcyA9IGZhbHNlOwogICB4LT5wcmVzZXJ2ZV9tb2RlID0gZmFsc2U7CiAgIHgt
PnByZXNlcnZlX3RpbWVzdGFtcHMgPSBmYWxzZTsKKyAgeC0+ZXhwbGljaXRfbm9fcHJlc2VydmVf
bW9kZSA9IGZhbHNlOwogICB4LT5yZWR1Y2VfZGlhZ25vc3RpY3M9ZmFsc2U7CiAgIHgtPmRhdGFf
Y29weV9yZXF1aXJlZCA9IHRydWU7CiAgIHgtPnJlcXVpcmVfcHJlc2VydmUgPSBmYWxzZTsKZGlm
ZiAtLWdpdCBhL3NyYy9tdi5jIGIvc3JjL212LmMKaW5kZXggZWUyZjVhMS4uYTQzZmViNyAxMDA2
NDQKLS0tIGEvc3JjL212LmMKKysrIGIvc3JjL212LmMKQEAgLTExNyw2ICsxMTcsNyBAQCBjcF9v
cHRpb25faW5pdCAoc3RydWN0IGNwX29wdGlvbnMgKngpCiAgIHgtPnByZXNlcnZlX2xpbmtzID0g
dHJ1ZTsKICAgeC0+cHJlc2VydmVfbW9kZSA9IHRydWU7CiAgIHgtPnByZXNlcnZlX3RpbWVzdGFt
cHMgPSB0cnVlOworICB4LT5leHBsaWNpdF9ub19wcmVzZXJ2ZV9tb2RlPSBmYWxzZTsKICAgeC0+
cHJlc2VydmVfc2VjdXJpdHlfY29udGV4dCA9IHNlbGludXhfZW5hYmxlZDsKICAgeC0+cmVkdWNl
X2RpYWdub3N0aWNzID0gZmFsc2U7CiAgIHgtPmRhdGFfY29weV9yZXF1aXJlZCA9IHRydWU7CmRp
ZmYgLS1naXQgYS90ZXN0cy9NYWtlZmlsZS5hbSBiL3Rlc3RzL01ha2VmaWxlLmFtCmluZGV4IGVk
YzA0YjQuLjEzOWFjMjAgMTAwNjQ0Ci0tLSBhL3Rlc3RzL01ha2VmaWxlLmFtCisrKyBiL3Rlc3Rz
L01ha2VmaWxlLmFtCkBAIC0zNTgsNiArMzU4LDcgQEAgVEVTVFMgPQkJCQkJCVwKICAgY3AvcGVy
bQkJCQkJXAogICBjcC9wcmVzZXJ2ZS0yCQkJCQlcCiAgIGNwL3ByZXNlcnZlLWxpbmsJCQkJXAor
ICBjcC9wcmVzZXJ2ZS1tb2RlCQkJCVwKICAgY3AvcHJlc2VydmUtc2xpbmstdGltZQkJCVwKICAg
Y3AvcHJvYy1zaG9ydC1yZWFkCQkJCVwKICAgY3AvcHJvYy16ZXJvLWxlbgkJCQlcCmRpZmYgLS1n
aXQgYS90ZXN0cy9jcC9wcmVzZXJ2ZS1tb2RlIGIvdGVzdHMvY3AvcHJlc2VydmUtbW9kZQpuZXcg
ZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi41NjgwZDhjCi0tLSAvZGV2L251bGwKKysr
IGIvdGVzdHMvY3AvcHJlc2VydmUtbW9kZQpAQCAtMCwwICsxLDMyIEBACisjIS9iaW4vc2gKKyMg
ZW5zdXJlIHRoYXQgY3AncyAtLW5vLXByZXNlcnZlPW1vZGUgd29ya3MgY29ycmVjdGx5CisKKyMg
Q29weXJpZ2h0IChDKSAyMDAyLTIwMTIgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuCisK
KyMgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0
IGFuZC9vciBtb2RpZnkKKyMgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQ
dWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKKyMgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRh
dGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGUgTGljZW5zZSwgb3IKKyMgKGF0IHlvdXIgb3B0
aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4KKworIyBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQg
aW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwKKyMgYnV0IFdJVEhPVVQgQU5ZIFdB
UlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YKKyMgTUVSQ0hBTlRB
QklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZQorIyBH
TlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLgorCisjIFlvdSBzaG91
bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNl
CisjIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtLiAgSWYgbm90LCBzZWUgPGh0dHA6Ly93d3cuZ251
Lm9yZy9saWNlbnNlcy8+LgorCisuICIke3NyY2Rpcj0ufS9pbml0LnNoIjsgcGF0aF9wcmVwZW5k
XyAuLi9zcmMKK3ByaW50X3Zlcl8gY3AKKworcm0gYSBiIGMKK3VtYXNrIDAwMjIKK3RvdWNoIGEK
K3RvdWNoIGIKK2NobW9kIDYwMCBiCitjcCAtLW5vLXByZXNlcnZlPW1vZGUgYiBjCittb2RlX2E9
JChscyAtbCBhIHwgZ2F3ayAne3ByaW50ICQxfScpCittb2RlX2M9JChscyAtbCBjIHwgZ2F3ayAn
e3ByaW50ICQxfScpCit0ZXN0ICIkbW9kZV9hIiA9ICIkbW9kZV9jIiB8fCBmYWlsPTEKKworRXhp
dCAkZmFpbAotLSAKMS43LjExLjIKCg==
------=_Part_332168_631374176.1344351707925--


From MAILER-DAEMON Tue Aug 07 11:38:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SylrK-0008Vu-QP
	for mharc-coreutils@gnu.org; Tue, 07 Aug 2012 11:38:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38590)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1SylrD-0008Kd-3s
	for coreutils@gnu.org; Tue, 07 Aug 2012 11:38:12 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sylr8-0007Vx-Oh
	for coreutils@gnu.org; Tue, 07 Aug 2012 11:38:07 -0400
Received: from moutng.kundenserver.de ([212.227.126.186]:55671)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sylr8-0007VO-F6
	for coreutils@gnu.org; Tue, 07 Aug 2012 11:38:02 -0400
Received: from [192.168.2.108] (p4FF73F61.dip.t-dialin.net [79.247.63.97])
	by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis)
	id 0Ls7Sx-1TkWCI2s0d-013y9a; Tue, 07 Aug 2012 17:37:59 +0200
Message-ID: <50213654.10700@bernhard-voelker.de>
Date: Tue, 07 Aug 2012 17:37:56 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: cp preserves mode with --no-preserve=mode
References: <1292257210.332170.1344351707927.JavaMail.root@redhat.com>
In-Reply-To: <1292257210.332170.1344351707927.JavaMail.root@redhat.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:786WD2MMrXJu7lppHjx/KP/+I00t8/u+WZyq2j24AHg
	jaMZGvfR8SwTD+ZTVzd5yCYHWn3lVZtufzNL2QjgX/p/cG96S2
	4wmyOCgl+BSSPPNigLINNnCQqQ6MqnU+Kzp71qu03UbMvespAv
	aDfBzS7cWG9+fKJW8VqqjV3PfGuEjkKntbnAcPLGstGSpw6JED
	QYqeZML0fFA0RZ+pwea3seD27aF/Pq6BcDfthwADpSlb3dYj/v
	JkvG7g44U7VKbF7eTCZbWZMPO28rYAwSWp5OYqmmcj/0FXmoQV
	2u03CkY3vUkmFVjYpKkMwN6buzCQ/cwoRz82VLjraPOjvSMUCN
	X214B3t9UaBJFE48uZITa+zPfiYKBpKfMM0wE1hUP
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.126.186
Cc: Padraig Brady <pbrady@redhat.com>, 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, 07 Aug 2012 15:38:13 -0000


On 08/07/2012 05:01 PM, Ondrej Oprala wrote:
> Hi, I've renamed the variable to be more hinting of it's purpose
> and --no-preserve=mode should now work properly with directories
> as well.
> Cheers,
>  Ondrej

Thanks, that looks good ... maybe the directory case deserves to
be added to the test. Minor nit: the change in copy_internal() is
missing in the commit log.
I'm sure that Padraig/Jim will add both when committing.

BTW: Interestingly, the TODO entry mentioned "--no-preserve=X"
to be buggy:

> -cp --no-preserve=X should not attempt to preserve attribute X
> -  reported by Andreas Schwab

but in fact, all the modes (t,o,l,c, and x) but "mode"
have already been working. ;-)

Have a nice day,
Berny


From MAILER-DAEMON Wed Aug 08 10:02:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sz6pl-0002r6-OW
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 10:02:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42519)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1Sz6pd-0002nY-4W
	for coreutils@gnu.org; Wed, 08 Aug 2012 10:01:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1Sz6pY-0001Cc-R6
	for coreutils@gnu.org; Wed, 08 Aug 2012 10:01:53 -0400
Received: from mx4-phx2.redhat.com ([209.132.183.25]:38463)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1Sz6pY-0001CP-Gd
	for coreutils@gnu.org; Wed, 08 Aug 2012 10:01:48 -0400
Received: from zmail19.collab.prod.int.phx2.redhat.com
	(zmail19.collab.prod.int.phx2.redhat.com [10.5.83.22])
	by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q78E1lIm026108
	for <coreutils@gnu.org>; Wed, 8 Aug 2012 10:01:48 -0400
Date: Wed, 8 Aug 2012 10:01:47 -0400 (EDT)
From: Ondrej Oprala <ooprala@redhat.com>
To: coreutils@gnu.org
Message-ID: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
In-Reply-To: <2054447852.559441.1344434206612.JavaMail.root@redhat.com>
Subject: du bogus warning with bind mounts
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_561336_986946732.1344434507964"
X-Originating-IP: [10.34.4.237]
X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - FF3.0 (Linux)/7.2.0_GA_2669)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 209.132.183.25
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, 08 Aug 2012 14:01:58 -0000

------=_Part_561336_986946732.1344434507964
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Hi, I've changed the du util a bit to reflect 
the proposed solution here http://marc.info/?l=coreutils-bug&m=134124896022426&w=2 .
I'm not sure about the XDEV checking though. Shouldn't the matching
st_dev numbers be enough to know both files are on the same device?
If true, then the check is implied in the di_set_lookup function, isn't it?
Cheers,
 Ondrej.

------=_Part_561336_986946732.1344434507964
Content-Type: application/mbox; name=DIFF
Content-Disposition: attachment; filename=DIFF
Content-Transfer-Encoding: base64

RnJvbSA1ODAzNGFhNjhmZDQ1YmEzZmY4YmJiNTU0ZDJjZGVmNmFjMzFkZTE3IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBPbmRyZWogT3ByYWxhIDxvb3ByYWxhQHJlZGhhdC5jb20+CkRh
dGU6IFdlZCwgOCBBdWcgMjAxMiAxNToyNDowNSArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIGR1OiBG
aXggYW4gaXNzdWUgd2l0aCBib2d1cyB3YXJuaW5ncyBvbiBiaW5kLW1vdW50ZWQKIGRpcmVjdG9y
aWVzCgoqIE5FV1M6IE1lbnRpb24gdGhlIGZpeC4KKiBzcmMvZHUuYzogQWRkIGEgZnVuY3Rpb24g
dG8gcmVhZCtzdGF0IG1vdW50IHBvaW50cwphbmQgcHJvcGVybHkgY2hlY2sgY3ljbGljIGRpcmVj
dG9yeSBlbnRyaWVzLgotLS0KIE5FV1MgICAgIHwgIDMgKysrCiBnbnVsaWIgICB8ICAyICstCiBz
cmMvZHUuYyB8IDU0ICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr
KysrKysrKy0tLQogMyBmaWxlcyBjaGFuZ2VkLCA1NSBpbnNlcnRpb25zKCspLCA0IGRlbGV0aW9u
cygtKQoKZGlmZiAtLWdpdCBhL05FV1MgYi9ORVdTCmluZGV4IGNhNDU2OGEuLjhmODVjMmIgMTAw
NjQ0Ci0tLSBhL05FV1MKKysrIGIvTkVXUwpAQCAtNCw2ICs0LDkgQEAgR05VIGNvcmV1dGlscyBO
RVdTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSotIG91dGxpbmUgLSotCiAK
ICoqIEJ1ZyBmaXhlcwogCisgIGR1IG5vIGxvbmdlciBlbWl0cyBib2d1cyB3YXJuaW5ncyB3aGVu
IHRyYXZlcnNpbmcgYmluZC1tb3VudGVkCisgIGRpcmVjdG9yeSBjeWNsZXMuCisKICAgY2tzdW0g
bm93IHByaW50cyBjaGVja3N1bXMgYXRvbWljYWxseSBzbyB0aGF0IGNvbmN1cnJlbnQKICAgcHJv
Y2Vzc2VzIHdpbGwgbm90IGludGVyc3BlcnNlIHRoZWlyIG91dHB1dC4KICAgW3RoZSBidWcgZGF0
ZXMgYmFjayB0byB0aGUgaW5pdGlhbCBpbXBsZW1lbnRhdGlvbl0KZGlmZiAtLWdpdCBhL2dudWxp
YiBiL2dudWxpYgppbmRleCAzOWNlZGY2Li42OTZhYTc0IDE2MDAwMAotLS0gYS9nbnVsaWIKKysr
IGIvZ251bGliCkBAIC0xICsxIEBACi1TdWJwcm9qZWN0IGNvbW1pdCAzOWNlZGY2ZjQyNzM1MGFj
NDcxMThkMjMxYzA1YTdiNzNiNjA5Zjg5CitTdWJwcm9qZWN0IGNvbW1pdCA2OTZhYTc0YjM4Zjhj
MTA5YzIxZTRjMDExOTRmYWFiNTNmYjRjZWZjCmRpZmYgLS1naXQgYS9zcmMvZHUuYyBiL3NyYy9k
dS5jCmluZGV4IDczMzM5NDEuLmI5MTUzMjAgMTAwNjQ0Ci0tLSBhL3NyYy9kdS5jCisrKyBiL3Ny
Yy9kdS5jCkBAIC0yNyw2ICsyNyw3IEBACiAjaW5jbHVkZSA8Z2V0b3B0Lmg+CiAjaW5jbHVkZSA8
c3lzL3R5cGVzLmg+CiAjaW5jbHVkZSA8YXNzZXJ0Lmg+CisjaW5jbHVkZSA8bW50ZW50Lmg+CiAj
aW5jbHVkZSAic3lzdGVtLmgiCiAjaW5jbHVkZSAiYXJnbWF0Y2guaCIKICNpbmNsdWRlICJhcmd2
LWl0ZXIuaCIKQEAgLTYwLDkgKzYxLDE0IEBAIGV4dGVybiBib29sIGZ0c19kZWJ1ZzsKICMgZGVm
aW5lIEZUU19DUk9TU19DSEVDSyhGdHMpCiAjZW5kaWYKIAorI2RlZmluZSBNVEFCICIvZXRjL210
YWIiCisKIC8qIEEgc2V0IG9mIGRldi9pbm8gcGFpcnMuICAqLwogc3RhdGljIHN0cnVjdCBkaV9z
ZXQgKmRpX3NldDsKIAorLyogQSBoYXNoIHRhYmxlIGZvciBtb3VudCBwb2ludHMuICovCitzdGF0
aWMgc3RydWN0IGRpX3NldCAqZGlfbW50OworCiAvKiBLZWVwIHRyYWNrIG9mIHRoZSBwcmVjZWRp
bmcgImxldmVsIiAoZGVwdGggaW4gaGllcmFyY2h5KQogICAgZnJvbSBvbmUgY2FsbCBvZiBwcm9j
ZXNzX2ZpbGUgdG8gdGhlIG5leHQuICAqLwogc3RhdGljIHNpemVfdCBwcmV2X2xldmVsOwpAQCAt
MzMzLDExICszMzksMTEgQEAgTWFuZGF0b3J5IGFyZ3VtZW50cyB0byBsb25nIG9wdGlvbnMgYXJl
IG1hbmRhdG9yeSBmb3Igc2hvcnQgb3B0aW9ucyB0b28uXG5cCiAgIGV4aXQgKHN0YXR1cyk7CiB9
CiAKLS8qIFRyeSB0byBpbnNlcnQgdGhlIElOTy9ERVYgcGFpciBpbnRvIHRoZSBnbG9iYWwgdGFi
bGUsIEhUQUIuCisvKiBUcnkgdG8gaW5zZXJ0IHRoZSBJTk8vREVWIHBhaXIgaW50byB0aGUgZGlf
c2V0IHRhYmxlLgogICAgUmV0dXJuIHRydWUgaWYgdGhlIHBhaXIgaXMgc3VjY2Vzc2Z1bGx5IGlu
c2VydGVkLAogICAgZmFsc2UgaWYgdGhlIHBhaXIgaXMgYWxyZWFkeSBpbiB0aGUgdGFibGUuICAq
Lwogc3RhdGljIGJvb2wKLWhhc2hfaW5zIChpbm9fdCBpbm8sIGRldl90IGRldikKK2hhc2hfaW5z
IChzdHJ1Y3QgZGlfc2V0ICpkaV9zZXQsIGlub190IGlubywgZGV2X3QgZGV2KQogewogICBpbnQg
aW5zZXJ0ZWQgPSBkaV9zZXRfaW5zZXJ0IChkaV9zZXQsIGRldiwgaW5vKTsKICAgaWYgKGluc2Vy
dGVkIDwgMCkKQEAgLTQ2MSw3ICs0NjcsNyBAQCBwcm9jZXNzX2ZpbGUgKEZUUyAqZnRzLCBGVFNF
TlQgKmVudCkKICAgICAgIGlmIChleGNsdWRlZAogICAgICAgICAgIHx8ICghIG9wdF9jb3VudF9h
bGwKICAgICAgICAgICAgICAgJiYgKGhhc2hfYWxsIHx8ICghIFNfSVNESVIgKHNiLT5zdF9tb2Rl
KSAmJiAxIDwgc2ItPnN0X25saW5rKSkKLSAgICAgICAgICAgICAgJiYgISBoYXNoX2lucyAoc2It
PnN0X2lubywgc2ItPnN0X2RldikpKQorICAgICAgICAgICAgICAmJiAhIGhhc2hfaW5zIChkaV9z
ZXQsIHNiLT5zdF9pbm8sIHNiLT5zdF9kZXYpKSkKICAgICAgICAgewogICAgICAgICAgIC8qIElm
IGlnbm9yaW5nIGEgZGlyZWN0b3J5IGluIHByZW9yZGVyLCBza2lwIGl0cyBjaGlsZHJlbi4KICAg
ICAgICAgICAgICBJZ25vcmUgdGhlIG5leHQgZnRzX3JlYWQgb3V0cHV0IHRvbywgYXMgaXQncyBh
IHBvc3RvcmRlcgpAQCAtNDc2LDYgKzQ4MiwxNyBAQCBwcm9jZXNzX2ZpbGUgKEZUUyAqZnRzLCBG
VFNFTlQgKmVudCkKICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgfQogCisgICAgICAv
KkNoZWNrIGlmIGRpciBpcyBhbHJlYWR5IGluIHRoZSBtb3VudCB0YWJsZSAqLworICAgICAgaWYg
KFNfSVNESVIgKHNiLT5zdF9tb2RlKSkKKyAgICAgICAgeworICAgICAgICAgIGlmIChkaV9zZXRf
bG9va3VwIChkaV9tbnQsIHNiLT5zdF9kZXYsIHNiLT5zdF9pbm8pKQorICAgICAgICAgICAgewor
ICAgICAgICAgICAgICBmdHNfc2V0IChmdHMsIGVudCwgRlRTX1NLSVApOworICAgICAgICAgICAg
ICBlcnJvciAoMCwgMCwgXygibW91bnQgcG9pbnQgJXMgYWxyZWFkeSB0cmF2ZXJzZWQiKSwgcXVv
dGUgKGZpbGUpKTsKKyAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgICAgfQor
ICAgICAgICB9CisKICAgICAgIHN3aXRjaCAoaW5mbykKICAgICAgICAgewogICAgICAgICBjYXNl
IEZUU19EOgpAQCAtNjIzLDYgKzY0MCwyOSBAQCBkdV9maWxlcyAoY2hhciAqKmZpbGVzLCBpbnQg
Yml0X2ZsYWdzKQogICByZXR1cm4gb2s7CiB9CiAKKy8qIEZpbGwgdGhlIGRpX21udCB0YWJsZSB3
aXRoIGRldi9pbm8gcGFpcnMKKyAqIG9mIG1vdW50IHBvaW50cyAgKi8KKworc3RhdGljIHZvaWQK
K2ZpbGxfbW91bnRfdGFibGUgKHZvaWQpCit7CisgIEZJTEUgKm10YWJfZnA7CisgIHN0cnVjdCBt
bnRlbnQgKm1udF9lbnQ7CisgIHN0cnVjdCBzdGF0ICpidWY7CisgIGJ1ZiA9IHhtYWxsb2MgKHNp
emVvZiAqYnVmKTsKKworICBtdGFiX2ZwID0gc2V0bW50ZW50IChNVEFCLCAiciIpOworCisgIHdo
aWxlIChtbnRfZW50ID0gZ2V0bW50ZW50IChtdGFiX2ZwKSkKKyAgICB7CisgICAgICBpZiAoIXN0
YXQgKG1udF9lbnQtPm1udF9kaXIsIGJ1ZikpCisgICAgICAgIGhhc2hfaW5zIChkaV9tbnQsIGJ1
Zi0+c3RfaW5vLCBidWYtPnN0X2Rldik7CisgICAgfQorCisgIGZyZWUgKGJ1Zik7CisgIGVuZG1u
dGVudCAobXRhYl9mcCk7Cit9CisKIGludAogbWFpbiAoaW50IGFyZ2MsIGNoYXIgKiphcmd2KQog
ewpAQCAtOTIyLDYgKzk2MiwxMyBAQCBtYWluIChpbnQgYXJnYywgY2hhciAqKmFyZ3YpCiAgICAg
eGFsbG9jX2RpZSAoKTsKIAogICAvKiBJbml0aWFsaXplIHRoZSBzZXQgb2YgZGV2LGlub2RlIHBh
aXJzLiAgKi8KKworICBkaV9tbnQgPSBkaV9zZXRfYWxsb2MgKCk7CisgIGlmICghZGlfbW50KQor
ICAgIHhhbGxvY19kaWUgKCk7CisKKyAgZmlsbF9tb3VudF90YWJsZSAoKTsKKwogICBkaV9zZXQg
PSBkaV9zZXRfYWxsb2MgKCk7CiAgIGlmICghZGlfc2V0KQogICAgIHhhbGxvY19kaWUgKCk7CkBA
IC0xMDAyLDYgKzEwNDksNyBAQCBtYWluIChpbnQgYXJnYywgY2hhciAqKmFyZ3YpCiAKICAgYXJn
dl9pdGVyX2ZyZWUgKGFpKTsKICAgZGlfc2V0X2ZyZWUgKGRpX3NldCk7CisgIGRpX3NldF9mcmVl
IChkaV9tbnQpOwogCiAgIGlmIChmaWxlc19mcm9tICYmIChmZXJyb3IgKHN0ZGluKSB8fCBmY2xv
c2UgKHN0ZGluKSAhPSAwKSAmJiBvaykKICAgICBlcnJvciAoRVhJVF9GQUlMVVJFLCAwLCBfKCJl
cnJvciByZWFkaW5nICVzIiksIHF1b3RlIChmaWxlc19mcm9tKSk7Ci0tIAoxLjcuMTEuMgoK
------=_Part_561336_986946732.1344434507964--


From MAILER-DAEMON Wed Aug 08 10:57:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sz7hC-0003cl-6P
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 10:57:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38621)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sz7h8-0003cc-OG
	for coreutils@gnu.org; Wed, 08 Aug 2012 10:57:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sz7h1-0007et-80
	for coreutils@gnu.org; Wed, 08 Aug 2012 10:57:10 -0400
Received: from mx.meyering.net ([88.168.87.75]:40241)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>)
	id 1Sz7h0-0007dc-Q2; Wed, 08 Aug 2012 10:57:03 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 7AD8E602BD;
	Wed,  8 Aug 2012 16:57:01 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: new snapshot available: coreutils-8.17.70-1bacb4
Mail-Followup-To: coreutils@gnu.org
Date: Wed, 08 Aug 2012 16:57:01 +0200
Message-ID: <87y5lp3002.fsf@rho.meyering.net>
Lines: 412
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: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: coordinator@translationproject.org, platform-testers@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, 08 Aug 2012 14:57:13 -0000

Here's a preview of what coreutils-8.18 should look like.

I noticed one spurious test failure reported by the Nixos Hydra autobuilder:

  http://hydra.nixos.org/build/2924158

It's in the most recently added test, so we'll probably have to fix it
before release but I haven't investigated yet or seen it anywhere else:

    FAIL: df/total-unprocessed (exit: 1)
    =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
    ...
    + df --local -t nfs --total .
    Filesystem     1K-blocks      Used Available Use% Mounted on
    -              453794636 325690492 105389844  76% /
    total          453794636 325690492 105389844  76%
    + fail=3D1
    + compare exp out
    + compare_dev_null_ exp out
    + test 2 =3D 2
    + test xexp =3D x/dev/null
    + test xout =3D x/dev/null
    + return 2
    + case $? in
    + compare_ exp out
    + diff -u exp out
    --- exp	2012-08-07 07:13:23.862331198 +0000
    +++ out	2012-08-07 07:13:23.864331274 +0000
    @@ -1 +1 @@
    -df: no file systems processed
    +df: Warning: cannot read table of mounted file systems:\
      No such file or directory
    + fail=3D1
    ...

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
[tarballs]

coreutils snapshot:
  http://meyering.net/cu/coreutils-ss.tar.xz      4.9 MB
  http://meyering.net/cu/coreutils-ss.tar.xz.sig
  http://meyering.net/cu/coreutils-8.17.70-1bacb4.tar.xz

There are .sig files here, too:
  http://people.redhat.com/meyering/cu/coreutils-ss.tar.xz
  http://people.redhat.com/meyering/cu/coreutils-8.17.70-1bacb4.tar.xz

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
[NEWS]

** Bug fixes

  cksum now prints checksums atomically so that concurrent
  processes will not intersperse their output.
  [the bug dates back to the initial implementation]

  date -d "$(printf '\xb0')" would print 00:00:00 with today's date
  rather than diagnosing the invalid input.  Now it reports this:
  date: invalid date '\260'
  [This bug was present in "the beginning".]

  df no longer outputs control characters present in the mount point name.
  Such characters are replaced with '?', so for example, scripts consuming
  lines output by df, can work reliably.
  [This bug was present in "the beginning".]

  df --total now exits with an appropriate diagnostic and error code, when
  file system --type options do not lead to a processed file system.
  [This bug dates back to when --total was added in coreutils-7.0]

  head --lines=3D-N (-n-N) now resets the read pointer of a seekable input =
file.
  This means that "head -n-3" no longer consumes all of its input, and lines
  not output by head may be processed by other programs.  For example, this
  command now prints the final line, 2, while before it would print nothing:
    seq 2 > k; (head -n-1 > /dev/null; cat) < k
  [This bug was present in "the beginning".]

  ls --color would mis-color relative-named symlinks in /
  [bug introduced in coreutils-8.17]

  split now ensures it doesn't overwrite the input file with generated outp=
ut.
  [the bug dates back to the initial implementation]

  stat and df now report the correct file system usage,
  in all situations on GNU/Linux, by correctly determining the block size.
  [df bug since coreutils-5.0.91, stat bug since the initial implementation]

  tail -f no longer tries to use inotify on AUFS or PanFS file systems
  [you might say this was introduced in coreutils-7.5, along with inotify
   support, but even now, its magic number isn't in the usual place.]

** New features

  stat -f recognizes the new remote file system types: aufs, panfs.

** Changes in behavior

  su: this program has been removed.  We stopped installing "su" by
  default with the release of coreutils-6.9.90 on 2007-12-01.  Now,
  that the util-linux package has the union of the Suse and Fedora
  patches as well as enough support to build on the Hurd, we no longer
  have any reason to include it here.

** Improvements

  sort avoids redundant processing in the presence of inaccessible inputs,
  or unwritable output.  Sort now diagnoses certain errors at start-up,
  rather than after potentially expensive processing.

  sort now allocates no more than 75% of physical memory by default,
  to better share system resources, and thus operate more efficiently.
  [The default max memory usage changed from 50% to 100% in coreutils-8.16]


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
[git shortlog]

Changes in coreutils since v8.17:

Andrew D Warshall (1):
      tests: fiemap-perf: avoid a false failure on ext2

Bernhard Voelker (4):
      maint: sort: style adjustment to help clarify size determination
      doc: document multiplier for dd number options like count=3DN
      df: warn if soon-to-be-removed --megabyte option is used
      df: fix exit code and error messages with --total

Bruno Haible (1):
      doc: clarify meaning of '-parodd' in stty help

Erik Auerswald (1):
      doc: mention uniq(1) in sort(1) man-page and vice versa

Jim Meyering (38):
      maint: post-release administrivia
      ls: color each symlink-to-relative-name in / properly
      maint: add assertions to placate static analysis tools
      maint: tell xgettext that fputs arg "93% of..." is not a C format str=
ing
      tests: use $AWK, not awk
      id,groups: use gidtostr/uidtostr to avoid casts
      maint: remove comment that suggested to remove support for mktemp -V
      maint: fix typos in test comments and old ChangeLog files
      stat,tail: recognize new file system type: panfs
      head: with --lines=3D-N (-n-N) reset file pointer on seekable input
      maint: mark new diagnostic for translation
      maint: detect a new type of duplicate in THANKS.in
      su: remove program (util-linux is now the best source for it)
      maint: prohibit use of strncpy
      maint: migrate strncpy-prohibiting rule to gnulib
      build: update gnulib to latest; correct comment grammar
      stty: portability: accommodate CIL
      doc: improve sample backup script
      stat,tail: recognize new file system type: aufs
      maint: avoid false-positive syntax-check failure due to fail=3D0 in .=
texi
      maint: fix minor bugs in helper program, setuidgid
      maint: add syntax-check rule to help avoid misuse of EXIT_FAILURE
      date: fails to diagnose invalid input
      build: shred.c: avoid i686-specific gcc -Wstrict-overflow warning
      maint: remove unwarranted uses of strncpy
      build: update gnulib submodule to latest
      pinky,who: fix bug in latest change
      maint: adjust exemption to track renamed test script
      maint: stzncpy: restrict pointer parameters
      tail: avoid misleading diagnostic upon fstat failure
      maint: refresh stale local gnulib patch files
      tail: avoid rare error-path FD leak
      split: plug nominal leaks
      tests: avoid FP ulimit failure with valgrind-wrapped tools
      truncate: don't leak a file descriptor with --ref=3DPIPE
      build: avoid sort link failure on Solaris 10
      tests: printf-surprise: avoid unwarranted failure on FreeBSD 9.0
      build: update gnulib submodule to latest

Joachim Schmitz (2):
      maint: rm: remove unused static-inlined functions
      maint: rm: remove two more unused static inline functions

Mike Frysinger (1):
      dircolors: add st/st-256color terminal types

Paul Eggert (5):
      sort: simplify -o handling to avoid fdopen, assert
      sort: fix exit-status typo
      doc: fix spacing
      doc: document leap seconds better
      sort: by default, do not exceed 3/4 of physical memory

P=E1draig Brady (15):
      stat: report the correct block size for file system usage
      cksum: line-buffer the printed checksums
      maint: suppress echoing of sc_THANKS_in_duplicates implementation
      maint: refactor common mode bits used to create files
      split: ensure output doesn't overwrite input
      maint: avoid a static analysis warning in csplit
      maint: avoid a -Wunsed-but-set warning on some systems
      maint: sc_prohibit_fail_0: update a stale comment
      sort: avoid redundant processing with inaccessible inputs or output
      tests: sort-merge-fdlimit: reduce the limit by one
      doc: mention the improved sort memory allocation
      df: don't output control characters in a mount point name
      maint: move two df tests from tests/misc to tests/df
      doc: mention gethostid(3) in hostid(1)
      tests: add a test for a previously fixed output format bug in join

Sami Kerola (1):
      maint: remove su testing artifact

Stefano Lattarini (1):
      doc: fix errors and warnings with Texinfo 5


Changes in gnulib since v8.17:

* gnulib a3a0496...39cedf6 (197):
  > extern-inline: also ignore -Wmissing-declarations
  > autoupdate
  > maint.mk: sc_prohibit_magic_number_exit: avoid new false positives
  > gnumakefile: better interaction with Automake-NG
  > base64: Use extern C scope in header file, for C++.
  > stat-time, timespec, u64: support naive out-of-dir builds
  > Fix typo: 'linline' -> 'inline' (thanks to Eric Blake).
  > Keep the extern-inline macros closer together.
  > Fix indenting.
  > utimens: use extern-inline
  > u64: use extern-inline
  > timespec: use extern-inline
  > stat-time: use extern-inline
  > extern-inline: new module
  > maint.mk: a "release-commit" wrapper to do-release-commit-and-tag
  > autoupdate
  > autoupdate
  > maint.mk: use silent-rules support from Automake
  > maint.mk: provide a web-manual-update target
  > README-release: shorten the circuit to post a news
  > gnu-web-doc-update: fix --help
  > passfd: fix comment on recvfd
  > maint.mk: avoid a sub-shell
  > maint.mk: absolute VPATH issue
  > update from texinfo
  > gitlog-to-changelog: fix previous change
  > gitlog-to-changelog: don't expect .git to be in $srcdir
  > maint.mk: absolute VPATH build fix
  > clean-temp: Fix memory leak.
  > maint: fix grammar in a ChangeLog entry
  > maint.mk: new rule: refresh-gnulib-patches
  > gnulib-tool: Fix handling of inctests variable.
  > getpass: Assume AC_CHECK_DECLS_ONCE invocation, like in getpass.m4.
  > verify: document conflict with -Wnested-externs
  > maint.mk: forbid exit(-1)
  > fsusage: port back to Solaris
  > gnu-web-doc-update: fix error messages
  > gnu-web-doc-update: check the requirements.
  > maint.mk: minor simplification.
  > gitlog-to-changelog: VPATH build issues.
  > fpending: Assume AC_CHECK_DECLS_ONCE invocation, like in fpending.m4.
  > pthread_sigmask: fix bug on FreeBSD 9
  > README-release: make it more legible
  > autoupdate
  > maint: require that each sc_... command start with "@"
  > maint.mk: add leading "@" to quiet new "make syntax-check" rule
  > autoupdate
  > maint.mk: new syntax check for HAVE_DECL checks
  > argp: make HAVE_DECL usage consistent
  > stat-time: relax license to LGPLv2+
  > strndup: fix m4 usage error
  > maint: enable the sc_avoid_if_before_free syntax-check rule
  > gettext: do not assume '#define ... defined ...' behavior
  > getloadavg: clean out old Emacs and Autoconf cruft
  > bootstrap: let warn be like tests/init.sh's warn_
  > getopt: Simplify after Emacs changed.
  > maint.mk: add sc_vulnerable_makefile_CVE-2012-3386
  > maint.mk: _sc_search_regexp, sc_vulnerable_makefile_CVE-2009-4029: fix
  > getloadavg, getopt: fix commentary re configure.in
  > timespec: mark functions with const attributes
  > canonicalize[-lgpl]: handle "guessing" values when cross-building
  > canonicalize: make the right guess when cross-compiling to GNU
  > update from texinfo
  > timespec-sub: avoid duplicate include
  > bootstrap: use a more consistent error reporting scheme
  > sys_time: allow too-wide tv_sec
  > pthread: check for both pthread_create and pthread_join
  > parse-datetime: doc tuneup
  > do-release-commit-and-tag: fix the previous commit
  > do-release-commit-and-tag: fix typo
  > pthread: check for pthread_create, not pthread_join
  > parse-datetime: fix failure to diagnose invalid input
  > bootstrap: do not require now-removed build-aux/missing
  > alloca: add support for HP NonStop TNS/E native
  > fsusage: remove code not needed on non GNU/Linux systems.
  > fsusage: include files needed for glibc 2.6 fallback
  > fsusage: avoid needless check on GNU/Linux
  > log: Fix an autoconf >=3D 2.64 warning.
  > autoupdate
  > autoupdate
  > log10f: Fix possible configuration problem.
  > Fix typo in ChangeLog entry.
  > remove: No longer override on all platforms. Fixes bug from 2012-03-20.
  > config: drop scripts that automake says are not independent
  > root-uid: new module
  > regex: use locale-independent comparison for codeset name
  > getopt-posix: No longer guarantee that option processing is resettable.
  > argp, regex: Ensure strcasecmp gets declared.
  > autoupdate
  > ptsname_r: Fix typo in last commit.
  > ptsname_r: Make it consistent with ptsname on AIX.
  > ptsname_r: Make it consistent with ptsname on OSF/1.
  > ttyname_r: Fix result on OSF/1, Solaris.
  > ptsname_r: Add support for Solaris.
  > ptsname_r: Fix test failure on native Windows.
  > ptsname_r: Fix test failures on IRIX, Solaris.
  > ptsname test: Extend test.
  > time: fix obsolete comment
  > getopt-gnu: Handle suboptimal getopt_long's abbreviation handling.
  > time_r: fix typo that always overrode localtime_r decl
  > Write "Mac OS X" instead of "MacOS X".
  > grantpt: Relax requirement regarding invalid file descriptors.
  > fbufmode test: Don't test unportable behaviour.
  > gnulib-tool: Refactor inctests variable.
  > gnulib-tool: --create-[mega]testdir, --[mega]test implies --with-tests.
  > parse-duration test: Avoid spurious output.
  > testing: fix typo in here doc
  > maint: disable the strncpy prohibition
  > Fix misspellings in comments.
  > nonblocking: Avoid compilation error on mingw64.
  > Do use readlink if available
  > posixtm-tests: port to buggy compiler
  > mktime: fix integer overflow in 'configure'-time test
  > tmpfile, clean-temp: Fix invocation of GetVersionEx.
  > fdopen: Allow implementations that don't reject invalid fd arguments.
  > parse-duration: Make self-test build on its own.
  > autoupdate
  > init.sh: do not rely on autoupated PWD
  > stat, fstat: Avoid warnings on mingw64.
  > stdioext: Add support for musl libc.
  > *printf-posix: Put more info into config.log.
  > getopt-gnu: Fix exit code overflow in autoconf test.
  > maint.mk: fix typo in code to derive GPG key at release time
  > regex: avoid warning when pointers are not long
  > dummy: Relicense into the public domain.
  > autoupdate
  > announce-gen: VPATH issues
  > gnu-web-doc-update: VPATH builds
  > autoupdate
  > maint.mk: revert most of the previous change re "all these"
  > autoupdate missed x bit
  > do not ask for gpg pw with --dry-run
  > implement --replace for ftp-upload protocol v1.2
  > parse-duration: Relicense under LGPLv2+.
  > maint.mk: prohibit common grammar error: "all these"
  > do-release-commit-and-tag: support VPATH builds
  > readme-release: also require announce-gen and maintainer-makefile
  > maint.mk: fix VPATH issues.
  > readme-release: require the promoted modules.
  > update from texinfo
  > error, strerror-override: Support mingw64 from Fedora 17.
  > error, strerror-override: Support mingw64 from Fedora 17.
  > error, strerror-override: Support new errno values from POSIX:2008.
  > autoupdate
  > savewd: add missing dependency on sys_wait module
  > system-quote-tests: port to CentOS 5
  > maint: fix typos in comments and ChangeLog
  > autoupdate
  > manywarnings: remove duplicate -Wmultichar entry
  > do not sync mktime.c from libc, last one left, not worth it
  > autoupdate
  > regex: don't assume uint64_t or uint32_t
  > * lib/mktime.c: Revert autoupdate, which fetched the wrong version.
  > maint.mk: add strncpy-prohibiting syntax-check rule
  > autoupdate
  > maint.mk: compute $(gpg_key_ID) more portably
  > mktime: sync from glibc
  > announce-gen: du -h is more portable than du --human
  > announce-gen: improve getopt-emitted diagnostics
  > maint.mk: gpg_key_ID: use sed more portably
  > gitlog-to-changelog: support the log message format used in Bison.
  > Revert "Revert "select: Fix build error on IRIX 6.5.""
  > Revert "select: Fix build error on IRIX 6.5."
  > Revert "strdup: undeprecate, IRIX 6.5 needs it"
  > poll/select: prevent busy-waiting
  > strdup: undeprecate, IRIX 6.5 needs it
  > select: Fix build error on IRIX 6.5.
  > autoupdate
  > Fix ChangeLog entry in last commit (silent change).
  > gc: fix libgcrypt detection on older machines.
  > autoupdate
  > crypto: fix bug in large buffer handling
  > crypto: fix bug in large buffer handling
  > crypto: fix bug in large buffer handling
  > autoupdate
  > update from texinfo
  > fsusage: fix block size returned on older Linux 2.6
  > autoupdate
  > bootstrap: suppress stderr chatter
  > bootstrap: .gitignore files created by autopoint, libtool
  > autoupdate
  > ignore-value.h: remove unused _GL_ATTRIBUTE_DEPRECATED definition
  > binary-io: Define set_binary_mode function.
  > bootstrap: take advantage of POSIX shell features
  > system-quote: Add more comments.
  > sh-quote, system-quote: Add comments about wildcards.
  > fsusage: check for GNU/Linux statvfs problem dynamically
  > system-quote, execute, spawn-pipe: Escape '?' on Windows.
  > _Noreturn: port config.h to gcc -Wundef
  > system-quote: Refactor.
  > execute, spawn-pipe: Escape '*' characters in arguments on Windows.
  > Tests for module 'system-quote'.
  > New module 'system-quote'.
  > sh-quote: Make C++ safe and allow multiple inclusion.
  > sh-quote tests: Make tests stricter.
  > warnings.m4: provide a means to specify the program to compile.
  > doc: recommendations on gettext version


From MAILER-DAEMON Wed Aug 08 11:43:18 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sz8Pm-0003ST-Mi
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 11:43:18 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36782)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sz8Pe-0003Ag-7P
	for coreutils@gnu.org; Wed, 08 Aug 2012 11:43:16 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sz8Pc-0001v8-DI
	for coreutils@gnu.org; Wed, 08 Aug 2012 11:43:10 -0400
Received: from mx1.redhat.com ([209.132.183.28]:24281)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sz8Pc-0001uN-3c
	for coreutils@gnu.org; Wed, 08 Aug 2012 11:43:08 -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 q78Fh5Et008300
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <coreutils@gnu.org>; Wed, 8 Aug 2012 11:43:06 -0400
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 q78Fh3kI025069
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO)
	for <coreutils@gnu.org>; Wed, 8 Aug 2012 11:43:05 -0400
Message-ID: <50228907.6080107@draigBrady.com>
Date: Wed, 08 Aug 2012 16:43:03 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: coreutils@gnu.org
Subject: Re: new snapshot available: coreutils-8.17.70-1bacb4
References: <87y5lp3002.fsf@rho.meyering.net>
In-Reply-To: <87y5lp3002.fsf@rho.meyering.net>
X-Enigmail-Version: 1.3.2
Content-Type: multipart/mixed; boundary="------------070108050308020904020807"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 08 Aug 2012 15:43:16 -0000

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

On 08/08/2012 03:57 PM, Jim Meyering wrote:
> Here's a preview of what coreutils-8.18 should look like.
>=20
> I noticed one spurious test failure reported by the Nixos Hydra autobui=
lder:
>=20
>   http://hydra.nixos.org/build/2924158
>=20
> It's in the most recently added test, so we'll probably have to fix it
> before release but I haven't investigated yet or seen it anywhere else:
>=20
>     FAIL: df/total-unprocessed (exit: 1)
>     =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>     ...
>     + df --local -t nfs --total .
>     Filesystem     1K-blocks      Used Available Use% Mounted on
>     -              453794636 325690492 105389844  76% /
>     total          453794636 325690492 105389844  76%
>     + fail=3D1
>     + compare exp out
>     + compare_dev_null_ exp out
>     + test 2 =3D 2
>     + test xexp =3D x/dev/null
>     + test xout =3D x/dev/null
>     + return 2
>     + case $? in
>     + compare_ exp out
>     + diff -u exp out
>     --- exp	2012-08-07 07:13:23.862331198 +0000
>     +++ out	2012-08-07 07:13:23.864331274 +0000
>     @@ -1 +1 @@
>     -df: no file systems processed
>     +df: Warning: cannot read table of mounted file systems:\
>       No such file or directory
>     + fail=3D1
>     ...

Hopefully the attached should fix it up.

cheers,
P=E1draig.

--------------070108050308020904020807
Content-Type: text/plain;
 name="df-tests.diff"
Content-Disposition: attachment;
 filename="df-tests.diff"
Content-Transfer-Encoding: 7bit

>From 534839ae82a342d6a9898ca27ae667911b3c3b54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Wed, 8 Aug 2012 16:38:38 +0100
Subject: [PATCH] tests: fix validation of local file systems

* tests/init.cfg (require_mount_list_): A new function
to ensure we cant read the list of file systems.
(require_local_dir_): Call the above function as otherwise
the check is invalid.
* tests/df/total-unprocessed: Ensure df can read the
list of mounted file systems so that --local can be honored.
---
 tests/df/total-unprocessed |    3 ++-
 tests/init.cfg             |    7 +++++++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/tests/df/total-unprocessed b/tests/df/total-unprocessed
index 9742591..aa49836 100755
--- a/tests/df/total-unprocessed
+++ b/tests/df/total-unprocessed
@@ -19,6 +19,7 @@
 
 . "${srcdir=.}/init.sh"; path_prepend_ ../src
 print_ver_ df
+require_mount_list_
 
 cat <<\EOF > exp || framework_failure_
 df: no file systems processed
@@ -27,7 +28,7 @@ EOF
 # The following simply finds no match for the combination
 # of the options --local and FS-type nfs together with the
 # argument ".". It must exit non-Zero nonetheless.
-df --local -t nfs --total "." 2>out && fail=1
+df --local -t nfs --total '.' 2>out && fail=1
 compare exp out || fail=1
 
 cat <<\EOF > exp || framework_failure_
diff --git a/tests/init.cfg b/tests/init.cfg
index 506c9b3..15b52e7 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -77,8 +77,15 @@ is_local_dir_()
   df --local "$1" >/dev/null 2>&1
 }
 
+require_mount_list_()
+{
+  df >/dev/null 2>&1 ||
+    skip_ "Unable to read the list of mounted file systems."
+}
+
 require_local_dir_()
 {
+  require_mount_list_
   is_local_dir_ . ||
     skip_ "This test must be run on a local file system."
 }
-- 
1.7.6.4


--------------070108050308020904020807--


From MAILER-DAEMON Wed Aug 08 11:48:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sz8UN-0006YW-OV
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 11:48:03 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35867)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sz8UL-0006YM-La
	for coreutils@gnu.org; Wed, 08 Aug 2012 11:48:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sz8UJ-0003gr-EH
	for coreutils@gnu.org; Wed, 08 Aug 2012 11:48:01 -0400
Received: from mx.meyering.net ([88.168.87.75]:40394)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sz8UJ-0003gd-3i
	for coreutils@gnu.org; Wed, 08 Aug 2012 11:47:59 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 8991860271;
	Wed,  8 Aug 2012 17:47:57 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: new snapshot available: coreutils-8.17.70-1bacb4
In-Reply-To: <50228907.6080107@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?=
	=?iso-8859-1?Q?g?= Brady"'s message of
	"Wed, 08 Aug 2012 16:43:03 +0100")
References: <87y5lp3002.fsf@rho.meyering.net> <50228907.6080107@draigBrady.com>
Date: Wed, 08 Aug 2012 17:47:57 +0200
Message-ID: <87d3312xn6.fsf@rho.meyering.net>
Lines: 99
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: Genre and OS details not
	recognized.
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: Wed, 08 Aug 2012 15:48:02 -0000

P=E1draig Brady wrote:
> On 08/08/2012 03:57 PM, Jim Meyering wrote:
>> Here's a preview of what coreutils-8.18 should look like.
>>
>> I noticed one spurious test failure reported by the Nixos Hydra autobuil=
der:
>>
>>   http://hydra.nixos.org/build/2924158
>>
>> It's in the most recently added test, so we'll probably have to fix it
>> before release but I haven't investigated yet or seen it anywhere else:
>>
>>     FAIL: df/total-unprocessed (exit: 1)
>>     =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>     ...
>>     + df --local -t nfs --total .
>>     Filesystem     1K-blocks      Used Available Use% Mounted on
>>     -              453794636 325690492 105389844  76% /
>>     total          453794636 325690492 105389844  76%
>>     + fail=3D1
>>     + compare exp out
>>     + compare_dev_null_ exp out
>>     + test 2 =3D 2
>>     + test xexp =3D x/dev/null
>>     + test xout =3D x/dev/null
>>     + return 2
>>     + case $? in
>>     + compare_ exp out
>>     + diff -u exp out
>>     --- exp	2012-08-07 07:13:23.862331198 +0000
>>     +++ out	2012-08-07 07:13:23.864331274 +0000
>>     @@ -1 +1 @@
>>     -df: no file systems processed
>>     +df: Warning: cannot read table of mounted file systems:\
>>       No such file or directory
>>     + fail=3D1
>>     ...
>
> Hopefully the attached should fix it up.

Thanks for the quick fix!
Looks great.

> Subject: [PATCH] tests: fix validation of local file systems
>
> * tests/init.cfg (require_mount_list_): A new function
> to ensure we cant read the list of file systems.

s/cant/can/

> (require_local_dir_): Call the above function as otherwise
> the check is invalid.
> * tests/df/total-unprocessed: Ensure df can read the
> list of mounted file systems so that --local can be honored.
> ---
>  tests/df/total-unprocessed |    3 ++-
>  tests/init.cfg             |    7 +++++++
>  2 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/tests/df/total-unprocessed b/tests/df/total-unprocessed
> index 9742591..aa49836 100755
> --- a/tests/df/total-unprocessed
> +++ b/tests/df/total-unprocessed
> @@ -19,6 +19,7 @@
>
>  . "${srcdir=3D.}/init.sh"; path_prepend_ ../src
>  print_ver_ df
> +require_mount_list_
>
>  cat <<\EOF > exp || framework_failure_
>  df: no file systems processed
> @@ -27,7 +28,7 @@ EOF
>  # The following simply finds no match for the combination
>  # of the options --local and FS-type nfs together with the
>  # argument ".". It must exit non-Zero nonetheless.
> -df --local -t nfs --total "." 2>out && fail=3D1
> +df --local -t nfs --total '.' 2>out && fail=3D1
>  compare exp out || fail=3D1
>
>  cat <<\EOF > exp || framework_failure_
> diff --git a/tests/init.cfg b/tests/init.cfg
> index 506c9b3..15b52e7 100644
> --- a/tests/init.cfg
> +++ b/tests/init.cfg
> @@ -77,8 +77,15 @@ is_local_dir_()
>    df --local "$1" >/dev/null 2>&1
>  }
>
> +require_mount_list_()
> +{
> +  df >/dev/null 2>&1 ||
> +    skip_ "Unable to read the list of mounted file systems."
> +}
> +
>  require_local_dir_()
>  {
> +  require_mount_list_
>    is_local_dir_ . ||
>      skip_ "This test must be run on a local file system."
>  }


From MAILER-DAEMON Wed Aug 08 11:54:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sz8aq-0007ko-IJ
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 11:54:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36347)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sz8aj-0007Om-7o
	for coreutils@gnu.org; Wed, 08 Aug 2012 11:54:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sz8ad-0005Zm-Nw
	for coreutils@gnu.org; Wed, 08 Aug 2012 11:54:37 -0400
Received: from moutng.kundenserver.de ([212.227.126.187]:61489)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sz8ad-0005ZX-EG
	for coreutils@gnu.org; Wed, 08 Aug 2012 11:54:31 -0400
Received: from [192.168.2.108] (p4FF74E39.dip.t-dialin.net [79.247.78.57])
	by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis)
	id 0MYLMf-1TCjNl045h-00VCSt; Wed, 08 Aug 2012 17:54:28 +0200
Message-ID: <50228BB3.80703@bernhard-voelker.de>
Date: Wed, 08 Aug 2012 17:54:27 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: =?windows-1252?Q?P=E1draig_Brady?= <P@draigBrady.com>
Subject: Re: new snapshot available: coreutils-8.17.70-1bacb4
References: <87y5lp3002.fsf@rho.meyering.net> <50228907.6080107@draigBrady.com>
In-Reply-To: <50228907.6080107@draigBrady.com>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:IhgGfTyQ8sSQqHRQFLSJ1CRVlxqHWcbl4LpGVUwE2CE
	zXPOwVslp+qrzyEKi4cJYib4O7qk5u9BfaEYmQ3wBvZ3xCu/aB
	Ayoa6DWKQSqvb18vdO1U7rgTQ4tsINMhw1KY+rtYntfE6lCyPf
	Mgiq3QNNZ7cLFlHa8N3GNucdBGk4YXPppz6FtTV/19b/ceacHJ
	UirU2puIn7bXraX3F+P8HBT6m8CrEhk0J5UeVdnFgPIahIOdix
	CtoQVQMsZTQ+P2rxPWVaEnncvWfOM0jsFCnkktDIjmxHbjcNLk
	jiLDC2YlTltaf+69LFul+ptIy6gSudY0ghUXsxG8wQUHNAdKrj
	cqim5/1V34Q9pxdreOmH0JRkPousvWEuPsMMvHEEq
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.126.187
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, 08 Aug 2012 15:54:43 -0000



On 08/08/2012 05:43 PM, Pádraig Brady wrote:

> +require_mount_list_()
> +{
> +  df >/dev/null 2>&1 ||
> +    skip_ "Unable to read the list of mounted file systems."
> +}
> +

Hmm, I think this is not enough: df can also fail due to other reasons,
e.g. when a mount point is not reachable by the user:

  $ src/df > /dev/null  ; echo $?
  src/df: ‘/root/backup’: Permission denied
  1

Have a nice day,
Berny


From MAILER-DAEMON Wed Aug 08 12:07:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sz8nN-0004pH-W2
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 12:07:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33607)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sz8nI-0004oo-OT
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:07:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sz8nH-0002bV-QO
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:07:36 -0400
Received: from mx.meyering.net ([88.168.87.75]:40471)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sz8nH-0002bJ-Jc
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:07:35 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id E8777600FC;
	Wed,  8 Aug 2012 18:07:33 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: new snapshot available: coreutils-8.17.70-1bacb4
In-Reply-To: <50228BB3.80703@bernhard-voelker.de> (Bernhard Voelker's message
	of "Wed, 08 Aug 2012 17:54:27 +0200")
References: <87y5lp3002.fsf@rho.meyering.net>
	<50228907.6080107@draigBrady.com> <50228BB3.80703@bernhard-voelker.de>
Date: Wed, 08 Aug 2012 18:07:33 +0200
Message-ID: <87vcgt1i62.fsf@rho.meyering.net>
Lines: 21
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Wed, 08 Aug 2012 16:07:40 -0000

Bernhard Voelker wrote:

> On 08/08/2012 05:43 PM, P=C3=A1draig Brady wrote:
>
>> +require_mount_list_()
>> +{
>> +  df >/dev/null 2>&1 ||
>> +    skip_ "Unable to read the list of mounted file systems."
>> +}
>> +
>
> Hmm, I think this is not enough: df can also fail due to other reasons,
> e.g. when a mount point is not reachable by the user:
>
>   $ src/df > /dev/null  ; echo $?
>   src/df: =E2=80=98/root/backup=E2=80=99: Permission denied
>   1

Good point.

"df ." or "df /" should be more reliable.


From MAILER-DAEMON Wed Aug 08 12:12:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sz8rt-0006GI-Fq
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 12:12:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51166)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sz8rr-0006GC-I3
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:12:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sz8rq-0004Hr-E1
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:12:19 -0400
Received: from moutng.kundenserver.de ([212.227.126.186]:50979)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sz8rq-0004Hk-4B
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:12:18 -0400
Received: from [192.168.2.108] (p4FF74E39.dip.t-dialin.net [79.247.78.57])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0LgL1E-1TUwuS3RMC-00oJsb; Wed, 08 Aug 2012 18:12:17 +0200
Message-ID: <50228FE0.7080509@bernhard-voelker.de>
Date: Wed, 08 Aug 2012 18:12:16 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: new snapshot available: coreutils-8.17.70-1bacb4
References: <87y5lp3002.fsf@rho.meyering.net> <50228907.6080107@draigBrady.com>
	<50228BB3.80703@bernhard-voelker.de>
	<87vcgt1i62.fsf@rho.meyering.net>
In-Reply-To: <87vcgt1i62.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:t8UB8kRa/B14Bbyn1Tq8b7lzEDkSPok9WonTQMlUFzm
	RfAT9MCxI+r8mvUS0tnZ8+Ywl6ju6iH2tVO+jGO+YJw2Ie4AGb
	xRt1OIyO2ngLlPdiTWgtEMcaE21ZsbKmowUIHu6nu+ZYFcPqoc
	+P08fzpdJ+3It33DzyvsHkpoFwF/0EmfI/lfgUb6mLYAqAI2S0
	88U3K/Yb0BV+H5NpmfJ/lxqs19LkbSgi2by5/yeFtZxzE4wrne
	RuDvyHYQ9daXnbKglFbrZCOumo7eSvjZN7AkL01QENgs3JWo5O
	UdMlG28Lgv9LMhNCphhEI6pqPIntF+4MoBuClbT8SuEAXiBu/7
	u0KtYSeSc8MxSVgb2xjciZrbD38Qdy6RD8B8eXrp7
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.126.186
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, 08 Aug 2012 16:12:20 -0000



On 08/08/2012 06:07 PM, Jim Meyering wrote:
> Bernhard Voelker wrote:
> 
>> On 08/08/2012 05:43 PM, PĂˇdraig Brady wrote:
>>
>>> +require_mount_list_()
>>> +{
>>> +  df >/dev/null 2>&1 ||
>>> +    skip_ "Unable to read the list of mounted file systems."
>>> +}
>>> +
>>
>> Hmm, I think this is not enough: df can also fail due to other reasons,
>> e.g. when a mount point is not reachable by the user:
>>
>>   $ src/df > /dev/null  ; echo $?
>>   src/df: â€�/root/backupâ€™: Permission denied
>>   1
> 
> Good point.
> 
> "df ." or "df /" should be more reliable.

Good idea, but doesn't work either:

  $ src/df . ; echo $?
  src/df: Warning: cannot read table of mounted file systems: No such file or directory
  Filesystem     1K-blocks      Used Available Use% Mounted on
  -              354786776 259885664  93819788  74% /media/sdb5
  0

It's because that's only a warning when arguments are given:

       /* Couldn't read the table of mounted file systems.
         Fail if df was invoked with no file name arguments;
         Otherwise, merely give a warning and proceed.  */

Have a nice day,
Berny


From MAILER-DAEMON Wed Aug 08 12:14:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sz8tp-00070V-Le
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 12:14:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51660)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sz8tm-0006y2-Ml
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:14:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sz8tk-0004en-NI
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:14:18 -0400
Received: from mx1.redhat.com ([209.132.183.28]:2590)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1Sz8tk-0004ec-Eu
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:14:16 -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 q78GEDei004450
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 8 Aug 2012 12:14:13 -0400
Received: from [10.36.116.60] (ovpn-116-60.ams2.redhat.com [10.36.116.60])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q78GEA5g020476
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Wed, 8 Aug 2012 12:14:12 -0400
Message-ID: <50229052.20402@draigBrady.com>
Date: Wed, 08 Aug 2012 17:14:10 +0100
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: new snapshot available: coreutils-8.17.70-1bacb4
References: <87y5lp3002.fsf@rho.meyering.net> <50228907.6080107@draigBrady.com>
	<50228BB3.80703@bernhard-voelker.de>
	<87vcgt1i62.fsf@rho.meyering.net>
In-Reply-To: <87vcgt1i62.fsf@rho.meyering.net>
X-Enigmail-Version: 1.3.2
Content-Type: multipart/mixed; boundary="------------060407070003010807050202"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: Bernhard Voelker <mail@bernhard-voelker.de>, 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, 08 Aug 2012 16:14:19 -0000

This is a multi-part message in MIME format.
--------------060407070003010807050202
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id q78GEDei004450

On 08/08/2012 05:07 PM, Jim Meyering wrote:
> Bernhard Voelker wrote:
>=20
>> On 08/08/2012 05:43 PM, P=C3=A1draig Brady wrote:
>>
>>> +require_mount_list_()
>>> +{
>>> +  df >/dev/null 2>&1 ||
>>> +    skip_ "Unable to read the list of mounted file systems."
>>> +}
>>> +
>>
>> Hmm, I think this is not enough: df can also fail due to other reasons=
,
>> e.g. when a mount point is not reachable by the user:
>>
>>   $ src/df > /dev/null  ; echo $?
>>   src/df: =E2=80=98/root/backup=E2=80=99: Permission denied
>>   1
>=20
> Good point.
>=20
> "df ." or "df /" should be more reliable.

But then it won't fail. It's tricky :)

Updated version that explicitly matches the error is attached.

cheers,
P=C3=A1draig.


--------------060407070003010807050202
Content-Type: text/plain;
 name="df-tests.diff"
Content-Disposition: attachment;
 filename="df-tests.diff"
Content-Transfer-Encoding: base64

RnJvbSBlNDM2NTUxZWUzNGZkN2VmZDU5ZDNmY2UyMTM3ODE2MWRlYTJlNDA0IE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/UD1DMz1BMWRyYWlnPTIwQnJhZHk/
PSA8UEBkcmFpZ0JyYWR5LmNvbT4KRGF0ZTogV2VkLCA4IEF1ZyAyMDEyIDE2OjM4OjM4ICsw
MTAwClN1YmplY3Q6IFtQQVRDSF0gdGVzdHM6IGZpeCB2YWxpZGF0aW9uIG9mIGxvY2FsIGZp
bGUgc3lzdGVtcwoKKiB0ZXN0cy9pbml0LmNmZyAocmVxdWlyZV9tb3VudF9saXN0Xyk6IEEg
bmV3IGZ1bmN0aW9uCnRvIGVuc3VyZSB3ZSBjYW4gcmVhZCB0aGUgbGlzdCBvZiBmaWxlIHN5
c3RlbXMuCihyZXF1aXJlX2xvY2FsX2Rpcl8pOiBDYWxsIHRoZSBhYm92ZSBmdW5jdGlvbiBh
cyBvdGhlcndpc2UKdGhlIGNoZWNrIGlzIGludmFsaWQuCiogdGVzdHMvZGYvdG90YWwtdW5w
cm9jZXNzZWQ6IEVuc3VyZSBkZiBjYW4gcmVhZCB0aGUKbGlzdCBvZiBtb3VudGVkIGZpbGUg
c3lzdGVtcyBzbyB0aGF0IC0tbG9jYWwgY2FuIGJlIGhvbm9yZWQuCi0tLQogdGVzdHMvZGYv
dG90YWwtdW5wcm9jZXNzZWQgfCAgICAzICsrLQogdGVzdHMvaW5pdC5jZmcgICAgICAgICAg
ICAgfCAgICA4ICsrKysrKysrCiAyIGZpbGVzIGNoYW5nZWQsIDEwIGluc2VydGlvbnMoKyks
IDEgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvdGVzdHMvZGYvdG90YWwtdW5wcm9jZXNz
ZWQgYi90ZXN0cy9kZi90b3RhbC11bnByb2Nlc3NlZAppbmRleCA5NzQyNTkxLi5hYTQ5ODM2
IDEwMDc1NQotLS0gYS90ZXN0cy9kZi90b3RhbC11bnByb2Nlc3NlZAorKysgYi90ZXN0cy9k
Zi90b3RhbC11bnByb2Nlc3NlZApAQCAtMTksNiArMTksNyBAQAogCiAuICIke3NyY2Rpcj0u
fS9pbml0LnNoIjsgcGF0aF9wcmVwZW5kXyAuLi9zcmMKIHByaW50X3Zlcl8gZGYKK3JlcXVp
cmVfbW91bnRfbGlzdF8KIAogY2F0IDw8XEVPRiA+IGV4cCB8fCBmcmFtZXdvcmtfZmFpbHVy
ZV8KIGRmOiBubyBmaWxlIHN5c3RlbXMgcHJvY2Vzc2VkCkBAIC0yNyw3ICsyOCw3IEBAIEVP
RgogIyBUaGUgZm9sbG93aW5nIHNpbXBseSBmaW5kcyBubyBtYXRjaCBmb3IgdGhlIGNvbWJp
bmF0aW9uCiAjIG9mIHRoZSBvcHRpb25zIC0tbG9jYWwgYW5kIEZTLXR5cGUgbmZzIHRvZ2V0
aGVyIHdpdGggdGhlCiAjIGFyZ3VtZW50ICIuIi4gSXQgbXVzdCBleGl0IG5vbi1aZXJvIG5v
bmV0aGVsZXNzLgotZGYgLS1sb2NhbCAtdCBuZnMgLS10b3RhbCAiLiIgMj5vdXQgJiYgZmFp
bD0xCitkZiAtLWxvY2FsIC10IG5mcyAtLXRvdGFsICcuJyAyPm91dCAmJiBmYWlsPTEKIGNv
bXBhcmUgZXhwIG91dCB8fCBmYWlsPTEKIAogY2F0IDw8XEVPRiA+IGV4cCB8fCBmcmFtZXdv
cmtfZmFpbHVyZV8KZGlmZiAtLWdpdCBhL3Rlc3RzL2luaXQuY2ZnIGIvdGVzdHMvaW5pdC5j
ZmcKaW5kZXggNTA2YzliMy4uMjU2OGUxNCAxMDA2NDQKLS0tIGEvdGVzdHMvaW5pdC5jZmcK
KysrIGIvdGVzdHMvaW5pdC5jZmcKQEAgLTc3LDggKzc3LDE2IEBAIGlzX2xvY2FsX2Rpcl8o
KQogICBkZiAtLWxvY2FsICIkMSIgPi9kZXYvbnVsbCAyPiYxCiB9CiAKK3JlcXVpcmVfbW91
bnRfbGlzdF8oKQoreworICBtb3VudF9saXN0X2ZhaWw9J2Nhbm5vdCByZWFkIHRhYmxlIG9m
IG1vdW50ZWQgZmlsZSBzeXN0ZW1zJworICBkZiAyPiYxIHwgZ3JlcCAtRiAiJG1vdW50X2xp
c3RfZmFpbCIgPi9kZXYvbnVsbCAmJgorICAgIHNraXBfICIkbW91bnRfbGlzdF9mYWlsIgor
fQorCiByZXF1aXJlX2xvY2FsX2Rpcl8oKQogeworICByZXF1aXJlX21vdW50X2xpc3RfCiAg
IGlzX2xvY2FsX2Rpcl8gLiB8fAogICAgIHNraXBfICJUaGlzIHRlc3QgbXVzdCBiZSBydW4g
b24gYSBsb2NhbCBmaWxlIHN5c3RlbS4iCiB9Ci0tIAoxLjcuNi40Cgo=
--------------060407070003010807050202--


From MAILER-DAEMON Wed Aug 08 12:31:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sz9AC-0003IH-Ta
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 12:31:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40278)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sz9AA-0003H3-S4
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:31:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sz9A9-0002OS-LA
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:31:14 -0400
Received: from moutng.kundenserver.de ([212.227.17.9]:53056)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Sz9A9-0002NS-BJ
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:31:13 -0400
Received: from [192.168.2.108] (p4FF74E39.dip.t-dialin.net [79.247.78.57])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0LhiSr-1TU6LG2GdF-00nUVV; Wed, 08 Aug 2012 18:31:12 +0200
Message-ID: <5022944E.80204@bernhard-voelker.de>
Date: Wed, 08 Aug 2012 18:31:10 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
Subject: Re: new snapshot available: coreutils-8.17.70-1bacb4
References: <87y5lp3002.fsf@rho.meyering.net> <50228907.6080107@draigBrady.com>
	<50228BB3.80703@bernhard-voelker.de>
	<87vcgt1i62.fsf@rho.meyering.net> <50229052.20402@draigBrady.com>
In-Reply-To: <50229052.20402@draigBrady.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:tPTZ549UU2QRuMCKNefP9aNzECqWcibqtVeSLmVt6h2
	jQkAubzAl8R17ePqB69xSqri+GVqmcIJ9MIRPB7AG3wRfRsFHp
	ZdOTnmS02QhTCCRDgPnd7BCApg59pzhYqyueKwMMlHZbEvrYkr
	wWw6+c0SHxePnH5TFKDjp3UlfI74X3iORvkC/Aek1QEfSTZZfs
	j1CzJOsC1SfN08CD0wayZ4GLdp94gXTiKBtsbbbr5XqsHtw5VB
	L0OEr7ZIXO/pRP1uVGcgPXbq+P1U7A0hcNhjDmThHTILsopY0t
	9IKZmPz5WXz2kaSTHc9v9Q9v8C1eJ71lLYjDWZMy6R2qFXHkZR
	JnjORCa+QJDrLtw8PumtQKISSst3dr3nARp6p8cfu
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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: Wed, 08 Aug 2012 16:31:15 -0000


On 08/08/2012 06:14 PM, PĂˇdraig Brady wrote:
> But then it won't fail. It's tricky :)
> 
> Updated version that explicitly matches the error is attached.

Looks good.
Thanks for fixing my test!

Have a nice day,
Berny


From MAILER-DAEMON Wed Aug 08 12:33:12 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Sz9C4-0003mV-PL
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 12:33:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41024)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sz9C1-0003lV-Ep
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:33:10 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sz9Bw-0003K5-Kk
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:33:09 -0400
Received: from mx.meyering.net ([88.168.87.75]:40549)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Sz9Bw-0003Ja-DR
	for coreutils@gnu.org; Wed, 08 Aug 2012 12:33:04 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 3B1D36035F;
	Wed,  8 Aug 2012 18:33:02 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: new snapshot available: coreutils-8.17.70-1bacb4
In-Reply-To: <50229052.20402@draigBrady.com> (=?iso-8859-1?Q?=22P=E1draig?=
	Brady"'s message of "Wed, 08 Aug 2012 17:14:10 +0100")
References: <87y5lp3002.fsf@rho.meyering.net>
	<50228907.6080107@draigBrady.com> <50228BB3.80703@bernhard-voelker.de>
	<87vcgt1i62.fsf@rho.meyering.net> <50229052.20402@draigBrady.com>
Date: Wed, 08 Aug 2012 18:33:02 +0200
Message-ID: <87k3x91gzl.fsf@rho.meyering.net>
Lines: 60
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: Bernhard Voelker <mail@bernhard-voelker.de>, 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, 08 Aug 2012 16:33:10 -0000

P=C3=A1draig Brady wrote:
> On 08/08/2012 05:07 PM, Jim Meyering wrote:
>> Bernhard Voelker wrote:
>>
>>> On 08/08/2012 05:43 PM, P=C3=A1draig Brady wrote:
>>>
>>>> +require_mount_list_()
>>>> +{
>>>> +  df >/dev/null 2>&1 ||
>>>> +    skip_ "Unable to read the list of mounted file systems."
>>>> +}
>>>> +
>>>
>>> Hmm, I think this is not enough: df can also fail due to other reasons,
>>> e.g. when a mount point is not reachable by the user:
>>>
>>>   $ src/df > /dev/null  ; echo $?
>>>   src/df: =E2=80=98/root/backup=E2=80=99: Permission denied
>>>   1
>>
>> Good point.
>>
>> "df ." or "df /" should be more reliable.
>
> But then it won't fail. It's tricky :)

Yep.  I should have looked at the code.

> Updated version that explicitly matches the error is attached.
...
> Subject: [PATCH] tests: fix validation of local file systems
>
> * tests/init.cfg (require_mount_list_): A new function
> to ensure we can read the list of file systems.
> (require_local_dir_): Call the above function as otherwise

s/ as/, as/ :-)

> the check is invalid.
> * tests/df/total-unprocessed: Ensure df can read the
> list of mounted file systems so that --local can be honored.
...
> +require_mount_list_()
> +{
> +  mount_list_fail=3D'cannot read table of mounted file systems'

Might as well get in the habit of using "local" in this file.

> +  df 2>&1 | grep -F "$mount_list_fail" >/dev/null &&
> +    skip_ "$mount_list_fail"
> +}
> +
>  require_local_dir_()
>  {
> +  require_mount_list_
>    is_local_dir_ . ||
>      skip_ "This test must be run on a local file system."
>  }

ACK.


From MAILER-DAEMON Wed Aug 08 16:48:06 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzDAk-0008L1-75
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 16:48:06 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53760)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SzDAg-0008AL-PL
	for coreutils@gnu.org; Wed, 08 Aug 2012 16:48:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SzDAd-0003yn-Jf
	for coreutils@gnu.org; Wed, 08 Aug 2012 16:48:01 -0400
Received: from mx.meyering.net ([88.168.87.75]:41250)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SzDAd-0003yf-CV
	for coreutils@gnu.org; Wed, 08 Aug 2012 16:47:59 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 9A3E66018D;
	Wed,  8 Aug 2012 22:47:57 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: du bogus warning with bind mounts
In-Reply-To: <305815138.561338.1344434507966.JavaMail.root@redhat.com> (Ondrej
	Oprala's message of "Wed, 8 Aug 2012 10:01:47 -0400 (EDT)")
References: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
Date: Wed, 08 Aug 2012 22:47:57 +0200
Message-ID: <87wr19yute.fsf@rho.meyering.net>
Lines: 92
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Wed, 08 Aug 2012 20:48:05 -0000

Ondrej Oprala wrote:
> Hi, I've changed the du util a bit to reflect
> the proposed solution here
> http://marc.info/?l=coreutils-bug&m=134124896022426&w=2 .

Thanks for working on this!

> I'm not sure about the XDEV checking though. Shouldn't the matching
> st_dev numbers be enough to know both files are on the same device?
> If true, then the check is implied in the di_set_lookup function, isn't it?

This is the code for --one-file-system (-x):

          /* The --one-file-system (-x) option cannot exclude anything
             specified on the command-line.  By definition, it can exclude
             a file or directory only when its device number is different
             from that of its just-processed parent directory, and du does
             not process the parent of a command-line argument.  */
          if (fts->fts_options & FTS_XDEV
              && FTS_ROOTLEVEL < ent->fts_level
              && fts->fts_dev != sb->st_dev)
            excluded = true;

It sounds like you have doubts about it?  If so, please be precise.
Giving an example might help.

> Subject: [PATCH] du: Fix an issue with bogus warnings on bind-mounted
>  directories
>
> * NEWS: Mention the fix.
> * src/du.c: Add a function to read+stat mount points
> and properly check cyclic directory entries.
> ---
>  NEWS     |  3 +++
>  gnulib   |  2 +-
>  src/du.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++---
>  3 files changed, 55 insertions(+), 4 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index ca4568a..8f85c2b 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -4,6 +4,9 @@ GNU coreutils NEWS                                    -*- outline -*-
>
>  ** Bug fixes
>
> +  du no longer emits bogus warnings when traversing bind-mounted
> +  directory cycles.
> +
>    cksum now prints checksums atomically so that concurrent
>    processes will not intersperse their output.
>    [the bug dates back to the initial implementation]
> diff --git a/gnulib b/gnulib
> index 39cedf6..696aa74 160000
> --- a/gnulib
> +++ b/gnulib
> @@ -1 +1 @@
> -Subproject commit 39cedf6f427350ac47118d231c05a7b73b609f89
> +Subproject commit 696aa74b38f8c109c21e4c01194faab53fb4cefc

Please do not include a gnulib submodule update like this.
To reset the git submodule to the reference commit, run this:

    git submodule update

> diff --git a/src/du.c b/src/du.c
> index 7333941..b915320 100644
> --- a/src/du.c
> +++ b/src/du.c
> @@ -27,6 +27,7 @@
>  #include <getopt.h>
>  #include <sys/types.h>
>  #include <assert.h>
> +#include <mntent.h>
>  #include "system.h"
>  #include "argmatch.h"
>  #include "argv-iter.h"
> @@ -60,9 +61,14 @@ extern bool fts_debug;
>  # define FTS_CROSS_CHECK(Fts)
>  #endif
>
> +#define MTAB "/etc/mtab"

Using <mntent.h> and its functions is not portable.
Please use the gnulib function, read_file_system_list,
from mountlist.c as df.c does.

It would be great if you were to include a new test case
to exercise this, too.  I see that tests/rm/one-file-system
creates a bind mount, so you might want to use it as a model.
Note how it is a root-only test and its cleanup_ functions is
careful to perform the unmount.


From MAILER-DAEMON Wed Aug 08 19:23:06 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzFak-0000Hs-Kw
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 19:23:06 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34257)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <justinmattock@gmail.com>) id 1SzFMM-0007RX-5G
	for coreutils@gnu.org; Wed, 08 Aug 2012 19:08:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <justinmattock@gmail.com>) id 1SzFML-0006tA-8r
	for coreutils@gnu.org; Wed, 08 Aug 2012 19:08:14 -0400
Received: from mail-vc0-f169.google.com ([209.85.220.169]:45856)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <justinmattock@gmail.com>) id 1SzFML-0006sy-52
	for coreutils@gnu.org; Wed, 08 Aug 2012 19:08:13 -0400
Received: by vcbfl10 with SMTP id fl10so1497955vcb.0
	for <coreutils@gnu.org>; Wed, 08 Aug 2012 16:08:12 -0700 (PDT)
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=eC+1UVT0PYrTgPUdLzqWGun6VNPKakIoQ7E+CqqReTM=;
	b=eIIf/Ke0qvn99CixhkO+pbQjHRhN72p98i1e7FUIuE5LXxjJeJ5A+yWANHcHjQXqFN
	Fsr7vZwxvVovJ/0cZHDMPME7Mqe6YZmyc9HeQTwjH5Q1SxHhZFjB2nN21uxkhpNxtphn
	IDdJWX0ZyO1Q8LEk0LRLGCgYvMiq5mJ+OAol6oy0LD119oFtjSh9noDbGw9y8HaA3lOD
	nj2Grmy0yJCxqugNQmdAzrO3JXmrOpzQcJ0ZPak+E3VDBDcNqZ5NDUpASGDtsx9FnKMH
	ahOyGEk+xi9nlrwjJ0l+DCQNu1N6nvTCReSKYAOSOy9pl/y+sV4Z8Zg4vKO5F9hDfQIz
	JuTA==
MIME-Version: 1.0
Received: by 10.58.74.71 with SMTP id r7mr17438953vev.44.1344467291979; Wed,
	08 Aug 2012 16:08:11 -0700 (PDT)
Received: by 10.220.20.142 with HTTP; Wed, 8 Aug 2012 16:08:11 -0700 (PDT)
Date: Wed, 8 Aug 2012 16:08:11 -0700
Message-ID: <CAKFRV=O49KQpDufjYcsdgfCwBfKh+TRpLkDFr5o4VY3_f=ZwFw@mail.gmail.com>
Subject: using dd to prepare a file to be written to memory blocks(remove
	padding)
From: Justin Mattock <justinmattock@gmail.com>
To: coreutils@gnu.org
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.220.169
X-Mailman-Approved-At: Wed, 08 Aug 2012 19:23:05 -0400
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, 08 Aug 2012 23:08:15 -0000

im not on the list so please cc's me, and if this is the wrong list
for this question then let me know so I may find the right one
to find info.

what are the tools to _prepare_ a file to be uploaded to memory(right
now im using dd)? is there a way to not pad a file? or keep the size
of the file without adding any padding to it so the size stays where
it needs to be, but the info inside is aligned from start to finish
without zero?

bassically what im looking at:
fixed block(partition) = 9,504kb
file that needs to be uploaded to partition = 9,216
file padding = 288kb (how to remove this in the end of the file?)

is there a program that is capable of stretching the file(9,216) so it
fits the partition of 9,504 or am I totally doing things wrong?

cheers,

-- 
Justin P. Mattock


From MAILER-DAEMON Wed Aug 08 19:35:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzFmJ-0001qa-7X
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 19:35:03 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49095)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SzFmG-0001om-Ra
	for coreutils@gnu.org; Wed, 08 Aug 2012 19:35:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SzFmF-0006mu-UE
	for coreutils@gnu.org; Wed, 08 Aug 2012 19:35:00 -0400
Received: from mx1.redhat.com ([209.132.183.28]:47520)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1SzFmF-0006mq-ME
	for coreutils@gnu.org; Wed, 08 Aug 2012 19:34:59 -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 q78NYvTO026736
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 8 Aug 2012 19:34:58 -0400
Received: from [10.36.116.60] (ovpn-116-60.ams2.redhat.com [10.36.116.60])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q78NYtpS014783
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Wed, 8 Aug 2012 19:34:57 -0400
Message-ID: <5022F79F.7070805@draigBrady.com>
Date: Thu, 09 Aug 2012 00:34:55 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Justin Mattock <justinmattock@gmail.com>
Subject: Re: using dd to prepare a file to be written to memory blocks(remove
	padding)
References: <CAKFRV=O49KQpDufjYcsdgfCwBfKh+TRpLkDFr5o4VY3_f=ZwFw@mail.gmail.com>
In-Reply-To: <CAKFRV=O49KQpDufjYcsdgfCwBfKh+TRpLkDFr5o4VY3_f=ZwFw@mail.gmail.com>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
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
	q78NYvTO026736
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 08 Aug 2012 23:35:01 -0000

On 08/09/2012 12:08 AM, Justin Mattock wrote:
> im not on the list so please cc's me, and if this is the wrong list
> for this question then let me know so I may find the right one
> to find info.
>=20
> what are the tools to _prepare_ a file to be uploaded to memory(right
> now im using dd)? is there a way to not pad a file? or keep the size
> of the file without adding any padding to it so the size stays where
> it needs to be, but the info inside is aligned from start to finish
> without zero?
>=20
> bassically what im looking at:
> fixed block(partition) =3D 9,504kb
> file that needs to be uploaded to partition =3D 9,216
> file padding =3D 288kb (how to remove this in the end of the file?)
>=20
> is there a program that is capable of stretching the file(9,216) so it
> fits the partition of 9,504 or am I totally doing things wrong?

I don't understand what you mean exactly.

If you want to write data to a particular part of a file,
look at the conv=3Dnotrunc and seek=3DBLOCKS options.
If you want to handle zero blocks in the input specially,
note the conv=3Dsparse option added in version 8.16

cheers,
P=E1draig.


From MAILER-DAEMON Wed Aug 08 20:14:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzGOq-0004hT-AT
	for mharc-coreutils@gnu.org; Wed, 08 Aug 2012 20:14:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40185)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <justinmattock@gmail.com>) id 1SzGOn-0004hN-SV
	for coreutils@gnu.org; Wed, 08 Aug 2012 20:14:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <justinmattock@gmail.com>) id 1SzGOm-0000In-Sz
	for coreutils@gnu.org; Wed, 08 Aug 2012 20:14:49 -0400
Received: from mail-vb0-f41.google.com ([209.85.212.41]:47210)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <justinmattock@gmail.com>) id 1SzGOm-0000Ij-HM
	for coreutils@gnu.org; Wed, 08 Aug 2012 20:14:48 -0400
Received: by vbkv13 with SMTP id v13so1546480vbk.0
	for <coreutils@gnu.org>; Wed, 08 Aug 2012 17:14:48 -0700 (PDT)
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
	:cc:content-type:content-transfer-encoding;
	bh=GbE13a0h3V5Qt/m1i633TWDGT5u9SrFPtT4qhZyA46E=;
	b=HJGx0mYKsYTXOC6KXI4mZBj476vcuiwXTW/2Ok/J3/wYDkUMG0N8111WWpsha3DM57
	e1fjXL90VmMLQSdlZSDWJqDwDSqxVApeRlxcsSiK16Nj4g8DUvT0VgtY2DDgwitkg4/I
	3q+02oOfaCRwz+/Ool8fXC+Ulv4XgSZvi9Br96dx0dgdSe+CZ6F25ao+X8ju9cAK13hr
	GfkBct74F7AD13oza3V52TMF3kdKP4q5lyAYYWqhS9dQd1Z18dif6ubK7QE9TtS2yvqb
	5nV/9SXqMaFpIrY0GzBYWyZzxG01+DUyrwnp6oCni4Jd9m79eIa9ReZPrbkfz0JprNcW
	PM1g==
MIME-Version: 1.0
Received: by 10.58.12.7 with SMTP id u7mr12231568veb.8.1344471288000; Wed, 08
	Aug 2012 17:14:48 -0700 (PDT)
Received: by 10.220.20.142 with HTTP; Wed, 8 Aug 2012 17:14:47 -0700 (PDT)
In-Reply-To: <5022F79F.7070805@draigBrady.com>
References: <CAKFRV=O49KQpDufjYcsdgfCwBfKh+TRpLkDFr5o4VY3_f=ZwFw@mail.gmail.com>
	<5022F79F.7070805@draigBrady.com>
Date: Wed, 8 Aug 2012 17:14:47 -0700
Message-ID: <CAKFRV=NZDiiRq3VwEoT+rG93o=_pmUvO2cKbXSiME=DcEbPgLg@mail.gmail.com>
Subject: Re: using dd to prepare a file to be written to memory blocks(remove
	padding)
From: Justin Mattock <justinmattock@gmail.com>
To: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigbrady.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.41
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, 09 Aug 2012 00:14:50 -0000

On Wed, Aug 8, 2012 at 4:34 PM, P=E1draig Brady <P@draigbrady.com> wrote:
> On 08/09/2012 12:08 AM, Justin Mattock wrote:
>> im not on the list so please cc's me, and if this is the wrong list
>> for this question then let me know so I may find the right one
>> to find info.
>>
>> what are the tools to _prepare_ a file to be uploaded to memory(right
>> now im using dd)? is there a way to not pad a file? or keep the size
>> of the file without adding any padding to it so the size stays where
>> it needs to be, but the info inside is aligned from start to finish
>> without zero?
>>
>> bassically what im looking at:
>> fixed block(partition) =3D 9,504kb
>> file that needs to be uploaded to partition =3D 9,216
>> file padding =3D 288kb (how to remove this in the end of the file?)
>>
>> is there a program that is capable of stretching the file(9,216) so it
>> fits the partition of 9,504 or am I totally doing things wrong?
>
> I don't understand what you mean exactly.
>
> If you want to write data to a particular part of a file,
> look at the conv=3Dnotrunc and seek=3DBLOCKS options.
> If you want to handle zero blocks in the input specially,
> note the conv=3Dsparse option added in version 8.16
>
> cheers,
> P=E1draig.

cool! thanks for the info.. I will look into conv=3Dsparse etc..
as to make sense with what im doing
I have a fixed partition that needs to have the file aligned to its
size before it can write to it, then once I write to it
I need to have no padding in the file.
from what I can see so far(might be wrong).

rough view:
fixed block partition size =3D 9,504
file size to be uploaded to fixed partition =3D 9,216
remaining size is =3D 288(padding)

I need to see if I can keep the file at 9,504(so the app will upload
to the partition)
but insert data of 9,216 but not have whitespace in the file(padding)

in any case I appreciate the response and will look into what you are sayin=
g.

--=20
Justin P. Mattock


From MAILER-DAEMON Thu Aug 09 02:53:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzMcv-0001u9-7c
	for mharc-coreutils@gnu.org; Thu, 09 Aug 2012 02:53:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50754)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <philomath868@gmail.com>) id 1SzMcs-0001rM-Ak
	for coreutils@gnu.org; Thu, 09 Aug 2012 02:53:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <philomath868@gmail.com>) id 1SzMcr-0005gg-Gw
	for coreutils@gnu.org; Thu, 09 Aug 2012 02:53:46 -0400
Received: from mail-pb0-f41.google.com ([209.85.160.41]:56370)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <philomath868@gmail.com>) id 1SzMcr-0005ff-AQ
	for coreutils@gnu.org; Thu, 09 Aug 2012 02:53:45 -0400
Received: by pbbro12 with SMTP id ro12so461222pbb.0
	for <coreutils@gnu.org>; Wed, 08 Aug 2012 23:53:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:date:message-id:subject:from:to:cc:content-type;
	bh=FNYmiOcK60zrwv6L9uuwbqQjErP5U+Poilm9U4HSOoo=;
	b=swXgJJ8l8bDXyGS8olEy28S1AnaZpuUCaTrTjki731kWtbao7Gf0zNjPlzVzlcIdaN
	L3vJWSMGDLpMcPnYvqcIt64RvXZIVB/5JyVwU9n0rAr9Chc1G2TnETGCj1NBDqmWCQlW
	hdF1PoafMjy/jOU1HLbMO3QbVtTDoLqU0cTr0HMg0CWgF4yaLWfTvtZGFHSVjddNv5Nf
	IUCzlQReHLrCvZG0IMI34EGdpuubmY5IGkH0IgLj+KctejHnlrZ7MMUYG60UFXfBxLLm
	MZgKlseNiVAHwrx0qi/YE6rP272XW9Ti/2fmJUqpsASxAQtIq34GnORJVmJRkNtE8qSI
	TnoQ==
MIME-Version: 1.0
Received: by 10.68.225.233 with SMTP id rn9mr1615802pbc.135.1344495224002;
	Wed, 08 Aug 2012 23:53:44 -0700 (PDT)
Received: by 10.66.147.40 with HTTP; Wed, 8 Aug 2012 23:53:43 -0700 (PDT)
Date: Thu, 9 Aug 2012 08:53:43 +0200
Message-ID: <CABOpGfvxYCj18cs9641RABkQXxSHFC_MWF4BubLWRHZE+xmcbQ@mail.gmail.com>
Subject: Re: using dd to prepare a file to be written to memory blocks(remove
	padding)
From: ohav chochmah <philomath868@gmail.com>
To: Justin Mattock <justinmattock@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.160.41
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, 09 Aug 2012 06:53:47 -0000

Hi,

Aren't you looking for truncate(1)?

Cheers.


From MAILER-DAEMON Thu Aug 09 04:12:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzNrB-0008Ai-2o
	for mharc-coreutils@gnu.org; Thu, 09 Aug 2012 04:12:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53653)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SzNr8-0008AI-Gs
	for coreutils@gnu.org; Thu, 09 Aug 2012 04:12:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SzNr4-0004u1-5q
	for coreutils@gnu.org; Thu, 09 Aug 2012 04:12:34 -0400
Received: from mx.meyering.net ([88.168.87.75]:42953)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SzNr3-0004tu-Ul
	for coreutils@gnu.org; Thu, 09 Aug 2012 04:12:30 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 536F860085;
	Thu,  9 Aug 2012 10:12:29 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: du bogus warning with bind mounts
In-Reply-To: <305815138.561338.1344434507966.JavaMail.root@redhat.com> (Ondrej
	Oprala's message of "Wed, 8 Aug 2012 10:01:47 -0400 (EDT)")
References: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
Date: Thu, 09 Aug 2012 10:12:29 +0200
Message-ID: <87fw7wxz4i.fsf@rho.meyering.net>
Lines: 35
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 09 Aug 2012 08:12:36 -0000

Ondrej Oprala wrote:
> Hi, I've changed the du util a bit to reflect
> the proposed solution here
> http://marc.info/?l=coreutils-bug&m=134124896022426&w=2 .
...
> +  while (mnt_ent = getmntent (mtab_fp))
> +    {
> +      if (!stat (mnt_ent->mnt_dir, buf))
> +        hash_ins (di_mnt, buf->st_ino, buf->st_dev);
> +    }

Also, please heed my advice inspired by Paul's comment (next in that
thread) that stat may hang on non-local mounts:

    http://marc.info/?l=coreutils-bug&m=134130469407031&w=2

    Paul Eggert wrote:
    > On 07/02/2012 10:04 AM, Jim Meyering wrote:
    >>       - read+stat all mount points at start-up
    >
    > This sounds like it might have problems on hosts that have
    > lots of mount points, or where some mount points are remote.
    > I've been on many systems where statting a remote
    > mount point can take a long time, or even hang indefinitely.
    >
    > The problem with remote mounts might be attacked by using
    > getmntent to find out which mount points are on the
    > current file system and can therefore be safely statted
    > (I haven't used getmntent enough to know whether this is feasible,
    > sorry).

    Since with bind mounts we care only about non-remote mount points,
    we can call read_file_system_list to get the list, and then stat only
    those mount point directories for which !mount_entry.me_remote
    (and probably && !...me_dummy)


From MAILER-DAEMON Thu Aug 09 05:16:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzOqw-0000JK-2l
	for mharc-coreutils@gnu.org; Thu, 09 Aug 2012 05:16:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59277)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SzOqp-0000In-Fi
	for coreutils@gnu.org; Thu, 09 Aug 2012 05:16:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SzOqn-0007hM-GA
	for coreutils@gnu.org; Thu, 09 Aug 2012 05:16:19 -0400
Received: from mx1.redhat.com ([209.132.183.28]:9792)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SzOqn-0007b6-7m
	for coreutils@gnu.org; Thu, 09 Aug 2012 05:16:17 -0400
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 q799GFI7029973
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 9 Aug 2012 05:16:15 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q799GC8s031469
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 9 Aug 2012 05:16:14 -0400
Message-ID: <50237FDC.3070502@redhat.com>
Date: Thu, 09 Aug 2012 11:16:12 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: du bogus warning with bind mounts
References: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
	<87fw7wxz4i.fsf@rho.meyering.net>
In-Reply-To: <87fw7wxz4i.fsf@rho.meyering.net>
Content-Type: multipart/mixed; boundary="------------050706010306030006060104"
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 09 Aug 2012 09:16:24 -0000

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

Hi,
  I've redone the patch to use mountlist instead of mntent, added the 
!remote && !dummy
condition and created a test for it.
Cheers,
  Ondrej

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

>From 0e462bfc67e8bab3b7d5eea37b96b050d8db47e6 Mon Sep 17 00:00:00 2001
From: Ondrej Oprala <ooprala@redhat.com>
Date: Thu, 9 Aug 2012 11:06:51 +0200
Subject: [PATCH] du: Fix an issue with bogus warnings on bind-mounted
 directories

* NEWS: Mention the fix.
* src/du.c: Add a function to read+stat mount points
and properly check cyclic directory entries.
* tests/Makefile.am: Add a new file.
* tests/du/cyclic-dir: Add a test for the fix.
---
 NEWS                |  3 +++
 src/du.c            | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++---
 tests/Makefile.am   |  1 +
 tests/du/cyclic-dir | 40 +++++++++++++++++++++++++++++++++++
 4 files changed, 102 insertions(+), 3 deletions(-)
 create mode 100755 tests/du/cyclic-dir

diff --git a/NEWS b/NEWS
index ca4568a..8f85c2b 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,9 @@ GNU coreutils NEWS                                    -*- outline -*-
 
 ** Bug fixes
 
+  du no longer emits bogus warnings when traversing bind-mounted
+  directory cycles.
+
   cksum now prints checksums atomically so that concurrent
   processes will not intersperse their output.
   [the bug dates back to the initial implementation]
diff --git a/src/du.c b/src/du.c
index 7333941..1f3a3e4 100644
--- a/src/du.c
+++ b/src/du.c
@@ -27,6 +27,7 @@
 #include <getopt.h>
 #include <sys/types.h>
 #include <assert.h>
+#include "mountlist.h"
 #include "system.h"
 #include "argmatch.h"
 #include "argv-iter.h"
@@ -60,9 +61,14 @@ extern bool fts_debug;
 # define FTS_CROSS_CHECK(Fts)
 #endif
 
+#define MTAB "/etc/mtab"
+
 /* A set of dev/ino pairs.  */
 static struct di_set *di_set;
 
+/* A hash table for mount points. */
+static struct di_set *di_mnt;
+
 /* Keep track of the preceding "level" (depth in hierarchy)
    from one call of process_file to the next.  */
 static size_t prev_level;
@@ -333,11 +339,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   exit (status);
 }
 
-/* Try to insert the INO/DEV pair into the global table, HTAB.
+/* Try to insert the INO/DEV pair into the di_set table.
    Return true if the pair is successfully inserted,
    false if the pair is already in the table.  */
 static bool
-hash_ins (ino_t ino, dev_t dev)
+hash_ins (struct di_set *di_set, ino_t ino, dev_t dev)
 {
   int inserted = di_set_insert (di_set, dev, ino);
   if (inserted < 0)
@@ -461,7 +467,7 @@ process_file (FTS *fts, FTSENT *ent)
       if (excluded
           || (! opt_count_all
               && (hash_all || (! S_ISDIR (sb->st_mode) && 1 < sb->st_nlink))
-              && ! hash_ins (sb->st_ino, sb->st_dev)))
+              && ! hash_ins (di_set, sb->st_ino, sb->st_dev)))
         {
           /* If ignoring a directory in preorder, skip its children.
              Ignore the next fts_read output too, as it's a postorder
@@ -476,6 +482,17 @@ process_file (FTS *fts, FTSENT *ent)
           return true;
         }
 
+      /*Check if dir is already in the mount table */
+      if (S_ISDIR (sb->st_mode))
+        {
+          if (di_set_lookup (di_mnt, sb->st_dev, sb->st_ino))
+            {
+              fts_set (fts, ent, FTS_SKIP);
+              error (0, 0, _("mount point %s already traversed"), quote (file));
+              return false;
+            }
+        }
+
       switch (info)
         {
         case FTS_D:
@@ -623,6 +640,36 @@ du_files (char **files, int bit_flags)
   return ok;
 }
 
+/* Fill the di_mnt table with dev/ino pairs
+ * of mount points  */
+
+static void
+fill_mount_table (void)
+{
+  struct mount_entry *mnt_ent, *mnt_free;
+  struct stat *buf;
+  buf = xmalloc (sizeof *buf);
+
+  mnt_ent = read_file_system_list (false);
+  while (mnt_ent)
+    {
+      if (!mnt_ent->me_remote && !mnt_ent->me_dummy)
+        {
+          stat (mnt_ent->me_mountdir, buf);
+          hash_ins (di_mnt, buf->st_ino, buf->st_dev);
+        }
+
+      mnt_free = mnt_ent;
+      mnt_ent = mnt_ent->me_next;
+
+      free (mnt_free->me_devname);
+      free (mnt_free->me_mountdir);
+      free (mnt_free->me_type);
+      free (mnt_free);
+    }
+  free (buf);
+}
+
 int
 main (int argc, char **argv)
 {
@@ -922,6 +969,13 @@ main (int argc, char **argv)
     xalloc_die ();
 
   /* Initialize the set of dev,inode pairs.  */
+
+  di_mnt = di_set_alloc ();
+  if (!di_mnt)
+    xalloc_die ();
+
+  fill_mount_table ();
+
   di_set = di_set_alloc ();
   if (!di_set)
     xalloc_die ();
@@ -1002,6 +1056,7 @@ main (int argc, char **argv)
 
   argv_iter_free (ai);
   di_set_free (di_set);
+  di_set_free (di_mnt);
 
   if (files_from && (ferror (stdin) || fclose (stdin) != 0) && ok)
     error (EXIT_FAILURE, 0, _("error reading %s"), quote (files_from));
diff --git a/tests/Makefile.am b/tests/Makefile.am
index edc04b4..20c313d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -32,6 +32,7 @@ root_tests =					\
   cp/sparse-fiemap				\
   dd/skip-seek-past-dev				\
   df/problematic-chars				\
+  du/cyclic-dir					\
   install/install-C-root			\
   ls/capability					\
   ls/nameless-uid				\
diff --git a/tests/du/cyclic-dir b/tests/du/cyclic-dir
new file mode 100755
index 0000000..65569ce
--- /dev/null
+++ b/tests/du/cyclic-dir
@@ -0,0 +1,40 @@
+#!/bin/sh
+# Ensure du properly handles bind mounts
+
+# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+print_ver_ rm
+require_root_
+
+cleanup_()
+{
+  # When you take the undesirable shortcut of making /etc/mtab a link
+  # to /proc/mounts, unmounting "$other_partition_tmpdir" would fail.
+  # So, here we unmount a/b instead.
+  umount a/b
+  rm -rf "$other_partition_tmpdir"
+}
+. "$abs_srcdir/other-fs-tmpdir"
+
+t=$other_partition_tmpdir
+mkdir -p a/b $t/y
+mount --bind $t a/b \
+  || skip_ "This test requires mount with a working --bind option."
+
+du a && fail=1
+
+Exit $fail
-- 
1.7.11.2


--------------050706010306030006060104--


From MAILER-DAEMON Thu Aug 09 06:41:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzQBa-0007Fe-6Z
	for mharc-coreutils@gnu.org; Thu, 09 Aug 2012 06:41:50 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60342)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SzQBX-0007ET-4y
	for coreutils@gnu.org; Thu, 09 Aug 2012 06:41:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SzQBV-00080R-3w
	for coreutils@gnu.org; Thu, 09 Aug 2012 06:41:47 -0400
Received: from mx.meyering.net ([88.168.87.75]:43353)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SzQBU-0007zn-P1
	for coreutils@gnu.org; Thu, 09 Aug 2012 06:41:45 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 4462260073;
	Thu,  9 Aug 2012 12:41:43 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: du bogus warning with bind mounts
In-Reply-To: <50237FDC.3070502@redhat.com> (Ondrej Oprala's message of "Thu,
	09 Aug 2012 11:16:12 +0200")
References: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
	<87fw7wxz4i.fsf@rho.meyering.net> <50237FDC.3070502@redhat.com>
Date: Thu, 09 Aug 2012 12:41:43 +0200
Message-ID: <87zk64uz2w.fsf@rho.meyering.net>
Lines: 279
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 09 Aug 2012 10:41:48 -0000

Ondrej Oprala wrote:
>  I've redone the patch to use mountlist instead of mntent, added the
> !remote && !dummy
> condition and created a test for it.

Great!  Thanks.

Some of this feedback is nit-picking, but there are more important
changes, too.

...
> Subject: [PATCH] du: Fix an issue with bogus warnings on bind-mounted
>  directories
>
> * NEWS: Mention the fix.
> * src/du.c: Add a function to read+stat mount points
> and properly check cyclic directory entries.

Please use this entry for "du.c" in the log:

  * src/du.c: Include "mountlist.h".
  (di_mnt): New global set.
  (fill_mount_table): New function.
  (hash_ins): Add HT parameter.
  (process_file): Look up each dir dev/ino pair in the new set.
  (main): Allocate, initialize, and free the new set.

> * tests/Makefile.am: Add a new file.
> * tests/du/cyclic-dir: Add a test for the fix.

Please rename the new test file to
bind-mount-dir-cycle

> ---
>  NEWS                |  3 +++
>  src/du.c            | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++---
>  tests/Makefile.am   |  1 +
>  tests/du/cyclic-dir | 40 +++++++++++++++++++++++++++++++++++
>  4 files changed, 102 insertions(+), 3 deletions(-)
>  create mode 100755 tests/du/cyclic-dir
>
> diff --git a/NEWS b/NEWS
> index ca4568a..8f85c2b 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -4,6 +4,9 @@ GNU coreutils NEWS                                    -*- outline -*-
>
>  ** Bug fixes
>
> +  du no longer emits bogus warnings when traversing bind-mounted
> +  directory cycles.
> +
>    cksum now prints checksums atomically so that concurrent
>    processes will not intersperse their output.
>    [the bug dates back to the initial implementation]
> diff --git a/src/du.c b/src/du.c
> index 7333941..1f3a3e4 100644
> --- a/src/du.c
> +++ b/src/du.c
> @@ -27,6 +27,7 @@
>  #include <getopt.h>
>  #include <sys/types.h>
>  #include <assert.h>
> +#include "mountlist.h"

Please move this down so it's alphabetized with other "..."-includes.

>  #include "system.h"
>  #include "argmatch.h"
>  #include "argv-iter.h"
> @@ -60,9 +61,14 @@ extern bool fts_debug;
>  # define FTS_CROSS_CHECK(Fts)
>  #endif
>
> +#define MTAB "/etc/mtab"
> +

Not used.

>  /* A set of dev/ino pairs.  */
>  static struct di_set *di_set;
>
> +/* A hash table for mount points. */

s/\./. /

> +static struct di_set *di_mnt;
> +
>  /* Keep track of the preceding "level" (depth in hierarchy)
>     from one call of process_file to the next.  */
>  static size_t prev_level;
> @@ -333,11 +339,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
>    exit (status);
>  }
>
> -/* Try to insert the INO/DEV pair into the global table, HTAB.
> +/* Try to insert the INO/DEV pair into the di_set table.
>     Return true if the pair is successfully inserted,
>     false if the pair is already in the table.  */
>  static bool
> -hash_ins (ino_t ino, dev_t dev)
> +hash_ins (struct di_set *di_set, ino_t ino, dev_t dev)
>  {
>    int inserted = di_set_insert (di_set, dev, ino);
>    if (inserted < 0)
> @@ -461,7 +467,7 @@ process_file (FTS *fts, FTSENT *ent)
>        if (excluded
>            || (! opt_count_all
>                && (hash_all || (! S_ISDIR (sb->st_mode) && 1 < sb->st_nlink))
> -              && ! hash_ins (sb->st_ino, sb->st_dev)))
> +              && ! hash_ins (di_set, sb->st_ino, sb->st_dev)))
>          {
>            /* If ignoring a directory in preorder, skip its children.
>               Ignore the next fts_read output too, as it's a postorder
> @@ -476,6 +482,17 @@ process_file (FTS *fts, FTSENT *ent)
>            return true;
>          }
>
> +      /*Check if dir is already in the mount table */

Make comment spacing and punctuation consistent:

         /* Check if dir is already in the mount table.  */

> +      if (S_ISDIR (sb->st_mode))
> +        {
> +          if (di_set_lookup (di_mnt, sb->st_dev, sb->st_ino))
> +            {
> +              fts_set (fts, ent, FTS_SKIP);
> +              error (0, 0, _("mount point %s already traversed"), quote (file));
> +              return false;
> +            }
> +        }
> +
>        switch (info)
>          {
>          case FTS_D:
> @@ -623,6 +640,36 @@ du_files (char **files, int bit_flags)
>    return ok;
>  }
>
> +/* Fill the di_mnt table with dev/ino pairs
> + * of mount points  */

That comment belongs all on one line.

> +static void
> +fill_mount_table (void)
> +{
> +  struct mount_entry *mnt_ent, *mnt_free;

Declare each variable on its own line.

> +  struct stat *buf;
> +  buf = xmalloc (sizeof *buf);

Combine declaration and initialization.  Reduces duplication.

> +  mnt_ent = read_file_system_list (false);
> +  while (mnt_ent)
> +    {
> +      if (!mnt_ent->me_remote && !mnt_ent->me_dummy)
> +        {
> +          stat (mnt_ent->me_mountdir, buf);

If stat fails, we must not call hash_ins, since &buf is then undefined.
It _might_ deserve a warning, too.

> +          hash_ins (di_mnt, buf->st_ino, buf->st_dev);
> +        }
> +
> +      mnt_free = mnt_ent;
> +      mnt_ent = mnt_ent->me_next;
> +
> +      free (mnt_free->me_devname);
> +      free (mnt_free->me_mountdir);
> +      free (mnt_free->me_type);
> +      free (mnt_free);
> +    }
> +  free (buf);
> +}
> +
>  int
>  main (int argc, char **argv)
>  {
> @@ -922,6 +969,13 @@ main (int argc, char **argv)
>      xalloc_die ();
>
>    /* Initialize the set of dev,inode pairs.  */
> +
> +  di_mnt = di_set_alloc ();
> +  if (!di_mnt)
> +    xalloc_die ();
> +
> +  fill_mount_table ();
> +
>    di_set = di_set_alloc ();
>    if (!di_set)
>      xalloc_die ();
> @@ -1002,6 +1056,7 @@ main (int argc, char **argv)
>
>    argv_iter_free (ai);
>    di_set_free (di_set);
> +  di_set_free (di_mnt);
>
>    if (files_from && (ferror (stdin) || fclose (stdin) != 0) && ok)
>      error (EXIT_FAILURE, 0, _("error reading %s"), quote (files_from));
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index edc04b4..20c313d 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -32,6 +32,7 @@ root_tests =					\
>    cp/sparse-fiemap				\
>    dd/skip-seek-past-dev				\
>    df/problematic-chars				\
> +  du/cyclic-dir					\
>    install/install-C-root			\
>    ls/capability					\
>    ls/nameless-uid				\
> diff --git a/tests/du/cyclic-dir b/tests/du/cyclic-dir
> new file mode 100755
> index 0000000..65569ce
> --- /dev/null
> +++ b/tests/du/cyclic-dir
> @@ -0,0 +1,40 @@
> +#!/bin/sh
> +# Ensure du properly handles bind mounts

s/bind mounts/bind-mount-induced directory cycles/

> +# Copyright (C) 2006-2012 Free Software Foundation, Inc.

s/2006-//

> +# 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/>.
> +
> +. "${srcdir=.}/init.sh"; path_prepend_ ../src
> +print_ver_ rm
> +require_root_
> +
> +cleanup_()
> +{
> +  # When you take the undesirable shortcut of making /etc/mtab a link
> +  # to /proc/mounts, unmounting "$other_partition_tmpdir" would fail.
> +  # So, here we unmount a/b instead.
> +  umount a/b
> +  rm -rf "$other_partition_tmpdir"

This test does not require a temporary directory on a separate partition,
so remove the line above, as well as the use of other-fs-tmpdir below.

> +}
> +. "$abs_srcdir/other-fs-tmpdir"
> +
> +t=$other_partition_tmpdir
> +mkdir -p a/b $t/y
> +mount --bind $t a/b \
> +  || skip_ "This test requires mount with a working --bind option."
> +
> +du a && fail=1

Please record the output of du and compare against expected output.
This will ensure not just that du fails but will also show whether the
bind-mounted directory name is listed.  Of course, like other du
tests, you'll have to filter out the block counts before comparing,
since they are notoriously non-portable.

> +Exit $fail


From MAILER-DAEMON Thu Aug 09 07:46:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzRCT-0007nN-8P
	for mharc-coreutils@gnu.org; Thu, 09 Aug 2012 07:46:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35984)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jannhorn@googlemail.com>) id 1SzRCR-0007nH-9o
	for coreutils@gnu.org; Thu, 09 Aug 2012 07:46:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jannhorn@googlemail.com>) id 1SzRCQ-0004GZ-DB
	for coreutils@gnu.org; Thu, 09 Aug 2012 07:46:47 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:54677)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jannhorn@googlemail.com>) id 1SzRCQ-0004GV-5p
	for coreutils@gnu.org; Thu, 09 Aug 2012 07:46:46 -0400
Received: by wgbez12 with SMTP id ez12so218664wgb.30
	for <coreutils@gnu.org>; Thu, 09 Aug 2012 04:46:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=xYQ9RlBBenZ5WJmxlcmmJPpyVsjXo1QEBlxMRKKjvnU=;
	b=Jr3CAearb9RVNvjq2nZmGbFtixUIy+A2Ht5YJVdD8gc6I6Z+NAs4xpk18CAXHycmzc
	t0euNXCc7YDdy3uF9xlX+9mY/8xV3SSgV01aSwIkcdD4Nx3bhfgB8iAN/Y6+FG2NJGiO
	nWEAwJ42Jjgyg72tIIc3HYjKa6uX1sqYQQX4bI9knxEIWbhkUBdGhWFPLbl3OuZ7wSi/
	70G2xsU1P4pWAfRyQ3IT3XFh/hD6cLO4tAj7XlM/zUojGVxkIFgkXJrghg6wPs4yXQIy
	BiJew5cOwWeTPkMQ5/i+MeoBdQjbUqGiPmXMhwiDinx04AbQ+5XgfSJzYou6RQHvYvDQ
	kKLQ==
MIME-Version: 1.0
Received: by 10.217.1.136 with SMTP id n8mr219819wes.10.1344512804789; Thu, 09
	Aug 2012 04:46:44 -0700 (PDT)
Received: by 10.223.91.143 with HTTP; Thu, 9 Aug 2012 04:46:44 -0700 (PDT)
Received: by 10.223.91.143 with HTTP; Thu, 9 Aug 2012 04:46:44 -0700 (PDT)
In-Reply-To: <CAKFRV=NZDiiRq3VwEoT+rG93o=_pmUvO2cKbXSiME=DcEbPgLg@mail.gmail.com>
References: <CAKFRV=O49KQpDufjYcsdgfCwBfKh+TRpLkDFr5o4VY3_f=ZwFw@mail.gmail.com>
	<5022F79F.7070805@draigBrady.com>
	<CAKFRV=NZDiiRq3VwEoT+rG93o=_pmUvO2cKbXSiME=DcEbPgLg@mail.gmail.com>
Date: Thu, 9 Aug 2012 13:46:44 +0200
Message-ID: <CAK9i0=phNyfhiPx=ANq2etshB7e870OCMJaAKAMMLRKLenTFpw@mail.gmail.com>
Subject: Re: using dd to prepare a file to be written to memory blocks(remove
	padding)
From: Jann Horn <jannhorn@googlemail.com>
To: Justin Mattock <justinmattock@gmail.com>
Content-Type: multipart/alternative; boundary=20cf301e2e35201f6704c6d3c84c
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
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, 09 Aug 2012 11:46:48 -0000

--20cf301e2e35201f6704c6d3c84c
Content-Type: text/plain; charset=UTF-8

Uh, you basically want to restore a partition image into a bigger
partition? In that case, just write the image to the partition and leave
the rest as it is. In order to extend the filesystem to the whole
partition, you need to alter fs metadata, so dd is the wrong tool for that
- you might want to have a look at resize2fs or so.

Sorry in case I got you totally wrong.

--20cf301e2e35201f6704c6d3c84c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr">Uh, you basically want to restore a partition image into a b=
igger partition? In that case, just write the image to the partition and le=
ave the rest as it is. In order to extend the filesystem to the whole parti=
tion, you need to alter fs metadata, so dd is the wrong tool for that - you=
 might want to have a look at resize2fs or so.</p>

<p dir=3D"ltr">Sorry in case I got you totally wrong.</p>

--20cf301e2e35201f6704c6d3c84c--


From MAILER-DAEMON Thu Aug 09 07:54:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzRJa-0008Ms-9k
	for mharc-coreutils@gnu.org; Thu, 09 Aug 2012 07:54:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57208)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1SzRJX-0008Ih-AH
	for coreutils@gnu.org; Thu, 09 Aug 2012 07:54:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1SzRJV-0005un-1d
	for coreutils@gnu.org; Thu, 09 Aug 2012 07:54:07 -0400
Received: from moutng.kundenserver.de ([212.227.126.187]:54261)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1SzRJU-0005uZ-NV
	for coreutils@gnu.org; Thu, 09 Aug 2012 07:54:04 -0400
Received: from [192.168.2.108] (p4FF76382.dip.t-dialin.net [79.247.99.130])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0MXjM2-1TDEoI385u-00WYwt; Thu, 09 Aug 2012 13:54:01 +0200
Message-ID: <5023A4D7.5030804@bernhard-voelker.de>
Date: Thu, 09 Aug 2012 13:53:59 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
Subject: [PATCH] df: fail when the mount list cannot be read but is needed
	[was: new snapshot available: coreutils-8.17.70-1bacb4]
References: <87y5lp3002.fsf@rho.meyering.net> <50228907.6080107@draigBrady.com>
	<50228BB3.80703@bernhard-voelker.de>
	<87vcgt1i62.fsf@rho.meyering.net> <50229052.20402@draigBrady.com>
In-Reply-To: <50229052.20402@draigBrady.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Provags-ID: V02:K0:Sep2qU1eTNA8khQ94Ugf/8oTapCjcpeUXGTl6Qzb7Hx
	oAGkVX3014lx57T83rDmwaYwpPHRlc0SqW0S8kwM0oMPrWHHCW
	WetslzVbikAbZFu4CRNaVjI4qeuMmZ09eIqoxXf9I2DE4VW9Ys
	j+n8+fwpulmEJB1du2+dQNCf1GMuwDSmF1YXsjfvLRfMrSaHTM
	uhcU4Recny1f0Wn5x3v+axSnoNoDZG/esUahzbTQOERT2As7Dj
	rs8qlJT2M0+qmjlaT3ojnwWtAf4PJljjWszLnZDlKkM5poNxnY
	zfXYJTN7CmHbAzKiKHN5ddSBjmFmrJT43k8ZdpYtE8veAi4ZMv
	XgMv4CviH4YcZsjsW+5tqhLleubetIUgfPg3brA6M
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.126.187
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, 09 Aug 2012 11:54:09 -0000


On 08/08/2012 06:14 PM, PĂˇdraig Brady wrote:
> But then it won't fail. It's tricky :)

I thought about that case again, and to me something's still wrong
when mtab is missing.

When mtab cannot be read, then df cannot determine the file system type.

Example (/tmp/mnt is an nfs mount):

  $ src/df -T  /tmp/mnt ; echo $?
  src/df: Warning: cannot read table of mounted file systems: No such file or directory
  Filesystem     Type 1K-blocks      Used Available Use% Mounted on
  -              -    155527168 114567680  33058816  78% /tmp/mnt
  0

I think $? == 0 is okay for this case.

  $ src/df -t hello /tmp/mnt ; echo $?
  src/df: Warning: cannot read table of mounted file systems: No such file or directory
  Filesystem     1K-blocks      Used Available Use% Mounted on
  -              155527168 114567680  33058816  78% /tmp/mnt
  0

  $ src/df -x nfs /tmp/mnt ; echo $?
  src/df: Warning: cannot read table of mounted file systems: No such file or directory
  Filesystem     1K-blocks      Used Available Use% Mounted on
  -              155527168 114567680  33058816  78% /tmp/mnt
  0

But in the case -t/-x I believe that df should exit(1).
The same applies to -a and -l.

Here's a proposed patch.

Have a nice day,
Berny

>From 32e3007a8cab32484e4e312ceb1784f6ad1d396f Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Thu, 9 Aug 2012 13:46:30 +0200
Subject: [PATCH] df: fail when the mount list cannot be read but is needed

* src/df.c (main): Add conditions to fail when the mount list cannot
be read: this includes the cases when a file name argument is given
and either of -a, -l -t or -x is used.
* doc/coreutils.texi: Document the additional error conditions.
* tests/df/no-mtab-status: Add a new test.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the fix.
---
 NEWS                    |    5 +++
 doc/coreutils.texi      |    5 +++
 src/df.c                |   18 ++++++++--
 tests/Makefile.am       |    1 +
 tests/df/no-mtab-status |   81 +++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 106 insertions(+), 4 deletions(-)
 create mode 100755 tests/df/no-mtab-status

diff --git a/NEWS b/NEWS
index ca4568a..d0d462c 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,11 @@ GNU coreutils NEWS                                    -*- outline -*-
   file system --type options do not lead to a processed file system.
   [This bug dates back to when --total was added in coreutils-7.0]

+  df now fails in cases when the list of mounted file systems (/etc/mtab)
+  cannot be read but the file system type information is needed to process
+  certain options like -a, -l, -t and -x.
+  [This bug was present in "the beginning".]
+
   head --lines=-N (-n-N) now resets the read pointer of a seekable input file.
   This means that "head -n-3" no longer consumes all of its input, and lines
   not output by head may be processed by other programs.  For example, this
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 516ec73..2fe0dd3 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -10754,6 +10754,11 @@ inspect the exit status of a command like @samp{df -t ext3 -t reiserfs
 @var{dir}} to test whether @var{dir} is on a file system of type
 @samp{ext3} or @samp{reiserfs}.

+As the list of file systems (@var{mtab}) is needed to determine the
+file system type, failure includes the cases when that list cannot
+be read and either of the options @option{-a}, @option{-l}, @option{-t}
+or @option{-x} is used together with a file name argument.
+

 @node du invocation
 @section @command{du}: Estimate file space usage
diff --git a/src/df.c b/src/df.c
index 4f3b56b..a2e6866 100644
--- a/src/df.c
+++ b/src/df.c
@@ -1100,10 +1100,20 @@ main (int argc, char **argv)
   if (mount_list == NULL)
     {
       /* Couldn't read the table of mounted file systems.
-         Fail if df was invoked with no file name arguments;
-         Otherwise, merely give a warning and proceed.  */
-      int status =          (optind < argc ? 0 : EXIT_FAILURE);
-      const char *warning = (optind < argc ? _("Warning: ") : "");
+         Fail if df was invoked with no file name arguments,
+         or when either of -a, -l, -t or -x is used with file name
+         arguments. Otherwise, merely give a warning and proceed.  */
+      int status = 0;
+      if ( !(optind < argc)
+          ||(optind < argc
+             && (show_all_fs
+                 || show_local_fs
+                 || fs_select_list != NULL
+                 || fs_exclude_list != NULL)))
+        {
+          status = EXIT_FAILURE;
+        }
+      const char *warning = (status == 0 ? _("Warning: ") : "");
       error (status, errno, "%s%s", warning,
              _("cannot read table of mounted file systems"));
     }
diff --git a/tests/Makefile.am b/tests/Makefile.am
index edc04b4..273405f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -376,6 +376,7 @@ TESTS =						\
   df/df-P					\
   df/unreadable					\
   df/total-unprocessed				\
+  df/no-mtab-status				\
   dd/direct					\
   dd/misc					\
   dd/nocache					\
diff --git a/tests/df/no-mtab-status b/tests/df/no-mtab-status
new file mode 100755
index 0000000..f568842
--- /dev/null
+++ b/tests/df/no-mtab-status
@@ -0,0 +1,81 @@
+#!/bin/sh
+# Test df's behaviour when the mount list cannot be read.
+# This test is skipped on systems that lack LD_PRELOAD support; that's fine.
+
+# Copyright (C) 2012 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+print_ver_ df
+
+df || skip_ "df fails"
+
+# Simulate "mtab" failure.
+cat > k.c <<'EOF' || framework_failure_
+#include <stdio.h>
+#include <errno.h>
+
+struct mntent *getmntent(FILE *fp)
+{
+  /* Prove that LD_PRELOAD works. */
+  static int done = 0;
+  if (!done)
+    {
+      fclose (fopen ("x", "w"));
+      ++done;
+    }
+  /* Now simulate the failure. */
+  errno = ENOENT;
+  return NULL;
+}
+EOF
+
+# Then compile/link it:
+$CC -shared -fPIC -ldl -O2 k.c -o k.so \
+  || framework_failure_ 'failed to compile with -shared -fPIC'
+
+cp k.so /tmp
+
+# Test if LD_PRELOAD works:
+LD_PRELOAD=./k.so df
+test -f x || skip_ "internal test failure: maybe LD_PRELOAD doesn't work?"
+
+# These tests are supposed to succeed:
+LD_PRELOAD=./k.so df '.' || fail=1
+LD_PRELOAD=./k.so df -i '.' || fail=1
+LD_PRELOAD=./k.so df -T '.' || fail=1
+LD_PRELOAD=./k.so df -Ti '.' || fail=1
+LD_PRELOAD=./k.so df --total '.' || fail=1
+
+# These tests are supposed to fail:
+LD_PRELOAD=./k.so df && fail=1
+LD_PRELOAD=./k.so df -i && fail=1
+LD_PRELOAD=./k.so df -T && fail=1
+LD_PRELOAD=./k.so df -Ti && fail=1
+LD_PRELOAD=./k.so df --total || fail=1
+
+LD_PRELOAD=./k.so df -a && fail=1
+LD_PRELOAD=./k.so df -a '.' && fail=1
+
+LD_PRELOAD=./k.so df -l && fail=1
+LD_PRELOAD=./k.so df -l '.' && fail=1
+
+LD_PRELOAD=./k.so df -t hello && fail=1
+LD_PRELOAD=./k.so df -t hello '.' && fail=1
+
+LD_PRELOAD=./k.so df -x hello && fail=1
+LD_PRELOAD=./k.so df -x hello '.' && fail=1
+
+Exit $fail
-- 
1.7.7



From MAILER-DAEMON Thu Aug 09 09:30:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzSoj-0001TN-9T
	for mharc-coreutils@gnu.org; Thu, 09 Aug 2012 09:30:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39685)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <justinmattock@gmail.com>) id 1SzSod-0001P5-Vf
	for coreutils@gnu.org; Thu, 09 Aug 2012 09:30:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <justinmattock@gmail.com>) id 1SzSoY-0000qc-Rc
	for coreutils@gnu.org; Thu, 09 Aug 2012 09:30:19 -0400
Received: from mail-pb0-f41.google.com ([209.85.160.41]:60957)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <justinmattock@gmail.com>) id 1SzSoY-0000qQ-GQ
	for coreutils@gnu.org; Thu, 09 Aug 2012 09:30:14 -0400
Received: by pbbro12 with SMTP id ro12so1035799pbb.0
	for <coreutils@gnu.org>; Thu, 09 Aug 2012 06:30:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	bh=aOw/mOizdNJmhRZHq8e/+grntAy0h5txrCQEcSl0lXk=;
	b=NMjw24SWobRAoIInV8m4UioBkW80TKdCttEyeqMgAD41Pn5+CwHA1dw1bin3WmMBVp
	58D1fKeDEZB7YZfG+U18mO7q+vkWd0dh4hlZBZCPP7YzQa8DBtwXcW4L1egz27IqnHi5
	CqSxUO2rF/DbK+rY+2XxWXdF0m1l+BTiar2jHnpCVkh6FgLq6F69eC/P2ViMYX5rp0aI
	ZJ8CGWhk1AS1yZ/EjQpnzfkDWA/nnMAln2HvKBEtaKua/BOGQNPsoiLiNYZAbAQEke5o
	tqTHP6HH/+W3RbQ/cilkrnAM6mTE0UBfRxjnHF37jdJhiw/s91i+VClTNbHM6Fpmg49W
	ymhQ==
Received: by 10.68.231.10 with SMTP id tc10mr4179113pbc.107.1344519013742;
	Thu, 09 Aug 2012 06:30:13 -0700 (PDT)
Received: from [192.168.0.50] (cpe-75-82-93-129.socal.res.rr.com.
	[75.82.93.129])
	by mx.google.com with ESMTPS id wf7sm1160007pbc.34.2012.08.09.06.30.11
	(version=SSLv3 cipher=OTHER); Thu, 09 Aug 2012 06:30:13 -0700 (PDT)
Message-ID: <5023BB62.4040004@gmail.com>
Date: Thu, 09 Aug 2012 06:30:10 -0700
From: "Justin P. Mattock" <justinmattock@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:14.0) Gecko/20120714 Thunderbird/14.0
MIME-Version: 1.0
To: Jann Horn <jannhorn@googlemail.com>
Subject: Re: using dd to prepare a file to be written to memory blocks(remove
	padding)
References: <CAKFRV=O49KQpDufjYcsdgfCwBfKh+TRpLkDFr5o4VY3_f=ZwFw@mail.gmail.com>
	<5022F79F.7070805@draigBrady.com>
	<CAKFRV=NZDiiRq3VwEoT+rG93o=_pmUvO2cKbXSiME=DcEbPgLg@mail.gmail.com>
	<CAK9i0=phNyfhiPx=ANq2etshB7e870OCMJaAKAMMLRKLenTFpw@mail.gmail.com>
In-Reply-To: <CAK9i0=phNyfhiPx=ANq2etshB7e870OCMJaAKAMMLRKLenTFpw@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.160.41
Cc: philomath868@gmail.com, 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, 09 Aug 2012 13:30:23 -0000

On 08/09/2012 04:46 AM, Jann Horn wrote:
> Uh, you basically want to restore a partition image into a bigger
> partition? In that case, just write the image to the partition and leave
> the rest as it is. In order to extend the filesystem to the whole
> partition, you need to alter fs metadata, so dd is the wrong tool for
> that - you might want to have a look at resize2fs or so.
>
> Sorry in case I got you totally wrong.
>


everybody thanks for the help and info with this..

as for the issue I will try the suggestions above to see where it takes 
me. altering the fs metadata is what needs to happen because once the 
file is uploaded to the block of memory the target wont work unless the 
file is prepared properly(whitespace at the end of the file breaks the 
target when it reads that block of memory with the info).

cheers!


From MAILER-DAEMON Thu Aug 09 11:40:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzUqg-00060z-VT
	for mharc-coreutils@gnu.org; Thu, 09 Aug 2012 11:40:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36554)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SzUqX-0005xS-Cc
	for coreutils@gnu.org; Thu, 09 Aug 2012 11:40:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SzUqV-0002nj-Pa
	for coreutils@gnu.org; Thu, 09 Aug 2012 11:40:25 -0400
Received: from mx1.redhat.com ([209.132.183.28]:45186)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SzUqV-0002nd-Gn
	for coreutils@gnu.org; Thu, 09 Aug 2012 11:40:23 -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 q79FeMH8012029
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 9 Aug 2012 11:40:22 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q79FeKdT017374
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Thu, 9 Aug 2012 11:40:21 -0400
Message-ID: <5023D9E3.4010000@redhat.com>
Date: Thu, 09 Aug 2012 17:40:19 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: du bogus warning with bind mounts
References: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
	<87fw7wxz4i.fsf@rho.meyering.net> <50237FDC.3070502@redhat.com>
	<87zk64uz2w.fsf@rho.meyering.net>
In-Reply-To: <87zk64uz2w.fsf@rho.meyering.net>
Content-Type: multipart/mixed; boundary="------------070604010406080704040607"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 09 Aug 2012 15:40:33 -0000

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

Hi, here's the amended patch.
Cheers,
  Ondrej

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

>From 29d3fbb14e59c883750cde3468fdc1bab5a227e1 Mon Sep 17 00:00:00 2001
From: Ondrej Oprala <ooprala@redhat.com>
Date: Thu, 9 Aug 2012 17:34:09 +0200
Subject: [PATCH] du: Fix an issue with bogus warnings on bind-mounted
 directories

* NEWS: Mention the fix.
* src/du.c: Include "mountlist.h".
  (di_mnt): New global set.
  (fill_mount_table): New function.
  (hash_ins): Add HT parameter.
  (process_file): Look up each dir dev/ino pair in the new set.
  (main): Allocate, initialize, and free the new set.
* tests/Makefile.am: Add a new file.
* tests/du/bind-mount-dir-cycle: Add a test for the fix.
---
 NEWS              |  3 +++
 src/du.c          | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
 tests/Makefile.am |  1 +
 3 files changed, 62 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index ca4568a..8f85c2b 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,9 @@ GNU coreutils NEWS                                    -*- outline -*-
 
 ** Bug fixes
 
+  du no longer emits bogus warnings when traversing bind-mounted
+  directory cycles.
+
   cksum now prints checksums atomically so that concurrent
   processes will not intersperse their output.
   [the bug dates back to the initial implementation]
diff --git a/src/du.c b/src/du.c
index 7333941..bfe543e 100644
--- a/src/du.c
+++ b/src/du.c
@@ -35,6 +35,7 @@
 #include "exclude.h"
 #include "fprintftime.h"
 #include "human.h"
+#include "mountlist.h"
 #include "quote.h"
 #include "quotearg.h"
 #include "stat-size.h"
@@ -63,6 +64,9 @@ extern bool fts_debug;
 /* A set of dev/ino pairs.  */
 static struct di_set *di_set;
 
+/* A hash table for mount points.  */
+static struct di_set *di_mnt;
+
 /* Keep track of the preceding "level" (depth in hierarchy)
    from one call of process_file to the next.  */
 static size_t prev_level;
@@ -333,11 +337,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   exit (status);
 }
 
-/* Try to insert the INO/DEV pair into the global table, HTAB.
+/* Try to insert the INO/DEV pair into the di_set table.
    Return true if the pair is successfully inserted,
    false if the pair is already in the table.  */
 static bool
-hash_ins (ino_t ino, dev_t dev)
+hash_ins (struct di_set *di_set, ino_t ino, dev_t dev)
 {
   int inserted = di_set_insert (di_set, dev, ino);
   if (inserted < 0)
@@ -461,7 +465,7 @@ process_file (FTS *fts, FTSENT *ent)
       if (excluded
           || (! opt_count_all
               && (hash_all || (! S_ISDIR (sb->st_mode) && 1 < sb->st_nlink))
-              && ! hash_ins (sb->st_ino, sb->st_dev)))
+              && ! hash_ins (di_set, sb->st_ino, sb->st_dev)))
         {
           /* If ignoring a directory in preorder, skip its children.
              Ignore the next fts_read output too, as it's a postorder
@@ -476,6 +480,17 @@ process_file (FTS *fts, FTSENT *ent)
           return true;
         }
 
+      /*Check if dir is already in the mount table.  */
+      if (S_ISDIR (sb->st_mode))
+        {
+          if (di_set_lookup (di_mnt, sb->st_dev, sb->st_ino))
+            {
+              fts_set (fts, ent, FTS_SKIP);
+              error (0, 0, _("mount point %s already traversed"), quote (file));
+              return false;
+            }
+        }
+
       switch (info)
         {
         case FTS_D:
@@ -623,6 +638,38 @@ du_files (char **files, int bit_flags)
   return ok;
 }
 
+/* Fill the di_mnt table with dev/ino pairs of mount points.  */
+
+static void
+fill_mount_table (void)
+{
+  struct mount_entry *mnt_ent;
+  struct mount_entry *mnt_free;
+  struct stat *buf = xmalloc (sizeof *buf);
+
+  mnt_ent = read_file_system_list (false);
+  while (mnt_ent)
+    {
+      if (!mnt_ent->me_remote && !mnt_ent->me_dummy)
+        {
+          if (!stat (mnt_ent->me_mountdir, buf))
+            hash_ins (di_mnt, buf->st_ino, buf->st_dev);
+          else
+            error (0, errno, _("warning: unable to stat %s"),
+                   mnt_ent->me_mountdir);
+        }
+
+      mnt_free = mnt_ent;
+      mnt_ent = mnt_ent->me_next;
+
+      free (mnt_free->me_devname);
+      free (mnt_free->me_mountdir);
+      free (mnt_free->me_type);
+      free (mnt_free);
+    }
+  free (buf);
+}
+
 int
 main (int argc, char **argv)
 {
@@ -922,6 +969,13 @@ main (int argc, char **argv)
     xalloc_die ();
 
   /* Initialize the set of dev,inode pairs.  */
+
+  di_mnt = di_set_alloc ();
+  if (!di_mnt)
+    xalloc_die ();
+
+  fill_mount_table ();
+
   di_set = di_set_alloc ();
   if (!di_set)
     xalloc_die ();
@@ -1002,6 +1056,7 @@ main (int argc, char **argv)
 
   argv_iter_free (ai);
   di_set_free (di_set);
+  di_set_free (di_mnt);
 
   if (files_from && (ferror (stdin) || fclose (stdin) != 0) && ok)
     error (EXIT_FAILURE, 0, _("error reading %s"), quote (files_from));
diff --git a/tests/Makefile.am b/tests/Makefile.am
index edc04b4..ebaceb6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -32,6 +32,7 @@ root_tests =					\
   cp/sparse-fiemap				\
   dd/skip-seek-past-dev				\
   df/problematic-chars				\
+  du/bind-mount-dir-cycle			\
   install/install-C-root			\
   ls/capability					\
   ls/nameless-uid				\
-- 
1.7.11.2


--------------070604010406080704040607--


From MAILER-DAEMON Thu Aug 09 11:43:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzUtU-00089P-BT
	for mharc-coreutils@gnu.org; Thu, 09 Aug 2012 11:43:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40447)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SzUtO-00088i-9O
	for coreutils@gnu.org; Thu, 09 Aug 2012 11:43:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SzUtI-00055O-9W
	for coreutils@gnu.org; Thu, 09 Aug 2012 11:43:22 -0400
Received: from mx1.redhat.com ([209.132.183.28]:32001)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1SzUtI-00054Z-1W
	for coreutils@gnu.org; Thu, 09 Aug 2012 11:43:16 -0400
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 q79FhEdQ004805
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <coreutils@gnu.org>; Thu, 9 Aug 2012 11:43:14 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q79FhCIb025145
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <coreutils@gnu.org>; Thu, 9 Aug 2012 11:43:14 -0400
Message-ID: <5023DA8F.7020307@redhat.com>
Date: Thu, 09 Aug 2012 17:43:11 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: coreutils@gnu.org
Subject: Various tests give illusory results
Content-Type: multipart/mixed; boundary="------------050308050401000809000106"
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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: Thu, 09 Aug 2012 15:43:27 -0000

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

Hi, I think I got a fix for this bugzilla 
https://bugzilla.redhat.com/show_bug.cgi?id=556358.
I added a bit of permission checking to require_root_ so no tests have 
to be rewriten.
Have a nice day :) ,
  Ondrej

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

>From 4c3dad461c638a710bb8c36c54d4ac4f64aa747e Mon Sep 17 00:00:00 2001
From: Ondrej Oprala <ooprala@redhat.com>
Date: Thu, 9 Aug 2012 15:40:39 +0200
Subject: [PATCH] tests: Add error checking for root-only tests running
 setuidgid

NEWS: Mention the fix.
tests/init.cfg: Modify the require_root_ function to check
for setuidgid calls and proper permissions.
---
 NEWS           |  4 ++++
 tests/init.cfg | 25 +++++++++++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/NEWS b/NEWS
index ca4568a..43c3a8e 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,10 @@ GNU coreutils NEWS                                    -*- outline -*-
 
 ** Bug fixes
 
+  root-only tests now properly check for permissions of dummy
+  user $NON_ROOT_USERNAME before trying to run binaries from the
+  src dir.
+
   cksum now prints checksums atomically so that concurrent
   processes will not intersperse their output.
   [the bug dates back to the initial implementation]
diff --git a/tests/init.cfg b/tests/init.cfg
index 4ff5ad4..00679e8 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -341,11 +341,36 @@ or use the shortcut target of the toplevel Makefile,
   fi
 }
 
+setuidgid_has_perm_()
+{
+
+  cat << \EOF > cmds.tmp
+  IFS=:
+  for DIR in $PATH; do
+    test -x $DIR || exit 1
+  done
+  exit 0
+EOF
+
+  su -s /bin/sh $NON_ROOT_USERNAME < cmds.tmp
+
+  RET=$?
+  return $RET
+}
+
 require_root_()
 {
   uid_is_privileged_ || skip_ "must be run as root"
+
   NON_ROOT_USERNAME=${NON_ROOT_USERNAME=nobody}
   NON_ROOT_GROUP=${NON_ROOT_GROUP=$(id -g $NON_ROOT_USERNAME)}
+
+  #if test contains a setuidgid call...
+  grep '^[ ]*setuidgid' "../$0"
+  if [ "$?" = "0" ]; then
+    setuidgid_has_perm_ || skip_ "user $NON_ROOT_USERNAME lacks permissions"
+  fi
+
 }
 
 skip_if_root_() { uid_is_privileged_ && skip_ "must be run as non-root"; }
-- 
1.7.11.2


--------------050308050401000809000106--


From MAILER-DAEMON Fri Aug 10 02:53:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Szj6A-0008M6-6K
	for mharc-coreutils@gnu.org; Fri, 10 Aug 2012 02:53:30 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42986)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Szj66-0008K1-4i
	for coreutils@gnu.org; Fri, 10 Aug 2012 02:53:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Szj65-0000di-8G
	for coreutils@gnu.org; Fri, 10 Aug 2012 02:53:26 -0400
Received: from moutng.kundenserver.de ([212.227.17.8]:57498)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1Szj64-0000dZ-UH
	for coreutils@gnu.org; Fri, 10 Aug 2012 02:53:25 -0400
Received: from [192.168.2.108] (p4FF7316F.dip.t-dialin.net [79.247.49.111])
	by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis)
	id 0M2ndG-1Tptg50mCU-00serS; Fri, 10 Aug 2012 08:53:23 +0200
Message-ID: <5024AFE1.7080004@bernhard-voelker.de>
Date: Fri, 10 Aug 2012 08:53:21 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: Various tests give illusory results
References: <5023DA8F.7020307@redhat.com>
In-Reply-To: <5023DA8F.7020307@redhat.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:gfz1LYIbPjeHJZ4qBgVFN52bsGcw71rpAAJEIhrrec/
	890ruaMY4liPS4YJ/BtD8jYn+4yD0X7ZYSNEDJlRGzyZsx/JN7
	aaCWUwgTNVT+sayBTuwnzWetmocCfo2MH5Y6HfcgvYgfyCOeX6
	c1uzgG0YATramTrKQ36eNKkG/OTsr0V4LSDaFrW9s9u5chOJ1b
	p1AISnNHN07aW2JCAfYgBuNuK7a91FwCfMyN5JQeFq+e6undmO
	dxXDuPBsUoyzEDpgknlTXwaFU2ZBWaOYAxE+LvRiXtqPPMrfCY
	K/H1DKw5hDSH35nYjtXjO3rn04JdteJymL8VB2w8ubs8GHAUYJ
	2VlTQP1H7c05CmIsorQ0IxRmhsMRxK31tm6I6Gx6e
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.17.8
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, 10 Aug 2012 06:53:28 -0000


On 08/09/2012 05:43 PM, Ondrej Oprala wrote:
> Hi, I think I got a fix for this bugzilla 
> https://bugzilla.redhat.com/show_bug.cgi?id=556358.
> I added a bit of permission checking to require_root_ so no tests have 
> to be rewriten.
> Have a nice day :) ,
>   Ondrej
> 

Hi Ondrej,

> +setuidgid_has_perm_()
> +{
> +
> +  cat << \EOF > cmds.tmp
> +  IFS=:
> +  for DIR in $PATH; do
> +    test -x $DIR || exit 1
> +  done
> +  exit 0
> +EOF
> +
> +  su -s /bin/sh $NON_ROOT_USERNAME < cmds.tmp
> +
> +  RET=$?
> +  return $RET
> +}
> +

just a thought: if setuidgid is part of the test failure,
then why not using setuidgid in here?

Furthermore: the problem is finding the correct binary, right?
E.g. in tests/rm/fail-2eperm there is already such a test:

  # Try to ensure that $NON_ROOT_USERNAME can access
  # the required version of rm.
  rm_version=$(
    setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
    sed -n '1s/.* //p'
  )
  case $rm_version in
    $PACKAGE_VERSION) ;;
    *) skip_ "cannot access just-built rm as user $NON_ROOT_USERNAME";;
  esac


Have a nice day,
Berny


From MAILER-DAEMON Sun Aug 12 06:32:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T0VTB-0000cN-LM
	for mharc-coreutils@gnu.org; Sun, 12 Aug 2012 06:32:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34311)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T0VT7-0000V5-ET
	for coreutils@gnu.org; Sun, 12 Aug 2012 06:32:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T0VT6-00071f-0I
	for coreutils@gnu.org; Sun, 12 Aug 2012 06:32:25 -0400
Received: from mx.meyering.net ([88.168.87.75]:53772)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>)
	id 1T0VT2-000713-GY; Sun, 12 Aug 2012 06:32:20 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 162BF60169;
	Sun, 12 Aug 2012 12:32:18 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: info-gnu@gnu.org
Subject: coreutils-8.18 released [stable]
Mail-Followup-To: bug-coreutils@gnu.org
Date: Sun, 12 Aug 2012 12:32:07 +0200
Message-ID: <87txw8xuxk.fsf@rho.meyering.net>
Lines: 141
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
	micalg=pgp-sha256; protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: coordinator@translationproject.org, coreutils@gnu.org,
	coreutils-announce@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: Sun, 12 Aug 2012 10:32:28 -0000

--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

This is to announce coreutils-8.18, a stable release.

There have been 72 commits by 11 people in the 13 weeks since 8.17.

Executive summary: 8.18 removes the su program, fixes an 8.17 regression
in ls --color and tweaks sort's memory constraints.  All other fixes are
for old (present since "the beginning") and relatively obscure bugs.

See the NEWS below for a brief summary.

Thanks to everyone who has contributed!
The following people contributed changes to this release:

  Andrew D Warshall (1)
  Bernhard Voelker (4)
  Bruno Haible (1)
  Erik Auerswald (1)
  Jim Meyering (39)
  Joachim Schmitz (2)
  Mike Frysinger (1)
  Paul Eggert (5)
  P=E1draig Brady (16)
  Sami Kerola (1)
  Stefano Lattarini (1)

Jim [on behalf of the coreutils maintainers]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Here is the GNU coreutils home page:
    http://gnu.org/s/coreutils/

For a summary of changes and contributors, see:
  http://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dshortlog;h=3Dv8.18
or run this command from a git-cloned coreutils directory:
  git shortlog v8.17..v8.18

To summarize the 197 gnulib-related changes, run these commands
From=20a git-cloned coreutils directory:
  git checkout v8.18
  git submodule summary v8.17

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Here are the compressed sources and a GPG detached signature[*]:
  http://ftp.gnu.org/gnu/coreutils/coreutils-8.18.tar.xz
  http://ftp.gnu.org/gnu/coreutils/coreutils-8.18.tar.xz.sig

Use a mirror for higher download bandwidth:
  http://ftpmirror.gnu.org/coreutils/coreutils-8.18.tar.xz
  http://ftpmirror.gnu.org/coreutils/coreutils-8.18.tar.xz.sig

[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify coreutils-8.18.tar.xz.sig

If that command fails because you don't have the required public key,
then run this command to import it:

  gpg --keyserver keys.gnupg.net --recv-keys 7FD9FCCB000BEEEE

and rerun the 'gpg --verify' command.

This release was bootstrapped with the following tools:
  Autoconf 2.69.7-e8d3
  Automake 1.12a
  Gnulib v0.0-7572-g39cedf6
  Bison 2.5

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
NEWS

* Noteworthy changes in release 8.18 (2012-08-12) [stable]

** Bug fixes

  cksum now prints checksums atomically so that concurrent
  processes will not intersperse their output.
  [the bug dates back to the initial implementation]

  date -d "$(printf '\xb0')" would print 00:00:00 with today's date
  rather than diagnosing the invalid input.  Now it reports this:
  date: invalid date '\260'
  [This bug was present in "the beginning".]

  df no longer outputs control characters present in the mount point name.
  Such characters are replaced with '?', so for example, scripts consuming
  lines output by df, can work reliably.
  [This bug was present in "the beginning".]

  df --total now exits with an appropriate diagnostic and error code, when
  file system --type options do not lead to a processed file system.
  [This bug dates back to when --total was added in coreutils-7.0]

  head --lines=3D-N (-n-N) now resets the read pointer of a seekable input =
file.
  This means that "head -n-3" no longer consumes all of its input, and lines
  not output by head may be processed by other programs.  For example, this
  command now prints the final line, 2, while before it would print nothing:
    seq 2 > k; (head -n-1 > /dev/null; cat) < k
  [This bug was present in "the beginning".]

  ls --color would mis-color relative-named symlinks in /
  [bug introduced in coreutils-8.17]

  split now ensures it doesn't overwrite the input file with generated outp=
ut.
  [the bug dates back to the initial implementation]

  stat and df now report the correct file system usage,
  in all situations on GNU/Linux, by correctly determining the block size.
  [df bug since coreutils-5.0.91, stat bug since the initial implementation]

  tail -f no longer tries to use inotify on AUFS or PanFS file systems
  [you might say this was introduced in coreutils-7.5, along with inotify
   support, but even now, its magic number isn't in the usual place.]

** New features

  stat -f recognizes the new remote file system types: aufs, panfs.

** Changes in behavior

  su: this program has been removed.  We stopped installing "su" by
  default with the release of coreutils-6.9.90 on 2007-12-01.  Now,
  that the util-linux package has the union of the Suse and Fedora
  patches as well as enough support to build on the Hurd, we no longer
  have any reason to include it here.

** Improvements

  sort avoids redundant processing in the presence of inaccessible inputs,
  or unwritable output.  Sort now diagnoses certain errors at start-up,
  rather than after potentially expensive processing.

  sort now allocates no more than 75% of physical memory by default,
  to better share system resources, and thus operate more efficiently.
  [The default max memory usage changed from 50% to 100% in coreutils-8.16]

=2D----
also posted as: https://savannah.gnu.org/forum/forum.php?forum_id=3D7333

--=-=-=
Content-Type: application/pgp-signature

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

iQIcBAEBCAAGBQJQJ4YxAAoJEH/Z/MsAC+7uCCMP/R/RozGbTA/r56Gcb68teqBg
x7zGnaw9Vh8OfcwSq3Q/yL8RN+r3PbKjVlxWV/fGGCCd1yJsPR657zEYvL5R9/Y0
MaKSjjNeLvVhmH0iak7Uw0Z7742oSkGoOdRM0vxrY3OXNp7HP4mHuDkpnjJFUMNB
pyT4OoJi86vSsY1cAZnYlaTsj5NW3KfV00LxJYFXQa40uH73wQtQZGszm1NkOg81
5aHuzUc7ngYPANm9qS0ESBAn2Kj6Az5q1iLcG/IgqYt1uud7/LhU1ZOO8yVBbsYi
zEbDOH2YSavwNGD2Iv0EhY9DCEqF9wm717GILSy6kR8jfZ1FcNiRxV0p1x07SLR1
tXljhBO5nNV9+kSo4caBLoSJmu0IdTuEBw9CLhRYVHFDAmhyzukLAdd5q4M1YwoL
s/QSPDTWeM8mtpo8z2fG0SyJLWWXZiyyU8Y2btmo1XWmUxCEuWItteJM9by7CvTn
6TAfc/kNvjz7/FGJjBRH2ftXBnNbb7p0N9XYnc4MU8M5Wsq9QqsAxQZkPn7FWHU0
1U7cz7GHZAmO8NLhUDfulEioGRpngyejH/DWebt65HXPbrtNcOSVct9JT8arw6Dp
MFINN1zEEDvAJRMd+BpN1TTiUiUKairsK0OO7VCyaqBKvbz01LjL9aM/tZPNcRZX
81JannB8C7mMkMYdOg53
=0xAs
-----END PGP SIGNATURE-----
--=-=-=--


From MAILER-DAEMON Mon Aug 13 00:14:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T0m2o-0004cn-Ah
	for mharc-coreutils@gnu.org; Mon, 13 Aug 2012 00:14:22 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55111)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <pth@suse.de>)
	id 1T0m2l-0004Xb-7w
	for coreutils@gnu.org; Mon, 13 Aug 2012 00:14:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <pth@suse.de>) id 1T0m2j-0005CL-2k
	for coreutils@gnu.org; Mon, 13 Aug 2012 00:14:19 -0400
Received: from cantor2.suse.de ([195.135.220.15]:58478 helo=mx2.suse.de)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <pth@suse.de>)
	id 1T0m2i-0005Bv-Sx
	for coreutils@gnu.org; Mon, 13 Aug 2012 00:14:17 -0400
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 841689A78E;
	Mon, 13 Aug 2012 06:14:14 +0200 (CEST)
Date: Mon, 13 Aug 2012 06:14:13 +0200
From: Philipp Thomas <pth@suse.de>
To: Erwin Poeze <coordinator@translationproject.org>
Subject: Message template for coreutils-8.18 missing
Message-ID: <20120813041413.GN11219@paradies.suse.de>
References: <87wr941xrh.fsf@rho.meyering.net>
	<20120119135913.GG29826@paradies.suse.de>
	<87k44nixf5.fsf@rho.meyering.net>
	<20120120121623.GA9054@vrijschrift.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20120120121623.GA9054@vrijschrift.org>
X-Operating-System: openSUSE - Kernel Linux 3.4.2-1-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-2.6
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, 13 Aug 2012 04:14:21 -0000

Hi Erwin,

* Erwin Poeze (coordinator@translationproject.org) [20120120 13:23]:

> 8.15 is added now to the TP. I wrongly thought to have seen that there
> where no changes compared to 8.14.

It seems that once again the template for coreutils 8.18 hasn't been added
to the TP although there are differences to 8.18-pre1. Assuming that the
template for 8.18 has been sent to the TP, could you please add it now?

Thanks in advance
Philipp


From MAILER-DAEMON Mon Aug 13 17:17:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T120a-0002pN-KZ
	for mharc-coreutils@gnu.org; Mon, 13 Aug 2012 17:17:08 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39224)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <krzysztof.goj@gmail.com>) id 1T120X-0002o0-BN
	for coreutils@gnu.org; Mon, 13 Aug 2012 17:17:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <krzysztof.goj@gmail.com>) id 1T120W-0000eA-9P
	for coreutils@gnu.org; Mon, 13 Aug 2012 17:17:05 -0400
Received: from mail-qa0-f41.google.com ([209.85.216.41]:61747)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <krzysztof.goj@gmail.com>) id 1T120W-0000dj-4R
	for coreutils@gnu.org; Mon, 13 Aug 2012 17:17:04 -0400
Received: by qafk30 with SMTP id k30so3174088qaf.0
	for <coreutils@gnu.org>; Mon, 13 Aug 2012 14:17:03 -0700 (PDT)
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=nl3fReAuED/ksmnNsQpc/zUX4BxTF2ZxWaqEkY2bnjk=;
	b=mB0YpKjl7+FwI9igmH9mp6XYU4aweX0gk6w3ZXi7WksxKf4SFIU+dQJMr1VflDtaPt
	UTeSSa2n4q4biY8ypnUWyJft4Dkdj7evrtL1I413QYIRUcJRQDSYSqphT5p9ZkIGp3Cv
	X6UICX/0F865OpN3htocWmmO31M7yaAZDZFlTtzusMgGRpo/c/cXbwNpdHiyZdi6uWF/
	L34IimooduLdRnfG1jLFr18yqI4mRgFx0pkN79GDUgGLwPa8WZ5fOwXgXAfWFrRnJjEA
	Mvyql03S6JZ9jGCm/84sFpCxvgSZM4nPzeapnehOzBdKwR0X0tiS+Kw6lBfyQcXH4NMy
	GpOA==
MIME-Version: 1.0
Received: by 10.224.105.205 with SMTP id u13mr28410758qao.54.1344892623596;
	Mon, 13 Aug 2012 14:17:03 -0700 (PDT)
Received: by 10.229.27.193 with HTTP; Mon, 13 Aug 2012 14:17:03 -0700 (PDT)
In-Reply-To: <CAJ_ynNbS-UoPvpLCSCkAMUNzH8E6Y+zwHs_cKn=3E0YW-8siJQ@mail.gmail.com>
References: <CAJ_ynNZV-6HaYUGkkUNi57wHLKgvnWg4O8n-hRDq34s6bbiP5g@mail.gmail.com>
	<4F1D784A.8040103@redhat.com>
	<CAJ_ynNbS-UoPvpLCSCkAMUNzH8E6Y+zwHs_cKn=3E0YW-8siJQ@mail.gmail.com>
Date: Mon, 13 Aug 2012 23:17:03 +0200
Message-ID: <CAJ_ynNYBUDWj1Ju51-AdLrh4xQgg0+N-En7FE99h3YJtVSNYZg@mail.gmail.com>
Subject: Re: [PATCH] rm: new option (-d) to remove empty directories
From: Krzysztof Goj <krzysztof.goj@gmail.com>
To: coreutils@gnu.org
Content-Type: multipart/mixed; boundary=20cf3071d136172c7804c72c379f
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.216.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: Mon, 13 Aug 2012 21:17:06 -0000

--20cf3071d136172c7804c72c379f
Content-Type: text/plain; charset=UTF-8

Hi,

This January I've submitted a patch adding a -d flag to rm which
allowed it to remove empty directories, same as BSD rm does. I lacked
a FSF assignment back then, which I have for some time now (RT:
721463; I can send the pdf). Here's the original thread in archive for
those who want more context:

http://lists.gnu.org/archive/html/coreutils/2012-01/msg00111.html

I've rebased my patch against current master and fixed the tests as
Jim Meyering have suggested. New patch is attached, it can also be
viewed at GitHub:

https://github.com/goj/coreutils/commit/rm-d

Best regards,
-- 
Krzysztof

--20cf3071d136172c7804c72c379f
Content-Type: application/octet-stream; name="rm-d.patch"
Content-Disposition: attachment; filename="rm-d.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_h5u25ah81

RnJvbSBlMjE1ZDBiZjg1NmFjMTYxZDFkZjMwMzg4OTBiNDM0NTY1ZmMyMmMyIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBLcnp5c3p0b2YgR29qIDxrcnp5c3p0b2YuZ29qQGdtYWlsLmNv
bT4KRGF0ZTogU3VuLCAyMiBKYW4gMjAxMiAwMTozOTo1OSArMDEwMApTdWJqZWN0OiBbUEFUQ0hd
IHJtOiBuZXcgb3B0aW9uICgtZCkgdG8gcmVtb3ZlIGVtcHR5IGRpcmVjdG9yaWVzCgpBZGRzIG5l
dyBvcHRpb24gdG8gcm0gKC1kLy0tZGlyKSwgd2hpY2ggYWxsb3dzIHJlbW92YWwgb2YKZW1wdHkg
ZGlyZWN0b3JpZXMsIHdoaWxlIHN0aWxsIHNhZmVseSBkaXNhbGxvd2luZyByZW1vdmFsCm9mIG5v
bi1lbXB0eSBvbmVzLgoKKiBzcmMvcmVtb3ZlLmMgKHJtX2Z0cyk6IGFsbG93IHJlbW92YWwgb2Yg
ZW1wdHkgZGlyIGlmIHRoZSBvcHRpb24gaXMgc2V0Ciogc3JjL3JlbW92ZS5oIChybV9vcHRpb25z
KTogbmV3IG9wdGlvbiAtIHJlbW92ZV9lbXB0eV9kaXJlY3RvcmllcwoqIHNyYy9ybS5jIChsb25n
X29wdHMsIHVzYWdlLCBtYWluKTogdXNhZ2UgJiYgb3B0aW9uIHBhcnNpbmcKKiB0ZXN0cy9NYWtl
ZmlsZS5hbTogYWRkZWQgbmV3IHRlc3QgY2FzZXMgKGQtMSwgZC0yKQoqIHRlc3RzL3JtL2QtMTog
bmV3IHRlc3QgY2FzZSAtIHN1Y2Nlc3NmdWxseSBkZWxldGUgZW1wdHkgZGlyCiogdGVzdHMvcm0v
ZC0yOiBuZXcgdGVzdCBjYXNlIC0gcmVmdXNlIHRvIGRlbGV0ZSBub25lbXB0eSBkaXIKLS0tCiBz
cmMvcmVtb3ZlLmMgICAgICB8IDEwICsrKysrKystLS0KIHNyYy9yZW1vdmUuaCAgICAgIHwgIDMg
KysrCiBzcmMvcm0uYyAgICAgICAgICB8ICA5ICsrKysrKysrLQogdGVzdHMvTWFrZWZpbGUuYW0g
fCAgMiArKwogdGVzdHMvcm0vZC0xICAgICAgfCAzOCArKysrKysrKysrKysrKysrKysrKysrKysr
KysrKysrKysrKysrKwogdGVzdHMvcm0vZC0yICAgICAgfCAzNCArKysrKysrKysrKysrKysrKysr
KysrKysrKysrKysrKysrCiA2IGZpbGVzIGNoYW5nZWQsIDkyIGluc2VydGlvbnMoKyksIDQgZGVs
ZXRpb25zKC0pCiBjcmVhdGUgbW9kZSAxMDA3NTUgdGVzdHMvcm0vZC0xCiBjcmVhdGUgbW9kZSAx
MDA3NTUgdGVzdHMvcm0vZC0yCgpkaWZmIC0tZ2l0IGEvc3JjL3JlbW92ZS5jIGIvc3JjL3JlbW92
ZS5jCmluZGV4IDVlYmQyY2UuLjU4YTliMzggMTAwNjQ0Ci0tLSBhL3NyYy9yZW1vdmUuYworKysg
Yi9zcmMvcmVtb3ZlLmMKQEAgLTQxNCwxMSArNDE0LDE1IEBAIHJtX2Z0cyAoRlRTICpmdHMsIEZU
U0VOVCAqZW50LCBzdHJ1Y3Qgcm1fb3B0aW9ucyBjb25zdCAqeCkKICAgc3dpdGNoIChlbnQtPmZ0
c19pbmZvKQogICAgIHsKICAgICBjYXNlIEZUU19EOgkJCS8qIHByZW9yZGVyIGRpcmVjdG9yeSAq
LwotICAgICAgaWYgKCEgeC0+cmVjdXJzaXZlKQorICAgICAgaWYgKCEgeC0+cmVjdXJzaXZlCisg
ICAgICAgICAgJiYgISh4LT5yZW1vdmVfZW1wdHlfZGlyZWN0b3JpZXMKKyAgICAgICAgICAgICAg
ICYmIGlzX2VtcHR5X2RpciAoZnRzLT5mdHNfY3dkX2ZkLCBlbnQtPmZ0c19hY2NwYXRoKSkpCiAg
ICAgICAgIHsKLSAgICAgICAgICAvKiBUaGlzIGlzIHRoZSBmaXJzdCAocHJlLW9yZGVyKSBlbmNv
dW50ZXIgd2l0aCBhIGRpcmVjdG9yeS4KKyAgICAgICAgICAvKiBUaGlzIGlzIHRoZSBmaXJzdCAo
cHJlLW9yZGVyKSBlbmNvdW50ZXIgd2l0aCBhIGRpcmVjdG9yeQorICAgICAgICAgICAqIHdoaWNo
IHdlIGNhbiBub3QgZGVsZXRlLgogICAgICAgICAgICAgIE5vdCByZWN1cnNpdmUsIHNvIGFycmFu
Z2UgdG8gc2tpcCBjb250ZW50cy4gICovCi0gICAgICAgICAgZXJyb3IgKDAsIEVJU0RJUiwgXygi
Y2Fubm90IHJlbW92ZSAlcyIpLCBxdW90ZSAoZW50LT5mdHNfcGF0aCkpOworICAgICAgICAgIGlu
dCBlcnIgPSB4LT5yZW1vdmVfZW1wdHlfZGlyZWN0b3JpZXMgPyBFTk9URU1QVFkgOiBFSVNESVI7
CisgICAgICAgICAgZXJyb3IgKDAsIGVyciwgXygiY2Fubm90IHJlbW92ZSAlcyIpLCBxdW90ZSAo
ZW50LT5mdHNfcGF0aCkpOwogICAgICAgICAgIG1hcmtfYW5jZXN0b3JfZGlycyAoZW50KTsKICAg
ICAgICAgICBmdHNfc2tpcF90cmVlIChmdHMsIGVudCk7CiAgICAgICAgICAgcmV0dXJuIFJNX0VS
Uk9SOwpkaWZmIC0tZ2l0IGEvc3JjL3JlbW92ZS5oIGIvc3JjL3JlbW92ZS5oCmluZGV4IDRlYWIy
ODIuLmNkM2NiMjkgMTAwNjQ0Ci0tLSBhL3NyYy9yZW1vdmUuaAorKysgYi9zcmMvcmVtb3ZlLmgK
QEAgLTQ5LDYgKzQ5LDkgQEAgc3RydWN0IHJtX29wdGlvbnMKICAgLyogSWYgdHJ1ZSwgcmVjdXJz
aXZlbHkgcmVtb3ZlIGRpcmVjdG9yaWVzLiAgKi8KICAgYm9vbCByZWN1cnNpdmU7CiAKKyAgLyog
SWYgdHJ1ZSwgcmVtb3ZlIGVtcHR5IGRpcmVjdG9yaWVzLiAqLworICBib29sIHJlbW92ZV9lbXB0
eV9kaXJlY3RvcmllczsKKwogICAvKiBQb2ludGVyIHRvIHRoZSBkZXZpY2UgYW5kIGlub2RlIG51
bWJlcnMgb2YgJy8nLCB3aGVuIC0tcmVjdXJzaXZlCiAgICAgIGFuZCBwcmVzZXJ2aW5nICcvJy4g
IE90aGVyd2lzZSBOVUxMLiAgKi8KICAgc3RydWN0IGRldl9pbm8gKnJvb3RfZGV2X2lubzsKZGlm
ZiAtLWdpdCBhL3NyYy9ybS5jIGIvc3JjL3JtLmMKaW5kZXggMDI4MDlmMi4uYTQ1NTk0ZSAxMDA2
NDQKLS0tIGEvc3JjL3JtLmMKKysrIGIvc3JjL3JtLmMKQEAgLTc3LDYgKzc3LDcgQEAgc3RhdGlj
IHN0cnVjdCBvcHRpb24gY29uc3QgbG9uZ19vcHRzW10gPQogICB7Ii1wcmVzdW1lLWlucHV0LXR0
eSIsIG5vX2FyZ3VtZW50LCBOVUxMLCBQUkVTVU1FX0lOUFVUX1RUWV9PUFRJT059LAogCiAgIHsi
cmVjdXJzaXZlIiwgbm9fYXJndW1lbnQsIE5VTEwsICdyJ30sCisgIHsiZGlyIiwgbm9fYXJndW1l
bnQsIE5VTEwsICdkJ30sCiAgIHsidmVyYm9zZSIsIG5vX2FyZ3VtZW50LCBOVUxMLCAndid9LAog
ICB7R0VUT1BUX0hFTFBfT1BUSU9OX0RFQ0x9LAogICB7R0VUT1BUX1ZFUlNJT05fT1BUSU9OX0RF
Q0x9LApAQCAtMTU0LDYgKzE1NSw3IEBAIFJlbW92ZSAodW5saW5rKSB0aGUgRklMRShzKS5cblwK
ICAgICAgIC0tbm8tcHJlc2VydmUtcm9vdCAgZG8gbm90IHRyZWF0ICcvJyBzcGVjaWFsbHlcblwK
ICAgICAgIC0tcHJlc2VydmUtcm9vdCAgIGRvIG5vdCByZW1vdmUgJy8nIChkZWZhdWx0KVxuXAog
ICAtciwgLVIsIC0tcmVjdXJzaXZlICAgcmVtb3ZlIGRpcmVjdG9yaWVzIGFuZCB0aGVpciBjb250
ZW50cyByZWN1cnNpdmVseVxuXAorICAtZCwgLS1kaXIgICAgICAgICAgICAgcmVtb3ZlIGVtcHR5
IGRpcmVjdG9yaWVzXG5cCiAgIC12LCAtLXZlcmJvc2UgICAgICAgICBleHBsYWluIHdoYXQgaXMg
YmVpbmcgZG9uZVxuXAogIiksIHN0ZG91dCk7CiAgICAgICBmcHV0cyAoSEVMUF9PUFRJT05fREVT
Q1JJUFRJT04sIHN0ZG91dCk7CkBAIC0xODksNiArMTkxLDcgQEAgcm1fb3B0aW9uX2luaXQgKHN0
cnVjdCBybV9vcHRpb25zICp4KQogICB4LT5pZ25vcmVfbWlzc2luZ19maWxlcyA9IGZhbHNlOwog
ICB4LT5pbnRlcmFjdGl2ZSA9IFJNSV9TT01FVElNRVM7CiAgIHgtPm9uZV9maWxlX3N5c3RlbSA9
IGZhbHNlOworICB4LT5yZW1vdmVfZW1wdHlfZGlyZWN0b3JpZXMgPSBmYWxzZTsKICAgeC0+cmVj
dXJzaXZlID0gZmFsc2U7CiAgIHgtPnJvb3RfZGV2X2lubyA9IE5VTEw7CiAgIHgtPnN0ZGluX3R0
eSA9IGlzYXR0eSAoU1RESU5fRklMRU5PKTsKQEAgLTIyMCwxMCArMjIzLDE0IEBAIG1haW4gKGlu
dCBhcmdjLCBjaGFyICoqYXJndikKICAgLyogVHJ5IHRvIGRpc2FibGUgdGhlIGFiaWxpdHkgdG8g
dW5saW5rIGEgZGlyZWN0b3J5LiAgKi8KICAgcHJpdl9zZXRfcmVtb3ZlX2xpbmtkaXIgKCk7CiAK
LSAgd2hpbGUgKChjID0gZ2V0b3B0X2xvbmcgKGFyZ2MsIGFyZ3YsICJmaXJ2SVIiLCBsb25nX29w
dHMsIE5VTEwpKSAhPSAtMSkKKyAgd2hpbGUgKChjID0gZ2V0b3B0X2xvbmcgKGFyZ2MsIGFyZ3Ys
ICJkZmlydklSIiwgbG9uZ19vcHRzLCBOVUxMKSkgIT0gLTEpCiAgICAgewogICAgICAgc3dpdGNo
IChjKQogICAgICAgICB7CisgICAgICAgIGNhc2UgJ2QnOgorICAgICAgICAgIHgucmVtb3ZlX2Vt
cHR5X2RpcmVjdG9yaWVzID0gdHJ1ZTsKKyAgICAgICAgICBicmVhazsKKwogICAgICAgICBjYXNl
ICdmJzoKICAgICAgICAgICB4LmludGVyYWN0aXZlID0gUk1JX05FVkVSOwogICAgICAgICAgIHgu
aWdub3JlX21pc3NpbmdfZmlsZXMgPSB0cnVlOwpkaWZmIC0tZ2l0IGEvdGVzdHMvTWFrZWZpbGUu
YW0gYi90ZXN0cy9NYWtlZmlsZS5hbQppbmRleCBlZGMwNGI0Li44Y2FmZmRhIDEwMDY0NAotLS0g
YS90ZXN0cy9NYWtlZmlsZS5hbQorKysgYi90ZXN0cy9NYWtlZmlsZS5hbQpAQCAtMTI1LDYgKzEy
NSw4IEBAIFRFU1RTID0JCQkJCQlcCiAgIHJtL3ItMgkJCQkJXAogICBybS9yLTMJCQkJCVwKICAg
cm0vci00CQkJCQlcCisgIHJtL2QtMQkJCQkJXAorICBybS9kLTIJCQkJCVwKICAgcm0vcmVhZGRp
ci1idWcJCQkJXAogICBybS9ybTEJCQkJCVwKICAgdG91Y2gvZW1wdHktZmlsZQkJCQlcCmRpZmYg
LS1naXQgYS90ZXN0cy9ybS9kLTEgYi90ZXN0cy9ybS9kLTEKbmV3IGZpbGUgbW9kZSAxMDA3NTUK
aW5kZXggMDAwMDAwMC4uYzRhOGFiNQotLS0gL2Rldi9udWxsCisrKyBiL3Rlc3RzL3JtL2QtMQpA
QCAtMCwwICsxLDM4IEBACisjIS9iaW4vc2gKKyMgVGVzdCAicm0gLWQgLS12ZXJib3NlIi4KKwor
IyBDb3B5cmlnaHQgKEMpIDIwMTIgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuCisKKyMg
VGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFu
ZC9vciBtb2RpZnkKKyMgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJs
aWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKKyMgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlv
biwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGUgTGljZW5zZSwgb3IKKyMgKGF0IHlvdXIgb3B0aW9u
KSBhbnkgbGF0ZXIgdmVyc2lvbi4KKworIyBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4g
dGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwKKyMgYnV0IFdJVEhPVVQgQU5ZIFdBUlJB
TlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YKKyMgTUVSQ0hBTlRBQklM
SVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZQorIyBHTlUg
R2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLgorCisjIFlvdSBzaG91bGQg
aGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlCisj
IGFsb25nIHdpdGggdGhpcyBwcm9ncmFtLiAgSWYgbm90LCBzZWUgPGh0dHA6Ly93d3cuZ251Lm9y
Zy9saWNlbnNlcy8+LgorCisuICIke3NyY2Rpcj0ufS9pbml0LnNoIjsgcGF0aF9wcmVwZW5kXyAu
Li9zcmMKK3ByaW50X3Zlcl8gcm0KKworbWtkaXIgYSB8fCBmcmFtZXdvcmtfZmFpbHVyZV8KKz4g
YiB8fCBmcmFtZXdvcmtfZmFpbHVyZV8KKworcm0gLS12ZXJib3NlIC0tZGlyIGEgYiA+IG91dCB8
fCBmYWlsPTEKKworY2F0IDw8XEVPRiA+IGV4cCB8fCBmcmFtZXdvcmtfZmFpbHVyZV8KK3JlbW92
ZWQgZGlyZWN0b3J5OiAnYScKK3JlbW92ZWQgJ2InCitFT0YKKwordGVzdCAtZSBhICYmIGZhaWw9
MQordGVzdCAtZSBiICYmIGZhaWw9MQorCisjIENvbXBhcmUgZXhwZWN0ZWQgYW5kIGFjdHVhbCBv
dXRwdXQuCitjb21wYXJlIGV4cCBvdXQgfHwgZmFpbD0xCisKK0V4aXQgJGZhaWwKZGlmZiAtLWdp
dCBhL3Rlc3RzL3JtL2QtMiBiL3Rlc3RzL3JtL2QtMgpuZXcgZmlsZSBtb2RlIDEwMDc1NQppbmRl
eCAwMDAwMDAwLi45MzJkYWNlCi0tLSAvZGV2L251bGwKKysrIGIvdGVzdHMvcm0vZC0yCkBAIC0w
LDAgKzEsMzQgQEAKKyMhL2Jpbi9zaAorIyBFbnN1cmUgdGhhdCAncm0gLWQgZGlyJyAoaS5lLiwg
d2l0aG91dCAtLXJlY3Vyc2l2ZSkgZ2l2ZXMgYSByZWFzb25hYmxlCisjIGRpYWdub3N0aWMgd2hl
biBmYWlsaW5nLgorCisjIENvcHlyaWdodCAoQykgMjAxMiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRp
b24sIEluYy4KKworIyBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRp
c3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQorIyBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdO
VSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieQorIyB0aGUgRnJlZSBTb2Z0
d2FyZSBGb3VuZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZSBMaWNlbnNlLCBvcgorIyAo
YXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLgorCisjIFRoaXMgcHJvZ3JhbSBpcyBk
aXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAorIyBidXQgV0lU
SE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZgor
IyBNRVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBT
ZWUgdGhlCisjIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuCisK
KyMgWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVi
bGljIExpY2Vuc2UKKyMgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0uICBJZiBub3QsIHNlZSA8aHR0
cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzLz4uCisKKy4gIiR7c3JjZGlyPS59L2luaXQuc2giOyBw
YXRoX3ByZXBlbmRfIC4uL3NyYworcHJpbnRfdmVyXyBybQorCitta2RpciBkIHx8IGZyYW1ld29y
a19mYWlsdXJlXworPiBkL2EKKworCitybSAtZCBkIDI+IG91dCAmJiBmYWlsPTEKK3ByaW50ZiAi
JXNcbiIgXAorICAgICJybTogY2Fubm90IHJlbW92ZSAnZCc6IERpcmVjdG9yeSBub3QgZW1wdHki
IFwKKyAgICA+IGV4cCB8fCBmcmFtZXdvcmtfZmFpbHVyZV8KKworY29tcGFyZSBleHAgb3V0IHx8
IGZhaWw9MQorCitFeGl0ICRmYWlsCi0tIAoxLjcuMTEuNAoK
--20cf3071d136172c7804c72c379f--


From MAILER-DAEMON Tue Aug 14 00:48:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T192w-0003XK-2H
	for mharc-coreutils@gnu.org; Tue, 14 Aug 2012 00:48:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40862)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T192q-0003W0-Tr
	for coreutils@gnu.org; Tue, 14 Aug 2012 00:47:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T192n-0000kT-RC
	for coreutils@gnu.org; Tue, 14 Aug 2012 00:47:56 -0400
Received: from mx.meyering.net ([88.168.87.75]:59958)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T192n-0000kP-Ge
	for coreutils@gnu.org; Tue, 14 Aug 2012 00:47:53 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 626076007F;
	Tue, 14 Aug 2012 06:47:52 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Krzysztof Goj <krzysztof.goj@gmail.com>
Subject: Re: [PATCH] rm: new option (-d) to remove empty directories
In-Reply-To: <CAJ_ynNYBUDWj1Ju51-AdLrh4xQgg0+N-En7FE99h3YJtVSNYZg@mail.gmail.com>
	(Krzysztof Goj's message of "Mon, 13 Aug 2012 23:17:03 +0200")
References: <CAJ_ynNZV-6HaYUGkkUNi57wHLKgvnWg4O8n-hRDq34s6bbiP5g@mail.gmail.com>
	<4F1D784A.8040103@redhat.com>
	<CAJ_ynNbS-UoPvpLCSCkAMUNzH8E6Y+zwHs_cKn=3E0YW-8siJQ@mail.gmail.com>
	<CAJ_ynNYBUDWj1Ju51-AdLrh4xQgg0+N-En7FE99h3YJtVSNYZg@mail.gmail.com>
Date: Tue, 14 Aug 2012 06:47:52 +0200
Message-ID: <87r4rat6yv.fsf@rho.meyering.net>
Lines: 181
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Tue, 14 Aug 2012 04:47:59 -0000

Krzysztof Goj wrote:
> This January I've submitted a patch adding a -d flag to rm which
> allowed it to remove empty directories, same as BSD rm does. I lacked
> a FSF assignment back then, which I have for some time now (RT:
> 721463; I can send the pdf). Here's the original thread in archive for
> those who want more context:
>
> http://lists.gnu.org/archive/html/coreutils/2012-01/msg00111.html
>
> I've rebased my patch against current master and fixed the tests as
> Jim Meyering have suggested. New patch is attached, it can also be
> viewed at GitHub:
>
> https://github.com/goj/coreutils/commit/rm-d

Thank you for the reminder.
This is a good time for it.

Please add a NEWS entry, a description of the new option
in coreutils.texi and adjust for the issues below
and then I'll push it.

> Subject: [PATCH] rm: new option (-d) to remove empty directories
>
> Adds new option to rm (-d/--dir), which allows removal of

s/Adds/Add/

> empty directories, while still safely disallowing removal
> of non-empty ones.

Mention that this provides compatibility with BSD's rm.

> * src/remove.c (rm_fts): allow removal of empty dir if the option is set
> * src/remove.h (rm_options): new option - remove_empty_directories
> * src/rm.c (long_opts, usage, main): usage && option parsing
> * tests/Makefile.am: added new test cases (d-1, d-2)

s/added/Add/

> * tests/rm/d-1: new test case - successfully delete empty dir
> * tests/rm/d-2: new test case - refuse to delete nonempty dir
...
> diff --git a/src/remove.c b/src/remove.c
> index 5ebd2ce..58a9b38 100644
> --- a/src/remove.c
> +++ b/src/remove.c
> @@ -414,11 +414,15 @@ rm_fts (FTS *fts, FTSENT *ent, struct rm_options const *x)
>    switch (ent->fts_info)
>      {
>      case FTS_D:			/* preorder directory */
> -      if (! x->recursive)
> +      if (! x->recursive
> +          && !(x->remove_empty_directories
> +               && is_empty_dir (fts->fts_cwd_fd, ent->fts_accpath)))
>          {
> -          /* This is the first (pre-order) encounter with a directory.
> +          /* This is the first (pre-order) encounter with a directory
> +           * which we can not delete.

Please retain the style of comment (no leading '*') and adjust wording:

                that we cannot delete.

>               Not recursive, so arrange to skip contents.  */
> -          error (0, EISDIR, _("cannot remove %s"), quote (ent->fts_path));
> +          int err = x->remove_empty_directories ? ENOTEMPTY : EISDIR;
> +          error (0, err, _("cannot remove %s"), quote (ent->fts_path));
>            mark_ancestor_dirs (ent);
>            fts_skip_tree (fts, ent);
>            return RM_ERROR;
> diff --git a/src/remove.h b/src/remove.h
> index 4eab282..cd3cb29 100644
> --- a/src/remove.h
> +++ b/src/remove.h
> @@ -49,6 +49,9 @@ struct rm_options
>    /* If true, recursively remove directories.  */
>    bool recursive;
>
> +  /* If true, remove empty directories. */

Two spaces after a period:
s/\./. /

> +  bool remove_empty_directories;

When adding a new member like this, one must also initialize it
at the other point of use: mv.c's rm_option_init.  Otherwise,
the new member would be used uninitialized when removing a
hierarchy upon a cross-device "mv".

>    /* Pointer to the device and inode numbers of '/', when --recursive
>       and preserving '/'.  Otherwise NULL.  */
>    struct dev_ino *root_dev_ino;
> diff --git a/src/rm.c b/src/rm.c
> index 02809f2..a45594e 100644
> --- a/src/rm.c
> +++ b/src/rm.c
> @@ -77,6 +77,7 @@ static struct option const long_opts[] =
>    {"-presume-input-tty", no_argument, NULL, PRESUME_INPUT_TTY_OPTION},
>
>    {"recursive", no_argument, NULL, 'r'},
> +  {"dir", no_argument, NULL, 'd'},
>    {"verbose", no_argument, NULL, 'v'},
>    {GETOPT_HELP_OPTION_DECL},
>    {GETOPT_VERSION_OPTION_DECL},
> @@ -154,6 +155,7 @@ Remove (unlink) the FILE(s).\n\
>        --no-preserve-root  do not treat '/' specially\n\
>        --preserve-root   do not remove '/' (default)\n\
>    -r, -R, --recursive   remove directories and their contents recursively\n\
> +  -d, --dir             remove empty directories\n\
>    -v, --verbose         explain what is being done\n\
>  "), stdout);
>        fputs (HELP_OPTION_DESCRIPTION, stdout);
> @@ -189,6 +191,7 @@ rm_option_init (struct rm_options *x)
>    x->ignore_missing_files = false;
>    x->interactive = RMI_SOMETIMES;
>    x->one_file_system = false;
> +  x->remove_empty_directories = false;
>    x->recursive = false;
>    x->root_dev_ino = NULL;
>    x->stdin_tty = isatty (STDIN_FILENO);
> @@ -220,10 +223,14 @@ main (int argc, char **argv)
>    /* Try to disable the ability to unlink a directory.  */
>    priv_set_remove_linkdir ();
>
> -  while ((c = getopt_long (argc, argv, "firvIR", long_opts, NULL)) != -1)
> +  while ((c = getopt_long (argc, argv, "dfirvIR", long_opts, NULL)) != -1)
>      {
>        switch (c)
>          {
> +        case 'd':
> +          x.remove_empty_directories = true;
> +          break;
> +
>          case 'f':
>            x.interactive = RMI_NEVER;
>            x.ignore_missing_files = true;
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index edc04b4..8caffda 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -125,6 +125,8 @@ TESTS =						\
>    rm/r-2					\
>    rm/r-3					\
>    rm/r-4					\
> +  rm/d-1					\
> +  rm/d-2					\

Please insert the new entries in sorted order.

>    rm/readdir-bug				\
>    rm/rm1					\
>    touch/empty-file				\
> diff --git a/tests/rm/d-1 b/tests/rm/d-1
...
> diff --git a/tests/rm/d-2 b/tests/rm/d-2
...
> +. "${srcdir=.}/init.sh"; path_prepend_ ../src
> +print_ver_ rm
> +
> +mkdir d || framework_failure_
> +> d/a

Detect failure:

   > d/a || framework_failure_

> +

Spurious blank line.

> +
> +rm -d d 2> out && fail=1
> +printf "%s\n" \
> +    "rm: cannot remove 'd': Directory not empty" \
> +    > exp || framework_failure_
> +
> +compare exp out || fail=1
> +
> +Exit $fail


From MAILER-DAEMON Tue Aug 14 03:23:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1BTe-0007dA-GD
	for mharc-coreutils@gnu.org; Tue, 14 Aug 2012 03:23:46 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37734)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1BTb-0007cy-M1
	for coreutils@gnu.org; Tue, 14 Aug 2012 03:23:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1BTY-0000xK-DH
	for coreutils@gnu.org; Tue, 14 Aug 2012 03:23:43 -0400
Received: from moutng.kundenserver.de ([212.227.126.186]:57824)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1BTY-0000xF-2u
	for coreutils@gnu.org; Tue, 14 Aug 2012 03:23:40 -0400
Received: from [192.168.2.108] (p4FF74032.dip.t-dialin.net [79.247.64.50])
	by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis)
	id 0MIyAj-1SyhZA0kor-003HSj; Tue, 14 Aug 2012 09:23:37 +0200
Message-ID: <5029FCF8.4010007@bernhard-voelker.de>
Date: Tue, 14 Aug 2012 09:23:36 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: coreutils@gnu.org
Subject: Re: [PATCH] df: fail when the mount list cannot be read but is needed
	[was: new snapshot available: coreutils-8.17.70-1bacb4]
References: <87y5lp3002.fsf@rho.meyering.net> <50228907.6080107@draigBrady.com>
	<50228BB3.80703@bernhard-voelker.de>
	<87vcgt1i62.fsf@rho.meyering.net> <50229052.20402@draigBrady.com>
	<5023A4D7.5030804@bernhard-voelker.de>
In-Reply-To: <5023A4D7.5030804@bernhard-voelker.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:GQx5ErRpYtqB/Jw6ltvMwjlgvmpdtE8g6L5inf5a0ly
	Yvse9Nmd+2o3HrFCiYGf75fOmgXRsrc1sltCjPcDky5NlliF8b
	ax0YHqrIWfEDCPgAPZCG2UTvut7vMJsupnOWh5hS63/RSHxVbi
	B2f0fMt8ESirG7s0kFVV2F1sqvksmhJJiSvMnHjw5KajLcHaTR
	yhpa7YCV7Jk9fCtem8DS+69n/UYoA0IGdHXrvuHHEyiNojpTqA
	JlCZ7kpHfdBODJEB2BS/vp0SmUpcMjpDLoTjV5/l13KsINUCrs
	HfoHRGD8Ab39trSUWc9f/g+++EGyfZc8W4QZfARxmDb4G5jGVP
	aPa5mHoMq/DZveaDt9A+iQatvnkfx2Jcuqh7nhS3A
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 14 Aug 2012 07:23:45 -0000


On 08/09/2012 01:53 PM, Bernhard Voelker wrote:
> Here's a proposed patch.

Oops, sorry, one of the cases in the new test failed.
I fixed it:

-LD_PRELOAD=./k.so df --total || fail=1
+LD_PRELOAD=./k.so df --total && fail=1


Additionally, as this patch didn't make it into 8.18,
I moved the NEWS entry into the new release.

Have a nice day,
Berny



>From a257a1bdc555b615a4513f9ef0bfd46e36771f69 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Tue, 14 Aug 2012 09:22:13 +0200
Subject: [PATCH] df: fail when the mount list cannot be read but is needed

* src/df.c (main): Add conditions to fail when the mount list cannot
be read: this includes the cases when a file name argument is given
and either of -a, -l, -t or -x is used.
* doc/coreutils.texi: Document the additional error conditions.
* tests/df/no-mtab-status: Add a new test.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the fix.
---
 NEWS                    |    5 +++
 doc/coreutils.texi      |    5 +++
 src/df.c                |   18 ++++++++--
 tests/Makefile.am       |    1 +
 tests/df/no-mtab-status |   81 +++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 106 insertions(+), 4 deletions(-)
 create mode 100755 tests/df/no-mtab-status

diff --git a/NEWS b/NEWS
index 385617e..0f63ddf 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,11 @@ GNU coreutils NEWS                                    -*- outline -*-

 * Noteworthy changes in release ?.? (????-??-??) [?]

+  df now fails in cases when the list of mounted file systems (/etc/mtab)
+  cannot be read but the file system type information is needed to process
+  certain options like -a, -l, -t and -x.
+  [This bug was present in "the beginning".]
+

 * Noteworthy changes in release 8.18 (2012-08-12) [stable]

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 516ec73..2fe0dd3 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -10754,6 +10754,11 @@ inspect the exit status of a command like @samp{df -t ext3 -t reiserfs
 @var{dir}} to test whether @var{dir} is on a file system of type
 @samp{ext3} or @samp{reiserfs}.

+As the list of file systems (@var{mtab}) is needed to determine the
+file system type, failure includes the cases when that list cannot
+be read and either of the options @option{-a}, @option{-l}, @option{-t}
+or @option{-x} is used together with a file name argument.
+

 @node du invocation
 @section @command{du}: Estimate file space usage
diff --git a/src/df.c b/src/df.c
index 4f3b56b..a2e6866 100644
--- a/src/df.c
+++ b/src/df.c
@@ -1100,10 +1100,20 @@ main (int argc, char **argv)
   if (mount_list == NULL)
     {
       /* Couldn't read the table of mounted file systems.
-         Fail if df was invoked with no file name arguments;
-         Otherwise, merely give a warning and proceed.  */
-      int status =          (optind < argc ? 0 : EXIT_FAILURE);
-      const char *warning = (optind < argc ? _("Warning: ") : "");
+         Fail if df was invoked with no file name arguments,
+         or when either of -a, -l, -t or -x is used with file name
+         arguments. Otherwise, merely give a warning and proceed.  */
+      int status = 0;
+      if ( !(optind < argc)
+          ||(optind < argc
+             && (show_all_fs
+                 || show_local_fs
+                 || fs_select_list != NULL
+                 || fs_exclude_list != NULL)))
+        {
+          status = EXIT_FAILURE;
+        }
+      const char *warning = (status == 0 ? _("Warning: ") : "");
       error (status, errno, "%s%s", warning,
              _("cannot read table of mounted file systems"));
     }
diff --git a/tests/Makefile.am b/tests/Makefile.am
index edc04b4..273405f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -376,6 +376,7 @@ TESTS =						\
   df/df-P					\
   df/unreadable					\
   df/total-unprocessed				\
+  df/no-mtab-status				\
   dd/direct					\
   dd/misc					\
   dd/nocache					\
diff --git a/tests/df/no-mtab-status b/tests/df/no-mtab-status
new file mode 100755
index 0000000..8835345
--- /dev/null
+++ b/tests/df/no-mtab-status
@@ -0,0 +1,81 @@
+#!/bin/sh
+# Test df's behaviour when the mount list cannot be read.
+# This test is skipped on systems that lack LD_PRELOAD support; that's fine.
+
+# Copyright (C) 2012 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+print_ver_ df
+
+df || skip_ "df fails"
+
+# Simulate "mtab" failure.
+cat > k.c <<'EOF' || framework_failure_
+#include <stdio.h>
+#include <errno.h>
+
+struct mntent *getmntent(FILE *fp)
+{
+  /* Prove that LD_PRELOAD works. */
+  static int done = 0;
+  if (!done)
+    {
+      fclose (fopen ("x", "w"));
+      ++done;
+    }
+  /* Now simulate the failure. */
+  errno = ENOENT;
+  return NULL;
+}
+EOF
+
+# Then compile/link it:
+$CC -shared -fPIC -ldl -O2 k.c -o k.so \
+  || framework_failure_ 'failed to compile with -shared -fPIC'
+
+cp k.so /tmp
+
+# Test if LD_PRELOAD works:
+LD_PRELOAD=./k.so df
+test -f x || skip_ "internal test failure: maybe LD_PRELOAD doesn't work?"
+
+# These tests are supposed to succeed:
+LD_PRELOAD=./k.so df '.' || fail=1
+LD_PRELOAD=./k.so df -i '.' || fail=1
+LD_PRELOAD=./k.so df -T '.' || fail=1
+LD_PRELOAD=./k.so df -Ti '.' || fail=1
+LD_PRELOAD=./k.so df --total '.' || fail=1
+
+# These tests are supposed to fail:
+LD_PRELOAD=./k.so df && fail=1
+LD_PRELOAD=./k.so df -i && fail=1
+LD_PRELOAD=./k.so df -T && fail=1
+LD_PRELOAD=./k.so df -Ti && fail=1
+LD_PRELOAD=./k.so df --total && fail=1
+
+LD_PRELOAD=./k.so df -a && fail=1
+LD_PRELOAD=./k.so df -a '.' && fail=1
+
+LD_PRELOAD=./k.so df -l && fail=1
+LD_PRELOAD=./k.so df -l '.' && fail=1
+
+LD_PRELOAD=./k.so df -t hello && fail=1
+LD_PRELOAD=./k.so df -t hello '.' && fail=1
+
+LD_PRELOAD=./k.so df -x hello && fail=1
+LD_PRELOAD=./k.so df -x hello '.' && fail=1
+
+Exit $fail
-- 
1.7.7


From MAILER-DAEMON Tue Aug 14 04:51:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1CqS-000155-94
	for mharc-coreutils@gnu.org; Tue, 14 Aug 2012 04:51:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39370)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1CqP-00014H-Uj
	for coreutils@gnu.org; Tue, 14 Aug 2012 04:51:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1CqO-0000Ld-It
	for coreutils@gnu.org; Tue, 14 Aug 2012 04:51:21 -0400
Received: from mx.meyering.net ([88.168.87.75]:60574)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1CqO-0000LT-7N
	for coreutils@gnu.org; Tue, 14 Aug 2012 04:51:20 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 497AB60169;
	Tue, 14 Aug 2012 10:51:18 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] df: fail when the mount list cannot be read but is needed
	[was: new snapshot available: coreutils-8.17.70-1bacb4]
In-Reply-To: <5029FCF8.4010007@bernhard-voelker.de> (Bernhard Voelker's
	message of "Tue, 14 Aug 2012 09:23:36 +0200")
References: <87y5lp3002.fsf@rho.meyering.net>
	<50228907.6080107@draigBrady.com> <50228BB3.80703@bernhard-voelker.de>
	<87vcgt1i62.fsf@rho.meyering.net> <50229052.20402@draigBrady.com>
	<5023A4D7.5030804@bernhard-voelker.de>
	<5029FCF8.4010007@bernhard-voelker.de>
Date: Tue, 14 Aug 2012 10:51:18 +0200
Message-ID: <87obmdsvp5.fsf@rho.meyering.net>
Lines: 95
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Tue, 14 Aug 2012 08:51:23 -0000

Bernhard Voelker wrote:
> On 08/09/2012 01:53 PM, Bernhard Voelker wrote:
>> Here's a proposed patch.
>
> Oops, sorry, one of the cases in the new test failed.
> I fixed it:
>
> -LD_PRELOAD=./k.so df --total || fail=1
> +LD_PRELOAD=./k.so df --total && fail=1
>
> Additionally, as this patch didn't make it into 8.18,
> I moved the NEWS entry into the new release.

Thanks.  It came a little too late for 8.18.

Here is the patch that I expect to squash in.
Most are nits, but there was an exploitable bit
of (debugging?) code in the new test.

diff --git a/NEWS b/NEWS
index 0f63ddf..46d0a41 100644
--- a/NEWS
+++ b/NEWS
@@ -2,8 +2,8 @@ GNU coreutils NEWS                                    -*- outline -*-

 * Noteworthy changes in release ?.? (????-??-??) [?]

-  df now fails in cases when the list of mounted file systems (/etc/mtab)
-  cannot be read but the file system type information is needed to process
+  df now fails when the list of mounted file systems (/etc/mtab) cannot
+  be read, yet the file system type information is needed to process
   certain options like -a, -l, -t and -x.
   [This bug was present in "the beginning".]

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 2fe0dd3..744b41a 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -10754,9 +10754,9 @@ df invocation
 @var{dir}} to test whether @var{dir} is on a file system of type
 @samp{ext3} or @samp{reiserfs}.

-As the list of file systems (@var{mtab}) is needed to determine the
+Since the list of file systems (@var{mtab}) is needed to determine the
 file system type, failure includes the cases when that list cannot
-be read and either of the options @option{-a}, @option{-l}, @option{-t}
+be read and one or more of the options @option{-a}, @option{-l}, @option{-t}
 or @option{-x} is used together with a file name argument.


diff --git a/src/df.c b/src/df.c
index a2e6866..835cc2e 100644
--- a/src/df.c
+++ b/src/df.c
@@ -1104,12 +1104,12 @@ main (int argc, char **argv)
          or when either of -a, -l, -t or -x is used with file name
          arguments. Otherwise, merely give a warning and proceed.  */
       int status = 0;
-      if ( !(optind < argc)
-          ||(optind < argc
-             && (show_all_fs
-                 || show_local_fs
-                 || fs_select_list != NULL
-                 || fs_exclude_list != NULL)))
+      if ( ! (optind < argc)
+           || (optind < argc
+               && (show_all_fs
+                   || show_local_fs
+                   || fs_select_list != NULL
+                   || fs_exclude_list != NULL)))
         {
           status = EXIT_FAILURE;
         }
diff --git a/tests/df/no-mtab-status b/tests/df/no-mtab-status
index 8835345..6e07854 100755
--- a/tests/df/no-mtab-status
+++ b/tests/df/no-mtab-status
@@ -27,7 +27,7 @@ cat > k.c <<'EOF' || framework_failure_
 #include <stdio.h>
 #include <errno.h>

-struct mntent *getmntent(FILE *fp)
+struct mntent *getmntent (FILE *fp)
 {
   /* Prove that LD_PRELOAD works. */
   static int done = 0;
@@ -46,8 +46,6 @@ EOF
 $CC -shared -fPIC -ldl -O2 k.c -o k.so \
   || framework_failure_ 'failed to compile with -shared -fPIC'

-cp k.so /tmp
-
 # Test if LD_PRELOAD works:
 LD_PRELOAD=./k.so df
 test -f x || skip_ "internal test failure: maybe LD_PRELOAD doesn't work?"


From MAILER-DAEMON Tue Aug 14 05:17:47 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1DFz-0007z2-Rx
	for mharc-coreutils@gnu.org; Tue, 14 Aug 2012 05:17:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50610)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1DFx-0007yw-Va
	for coreutils@gnu.org; Tue, 14 Aug 2012 05:17:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1DFv-0007fT-Ht
	for coreutils@gnu.org; Tue, 14 Aug 2012 05:17:45 -0400
Received: from moutng.kundenserver.de ([212.227.17.8]:59082)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1DFv-0007fL-7d
	for coreutils@gnu.org; Tue, 14 Aug 2012 05:17:43 -0400
Received: from [192.168.2.108] (p4FF74032.dip.t-dialin.net [79.247.64.50])
	by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis)
	id 0MHKKd-1SwYHG3kZP-00DnoZ; Tue, 14 Aug 2012 11:17:42 +0200
Message-ID: <502A17B4.7030805@bernhard-voelker.de>
Date: Tue, 14 Aug 2012 11:17:40 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] df: fail when the mount list cannot be read but is needed
	[was: new snapshot available: coreutils-8.17.70-1bacb4]
References: <87y5lp3002.fsf@rho.meyering.net> <50228907.6080107@draigBrady.com>
	<50228BB3.80703@bernhard-voelker.de>
	<87vcgt1i62.fsf@rho.meyering.net> <50229052.20402@draigBrady.com>
	<5023A4D7.5030804@bernhard-voelker.de>
	<5029FCF8.4010007@bernhard-voelker.de>
	<87obmdsvp5.fsf@rho.meyering.net>
In-Reply-To: <87obmdsvp5.fsf@rho.meyering.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:IJ3GO3wQerhkRV5L6lJdi18wARJaldqBPv3kRFmyr4k
	nfu2s+Y6yYZKmgpM0zS+9YVxc9pcTZ7sOC6YH60mpcXqrxVv5B
	Q3cV0uS/dnhIguW2QLx/PNwTHAjjq7MB4SVHnJRk3eNUpIfOgg
	1uQCGK0RJL7uTv3epk1YWPTMbHeTWCfJc18w8SB9iUspjYpcc4
	3+9Zkm4AMQqpK+eg99Mzc+iUOTf+NjdFWYDhs2Xqzp99K0OGiP
	Bi48XAcw7zVKkGxLTxek6JYePOSNuScWjqXwnzWxukX2ukJ2jJ
	KyFwB2PouCwMPKSv8Rp9X6uPb43r4oVusv+7v5FEBYaKqy0HUZ
	R1ANdTZRq2k45SAaPmhzgWnv1N065OQx+B78vjWrX
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.17.8
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, 14 Aug 2012 09:17:47 -0000

On 08/14/2012 10:51 AM, Jim Meyering wrote:
> Here is the patch that I expect to squash in.
> Most are nits, but there was an exploitable bit
> of (debugging?) code in the new test.
> 
> diff --git a/NEWS b/NEWS
> index 0f63ddf..46d0a41 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -2,8 +2,8 @@ GNU coreutils NEWS                                    -*- outline -*-
> 
>  * Noteworthy changes in release ?.? (????-??-??) [?]
> 
> -  df now fails in cases when the list of mounted file systems (/etc/mtab)
> -  cannot be read but the file system type information is needed to process
> +  df now fails when the list of mounted file systems (/etc/mtab) cannot
> +  be read, yet the file system type information is needed to process
>    certain options like -a, -l, -t and -x.
>    [This bug was present in "the beginning".]
> 
> diff --git a/doc/coreutils.texi b/doc/coreutils.texi
> index 2fe0dd3..744b41a 100644
> --- a/doc/coreutils.texi
> +++ b/doc/coreutils.texi
> @@ -10754,9 +10754,9 @@ df invocation
>  @var{dir}} to test whether @var{dir} is on a file system of type
>  @samp{ext3} or @samp{reiserfs}.
> 
> -As the list of file systems (@var{mtab}) is needed to determine the
> +Since the list of file systems (@var{mtab}) is needed to determine the
>  file system type, failure includes the cases when that list cannot
> -be read and either of the options @option{-a}, @option{-l}, @option{-t}
> +be read and one or more of the options @option{-a}, @option{-l}, @option{-t}
>  or @option{-x} is used together with a file name argument.

Thanks for the rewording both in NEWS and cu.texi.
Often it's still hard for me to find the right wording in English ...

> diff --git a/src/df.c b/src/df.c
> index a2e6866..835cc2e 100644
> --- a/src/df.c
> +++ b/src/df.c
> @@ -1104,12 +1104,12 @@ main (int argc, char **argv)
>           or when either of -a, -l, -t or -x is used with file name
>           arguments. Otherwise, merely give a warning and proceed.  */
>        int status = 0;
> -      if ( !(optind < argc)
> -          ||(optind < argc
> -             && (show_all_fs
> -                 || show_local_fs
> -                 || fs_select_list != NULL
> -                 || fs_exclude_list != NULL)))
> +      if ( ! (optind < argc)
> +           || (optind < argc
> +               && (show_all_fs
> +                   || show_local_fs
> +                   || fs_select_list != NULL
> +                   || fs_exclude_list != NULL)))
>          {
>            status = EXIT_FAILURE;
>          }

I wonder if there's something like "make diff-syntax-check" which enforces
CU's coding styles for changed code ... the normal syntax-check didn't
complain.

> diff --git a/tests/df/no-mtab-status b/tests/df/no-mtab-status
> index 8835345..6e07854 100755
> --- a/tests/df/no-mtab-status
> +++ b/tests/df/no-mtab-status
> @@ -27,7 +27,7 @@ cat > k.c <<'EOF' || framework_failure_
>  #include <stdio.h>
>  #include <errno.h>
> 
> -struct mntent *getmntent(FILE *fp)
> +struct mntent *getmntent (FILE *fp)
>  {
>    /* Prove that LD_PRELOAD works. */
>    static int done = 0;
> @@ -46,8 +46,6 @@ EOF
>  $CC -shared -fPIC -ldl -O2 k.c -o k.so \
>    || framework_failure_ 'failed to compile with -shared -fPIC'
> 
> -cp k.so /tmp
> -

Good catch. Yes, that was a debugging statement.
I had problems with this LD_PRELOAD-ed test, because I
wanted to intercept open("/etc/mtab", ...) in the first
place, but that never fired, although strace clearly showed
such a line.

Thank you. Now it looks good.

Have a ncie day,
Berny


From MAILER-DAEMON Tue Aug 14 05:31:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1DT3-0002hc-Um
	for mharc-coreutils@gnu.org; Tue, 14 Aug 2012 05:31:17 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33039)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1DT1-0002hJ-F3
	for coreutils@gnu.org; Tue, 14 Aug 2012 05:31:16 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1DSz-0002wj-Ac
	for coreutils@gnu.org; Tue, 14 Aug 2012 05:31:15 -0400
Received: from mx.meyering.net ([88.168.87.75]:60687)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1DSy-0002wW-Vt
	for coreutils@gnu.org; Tue, 14 Aug 2012 05:31:13 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 5D77660029;
	Tue, 14 Aug 2012 11:31:11 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] df: fail when the mount list cannot be read but is needed
	[was: new snapshot available: coreutils-8.17.70-1bacb4]
In-Reply-To: <502A17B4.7030805@bernhard-voelker.de> (Bernhard Voelker's
	message of "Tue, 14 Aug 2012 11:17:40 +0200")
References: <87y5lp3002.fsf@rho.meyering.net>
	<50228907.6080107@draigBrady.com> <50228BB3.80703@bernhard-voelker.de>
	<87vcgt1i62.fsf@rho.meyering.net> <50229052.20402@draigBrady.com>
	<5023A4D7.5030804@bernhard-voelker.de>
	<5029FCF8.4010007@bernhard-voelker.de>
	<87obmdsvp5.fsf@rho.meyering.net>
	<502A17B4.7030805@bernhard-voelker.de>
Date: Tue, 14 Aug 2012 11:31:11 +0200
Message-ID: <87fw7pstuo.fsf@rho.meyering.net>
Lines: 109
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Tue, 14 Aug 2012 09:31:16 -0000

Bernhard Voelker wrote:
> On 08/14/2012 10:51 AM, Jim Meyering wrote:
>> Here is the patch that I expect to squash in.
>> Most are nits, but there was an exploitable bit
>> of (debugging?) code in the new test.
>>
>> diff --git a/NEWS b/NEWS
>> index 0f63ddf..46d0a41 100644
>> --- a/NEWS
>> +++ b/NEWS
>> @@ -2,8 +2,8 @@ GNU coreutils NEWS                                    -*- outline -*-
>>
>>  * Noteworthy changes in release ?.? (????-??-??) [?]
>>
>> -  df now fails in cases when the list of mounted file systems (/etc/mtab)
>> -  cannot be read but the file system type information is needed to process
>> +  df now fails when the list of mounted file systems (/etc/mtab) cannot
>> +  be read, yet the file system type information is needed to process
>>    certain options like -a, -l, -t and -x.
>>    [This bug was present in "the beginning".]
>>
>> diff --git a/doc/coreutils.texi b/doc/coreutils.texi
>> index 2fe0dd3..744b41a 100644
>> --- a/doc/coreutils.texi
>> +++ b/doc/coreutils.texi
>> @@ -10754,9 +10754,9 @@ df invocation
>>  @var{dir}} to test whether @var{dir} is on a file system of type
>>  @samp{ext3} or @samp{reiserfs}.
>>
>> -As the list of file systems (@var{mtab}) is needed to determine the
>> +Since the list of file systems (@var{mtab}) is needed to determine the
>>  file system type, failure includes the cases when that list cannot
>> -be read and either of the options @option{-a}, @option{-l}, @option{-t}
>> +be read and one or more of the options @option{-a}, @option{-l}, @option{-t}
>>  or @option{-x} is used together with a file name argument.
>
> Thanks for the rewording both in NEWS and cu.texi.
> Often it's still hard for me to find the right wording in English ...

Don't worry.
The wording changes were more for style than for correctness.
They're the sorts of mistakes that native speakers might well make.

>> diff --git a/src/df.c b/src/df.c
>> index a2e6866..835cc2e 100644
>> --- a/src/df.c
>> +++ b/src/df.c
>> @@ -1104,12 +1104,12 @@ main (int argc, char **argv)
>>           or when either of -a, -l, -t or -x is used with file name
>>           arguments. Otherwise, merely give a warning and proceed.  */
>>        int status = 0;
>> -      if ( !(optind < argc)
>> -          ||(optind < argc
>> -             && (show_all_fs
>> -                 || show_local_fs
>> -                 || fs_select_list != NULL
>> -                 || fs_exclude_list != NULL)))
>> +      if ( ! (optind < argc)
>> +           || (optind < argc

Actually, I realized that we should remove the latter "optind < argc"
conjunct.  Because in the RHS of the outer "||", that expression is already
guaranteed to be true.  I.e.,

diff --git a/src/df.c b/src/df.c
index a2e6866..9d956cd 100644
--- a/src/df.c
+++ b/src/df.c
@@ -1104,12 +1104,11 @@ main (int argc, char **argv)
          or when either of -a, -l, -t or -x is used with file name
          arguments. Otherwise, merely give a warning and proceed.  */
       int status = 0;
-      if ( !(optind < argc)
-          ||(optind < argc
-             && (show_all_fs
-                 || show_local_fs
-                 || fs_select_list != NULL
-                 || fs_exclude_list != NULL)))
+      if ( ! (optind < argc)
+           || (show_all_fs
+               || show_local_fs
+               || fs_select_list != NULL
+               || fs_exclude_list != NULL))
         {
           status = EXIT_FAILURE;
         }

>> +               && (show_all_fs
>> +                   || show_local_fs
>> +                   || fs_select_list != NULL
>> +                   || fs_exclude_list != NULL)))
>>          {
>>            status = EXIT_FAILURE;
>>          }
>
> I wonder if there's something like "make diff-syntax-check" which enforces
> CU's coding styles for changed code ... the normal syntax-check didn't
> complain.

The spaces around "!" are not a big deal.
The main change was to add a space after "||".
If you compare the code as-is with the code filtered
through indent --no-tabs, it will give you an idea.
indent doesn't know about all types, so I have a bunch of lines
like this in ~/.indent.pro:

  -Ttcflag_t
  -Tcc_t
  -TDIR


From MAILER-DAEMON Tue Aug 14 06:50:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1Ehv-0005ca-0G
	for mharc-coreutils@gnu.org; Tue, 14 Aug 2012 06:50:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37746)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1Eht-0005cM-67
	for coreutils@gnu.org; Tue, 14 Aug 2012 06:50:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1Ehq-0007x3-No
	for coreutils@gnu.org; Tue, 14 Aug 2012 06:50:41 -0400
Received: from moutng.kundenserver.de ([212.227.126.186]:54188)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1Ehq-0007ww-Dq
	for coreutils@gnu.org; Tue, 14 Aug 2012 06:50:38 -0400
Received: from [192.168.2.108] (p4FF74032.dip.t-dialin.net [79.247.64.50])
	by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis)
	id 0MeHvO-1TLexm34co-00PvL4; Tue, 14 Aug 2012 12:50:37 +0200
Message-ID: <502A2D7B.8080804@bernhard-voelker.de>
Date: Tue, 14 Aug 2012 12:50:35 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] df: fail when the mount list cannot be read but is needed
	[was: new snapshot available: coreutils-8.17.70-1bacb4]
References: <87y5lp3002.fsf@rho.meyering.net> <50228907.6080107@draigBrady.com>
	<50228BB3.80703@bernhard-voelker.de>
	<87vcgt1i62.fsf@rho.meyering.net> <50229052.20402@draigBrady.com>
	<5023A4D7.5030804@bernhard-voelker.de>
	<5029FCF8.4010007@bernhard-voelker.de>
	<87obmdsvp5.fsf@rho.meyering.net>
	<502A17B4.7030805@bernhard-voelker.de>
	<87fw7pstuo.fsf@rho.meyering.net>
In-Reply-To: <87fw7pstuo.fsf@rho.meyering.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:sZwyWWQi4ehU7AQse/YCGaZN2C4qVtEimCW71U3wRnp
	fkLljNkT9+fnVXeY4OuyypPVLeKOySp9CWEVvGtir7AxijSbR6
	ocAsFSxKsaM97T7/5tdZuA9knpi9T9trfa98A9sAHIX9cecF2k
	CwoBGAmzJqYlsePR24AEZ6DOaw/5HJhKMBUYSW1MQl/84+hqs1
	dSBXOcY5GCKmnUDNVa+4t1j98X2br75Lef6YGRcCQRLj0plpEN
	5U1EbY5IBJxBre26iCZJAKBFTvJka20XTQA5OldKUTeKfWINsf
	66NEmEfRPfjGyic+54H+XVALCBh3lQMkXoZKJkj4aDdqmC32HE
	CPJrp7HZoSq9lXdrtz26Uu7bUH5Q7PVj9P31QPMYT
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.126.186
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, 14 Aug 2012 10:50:42 -0000

On 08/14/2012 11:31 AM, Jim Meyering wrote:
> Actually, I realized that we should remove the latter "optind < argc"
> conjunct.  Because in the RHS of the outer "||", that expression is already
> guaranteed to be true.  I.e.,
> 
> diff --git a/src/df.c b/src/df.c
> index a2e6866..9d956cd 100644
> --- a/src/df.c
> +++ b/src/df.c
> @@ -1104,12 +1104,11 @@ main (int argc, char **argv)
>           or when either of -a, -l, -t or -x is used with file name
>           arguments. Otherwise, merely give a warning and proceed.  */
>        int status = 0;
> -      if ( !(optind < argc)
> -          ||(optind < argc
> -             && (show_all_fs
> -                 || show_local_fs
> -                 || fs_select_list != NULL
> -                 || fs_exclude_list != NULL)))
> +      if ( ! (optind < argc)
> +           || (show_all_fs
> +               || show_local_fs
> +               || fs_select_list != NULL
> +               || fs_exclude_list != NULL))
>          {
>            status = EXIT_FAILURE;
>          }

I derived the expression from the natural wording (see the comment),
therefore that excess condition was still there.
Looks even better now. Thanks.

Have a nice day,
Berny


From MAILER-DAEMON Tue Aug 14 08:48:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1GXe-0000iK-UL
	for mharc-coreutils@gnu.org; Tue, 14 Aug 2012 08:48:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41673)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1GXZ-0000Qr-0H
	for coreutils@gnu.org; Tue, 14 Aug 2012 08:48:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1GXX-0002YD-Gi
	for coreutils@gnu.org; Tue, 14 Aug 2012 08:48:08 -0400
Received: from mx1.redhat.com ([209.132.183.28]:50336)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1GXX-0002Xl-8U
	for coreutils@gnu.org; Tue, 14 Aug 2012 08:48:07 -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 q7ECm12A012585
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 14 Aug 2012 08:48:01 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7EClxiK004368
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Tue, 14 Aug 2012 08:48:01 -0400
Message-ID: <502A48FF.4030809@redhat.com>
Date: Tue, 14 Aug 2012 14:47:59 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: Various tests give illusory results
References: <5023DA8F.7020307@redhat.com>
	<5024AFE1.7080004@bernhard-voelker.de>
In-Reply-To: <5024AFE1.7080004@bernhard-voelker.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 14 Aug 2012 12:48:14 -0000

Well, I wanted to satisfy the requirements from comment #6 as much as 
possible
and didn't want to change anything in the existing tests (such as 
passing args to require_root_ )
to make it more automatic. If the check were to act on setuidgid output 
like in the rm test, it'd either
have to be changed in all tests or require_root_ would need additional 
arguments (which are again
changes in the tests). But if it needs to be changed that way, I will, 
of course, redo it.
Cheers,
   Ondrej.

On 08/10/2012 08:53 AM, Bernhard Voelker wrote:
> On 08/09/2012 05:43 PM, Ondrej Oprala wrote:
>> Hi, I think I got a fix for this bugzilla
>> https://bugzilla.redhat.com/show_bug.cgi?id=556358.
>> I added a bit of permission checking to require_root_ so no tests have
>> to be rewriten.
>> Have a nice day :) ,
>>    Ondrej
>>
> Hi Ondrej,
>
>> +setuidgid_has_perm_()
>> +{
>> +
>> +  cat << \EOF > cmds.tmp
>> +  IFS=:
>> +  for DIR in $PATH; do
>> +    test -x $DIR || exit 1
>> +  done
>> +  exit 0
>> +EOF
>> +
>> +  su -s /bin/sh $NON_ROOT_USERNAME < cmds.tmp
>> +
>> +  RET=$?
>> +  return $RET
>> +}
>> +
> just a thought: if setuidgid is part of the test failure,
> then why not using setuidgid in here?
>
> Furthermore: the problem is finding the correct binary, right?
> E.g. in tests/rm/fail-2eperm there is already such a test:
>
>    # Try to ensure that $NON_ROOT_USERNAME can access
>    # the required version of rm.
>    rm_version=$(
>      setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
>      sed -n '1s/.* //p'
>    )
>    case $rm_version in
>      $PACKAGE_VERSION) ;;
>      *) skip_ "cannot access just-built rm as user $NON_ROOT_USERNAME";;
>    esac
>
>
> Have a nice day,
> Berny



From MAILER-DAEMON Tue Aug 14 10:53:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1IUd-00027t-Lw
	for mharc-coreutils@gnu.org; Tue, 14 Aug 2012 10:53:15 -0400
Received: from eggs.gnu.org ([208.118.235.92]:32995)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1IUb-00026j-TI
	for coreutils@gnu.org; Tue, 14 Aug 2012 10:53:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1IUV-0002uu-DL
	for coreutils@gnu.org; Tue, 14 Aug 2012 10:53:13 -0400
Received: from moutng.kundenserver.de ([212.227.126.187]:57944)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1IUV-0002up-2h
	for coreutils@gnu.org; Tue, 14 Aug 2012 10:53:07 -0400
Received: from [192.168.2.108] (p4FF74032.dip.t-dialin.net [79.247.64.50])
	by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis)
	id 0LjJqJ-1TZGGd3OYB-00dTqz; Tue, 14 Aug 2012 16:53:05 +0200
Message-ID: <502A664F.3040702@bernhard-voelker.de>
Date: Tue, 14 Aug 2012 16:53:03 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: Various tests give illusory results
References: <5023DA8F.7020307@redhat.com>
	<5024AFE1.7080004@bernhard-voelker.de>
	<502A48FF.4030809@redhat.com>
In-Reply-To: <502A48FF.4030809@redhat.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:3wV8ix3ilVNTXcTm04ZxGXZtQo7BCpWYboa1RGTbAcU
	0UCj5PzOeVtU0dm6wHtburTxp1CgM/b66Ms4JUqxDWe8kWap2T
	WPcJWFaP5bN02BjnjzgHu3C0gYhOqyd7YKZw6zEYYAVVMNIt8D
	wFEx/yugyb3CjKXPRLnNxM9P7ZCTmRH/MWeESsKohUI6iF/bbh
	WSM4vZI7kfiIQcGu5OisltKYuCOSnJBm6cm0Pc2BLuVAI5tlDP
	Vp61V7sBUH2OBRavbUeVNEL+MBB9PFI/dBN7TXonf6b7/omH+n
	jF0oGFY8DyrbD1kLCoVzuCJDZ4xQ39bKZuJOuIN7TIFtBaPvA1
	ZT+RbnDA7QefWQtBQbtyMmkXw9LXSO2XFmMvClFKa
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.126.187
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, 14 Aug 2012 14:53:15 -0000

On 08/14/2012 02:47 PM, Ondrej Oprala wrote:
> 
> On 08/10/2012 08:53 AM, Bernhard Voelker wrote:
>> On 08/09/2012 05:43 PM, Ondrej Oprala wrote:
>>> Hi, I think I got a fix for this bugzilla
>>> https://bugzilla.redhat.com/show_bug.cgi?id=556358.
>>> I added a bit of permission checking to require_root_ so no tests have
>>> to be rewriten.
>>> Have a nice day :) ,
>>>    Ondrej
>>>
>> Hi Ondrej,
>>
>>> +setuidgid_has_perm_()
>>> +{
>>> +
>>> +  cat << \EOF > cmds.tmp
>>> +  IFS=:
>>> +  for DIR in $PATH; do
>>> +    test -x $DIR || exit 1
>>> +  done
>>> +  exit 0
>>> +EOF
>>> +
>>> +  su -s /bin/sh $NON_ROOT_USERNAME < cmds.tmp
>>> +
>>> +  RET=$?
>>> +  return $RET
>>> +}
>>> +
>> just a thought: if setuidgid is part of the test failure,
>> then why not using setuidgid in here?
>>
>> Furthermore: the problem is finding the correct binary, right?
>> E.g. in tests/rm/fail-2eperm there is already such a test:
>>
>>    # Try to ensure that $NON_ROOT_USERNAME can access
>>    # the required version of rm.
>>    rm_version=$(
>>      setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
>>      sed -n '1s/.* //p'
>>    )
>>    case $rm_version in
>>      $PACKAGE_VERSION) ;;
>>      *) skip_ "cannot access just-built rm as user $NON_ROOT_USERNAME";;
>>    esac
>>
>>
>> Have a nice day,
>> Berny
> 
> Well, I wanted to satisfy the requirements from comment #6 as much as 
> possible
> and didn't want to change anything in the existing tests (such as 
> passing args to require_root_ )
> to make it more automatic. If the check were to act on setuidgid output 
> like in the rm test, it'd either
> have to be changed in all tests or require_root_ would need additional 
> arguments (which are again
> changes in the tests). But if it needs to be changed that way, I will, 
> of course, redo it.

Hi Ondrej,

I think grep-ing for "setuidgid" in $0 is the right thing
in order to avoid changing all root-tests.

I just thought that setuidgid_has_perm_() should use the same
same mechanism via setuidgid as the actual test. This is just
to avoid potential problems if there are any discrepancies
between "the su way" and "the setuidgid way" - today or in
future.

And I think you wouldn't have to pass an extra arg - the CU
program? - to require_root_: it doesn't matter which program
is used to check the version. If the right version of e.g.
rm is found, then also the right version of e.g. touch would
be used.

The question I'm still asking myself is: is the only problem
to use the correct binary in the test, or do you also want
to ensure that the current directory is accessible.

To check both, I thought of something like this:

  setuidgid_has_perm_()
  {
    # Try to ensure that $NON_ROOT_USERNAME can access
    # the required version of CU binaries.
    local rm_version=$(
      setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
      sed -n '1s/.* //p'
    )
    case "_${rm_version}_" in
      _$PACKAGE_VERSION}_) ;;
      *) return 1;;
    esac

    # Try to ensure that $NON_ROOT_USERNAME can access
    # the temporary test directory.
    setuidgid $NON_ROOT_USERNAME env PATH="$PATH" touch foo
    [ -f foo ] || return 1

    rm -f foo
    return 0
  }

Have a nice day,
Berny


From MAILER-DAEMON Tue Aug 14 11:55:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1JT6-0006tQ-Ht
	for mharc-coreutils@gnu.org; Tue, 14 Aug 2012 11:55:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50092)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1JT1-0006tE-Kc
	for coreutils@gnu.org; Tue, 14 Aug 2012 11:55:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1JSx-0004HH-Ek
	for coreutils@gnu.org; Tue, 14 Aug 2012 11:55:39 -0400
Received: from mx1.redhat.com ([209.132.183.28]:28724)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1JSx-0004HD-6G
	for coreutils@gnu.org; Tue, 14 Aug 2012 11:55:35 -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 q7EFtVkp014248
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 14 Aug 2012 11:55:31 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q7EFtSj9015613
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 14 Aug 2012 11:55:30 -0400
Message-ID: <502A74F0.9070404@redhat.com>
Date: Tue, 14 Aug 2012 17:55:28 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: Various tests give illusory results
References: <5023DA8F.7020307@redhat.com>
	<5024AFE1.7080004@bernhard-voelker.de>
	<502A48FF.4030809@redhat.com>
	<502A664F.3040702@bernhard-voelker.de>
In-Reply-To: <502A664F.3040702@bernhard-voelker.de>
Content-Type: multipart/mixed; boundary="------------040900080402090301070801"
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 14 Aug 2012 15:55:42 -0000

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

On 08/14/2012 04:53 PM, Bernhard Voelker wrote:
> On 08/14/2012 02:47 PM, Ondrej Oprala wrote:
>> On 08/10/2012 08:53 AM, Bernhard Voelker wrote:
>>> On 08/09/2012 05:43 PM, Ondrej Oprala wrote:
>>>> Hi, I think I got a fix for this bugzilla
>>>> https://bugzilla.redhat.com/show_bug.cgi?id=556358.
>>>> I added a bit of permission checking to require_root_ so no tests have
>>>> to be rewriten.
>>>> Have a nice day :) ,
>>>>     Ondrej
>>>>
>>> Hi Ondrej,
>>>
>>>> +setuidgid_has_perm_()
>>>> +{
>>>> +
>>>> +  cat << \EOF > cmds.tmp
>>>> +  IFS=:
>>>> +  for DIR in $PATH; do
>>>> +    test -x $DIR || exit 1
>>>> +  done
>>>> +  exit 0
>>>> +EOF
>>>> +
>>>> +  su -s /bin/sh $NON_ROOT_USERNAME < cmds.tmp
>>>> +
>>>> +  RET=$?
>>>> +  return $RET
>>>> +}
>>>> +
>>> just a thought: if setuidgid is part of the test failure,
>>> then why not using setuidgid in here?
>>>
>>> Furthermore: the problem is finding the correct binary, right?
>>> E.g. in tests/rm/fail-2eperm there is already such a test:
>>>
>>>     # Try to ensure that $NON_ROOT_USERNAME can access
>>>     # the required version of rm.
>>>     rm_version=$(
>>>       setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
>>>       sed -n '1s/.* //p'
>>>     )
>>>     case $rm_version in
>>>       $PACKAGE_VERSION) ;;
>>>       *) skip_ "cannot access just-built rm as user $NON_ROOT_USERNAME";;
>>>     esac
>>>
>>>
>>> Have a nice day,
>>> Berny
>> Well, I wanted to satisfy the requirements from comment #6 as much as
>> possible
>> and didn't want to change anything in the existing tests (such as
>> passing args to require_root_ )
>> to make it more automatic. If the check were to act on setuidgid output
>> like in the rm test, it'd either
>> have to be changed in all tests or require_root_ would need additional
>> arguments (which are again
>> changes in the tests). But if it needs to be changed that way, I will,
>> of course, redo it.
> Hi Ondrej,
>
> I think grep-ing for "setuidgid" in $0 is the right thing
> in order to avoid changing all root-tests.
>
> I just thought that setuidgid_has_perm_() should use the same
> same mechanism via setuidgid as the actual test. This is just
> to avoid potential problems if there are any discrepancies
> between "the su way" and "the setuidgid way" - today or in
> future.
>
> And I think you wouldn't have to pass an extra arg - the CU
> program? - to require_root_: it doesn't matter which program
> is used to check the version. If the right version of e.g.
> rm is found, then also the right version of e.g. touch would
> be used.
>
> The question I'm still asking myself is: is the only problem
> to use the correct binary in the test, or do you also want
> to ensure that the current directory is accessible.
>
> To check both, I thought of something like this:
>
>    setuidgid_has_perm_()
>    {
>      # Try to ensure that $NON_ROOT_USERNAME can access
>      # the required version of CU binaries.
>      local rm_version=$(
>        setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
>        sed -n '1s/.* //p'
>      )
>      case "_${rm_version}_" in
>        _$PACKAGE_VERSION}_) ;;
>        *) return 1;;
>      esac
>
>      # Try to ensure that $NON_ROOT_USERNAME can access
>      # the temporary test directory.
>      setuidgid $NON_ROOT_USERNAME env PATH="$PATH" touch foo
>      [ -f foo ] || return 1
>
>      rm -f foo
>      return 0
>    }
>
> Have a nice day,
> Berny
Hi,

You're right about the rm test. I originally wanted to make the check by 
checking
if $NON_ROOT_USERNAME has execute permissions for the src folder, but this
looks cleaner. There's still the very rare case of $NON_ROOT_USERNAME
having execute permissions for rm but not having them for other binaries 
using
setuidgid, but that is something that would have to be done purposefully and
personally I don't see any reason to do that.

Anyway, the attachment should hopefully have it right.

Cheers,
   Ondrej.

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

RnJvbSBiNWE4ZmEzMjRkMDg5MzIzZjBhZjAyZjRlYjdjOGJmZGM4NmI0MzM3IE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBPbmRyZWogT3ByYWxhIDxvb3ByYWxhQHJlZGhhdC5j
b20+CkRhdGU6IFRodSwgOSBBdWcgMjAxMiAxNTo0MDozOSArMDIwMApTdWJqZWN0OiBbUEFU
Q0hdIHRlc3RzOiBBZGQgZXJyb3IgY2hlY2tpbmcgZm9yIHJvb3Qtb25seSB0ZXN0cyBydW5u
aW5nCiBzZXR1aWRnaWQKCiogTkVXUzogTWVudGlvbiB0aGUgZml4LgoqIHRlc3RzL2luaXQu
Y2ZnOiBNb2RpZnkgdGhlIHJlcXVpcmVfcm9vdF8gZnVuY3Rpb24gdG8gY2hlY2sKZm9yIHNl
dHVpZGdpZCBjYWxscyBhbmQgcHJvcGVyIHBlcm1pc3Npb25zLgotLS0KIE5FV1MgICAgICAg
ICAgIHwgIDYgKysrKysrCiB0ZXN0cy9pbml0LmNmZyB8IDE5ICsrKysrKysrKysrKysrKysr
KysKIDIgZmlsZXMgY2hhbmdlZCwgMjUgaW5zZXJ0aW9ucygrKQoKZGlmZiAtLWdpdCBhL05F
V1MgYi9ORVdTCmluZGV4IDQ2ZDBhNDEuLjE3M2Y4NjEgMTAwNjQ0Ci0tLSBhL05FV1MKKysr
IGIvTkVXUwpAQCAtNyw2ICs3LDEyIEBAIEdOVSBjb3JldXRpbHMgTkVXUyAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgIC0qLSBvdXRsaW5lIC0qLQogICBjZXJ0YWluIG9w
dGlvbnMgbGlrZSAtYSwgLWwsIC10IGFuZCAteC4KICAgW1RoaXMgYnVnIHdhcyBwcmVzZW50
IGluICJ0aGUgYmVnaW5uaW5nIi5dCiAKKyoqIEJ1ZyBmaXhlcworCisgIHJvb3Qtb25seSB0
ZXN0cyBub3cgcHJvcGVybHkgY2hlY2sgZm9yIHBlcm1pc3Npb25zIG9mIGR1bW15CisgIHVz
ZXIgJE5PTl9ST09UX1VTRVJOQU1FIGJlZm9yZSB0cnlpbmcgdG8gcnVuIGJpbmFyaWVzIGZy
b20gdGhlCisgIHNyYyBkaXIuCisKIAogKiBOb3Rld29ydGh5IGNoYW5nZXMgaW4gcmVsZWFz
ZSA4LjE4ICgyMDEyLTA4LTEyKSBbc3RhYmxlXQogCmRpZmYgLS1naXQgYS90ZXN0cy9pbml0
LmNmZyBiL3Rlc3RzL2luaXQuY2ZnCmluZGV4IDRmZjVhZDQuLjJkMGZlMTAgMTAwNjQ0Ci0t
LSBhL3Rlc3RzL2luaXQuY2ZnCisrKyBiL3Rlc3RzL2luaXQuY2ZnCkBAIC0zNDEsMTEgKzM0
MSwzMCBAQCBvciB1c2UgdGhlIHNob3J0Y3V0IHRhcmdldCBvZiB0aGUgdG9wbGV2ZWwgTWFr
ZWZpbGUsCiAgIGZpCiB9CiAKK3NldHVpZGdpZF9oYXNfcGVybV8oKQoreworICBsb2NhbCBy
bV92ZXJzaW9uPSQoCisgICAgc2V0dWlkZ2lkICROT05fUk9PVF9VU0VSTkFNRSBlbnYgUEFU
SD0iJFBBVEgiIHJtIC0tdmVyc2lvbiB8CisgICAgc2VkIC1uICdscy8uKiAvL3AnCisgICkK
KyAgY2FzZSAiXyR7cm1fdmVyc2lvbn1fIiBpbgorICAgICAgXyRQQUNLQUdFX1ZFUlNJT059
XykgOzsKKyAgICAgICopIHJldHVybiAxOzsKKyAgZXNhYworfQorCiByZXF1aXJlX3Jvb3Rf
KCkKIHsKICAgdWlkX2lzX3ByaXZpbGVnZWRfIHx8IHNraXBfICJtdXN0IGJlIHJ1biBhcyBy
b290IgogICBOT05fUk9PVF9VU0VSTkFNRT0ke05PTl9ST09UX1VTRVJOQU1FPW5vYm9keX0K
ICAgTk9OX1JPT1RfR1JPVVA9JHtOT05fUk9PVF9HUk9VUD0kKGlkIC1nICROT05fUk9PVF9V
U0VSTkFNRSl9CisKKyAgI2lmIHRlc3QgY29udGFpbnMgYSBzZXR1aWRnaWQgY2FsbC4uLgor
ICBncmVwICdeWyBdKnNldHVpZGdpZCcgIi4uLyQwIgorICBpZiBbICIkPyIgPSAiMCIgXTsg
dGhlbgorICAgIHNldHVpZGdpZF9oYXNfcGVybV8gfHwKKyAgICBza2lwXyAidXNlciAkTk9O
X1JPT1RfVVNFUk5BTUUgbGFja3MgZXhlY3V0ZSBwZXJtaXNzaW9ucyIKKyAgZmkKIH0KIAog
c2tpcF9pZl9yb290XygpIHsgdWlkX2lzX3ByaXZpbGVnZWRfICYmIHNraXBfICJtdXN0IGJl
IHJ1biBhcyBub24tcm9vdCI7IH0KLS0gCjEuNy4xMS4yCgo=
--------------040900080402090301070801--


From MAILER-DAEMON Tue Aug 14 11:56:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1JU1-0006xl-OG
	for mharc-coreutils@gnu.org; Tue, 14 Aug 2012 11:56:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50224)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <krzysztof.goj@gmail.com>) id 1T1JTx-0006xe-Hq
	for coreutils@gnu.org; Tue, 14 Aug 2012 11:56:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <krzysztof.goj@gmail.com>) id 1T1JTw-00051J-Fg
	for coreutils@gnu.org; Tue, 14 Aug 2012 11:56:37 -0400
Received: from mail-qc0-f169.google.com ([209.85.216.169]:41988)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <krzysztof.goj@gmail.com>) id 1T1JTw-00051D-A7
	for coreutils@gnu.org; Tue, 14 Aug 2012 11:56:36 -0400
Received: by qcsd16 with SMTP id d16so464280qcs.0
	for <coreutils@gnu.org>; Tue, 14 Aug 2012 08:56:35 -0700 (PDT)
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
	:cc:content-type;
	bh=9O/UlTevpWUsaJcjZv9XKXbkPGuwTMX1LtmRr07pUYI=;
	b=tiFcB0fLNnKzq+bSTlpRxH2zeEcNwh9B/OXkylgo47W1QgKAas8xzi6Z53qjx+4gdi
	fybc8kWhiU1L6r1D03KfmYqC6EjbWRep48PEeFTG5ZIMHLdIByMHTVulPUyFyTbKxvsd
	pVcPS2wTtWIuBWLLVAN1p3MZghT1Srigyq3sWIMzaqrjkURXcEMvkLRvf7mqDwrH9B2W
	a5gUg8Q9JGdh7OiJU0TW72i4KRb03PLyP9jNXAlSBzajrgeJPz0AP11BxboYXwjq7XNb
	53cacTgRIHd8ZmwhMzkl0ce36+czqd+kxlZV/KppvxMgGhloxbPDII/fvhb1Rby6oxbE
	rKxA==
MIME-Version: 1.0
Received: by 10.229.102.67 with SMTP id f3mr8965827qco.137.1344959795862; Tue,
	14 Aug 2012 08:56:35 -0700 (PDT)
Received: by 10.229.27.193 with HTTP; Tue, 14 Aug 2012 08:56:35 -0700 (PDT)
In-Reply-To: <87r4rat6yv.fsf@rho.meyering.net>
References: <CAJ_ynNZV-6HaYUGkkUNi57wHLKgvnWg4O8n-hRDq34s6bbiP5g@mail.gmail.com>
	<4F1D784A.8040103@redhat.com>
	<CAJ_ynNbS-UoPvpLCSCkAMUNzH8E6Y+zwHs_cKn=3E0YW-8siJQ@mail.gmail.com>
	<CAJ_ynNYBUDWj1Ju51-AdLrh4xQgg0+N-En7FE99h3YJtVSNYZg@mail.gmail.com>
	<87r4rat6yv.fsf@rho.meyering.net>
Date: Tue, 14 Aug 2012 17:56:35 +0200
Message-ID: <CAJ_ynNa-2+KkNdQ0Gr6ePc958HcZa=aab5pBX4-qgq3O__6UUA@mail.gmail.com>
Subject: Re: [PATCH] rm: new option (-d) to remove empty directories
From: Krzysztof Goj <krzysztof.goj@gmail.com>
To: Jim Meyering <jim@meyering.net>
Content-Type: multipart/mixed; boundary=002354471060de9cfd04c73bdaa1
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.216.169
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, 14 Aug 2012 15:56:40 -0000

--002354471060de9cfd04c73bdaa1
Content-Type: text/plain; charset=UTF-8

Hi,

> Please add a NEWS entry, a description of the new option
> in coreutils.texi and adjust for the issues below
> [...]

Thanks for the review. I've updated the patch, it's attached.

Best regards,
-- 
Krzysztof

--002354471060de9cfd04c73bdaa1
Content-Type: application/octet-stream; name="rm-d.patch"
Content-Disposition: attachment; filename="rm-d.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_h5v6apos1

RnJvbSAxYWRiZjMzMzU1N2E1NWZkZjYyODU2YWJkMzU2M2U5YmZiNDU3OTYyIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBLcnp5c3p0b2YgR29qIDxrcnp5c3p0b2YuZ29qQGdtYWlsLmNv
bT4KRGF0ZTogU3VuLCAyMiBKYW4gMjAxMiAwMTozOTo1OSArMDEwMApTdWJqZWN0OiBbUEFUQ0hd
IHJtOiBuZXcgb3B0aW9uICgtZCkgdG8gcmVtb3ZlIGVtcHR5IGRpcmVjdG9yaWVzCgpBZGQgbmV3
IG9wdGlvbiB0byBybSAoLWQvLS1kaXIpLCB3aGljaCBhbGxvd3MgcmVtb3ZhbCBvZgplbXB0eSBk
aXJlY3Rvcmllcywgd2hpbGUgc3RpbGwgc2FmZWx5IGRpc2FsbG93aW5nIHJlbW92YWwKb2Ygbm9u
LWVtcHR5IG9uZXMuCgpUaGlzIGNoYW5nZSBpbXByb3ZlcyBjb21wYXRpYmlsaXR5IHdpdGggTWFj
IE9TIFggYW5kIEJTRCBzeXN0ZW1zCndoaWNoIGFsbCBoYXZlIHRoZSAtZCBmbGFnLgoKKiBzcmMv
cmVtb3ZlLmMgKHJtX2Z0cyk6IGFsbG93IHJlbW92YWwgb2YgZW1wdHkgZGlyIGlmIHRoZSBvcHRp
b24gaXMgc2V0Ciogc3JjL3JlbW92ZS5oIChybV9vcHRpb25zKTogbmV3IG9wdGlvbiAtIHJlbW92
ZV9lbXB0eV9kaXJlY3RvcmllcwoqIHNyYy9ybS5jIChsb25nX29wdHMsIHVzYWdlLCBtYWluKTog
dXNhZ2UgJiYgb3B0aW9uIHBhcnNpbmcKKiB0ZXN0cy9NYWtlZmlsZS5hbTogYWRkZWQgbmV3IHRl
c3QgY2FzZXMgKGQtMSwgZC0yKQoqIHRlc3RzL3JtL2QtMTogbmV3IHRlc3QgY2FzZSAtIHN1Y2Nl
c3NmdWxseSBkZWxldGUgZW1wdHkgZGlyCiogdGVzdHMvcm0vZC0yOiBuZXcgdGVzdCBjYXNlIC0g
cmVmdXNlIHRvIGRlbGV0ZSBub25lbXB0eSBkaXIKLS0tCiBORVdTICAgICAgICAgICAgICAgfCAg
NiArKysrKysKIGRvYy9jb3JldXRpbHMudGV4aSB8ICA3ICsrKysrKysKIHNyYy9tdi5jICAgICAg
ICAgICB8ICAxICsKIHNyYy9yZW1vdmUuYyAgICAgICB8IDEwICsrKysrKystLS0KIHNyYy9yZW1v
dmUuaCAgICAgICB8ICAzICsrKwogc3JjL3JtLmMgICAgICAgICAgIHwgIDkgKysrKysrKystCiB0
ZXN0cy9NYWtlZmlsZS5hbSAgfCAgMiArKwogdGVzdHMvcm0vZC0xICAgICAgIHwgMzggKysrKysr
KysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysKIHRlc3RzL3JtL2QtMiAgICAgICB8IDMz
ICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKwogOSBmaWxlcyBjaGFuZ2VkLCAxMDUg
aW5zZXJ0aW9ucygrKSwgNCBkZWxldGlvbnMoLSkKIGNyZWF0ZSBtb2RlIDEwMDc1NSB0ZXN0cy9y
bS9kLTEKIGNyZWF0ZSBtb2RlIDEwMDc1NSB0ZXN0cy9ybS9kLTIKCmRpZmYgLS1naXQgYS9ORVdT
IGIvTkVXUwppbmRleCAzODU2MTdlLi5hZDU5Y2FhIDEwMDY0NAotLS0gYS9ORVdTCisrKyBiL05F
V1MKQEAgLTIsNiArMiwxMiBAQCBHTlUgY29yZXV0aWxzIE5FV1MgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAtKi0gb3V0bGluZSAtKi0KIAogKiBOb3Rld29ydGh5IGNoYW5nZXMg
aW4gcmVsZWFzZSA/Lj8gKD8/Pz8tPz8tPz8pIFs/XQogCisqKiBOZXcgZmVhdHVyZXMKKworICBy
bSBub3cgYWNjZXB0cyAtZC8tLWRpciBmbGFnIHdoaWNoIGFsbG93cyBpdCB0byByZW1vdmUgZW1w
dHkgZGlyZWN0b3JpZXMuCisgIEFzIHJlbW92aW5nIGVtcHR5IGRpcmVjdG9yaWVzIGlzIHJlbGF0
aXZlbHkgc2FmZSB0aGlzIG9wdGlvbiBjYW4gYmUgdXNlZCBhcworICBhIHBhcnQgb2YgdGhlIGFs
aWFzIHJtPSdybSAtLWRpcicuICBUaGlzIGNoYW5nZSBhbHNvIGltcHJvdmVzIGNvbXBhdGliaWxp
dHkKKyAgd2l0aCBNYWMgT1MgWCBhbmQgQlNEIHN5c3RlbXMgd2hpY2ggYWxsIGhhdmUgdGhlIC1k
IGZsYWcuCiAKICogTm90ZXdvcnRoeSBjaGFuZ2VzIGluIHJlbGVhc2UgOC4xOCAoMjAxMi0wOC0x
MikgW3N0YWJsZV0KIApkaWZmIC0tZ2l0IGEvZG9jL2NvcmV1dGlscy50ZXhpIGIvZG9jL2NvcmV1
dGlscy50ZXhpCmluZGV4IDUxNmVjNzMuLmEzYTQ5NjAgMTAwNjQ0Ci0tLSBhL2RvYy9jb3JldXRp
bHMudGV4aQorKysgYi9kb2MvY29yZXV0aWxzLnRleGkKQEAgLTg4MDcsNiArODgwNywxMyBAQCBU
aGUgcHJvZ3JhbSBhY2NlcHRzIHRoZSBmb2xsb3dpbmcgb3B0aW9ucy4gIEFsc28gc2VlIEByZWZ7
Q29tbW9uIG9wdGlvbnN9LgogCiBAdGFibGUgQHNhbXAKIAorQGl0ZW0gLWQKK0BpdGVteCAtLWRp
cgorQG9waW5kZXggLWQKK0BvcGluZGV4IC0tZGlyCitAY2luZGV4IGRpcmVjdG9yaWVzLCByZW1v
dmluZworUmVtb3ZlIHRoZSBsaXN0ZWQgZGlyZWN0b3JpZXMgaWYgdGhleSBhcmUgZW1wdHkuCisK
IEBpdGVtIC1mCiBAaXRlbXggLS1mb3JjZQogQG9waW5kZXggLWYKZGlmZiAtLWdpdCBhL3NyYy9t
di5jIGIvc3JjL212LmMKaW5kZXggZWUyZjVhMS4uNGY1NzA4ZSAxMDA2NDQKLS0tIGEvc3JjL212
LmMKKysrIGIvc3JjL212LmMKQEAgLTczLDYgKzczLDcgQEAgc3RhdGljIHZvaWQKIHJtX29wdGlv
bl9pbml0IChzdHJ1Y3Qgcm1fb3B0aW9ucyAqeCkKIHsKICAgeC0+aWdub3JlX21pc3NpbmdfZmls
ZXMgPSBmYWxzZTsKKyAgeC0+cmVtb3ZlX2VtcHR5X2RpcmVjdG9yaWVzID0gdHJ1ZTsKICAgeC0+
cmVjdXJzaXZlID0gdHJ1ZTsKICAgeC0+b25lX2ZpbGVfc3lzdGVtID0gZmFsc2U7CiAKZGlmZiAt
LWdpdCBhL3NyYy9yZW1vdmUuYyBiL3NyYy9yZW1vdmUuYwppbmRleCA1ZWJkMmNlLi42MWJhNWYz
IDEwMDY0NAotLS0gYS9zcmMvcmVtb3ZlLmMKKysrIGIvc3JjL3JlbW92ZS5jCkBAIC00MTQsMTEg
KzQxNCwxNSBAQCBybV9mdHMgKEZUUyAqZnRzLCBGVFNFTlQgKmVudCwgc3RydWN0IHJtX29wdGlv
bnMgY29uc3QgKngpCiAgIHN3aXRjaCAoZW50LT5mdHNfaW5mbykKICAgICB7CiAgICAgY2FzZSBG
VFNfRDoJCQkvKiBwcmVvcmRlciBkaXJlY3RvcnkgKi8KLSAgICAgIGlmICghIHgtPnJlY3Vyc2l2
ZSkKKyAgICAgIGlmICghIHgtPnJlY3Vyc2l2ZQorICAgICAgICAgICYmICEoeC0+cmVtb3ZlX2Vt
cHR5X2RpcmVjdG9yaWVzCisgICAgICAgICAgICAgICAmJiBpc19lbXB0eV9kaXIgKGZ0cy0+ZnRz
X2N3ZF9mZCwgZW50LT5mdHNfYWNjcGF0aCkpKQogICAgICAgICB7Ci0gICAgICAgICAgLyogVGhp
cyBpcyB0aGUgZmlyc3QgKHByZS1vcmRlcikgZW5jb3VudGVyIHdpdGggYSBkaXJlY3RvcnkuCisg
ICAgICAgICAgLyogVGhpcyBpcyB0aGUgZmlyc3QgKHByZS1vcmRlcikgZW5jb3VudGVyIHdpdGgg
YSBkaXJlY3RvcnkKKyAgICAgICAgICAgICB0aGF0IHdlIGNhbiBub3QgZGVsZXRlLgogICAgICAg
ICAgICAgIE5vdCByZWN1cnNpdmUsIHNvIGFycmFuZ2UgdG8gc2tpcCBjb250ZW50cy4gICovCi0g
ICAgICAgICAgZXJyb3IgKDAsIEVJU0RJUiwgXygiY2Fubm90IHJlbW92ZSAlcyIpLCBxdW90ZSAo
ZW50LT5mdHNfcGF0aCkpOworICAgICAgICAgIGludCBlcnIgPSB4LT5yZW1vdmVfZW1wdHlfZGly
ZWN0b3JpZXMgPyBFTk9URU1QVFkgOiBFSVNESVI7CisgICAgICAgICAgZXJyb3IgKDAsIGVyciwg
XygiY2Fubm90IHJlbW92ZSAlcyIpLCBxdW90ZSAoZW50LT5mdHNfcGF0aCkpOwogICAgICAgICAg
IG1hcmtfYW5jZXN0b3JfZGlycyAoZW50KTsKICAgICAgICAgICBmdHNfc2tpcF90cmVlIChmdHMs
IGVudCk7CiAgICAgICAgICAgcmV0dXJuIFJNX0VSUk9SOwpkaWZmIC0tZ2l0IGEvc3JjL3JlbW92
ZS5oIGIvc3JjL3JlbW92ZS5oCmluZGV4IDRlYWIyODIuLmY5OTQ1MTcgMTAwNjQ0Ci0tLSBhL3Ny
Yy9yZW1vdmUuaAorKysgYi9zcmMvcmVtb3ZlLmgKQEAgLTQ5LDYgKzQ5LDkgQEAgc3RydWN0IHJt
X29wdGlvbnMKICAgLyogSWYgdHJ1ZSwgcmVjdXJzaXZlbHkgcmVtb3ZlIGRpcmVjdG9yaWVzLiAg
Ki8KICAgYm9vbCByZWN1cnNpdmU7CiAKKyAgLyogSWYgdHJ1ZSwgcmVtb3ZlIGVtcHR5IGRpcmVj
dG9yaWVzLiAgKi8KKyAgYm9vbCByZW1vdmVfZW1wdHlfZGlyZWN0b3JpZXM7CisKICAgLyogUG9p
bnRlciB0byB0aGUgZGV2aWNlIGFuZCBpbm9kZSBudW1iZXJzIG9mICcvJywgd2hlbiAtLXJlY3Vy
c2l2ZQogICAgICBhbmQgcHJlc2VydmluZyAnLycuICBPdGhlcndpc2UgTlVMTC4gICovCiAgIHN0
cnVjdCBkZXZfaW5vICpyb290X2Rldl9pbm87CmRpZmYgLS1naXQgYS9zcmMvcm0uYyBiL3NyYy9y
bS5jCmluZGV4IDAyODA5ZjIuLmE0NTU5NGUgMTAwNjQ0Ci0tLSBhL3NyYy9ybS5jCisrKyBiL3Ny
Yy9ybS5jCkBAIC03Nyw2ICs3Nyw3IEBAIHN0YXRpYyBzdHJ1Y3Qgb3B0aW9uIGNvbnN0IGxvbmdf
b3B0c1tdID0KICAgeyItcHJlc3VtZS1pbnB1dC10dHkiLCBub19hcmd1bWVudCwgTlVMTCwgUFJF
U1VNRV9JTlBVVF9UVFlfT1BUSU9OfSwKIAogICB7InJlY3Vyc2l2ZSIsIG5vX2FyZ3VtZW50LCBO
VUxMLCAncid9LAorICB7ImRpciIsIG5vX2FyZ3VtZW50LCBOVUxMLCAnZCd9LAogICB7InZlcmJv
c2UiLCBub19hcmd1bWVudCwgTlVMTCwgJ3YnfSwKICAge0dFVE9QVF9IRUxQX09QVElPTl9ERUNM
fSwKICAge0dFVE9QVF9WRVJTSU9OX09QVElPTl9ERUNMfSwKQEAgLTE1NCw2ICsxNTUsNyBAQCBS
ZW1vdmUgKHVubGluaykgdGhlIEZJTEUocykuXG5cCiAgICAgICAtLW5vLXByZXNlcnZlLXJvb3Qg
IGRvIG5vdCB0cmVhdCAnLycgc3BlY2lhbGx5XG5cCiAgICAgICAtLXByZXNlcnZlLXJvb3QgICBk
byBub3QgcmVtb3ZlICcvJyAoZGVmYXVsdClcblwKICAgLXIsIC1SLCAtLXJlY3Vyc2l2ZSAgIHJl
bW92ZSBkaXJlY3RvcmllcyBhbmQgdGhlaXIgY29udGVudHMgcmVjdXJzaXZlbHlcblwKKyAgLWQs
IC0tZGlyICAgICAgICAgICAgIHJlbW92ZSBlbXB0eSBkaXJlY3Rvcmllc1xuXAogICAtdiwgLS12
ZXJib3NlICAgICAgICAgZXhwbGFpbiB3aGF0IGlzIGJlaW5nIGRvbmVcblwKICIpLCBzdGRvdXQp
OwogICAgICAgZnB1dHMgKEhFTFBfT1BUSU9OX0RFU0NSSVBUSU9OLCBzdGRvdXQpOwpAQCAtMTg5
LDYgKzE5MSw3IEBAIHJtX29wdGlvbl9pbml0IChzdHJ1Y3Qgcm1fb3B0aW9ucyAqeCkKICAgeC0+
aWdub3JlX21pc3NpbmdfZmlsZXMgPSBmYWxzZTsKICAgeC0+aW50ZXJhY3RpdmUgPSBSTUlfU09N
RVRJTUVTOwogICB4LT5vbmVfZmlsZV9zeXN0ZW0gPSBmYWxzZTsKKyAgeC0+cmVtb3ZlX2VtcHR5
X2RpcmVjdG9yaWVzID0gZmFsc2U7CiAgIHgtPnJlY3Vyc2l2ZSA9IGZhbHNlOwogICB4LT5yb290
X2Rldl9pbm8gPSBOVUxMOwogICB4LT5zdGRpbl90dHkgPSBpc2F0dHkgKFNURElOX0ZJTEVOTyk7
CkBAIC0yMjAsMTAgKzIyMywxNCBAQCBtYWluIChpbnQgYXJnYywgY2hhciAqKmFyZ3YpCiAgIC8q
IFRyeSB0byBkaXNhYmxlIHRoZSBhYmlsaXR5IHRvIHVubGluayBhIGRpcmVjdG9yeS4gICovCiAg
IHByaXZfc2V0X3JlbW92ZV9saW5rZGlyICgpOwogCi0gIHdoaWxlICgoYyA9IGdldG9wdF9sb25n
IChhcmdjLCBhcmd2LCAiZmlydklSIiwgbG9uZ19vcHRzLCBOVUxMKSkgIT0gLTEpCisgIHdoaWxl
ICgoYyA9IGdldG9wdF9sb25nIChhcmdjLCBhcmd2LCAiZGZpcnZJUiIsIGxvbmdfb3B0cywgTlVM
TCkpICE9IC0xKQogICAgIHsKICAgICAgIHN3aXRjaCAoYykKICAgICAgICAgeworICAgICAgICBj
YXNlICdkJzoKKyAgICAgICAgICB4LnJlbW92ZV9lbXB0eV9kaXJlY3RvcmllcyA9IHRydWU7Cisg
ICAgICAgICAgYnJlYWs7CisKICAgICAgICAgY2FzZSAnZic6CiAgICAgICAgICAgeC5pbnRlcmFj
dGl2ZSA9IFJNSV9ORVZFUjsKICAgICAgICAgICB4Lmlnbm9yZV9taXNzaW5nX2ZpbGVzID0gdHJ1
ZTsKZGlmZiAtLWdpdCBhL3Rlc3RzL01ha2VmaWxlLmFtIGIvdGVzdHMvTWFrZWZpbGUuYW0KaW5k
ZXggZWRjMDRiNC4uYTA5Y2ZlOCAxMDA2NDQKLS0tIGEvdGVzdHMvTWFrZWZpbGUuYW0KKysrIGIv
dGVzdHMvTWFrZWZpbGUuYW0KQEAgLTk4LDYgKzk4LDggQEAgVEVTVFMgPQkJCQkJCVwKICAgY2hn
cnAvYmFzaWMJCQkJCVwKICAgcm0vZGFuZ2xpbmctc3ltbGluawkJCQlcCiAgIG1pc2MvbHMtdGlt
ZQkJCQkJXAorICBybS9kLTEJCQkJCVwKKyAgcm0vZC0yCQkJCQlcCiAgIHJtL2RlZXAtMQkJCQkJ
XAogICBybS9kZWVwLTIJCQkJCVwKICAgcm0vZGlyLW5vLXcJCQkJCVwKZGlmZiAtLWdpdCBhL3Rl
c3RzL3JtL2QtMSBiL3Rlc3RzL3JtL2QtMQpuZXcgZmlsZSBtb2RlIDEwMDc1NQppbmRleCAwMDAw
MDAwLi5mMzVlOTUxCi0tLSAvZGV2L251bGwKKysrIGIvdGVzdHMvcm0vZC0xCkBAIC0wLDAgKzEs
MzggQEAKKyMhL2Jpbi9zaAorIyBUZXN0ICJybSAtLWRpciAtLXZlcmJvc2UiLgorCisjIENvcHly
aWdodCAoQykgMjAxMiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4KKworIyBUaGlzIHBy
b2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTogeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1v
ZGlmeQorIyBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNl
bnNlIGFzIHB1Ymxpc2hlZCBieQorIyB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBlaXRo
ZXIgdmVyc2lvbiAzIG9mIHRoZSBMaWNlbnNlLCBvcgorIyAoYXQgeW91ciBvcHRpb24pIGFueSBs
YXRlciB2ZXJzaW9uLgorCisjIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9w
ZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAorIyBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdp
dGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZgorIyBNRVJDSEFOVEFCSUxJVFkgb3Ig
RklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlCisjIEdOVSBHZW5lcmFs
IFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuCisKKyMgWW91IHNob3VsZCBoYXZlIHJl
Y2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKKyMgYWxvbmcg
d2l0aCB0aGlzIHByb2dyYW0uICBJZiBub3QsIHNlZSA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vu
c2VzLz4uCisKKy4gIiR7c3JjZGlyPS59L2luaXQuc2giOyBwYXRoX3ByZXBlbmRfIC4uL3NyYwor
cHJpbnRfdmVyXyBybQorCitta2RpciBhIHx8IGZyYW1ld29ya19mYWlsdXJlXworPiBiIHx8IGZy
YW1ld29ya19mYWlsdXJlXworCitybSAtLXZlcmJvc2UgLS1kaXIgYSBiID4gb3V0IHx8IGZhaWw9
MQorCitjYXQgPDxcRU9GID4gZXhwIHx8IGZyYW1ld29ya19mYWlsdXJlXworcmVtb3ZlZCBkaXJl
Y3Rvcnk6ICdhJworcmVtb3ZlZCAnYicKK0VPRgorCit0ZXN0IC1lIGEgJiYgZmFpbD0xCit0ZXN0
IC1lIGIgJiYgZmFpbD0xCisKKyMgQ29tcGFyZSBleHBlY3RlZCBhbmQgYWN0dWFsIG91dHB1dC4K
K2NvbXBhcmUgZXhwIG91dCB8fCBmYWlsPTEKKworRXhpdCAkZmFpbApkaWZmIC0tZ2l0IGEvdGVz
dHMvcm0vZC0yIGIvdGVzdHMvcm0vZC0yCm5ldyBmaWxlIG1vZGUgMTAwNzU1CmluZGV4IDAwMDAw
MDAuLmE2M2NmZjYKLS0tIC9kZXYvbnVsbAorKysgYi90ZXN0cy9ybS9kLTIKQEAgLTAsMCArMSwz
MyBAQAorIyEvYmluL3NoCisjIEVuc3VyZSB0aGF0ICdybSAtZCBkaXInIChpLmUuLCB3aXRob3V0
IC0tcmVjdXJzaXZlKSBnaXZlcyBhIHJlYXNvbmFibGUKKyMgZGlhZ25vc3RpYyB3aGVuIGZhaWxp
bmcuCisKKyMgQ29weXJpZ2h0IChDKSAyMDEyIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5j
LgorCisjIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0
ZSBpdCBhbmQvb3IgbW9kaWZ5CisjIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVy
YWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5CisjIHRoZSBGcmVlIFNvZnR3YXJlIEZv
dW5kYXRpb24sIGVpdGhlciB2ZXJzaW9uIDMgb2YgdGhlIExpY2Vuc2UsIG9yCisjIChhdCB5b3Vy
IG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uCisKKyMgVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1
dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsCisjIGJ1dCBXSVRIT1VUIEFO
WSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mCisjIE1FUkNI
QU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUK
KyMgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4KKworIyBZb3Ug
c2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGlj
ZW5zZQorIyBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbS4gIElmIG5vdCwgc2VlIDxodHRwOi8vd3d3
LmdudS5vcmcvbGljZW5zZXMvPi4KKworLiAiJHtzcmNkaXI9Ln0vaW5pdC5zaCI7IHBhdGhfcHJl
cGVuZF8gLi4vc3JjCitwcmludF92ZXJfIHJtCisKK21rZGlyIGQgfHwgZnJhbWV3b3JrX2ZhaWx1
cmVfCis+IGQvYSB8fCBmcmFtZXdvcmtfZmFpbHVyZV8KKworcm0gLWQgZCAyPiBvdXQgJiYgZmFp
bD0xCitwcmludGYgIiVzXG4iIFwKKyAgICAicm06IGNhbm5vdCByZW1vdmUgJ2QnOiBEaXJlY3Rv
cnkgbm90IGVtcHR5IiBcCisgICAgPiBleHAgfHwgZnJhbWV3b3JrX2ZhaWx1cmVfCisKK2NvbXBh
cmUgZXhwIG91dCB8fCBmYWlsPTEKKworRXhpdCAkZmFpbAotLSAKMS43LjExLjQKCg==
--002354471060de9cfd04c73bdaa1--


From MAILER-DAEMON Tue Aug 14 12:05:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1JcK-0002s2-K8
	for mharc-coreutils@gnu.org; Tue, 14 Aug 2012 12:05:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36366)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1JcG-0002ro-Ld
	for coreutils@gnu.org; Tue, 14 Aug 2012 12:05:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1JcF-0006z0-IA
	for coreutils@gnu.org; Tue, 14 Aug 2012 12:05:12 -0400
Received: from mx.meyering.net ([88.168.87.75]:33550)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1JcF-0006yS-AX
	for coreutils@gnu.org; Tue, 14 Aug 2012 12:05:11 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 97131600A4;
	Tue, 14 Aug 2012 18:05:06 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: Various tests give illusory results
In-Reply-To: <502A74F0.9070404@redhat.com> (Ondrej Oprala's message of "Tue,
	14 Aug 2012 17:55:28 +0200")
References: <5023DA8F.7020307@redhat.com>
	<5024AFE1.7080004@bernhard-voelker.de> <502A48FF.4030809@redhat.com>
	<502A664F.3040702@bernhard-voelker.de> <502A74F0.9070404@redhat.com>
Date: Tue, 14 Aug 2012 18:05:06 +0200
Message-ID: <87628lqx1p.fsf@rho.meyering.net>
Lines: 84
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: Bernhard Voelker <mail@bernhard-voelker.de>, 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, 14 Aug 2012 16:05:15 -0000

Ondrej Oprala wrote:
...
> Subject: [PATCH] tests: Add error checking for root-only tests running
>  setuidgid
>
> * NEWS: Mention the fix.
> * tests/init.cfg: Modify the require_root_ function to check
> for setuidgid calls and proper permissions.
> ---
>  NEWS           |  6 ++++++
>  tests/init.cfg | 19 +++++++++++++++++++
>  2 files changed, 25 insertions(+)
>
> diff --git a/NEWS b/NEWS
> index 46d0a41..173f861 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -7,6 +7,12 @@ GNU coreutils NEWS                                    -*- outline -*-
>    certain options like -a, -l, -t and -x.
>    [This bug was present in "the beginning".]
>
> +** Bug fixes
> +
> +  root-only tests now properly check for permissions of dummy
> +  user $NON_ROOT_USERNAME before trying to run binaries from the
> +  src dir.

If mentioned in NEWS at all, this would go in an "Improved tests"
category, not under "Bug fixes", since the problem arises only for those
rare people who:

  - run the root-only tests, and
  - do not following the instructions in README


> diff --git a/tests/init.cfg b/tests/init.cfg
> index 4ff5ad4..2d0fe10 100644
> --- a/tests/init.cfg
> +++ b/tests/init.cfg
> @@ -341,11 +341,30 @@ or use the shortcut target of the toplevel Makefile,
>    fi
>  }
>
> +setuidgid_has_perm_()
> +{
> +  local rm_version=$(
> +    setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
> +    sed -n 'ls/.* //p'
> +  )
> +  case "_${rm_version}_" in
> +      _$PACKAGE_VERSION}_) ;;

Missing "{" ?

         _${PACKAGE_VERSION}_) ;;

> +      *) return 1;;
> +  esac
> +}
> +
>  require_root_()
>  {
>    uid_is_privileged_ || skip_ "must be run as root"
>    NON_ROOT_USERNAME=${NON_ROOT_USERNAME=nobody}
>    NON_ROOT_GROUP=${NON_ROOT_GROUP=$(id -g $NON_ROOT_USERNAME)}
> +
> +  #if test contains a setuidgid call...
> +  grep '^[ ]*setuidgid' "../$0"
> +  if [ "$?" = "0" ]; then
> +    setuidgid_has_perm_ ||
> +    skip_ "user $NON_ROOT_USERNAME lacks execute permissions"
> +  fi
>  }

I would prefer to write that as

     grep '^[ ]*setuidgid' "../$0" \
       && { setuidgid_has_perm_ \
              || skip_ "user $NON_ROOT_USERNAME lacks permissions"; }

Also, please add this line to the end of the commit log
acknowledging Bernhard's improvements:

Improved-by: Bernhard Voelker


From MAILER-DAEMON Tue Aug 14 12:48:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1KI3-0007hw-4P
	for mharc-coreutils@gnu.org; Tue, 14 Aug 2012 12:48:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36521)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <michael@orlitzky.com>) id 1T1Jd1-0003Bf-1p
	for coreutils@gnu.org; Tue, 14 Aug 2012 12:05:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <michael@orlitzky.com>) id 1T1Jcz-0007Z7-QD
	for coreutils@gnu.org; Tue, 14 Aug 2012 12:05:58 -0400
Received: from mail2.viabit.com ([65.246.80.16]:50435)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <michael@orlitzky.com>)
	id 1T1Jcu-0007Nc-Et; Tue, 14 Aug 2012 12:05:52 -0400
Received: from [10.1.1.204] (unknown [65.213.236.244])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail2.viabit.com (Postfix) with ESMTPSA id EED8437AF6;
	Tue, 14 Aug 2012 11:29:02 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=orlitzky.com; s=mail2;
	t=1344958142; bh=CgR73pwzvupBHEzi4Rzn3Gb04UVJ0r6Yr6kydpEyR5M=;
	h=Date:From:To:CC:Subject;
	b=KHOV1c0SZD8NNk0714WgzdXLzvJvjsw4IM/4SiK6V3h2rpoYdTrCwVZv4pVRI1mg1
	W1R1xV4HI2mUpd+AYJX0pUi0UaBe/gpN33kspXxyEK882A1ZmxXGM2YrVdy1iJJAnF
	nPJ1KFGCgkgsw+oaw3v+SIcnvoZLDPHiOYku+d5M=
Message-ID: <502A6EB8.3050000@orlitzky.com>
Date: Tue, 14 Aug 2012 11:28:56 -0400
From: Michael Orlitzky <michael@orlitzky.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.6esrpre) Gecko/20120730 Thunderbird/10.0.6
MIME-Version: 1.0
To: coreutils@gnu.org
Subject: Fixing default ACL behavior
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 65.246.80.16
X-Mailman-Approved-At: Tue, 14 Aug 2012 12:48:22 -0400
Cc: bug-tar@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, 14 Aug 2012 16:06:00 -0000

(cc: bug-tar)

We use POSIX ACLs to grant access to different groups of developers on
our web servers. The biggest roadblock so far has been the use of cp and
tar, which preserve the source's group bits as the ACL mask (usually
denying write access in spite of the default ACL).

There are bugs for cp[1] and mkdir[2] already, and an old ML thread for
tar that I can't seem to find any more.

I wrote a long article for the benefit of myself and my coworkers that
should explain the details:

> http://michael.orlitzky.com/articles/problems_with_posix_acls_and_common_utilities.php

There's proof of concept code in there that works for our simple use case.

I'm both looking for feedback on the algorithm (proposed fix and todo
sections), and wondering whether or not a fix like this could ever make
it upstream. If so, what would I need to do to clean it up for inclusion?


[1] http://savannah.gnu.org/bugs/?27146
[2] http://savannah.gnu.org/bugs/?19546


From MAILER-DAEMON Wed Aug 15 06:17:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1afU-0008HZ-5G
	for mharc-coreutils@gnu.org; Wed, 15 Aug 2012 06:17:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53860)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1afQ-00088M-LG
	for coreutils@gnu.org; Wed, 15 Aug 2012 06:17:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1afP-0004E1-3J
	for coreutils@gnu.org; Wed, 15 Aug 2012 06:17:36 -0400
Received: from mx1.redhat.com ([209.132.183.28]:33149)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1afO-0004Dv-RJ
	for coreutils@gnu.org; Wed, 15 Aug 2012 06:17:35 -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 q7FAHVhW011741
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 15 Aug 2012 06:17:31 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7FAHSnB003564
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Wed, 15 Aug 2012 06:17:30 -0400
Message-ID: <502B7737.9030809@redhat.com>
Date: Wed, 15 Aug 2012 12:17:27 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: Various tests give illusory results
References: <5023DA8F.7020307@redhat.com>
	<5024AFE1.7080004@bernhard-voelker.de>
	<502A48FF.4030809@redhat.com>
	<502A664F.3040702@bernhard-voelker.de>
	<502A74F0.9070404@redhat.com> <87628lqx1p.fsf@rho.meyering.net>
In-Reply-To: <87628lqx1p.fsf@rho.meyering.net>
Content-Type: multipart/mixed; boundary="------------080100010209060506080300"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: Bernhard Voelker <mail@bernhard-voelker.de>, 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, 15 Aug 2012 10:17:38 -0000

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

Hi,
here's the new patch...I hope it's all alright now.
And sorry about not mentioning Bernhard in the first place,
it just didn't occur to me.
Cheers,
  Ondrej.

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

>From ec19d2d04b057ccc6f39de987c60b1ea2e4431cf Mon Sep 17 00:00:00 2001
From: Ondrej Oprala <ooprala@redhat.com>
Date: Thu, 9 Aug 2012 15:40:39 +0200
Subject: [PATCH] tests: Add error checking for root-only tests running
 setuidgid

* NEWS: Mention the test improvement.
* tests/init.cfg: Modify the require_root_ function to check
for setuidgid calls and proper permissions.

Improved-by: Bernhard Voelker
---
 NEWS           |  6 ++++++
 tests/init.cfg | 16 ++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/NEWS b/NEWS
index 46d0a41..ec7526e 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,12 @@ GNU coreutils NEWS                                    -*- outline -*-
   certain options like -a, -l, -t and -x.
   [This bug was present in "the beginning".]
 
+** Improved tests
+
+  root-only tests now properly check for permissions of dummy
+  user $NON_ROOT_USERNAME before trying to run binaries from the
+  src dir.
+
 
 * Noteworthy changes in release 8.18 (2012-08-12) [stable]
 
diff --git a/tests/init.cfg b/tests/init.cfg
index 4ff5ad4..5863450 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -341,11 +341,27 @@ or use the shortcut target of the toplevel Makefile,
   fi
 }
 
+setuidgid_has_perm_()
+{
+  local rm_version=$(
+    setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
+    sed -n 'ls/.* //p'
+  )
+  case "_${rm_version}_" in
+      _${PACKAGE_VERSION}_) ;;
+      *) return 1;;
+  esac
+}
+
 require_root_()
 {
   uid_is_privileged_ || skip_ "must be run as root"
   NON_ROOT_USERNAME=${NON_ROOT_USERNAME=nobody}
   NON_ROOT_GROUP=${NON_ROOT_GROUP=$(id -g $NON_ROOT_USERNAME)}
+
+  grep '^[ ]*setuidgid' "../$0" \
+    && { setuidgid_has_perm_ \
+           || skip_ "user $NON_ROOT_USERNAME lacks execute permissions"; }
 }
 
 skip_if_root_() { uid_is_privileged_ && skip_ "must be run as non-root"; }
-- 
1.7.11.2


--------------080100010209060506080300--


From MAILER-DAEMON Wed Aug 15 06:31:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1asv-0005FS-DT
	for mharc-coreutils@gnu.org; Wed, 15 Aug 2012 06:31:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35948)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1ass-0005DH-SF
	for coreutils@gnu.org; Wed, 15 Aug 2012 06:31:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1asr-00084h-Vd
	for coreutils@gnu.org; Wed, 15 Aug 2012 06:31:30 -0400
Received: from mx.meyering.net ([88.168.87.75]:36508)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1asr-00084c-P0
	for coreutils@gnu.org; Wed, 15 Aug 2012 06:31:29 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 6523C6015E;
	Wed, 15 Aug 2012 12:31:28 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Krzysztof Goj <krzysztof.goj@gmail.com>
Subject: Re: [PATCH] rm: new option (-d) to remove empty directories
In-Reply-To: <CAJ_ynNa-2+KkNdQ0Gr6ePc958HcZa=aab5pBX4-qgq3O__6UUA@mail.gmail.com>
	(Krzysztof Goj's message of "Tue, 14 Aug 2012 17:56:35 +0200")
References: <CAJ_ynNZV-6HaYUGkkUNi57wHLKgvnWg4O8n-hRDq34s6bbiP5g@mail.gmail.com>
	<4F1D784A.8040103@redhat.com>
	<CAJ_ynNbS-UoPvpLCSCkAMUNzH8E6Y+zwHs_cKn=3E0YW-8siJQ@mail.gmail.com>
	<CAJ_ynNYBUDWj1Ju51-AdLrh4xQgg0+N-En7FE99h3YJtVSNYZg@mail.gmail.com>
	<87r4rat6yv.fsf@rho.meyering.net>
	<CAJ_ynNa-2+KkNdQ0Gr6ePc958HcZa=aab5pBX4-qgq3O__6UUA@mail.gmail.com>
Date: Wed, 15 Aug 2012 12:31:28 +0200
Message-ID: <87txw4o39b.fsf@rho.meyering.net>
Lines: 10
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Wed, 15 Aug 2012 10:31:31 -0000

Krzysztof Goj wrote:
>> Please add a NEWS entry, a description of the new option
>> in coreutils.texi and adjust for the issues below
>> [...]
>
> Thanks for the review. I've updated the patch, it's attached.

Thanks for contributing.
I adjusted the wording and punctuation in the commit log and
NEWS and have pushed that.


From MAILER-DAEMON Wed Aug 15 07:41:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1byO-00018Z-B7
	for mharc-coreutils@gnu.org; Wed, 15 Aug 2012 07:41:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39235)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1byL-000183-5S
	for coreutils@gnu.org; Wed, 15 Aug 2012 07:41:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1byJ-0001dT-9G
	for coreutils@gnu.org; Wed, 15 Aug 2012 07:41:13 -0400
Received: from mx1.redhat.com ([209.132.183.28]:47025)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1byJ-0001dN-04
	for coreutils@gnu.org; Wed, 15 Aug 2012 07:41:11 -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 q7FBfATq005512
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <coreutils@gnu.org>; Wed, 15 Aug 2012 07:41:10 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q7FBf7vb006820
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <coreutils@gnu.org>; Wed, 15 Aug 2012 07:41:09 -0400
Message-ID: <502B8AD3.4040508@redhat.com>
Date: Wed, 15 Aug 2012 13:41:07 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: coreutils@gnu.org
Subject: Re: du bogus warning with bind mounts
References: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
	<87fw7wxz4i.fsf@rho.meyering.net> <50237FDC.3070502@redhat.com>
	<87zk64uz2w.fsf@rho.meyering.net>
In-Reply-To: <87zk64uz2w.fsf@rho.meyering.net>
Content-Type: multipart/mixed; boundary="------------050302090600080206050506"
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 15 Aug 2012 11:41:15 -0000

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

Oops, I seem to have forgotten to add the test
to the last patch I sent, sorry about the trouble, here
it is again with the test added.
Cheers,
  Ondrej.

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

>From d8eab7abdf19b668065ff8be3700c9966eefdc39 Mon Sep 17 00:00:00 2001
From: Ondrej Oprala <ooprala@redhat.com>
Date: Thu, 9 Aug 2012 17:34:09 +0200
Subject: [PATCH] du: Fix an issue with bogus warnings on bind-mounted
 directories

* NEWS: Mention the fix.
* src/du.c: Include "mountlist.h".
  (di_mnt): New global set.
  (fill_mount_table): New function.
  (hash_ins): Add HT parameter.
  (process_file): Look up each dir dev/ino pair in the new set.
  (main): Allocate, initialize, and free the new set.
* tests/Makefile.am: Add a new file.
* tests/du/bind-mount-dir-cycle: Add a test for the fix.
---
 NEWS                          |  5 ++++
 src/du.c                      | 61 ++++++++++++++++++++++++++++++++++++++++---
 tests/Makefile.am             |  1 +
 tests/du/bind-mount-dir-cycle | 44 +++++++++++++++++++++++++++++++
 4 files changed, 108 insertions(+), 3 deletions(-)
 create mode 100755 tests/du/bind-mount-dir-cycle

diff --git a/NEWS b/NEWS
index 46d0a41..d2d2fe2 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,11 @@ GNU coreutils NEWS                                    -*- outline -*-
   certain options like -a, -l, -t and -x.
   [This bug was present in "the beginning".]
 
+** Bug fixes
+
+  du no longer emits bogus warnings when traversing bind-mounted
+  directory cycles.
+
 
 * Noteworthy changes in release 8.18 (2012-08-12) [stable]
 
diff --git a/src/du.c b/src/du.c
index 7333941..bfe543e 100644
--- a/src/du.c
+++ b/src/du.c
@@ -35,6 +35,7 @@
 #include "exclude.h"
 #include "fprintftime.h"
 #include "human.h"
+#include "mountlist.h"
 #include "quote.h"
 #include "quotearg.h"
 #include "stat-size.h"
@@ -63,6 +64,9 @@ extern bool fts_debug;
 /* A set of dev/ino pairs.  */
 static struct di_set *di_set;
 
+/* A hash table for mount points.  */
+static struct di_set *di_mnt;
+
 /* Keep track of the preceding "level" (depth in hierarchy)
    from one call of process_file to the next.  */
 static size_t prev_level;
@@ -333,11 +337,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   exit (status);
 }
 
-/* Try to insert the INO/DEV pair into the global table, HTAB.
+/* Try to insert the INO/DEV pair into the di_set table.
    Return true if the pair is successfully inserted,
    false if the pair is already in the table.  */
 static bool
-hash_ins (ino_t ino, dev_t dev)
+hash_ins (struct di_set *di_set, ino_t ino, dev_t dev)
 {
   int inserted = di_set_insert (di_set, dev, ino);
   if (inserted < 0)
@@ -461,7 +465,7 @@ process_file (FTS *fts, FTSENT *ent)
       if (excluded
           || (! opt_count_all
               && (hash_all || (! S_ISDIR (sb->st_mode) && 1 < sb->st_nlink))
-              && ! hash_ins (sb->st_ino, sb->st_dev)))
+              && ! hash_ins (di_set, sb->st_ino, sb->st_dev)))
         {
           /* If ignoring a directory in preorder, skip its children.
              Ignore the next fts_read output too, as it's a postorder
@@ -476,6 +480,17 @@ process_file (FTS *fts, FTSENT *ent)
           return true;
         }
 
+      /*Check if dir is already in the mount table.  */
+      if (S_ISDIR (sb->st_mode))
+        {
+          if (di_set_lookup (di_mnt, sb->st_dev, sb->st_ino))
+            {
+              fts_set (fts, ent, FTS_SKIP);
+              error (0, 0, _("mount point %s already traversed"), quote (file));
+              return false;
+            }
+        }
+
       switch (info)
         {
         case FTS_D:
@@ -623,6 +638,38 @@ du_files (char **files, int bit_flags)
   return ok;
 }
 
+/* Fill the di_mnt table with dev/ino pairs of mount points.  */
+
+static void
+fill_mount_table (void)
+{
+  struct mount_entry *mnt_ent;
+  struct mount_entry *mnt_free;
+  struct stat *buf = xmalloc (sizeof *buf);
+
+  mnt_ent = read_file_system_list (false);
+  while (mnt_ent)
+    {
+      if (!mnt_ent->me_remote && !mnt_ent->me_dummy)
+        {
+          if (!stat (mnt_ent->me_mountdir, buf))
+            hash_ins (di_mnt, buf->st_ino, buf->st_dev);
+          else
+            error (0, errno, _("warning: unable to stat %s"),
+                   mnt_ent->me_mountdir);
+        }
+
+      mnt_free = mnt_ent;
+      mnt_ent = mnt_ent->me_next;
+
+      free (mnt_free->me_devname);
+      free (mnt_free->me_mountdir);
+      free (mnt_free->me_type);
+      free (mnt_free);
+    }
+  free (buf);
+}
+
 int
 main (int argc, char **argv)
 {
@@ -922,6 +969,13 @@ main (int argc, char **argv)
     xalloc_die ();
 
   /* Initialize the set of dev,inode pairs.  */
+
+  di_mnt = di_set_alloc ();
+  if (!di_mnt)
+    xalloc_die ();
+
+  fill_mount_table ();
+
   di_set = di_set_alloc ();
   if (!di_set)
     xalloc_die ();
@@ -1002,6 +1056,7 @@ main (int argc, char **argv)
 
   argv_iter_free (ai);
   di_set_free (di_set);
+  di_set_free (di_mnt);
 
   if (files_from && (ferror (stdin) || fclose (stdin) != 0) && ok)
     error (EXIT_FAILURE, 0, _("error reading %s"), quote (files_from));
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 273405f..45ab3b1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -32,6 +32,7 @@ root_tests =					\
   cp/sparse-fiemap				\
   dd/skip-seek-past-dev				\
   df/problematic-chars				\
+  du/bind-mount-dir-cycle			\
   install/install-C-root			\
   ls/capability					\
   ls/nameless-uid				\
diff --git a/tests/du/bind-mount-dir-cycle b/tests/du/bind-mount-dir-cycle
new file mode 100755
index 0000000..a8a4220
--- /dev/null
+++ b/tests/du/bind-mount-dir-cycle
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Demonstrate rm's new --one-file-system option.
+
+# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+print_ver_ rm
+require_root_
+
+cleanup_()
+{
+  # When you take the undesirable shortcut of making /etc/mtab a link
+  # to /proc/mounts, unmounting "$other_partition_tmpdir" would fail.
+  # So, here we unmount a/b instead.
+  umount a/b
+}
+
+mkdir -p a/b
+mount --bind a a/b \
+  || skip_ "This test requires mount with a working --bind option."
+
+cat <<\EOF > exp || framework_failure_
+rm: skipping 'a/b', since it's on a different device
+EOF
+
+echo "du: mount point 'a' already traversed" > exp
+du a > /dev/null 2> out
+
+compare exp out || fail=1
+
+Exit $fail
-- 
1.7.11.2


--------------050302090600080206050506--


From MAILER-DAEMON Wed Aug 15 11:41:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1fiq-0000lB-VA
	for mharc-coreutils@gnu.org; Wed, 15 Aug 2012 11:41:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47157)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1fin-0000aE-Eg
	for coreutils@gnu.org; Wed, 15 Aug 2012 11:41:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1fim-0002dA-06
	for coreutils@gnu.org; Wed, 15 Aug 2012 11:41:25 -0400
Received: from mx1.redhat.com ([209.132.183.28]:1324)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1fil-0002d4-OG
	for coreutils@gnu.org; Wed, 15 Aug 2012 11:41:23 -0400
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 q7FFfMbu021469
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <coreutils@gnu.org>; Wed, 15 Aug 2012 11:41:22 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7FFfK6f008803
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO)
	for <coreutils@gnu.org>; Wed, 15 Aug 2012 11:41:21 -0400
Message-ID: <502BC320.8080106@redhat.com>
Date: Wed, 15 Aug 2012 17:41:20 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: coreutils@gnu.org
Subject: df command should suppress duplicates
Content-Type: multipart/mixed; boundary="------------070806090107010205040709"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 15 Aug 2012 15:41:27 -0000

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

Hi,
  I've written a little fix for this bugzilla 
https://bugzilla.redhat.com/show_bug.cgi?id=709351
which I think could solve the duplicity output problem. The idea is that 
df would keep a linked
list of device numbers it already went through and not count in 
(get_dev) those filesystems again
when running into them as bind mounts.
Cheers,
  Ondrej.


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

>From 68402ab6e31a64dcac5dfed7e7f5d9595209d154 Mon Sep 17 00:00:00 2001
From: Ondrej Oprala <ooprala@redhat.com>
Date: Wed, 15 Aug 2012 17:30:40 +0200
Subject: [PATCH] df: Fix outputting filesystem duplicities caused by
 bind-mounts

* NEWS: Mention the fix.
* src/df.c (devlist_add): Add another entry to the global
device number list.
(dev_examined): Check if a filesystem has been examined already.
---
 NEWS     |  3 +++
 src/df.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 75 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 012a633..d1c84bb 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,9 @@ GNU coreutils NEWS                                    -*- outline -*-
 
 ** Bug fixes
 
+  df now properly outputs filesystem information with bind mounts
+  present on the system.
+
   df now fails when the list of mounted file systems (/etc/mtab) cannot
   be read, yet the file system type information is needed to process
   certain options like -a, -l, -t and -x.
diff --git a/src/df.c b/src/df.c
index 9d956cd..5745a4f 100644
--- a/src/df.c
+++ b/src/df.c
@@ -43,6 +43,20 @@
   proper_name ("David MacKenzie"), \
   proper_name ("Paul Eggert")
 
+/* Filled with device numbers of examined filesystems to avoid
+   duplicities in output.  */
+struct devlist
+{
+  dev_t dev_num;
+  struct devlist *dev_next;
+};
+
+/* Global device number linked list.  */
+static struct devlist *devlist;
+
+/* Help pointer to devlist's first entry.  */
+static struct devlist *devlist_head;
+
 /* If true, show inode information. */
 static bool inode_format;
 
@@ -821,6 +835,44 @@ get_entry (char const *name, struct stat const *statp)
   get_point (name, statp);
 }
 
+/* Add a device number of the soon-to-be examined
+   filesystem to the global list devlist.  */
+
+static void
+devlist_add (dev_t dev_num)
+{
+  devlist->dev_num = dev_num;
+  devlist->dev_next = xmalloc (sizeof *devlist);
+  devlist = devlist->dev_next;
+  devlist->dev_num = 0;
+  devlist->dev_next = NULL;
+  devlist = devlist_head;
+}
+
+/* Check if the device was already examined.  */
+
+static bool
+dev_examined (char *mount_dir)
+{
+  dev_t dev_num;
+  struct stat *buf = alloca (sizeof *buf);
+  stat (mount_dir, buf);
+
+  dev_num = buf->st_dev;
+  while (devlist->dev_num)
+      {
+        if (devlist->dev_num == dev_num)
+          {
+            devlist = devlist_head;
+            return true;
+          }
+        devlist = devlist->dev_next;
+      }
+
+  devlist_add (dev_num);
+  return false;
+}
+
 /* Show all mounted file systems, except perhaps those that are of
    an unselected type or are empty. */
 
@@ -830,8 +882,11 @@ get_all_entries (void)
   struct mount_entry *me;
 
   for (me = mount_list; me; me = me->me_next)
-    get_dev (me->me_devname, me->me_mountdir, NULL, me->me_type,
-             me->me_dummy, me->me_remote, NULL, true);
+    if (!dev_examined (me->me_mountdir))
+      {
+      get_dev (me->me_devname, me->me_mountdir, NULL, me->me_type,
+               me->me_dummy, me->me_remote, NULL, true);
+      }
 }
 
 /* Add FSTYPE to the list of file system types to display. */
@@ -1132,7 +1187,21 @@ main (int argc, char **argv)
           get_entry (argv[i], &stats[i - optind]);
     }
   else
-    get_all_entries ();
+    {
+      devlist = xmalloc (sizeof *devlist);
+      devlist->dev_num = 0;
+      devlist->dev_next = NULL;
+      devlist_head = devlist;
+
+      get_all_entries ();
+
+      while (devlist_head)
+        {
+          devlist = devlist_head->dev_next;
+          free (devlist_head);
+          devlist_head = devlist;
+        }
+    }
 
   if (print_grand_total && file_systems_processed)
     {
-- 
1.7.11.2


--------------070806090107010205040709--


From MAILER-DAEMON Wed Aug 15 12:37:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1gb3-0001gp-0o
	for mharc-coreutils@gnu.org; Wed, 15 Aug 2012 12:37:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59183)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1gaz-0001XX-FI
	for coreutils@gnu.org; Wed, 15 Aug 2012 12:37:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1gay-0002dD-6r
	for coreutils@gnu.org; Wed, 15 Aug 2012 12:37:25 -0400
Received: from mx.meyering.net ([88.168.87.75]:37451)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T1gax-0002cQ-VR
	for coreutils@gnu.org; Wed, 15 Aug 2012 12:37:24 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 891876018C;
	Wed, 15 Aug 2012 18:37:22 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: Various tests give illusory results
In-Reply-To: <502B7737.9030809@redhat.com> (Ondrej Oprala's message of "Wed,
	15 Aug 2012 12:17:27 +0200")
References: <5023DA8F.7020307@redhat.com>
	<5024AFE1.7080004@bernhard-voelker.de> <502A48FF.4030809@redhat.com>
	<502A664F.3040702@bernhard-voelker.de> <502A74F0.9070404@redhat.com>
	<87628lqx1p.fsf@rho.meyering.net> <502B7737.9030809@redhat.com>
Date: Wed, 15 Aug 2012 18:37:22 +0200
Message-ID: <87628knmbh.fsf@rho.meyering.net>
Lines: 64
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: Bernhard Voelker <mail@bernhard-voelker.de>, 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, 15 Aug 2012 16:37:26 -0000

Ondrej Oprala wrote:
> here's the new patch...I hope it's all alright now.
> And sorry about not mentioning Bernhard in the first place,
> it just didn't occur to me.
...
> Subject: [PATCH] tests: Add error checking for root-only tests running
>  setuidgid
>
> * NEWS: Mention the test improvement.
> * tests/init.cfg: Modify the require_root_ function to check
> for setuidgid calls and proper permissions.
>
> Improved-by: Bernhard Voelker
...
> +** Improved tests
> +
> +  root-only tests now properly check for permissions of dummy
> +  user $NON_ROOT_USERNAME before trying to run binaries from the
> +  src dir.
...
> +setuidgid_has_perm_()
> +{
> +  local rm_version=$(
> +    setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
> +    sed -n 'ls/.* //p'
> +  )
> +  case "_${rm_version}_" in
> +      _${PACKAGE_VERSION}_) ;;
> +      *) return 1;;
> +  esac
> +}

Thanks.
I've squashed in two minor changes, and will push the result in a few hours.
The latter switches from use of "_" to ":" to avoid the need for braces.

diff --git a/NEWS b/NEWS
index 10addb4..d327b02 100644
--- a/NEWS
+++ b/NEWS
@@ -20,7 +20,7 @@ GNU coreutils NEWS                                    -*- outline -*-

   root-only tests now properly check for permissions of dummy
   user $NON_ROOT_USERNAME before trying to run binaries from the
-  src dir.
+  build dir.


 * Noteworthy changes in release 8.18 (2012-08-12) [stable]
diff --git a/tests/init.cfg b/tests/init.cfg
index 5863450..76baf4f 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -347,8 +347,8 @@ setuidgid_has_perm_()
     setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
     sed -n 'ls/.* //p'
   )
-  case "_${rm_version}_" in
-      _${PACKAGE_VERSION}_) ;;
+  case ":$rm_version:" in
+      :$PACKAGE_VERSION:) ;;
       *) return 1;;
   esac
 }


From MAILER-DAEMON Thu Aug 16 02:43:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1tnb-0005ee-1g
	for mharc-coreutils@gnu.org; Thu, 16 Aug 2012 02:43:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45623)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1tnY-0005eY-Mh
	for coreutils@gnu.org; Thu, 16 Aug 2012 02:43:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1tnX-0004VJ-FG
	for coreutils@gnu.org; Thu, 16 Aug 2012 02:43:16 -0400
Received: from moutng.kundenserver.de ([212.227.17.10]:54030)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T1tnX-0004VB-5O
	for coreutils@gnu.org; Thu, 16 Aug 2012 02:43:15 -0400
Received: from [192.168.2.108] (p4FF74EFC.dip.t-dialin.net [79.247.78.252])
	by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis)
	id 0M8opw-1Spq1y1Uqa-00Cfpf; Thu, 16 Aug 2012 08:43:10 +0200
Message-ID: <502C967C.7070009@bernhard-voelker.de>
Date: Thu, 16 Aug 2012 08:43:08 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: df command should suppress duplicates
References: <502BC320.8080106@redhat.com>
In-Reply-To: <502BC320.8080106@redhat.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:u63g4QzTGtO08doH/qExIyrBfZzJR6oEgGLyGjgGPxx
	+vwLTFWOMeMSRym886bvgTuvi3BLlXO+hVVXRUF3EkBQHy+WN2
	hFOxrlvaXy75mFMMqWqPM2ivEYvJBvKffyWgOvmY51Z5oWq5cc
	JDDF1rv2OfZktqEI4EjrUhS2K0PGvt3LugJfKO9gvLto1iC72L
	C2M/hfIAfUy36fB5y0if4jSG7jFjWOdpLdKX9ZKwCrUTjXY56Y
	x6HeA+PDOuzcWPM9ItIdH3T0DlseblDBxA43JumpFw11WyVU6P
	gYyLT3yFEgxRhF+uAJp7bJCyaOk4FtwiAFhsw/PzF1Mj3PRe9t
	t3sZ6svg0bCjEp62xGdUiY+2CuNLQKuFtf7ClAw5j
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.17.10
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, 16 Aug 2012 06:43:17 -0000

On 08/15/2012 05:41 PM, Ondrej Oprala wrote:
> Hi,
>   I've written a little fix for this bugzilla 
> https://bugzilla.redhat.com/show_bug.cgi?id=709351
> which I think could solve the duplicity output problem. The idea is that 
> df would keep a linked
> list of device numbers it already went through and not count in 
> (get_dev) those filesystems again
> when running into them as bind mounts.
> Cheers,
>   Ondrej.

Thanks for working on that.

> +/* Global device number linked list.  */
> +static struct devlist *devlist;
> +
> +/* Help pointer to devlist's first entry.  */
> +static struct devlist *devlist_head;
> +

I think we don't need both as static global variable.
The former is only used as a loop variable, so I'd define
it where it's needed.


> +/* Add a device number of the soon-to-be examined
> +   filesystem to the global list devlist.  */
> +
> +static void
> +devlist_add (dev_t dev_num)
> +{
> +  devlist->dev_num = dev_num;
> +  devlist->dev_next = xmalloc (sizeof *devlist);
> +  devlist = devlist->dev_next;
> +  devlist->dev_num = 0;
> +  devlist->dev_next = NULL;
> +  devlist = devlist_head;
> +}

Together with the new code in main, you allocate one item
more than what is needed. If the loop in dev_examinded()
would run "while (devlist)", then this wouldn't be necessary.

> +/* Check if the device was already examined.  */
> +
> +static bool
> +dev_examined (char *mount_dir)
> +{
> +  dev_t dev_num;
> +  struct stat *buf = alloca (sizeof *buf);

Isn't the use of alloca discouraged? A simple "struct stat buf"
would be sufficient.

> +  stat (mount_dir, buf);
> +
> +  dev_num = buf->st_dev;
> +  while (devlist->dev_num)
> +      {
> +        if (devlist->dev_num == dev_num)
> +          {
> +            devlist = devlist_head;
> +            return true;
> +          }
> +        devlist = devlist->dev_next;
> +      }
> +
> +  devlist_add (dev_num);
> +  return false;
> +}
...
> @@ -830,8 +882,11 @@ get_all_entries (void)
>    struct mount_entry *me;
>  
>    for (me = mount_list; me; me = me->me_next)
> -    get_dev (me->me_devname, me->me_mountdir, NULL, me->me_type,
> -             me->me_dummy, me->me_remote, NULL, true);
> +    if (!dev_examined (me->me_mountdir))
> +      {
> +      get_dev (me->me_devname, me->me_mountdir, NULL, me->me_type,
> +               me->me_dummy, me->me_remote, NULL, true);
> +      }
>  }
...
> @@ -1132,7 +1187,21 @@ main (int argc, char **argv)
>            get_entry (argv[i], &stats[i - optind]);
>      }
>    else
> -    get_all_entries ();
> +    {
> +      devlist = xmalloc (sizeof *devlist);
> +      devlist->dev_num = 0;
> +      devlist->dev_next = NULL;
> +      devlist_head = devlist;

See my comment above: allocating one more than actually needed.

> +
> +      get_all_entries ();
> +
> +      while (devlist_head)
> +        {
> +          devlist = devlist_head->dev_next;
> +          free (devlist_head);
> +          devlist_head = devlist;
> +        }
> +    }
>  
>    if (print_grand_total && file_systems_processed)
>      {

There's no test, although I personally think it's hard to
write a test ... well, maybe by faking /etc/mtab, i.e. by
intercepting getmntent() in another LD_PRELOAD'ed test? ;-)

The practical result is good, although - as a user - I'd expect
that the "rootfs" line would disappear instead of the line showing
the device which is mounted on '/'. E.g. on my PC, I now see

  rootfs           12G  7.2G  3.9G  66% /

instead of

  /dev/sda1        12G  7.2G  3.9G  66% /

Even the new findmnt command of util-linux shows the device:

  $ ~/ul/findmnt --df
  SOURCE         FSTYPE                SIZE   USED AVAIL USE% TARGET
  ...
  /dev/sda1      ext4                 11.5G   7.1G  4.4G  62% /
  ...


Have a nice day,
Berny


From MAILER-DAEMON Thu Aug 16 05:59:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1wrU-0001Pm-Qy
	for mharc-coreutils@gnu.org; Thu, 16 Aug 2012 05:59:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38553)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1wrR-0001O9-IR
	for coreutils@gnu.org; Thu, 16 Aug 2012 05:59:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1wrQ-0000cB-Eq
	for coreutils@gnu.org; Thu, 16 Aug 2012 05:59:29 -0400
Received: from mx1.redhat.com ([209.132.183.28]:22226)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T1wrQ-0000bx-6a
	for coreutils@gnu.org; Thu, 16 Aug 2012 05:59:28 -0400
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 q7G9xNQX028904
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 16 Aug 2012 05:59:23 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7G9xKoJ026709
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Thu, 16 Aug 2012 05:59:22 -0400
Message-ID: <502CC478.2000205@redhat.com>
Date: Thu, 16 Aug 2012 11:59:20 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: df command should suppress duplicates
References: <502BC320.8080106@redhat.com>
	<502C967C.7070009@bernhard-voelker.de>
In-Reply-To: <502C967C.7070009@bernhard-voelker.de>
Content-Type: multipart/mixed; boundary="------------070300030709020401080209"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 16 Aug 2012 09:59:30 -0000

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

Hi,
  maybe this solution would be more suitable then.
Cheers,
  Ondrej.

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

RnJvbSBjYjk5YjJkMjg0NzBmOTUzODYzMTJlZGJkOTI2YzE0ZGExY2ZmYTQ3IE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBPbmRyZWogT3ByYWxhIDxvb3ByYWxhQHJlZGhhdC5j
b20+CkRhdGU6IFdlZCwgMTUgQXVnIDIwMTIgMTc6MzA6NDAgKzAyMDAKU3ViamVjdDogW1BB
VENIXSBkZjogRml4IG91dHB1dHRpbmcgZmlsZXN5c3RlbSBkdXBsaWNpdGllcyBjYXVzZWQg
YnkKIGJpbmQtbW91bnRzCgoqIE5FV1M6IE1lbnRpb24gdGhlIGZpeC4KKiBzcmMvZGYuYyAo
ZGV2bGlzdF9hZGQpOiBBZGQgYW5vdGhlciBlbnRyeSB0byB0aGUgZ2xvYmFsCmRldmljZSBu
dW1iZXIgbGlzdC4KKGRldl9leGFtaW5lZCk6IENoZWNrIGlmIGEgZmlsZXN5c3RlbSBoYXMg
YmVlbiBleGFtaW5lZCBhbHJlYWR5LgotLS0KIE5FV1MgICAgIHwgIDMgKysrCiBzcmMvZGYu
YyB8IDcwICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr
KysrKysrKysrKysrKysrLS0KIDIgZmlsZXMgY2hhbmdlZCwgNzEgaW5zZXJ0aW9ucygrKSwg
MiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9ORVdTIGIvTkVXUwppbmRleCAwMTJhNjMz
Li5kMWM4NGJiIDEwMDY0NAotLS0gYS9ORVdTCisrKyBiL05FV1MKQEAgLTQsNiArNCw5IEBA
IEdOVSBjb3JldXRpbHMgTkVXUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
IC0qLSBvdXRsaW5lIC0qLQogCiAqKiBCdWcgZml4ZXMKIAorICBkZiBub3cgcHJvcGVybHkg
b3V0cHV0cyBmaWxlc3lzdGVtIGluZm9ybWF0aW9uIHdpdGggYmluZCBtb3VudHMKKyAgcHJl
c2VudCBvbiB0aGUgc3lzdGVtLgorCiAgIGRmIG5vdyBmYWlscyB3aGVuIHRoZSBsaXN0IG9m
IG1vdW50ZWQgZmlsZSBzeXN0ZW1zICgvZXRjL210YWIpIGNhbm5vdAogICBiZSByZWFkLCB5
ZXQgdGhlIGZpbGUgc3lzdGVtIHR5cGUgaW5mb3JtYXRpb24gaXMgbmVlZGVkIHRvIHByb2Nl
c3MKICAgY2VydGFpbiBvcHRpb25zIGxpa2UgLWEsIC1sLCAtdCBhbmQgLXguCmRpZmYgLS1n
aXQgYS9zcmMvZGYuYyBiL3NyYy9kZi5jCmluZGV4IDlkOTU2Y2QuLmVjNmI3YTUgMTAwNjQ0
Ci0tLSBhL3NyYy9kZi5jCisrKyBiL3NyYy9kZi5jCkBAIC00Myw2ICs0MywxNyBAQAogICBw
cm9wZXJfbmFtZSAoIkRhdmlkIE1hY0tlbnppZSIpLCBcCiAgIHByb3Blcl9uYW1lICgiUGF1
bCBFZ2dlcnQiKQogCisvKiBGaWxsZWQgd2l0aCBkZXZpY2UgbnVtYmVycyBvZiBleGFtaW5l
ZCBmaWxlc3lzdGVtcyB0byBhdm9pZAorICAgZHVwbGljaXRpZXMgaW4gb3V0cHV0LiAgKi8K
K3N0cnVjdCBkZXZsaXN0Cit7CisgIGRldl90IGRldl9udW07CisgIHN0cnVjdCBkZXZsaXN0
ICpkZXZfbmV4dDsKK307CisKKy8qIERldmljZSBsaXN0IGhlbHAgcG9pbnRlci4gICovCitz
dHJ1Y3QgZGV2bGlzdCAqZGV2bGlzdF9oZWFkOworCiAvKiBJZiB0cnVlLCBzaG93IGlub2Rl
IGluZm9ybWF0aW9uLiAqLwogc3RhdGljIGJvb2wgaW5vZGVfZm9ybWF0OwogCkBAIC04MjEs
NiArODMyLDQ4IEBAIGdldF9lbnRyeSAoY2hhciBjb25zdCAqbmFtZSwgc3RydWN0IHN0YXQg
Y29uc3QgKnN0YXRwKQogICBnZXRfcG9pbnQgKG5hbWUsIHN0YXRwKTsKIH0KIAorLyogQWRk
IGEgZGV2aWNlIG51bWJlciBvZiB0aGUgc29vbi10by1iZSBleGFtaW5lZAorICAgZmlsZXN5
c3RlbSB0byB0aGUgZ2xvYmFsIGxpc3QgZGV2bGlzdC4gICovCisKK3N0YXRpYyB2b2lkCitk
ZXZsaXN0X2FkZCAoZGV2X3QgZGV2X251bSkKK3sKKyAgc3RydWN0IGRldmxpc3QgKmRldmxp
c3QgPSBkZXZsaXN0X2hlYWQ7CisgIHdoaWxlKGRldmxpc3QtPmRldl9uZXh0KQorICAgIGRl
dmxpc3QgPSBkZXZsaXN0LT5kZXZfbmV4dDsKKworICBpZiAoIWRldmxpc3QtPmRldl9udW0p
CisgICAgICBkZXZsaXN0LT5kZXZfbnVtID0gZGV2X251bTsKKyAgZWxzZQorICAgIHsKKyAg
ICAgIGRldmxpc3QtPmRldl9uZXh0ID0geG1hbGxvYyAoc2l6ZW9mICpkZXZsaXN0KTsKKyAg
ICAgIGRldmxpc3QgPSBkZXZsaXN0LT5kZXZfbmV4dDsKKyAgICAgIGRldmxpc3QtPmRldl9u
dW0gPSBkZXZfbnVtOworICAgICAgZGV2bGlzdC0+ZGV2X25leHQgPSBOVUxMOworICAgIH0K
K30KKworLyogQ2hlY2sgaWYgdGhlIGRldmljZSB3YXMgYWxyZWFkeSBleGFtaW5lZC4gICov
CisKK3N0YXRpYyBib29sCitkZXZfZXhhbWluZWQgKHN0cnVjdCBkZXZsaXN0ICpkZXZsaXN0
LCBjaGFyICptb3VudF9kaXIpCit7CisgIGRldl90IGRldl9udW07CisgIHN0cnVjdCBzdGF0
IGJ1ZjsKKyAgc3RhdCAobW91bnRfZGlyLCAmYnVmKTsKKworICBkZXZfbnVtID0gYnVmLnN0
X2RldjsKKyAgd2hpbGUgKGRldmxpc3QpCisgICAgeworICAgICAgaWYgKGRldmxpc3QtPmRl
dl9udW0gPT0gZGV2X251bSkKKyAgICAgICAgcmV0dXJuIHRydWU7CisgICAgICBkZXZsaXN0
ID0gZGV2bGlzdC0+ZGV2X25leHQ7CisgICAgfQorCisgIGRldmxpc3RfYWRkIChkZXZfbnVt
KTsKKyAgcmV0dXJuIGZhbHNlOworfQorCiAvKiBTaG93IGFsbCBtb3VudGVkIGZpbGUgc3lz
dGVtcywgZXhjZXB0IHBlcmhhcHMgdGhvc2UgdGhhdCBhcmUgb2YKICAgIGFuIHVuc2VsZWN0
ZWQgdHlwZSBvciBhcmUgZW1wdHkuICovCiAKQEAgLTgyOCwxMCArODgxLDIzIEBAIHN0YXRp
YyB2b2lkCiBnZXRfYWxsX2VudHJpZXMgKHZvaWQpCiB7CiAgIHN0cnVjdCBtb3VudF9lbnRy
eSAqbWU7CisgIHN0cnVjdCBkZXZsaXN0ICpkZXZsaXN0ID0geG1hbGxvYyAoc2l6ZW9mICpk
ZXZsaXN0KTsKKyAgZGV2bGlzdF9oZWFkID0gZGV2bGlzdDsKKworICBkZXZsaXN0LT5kZXZf
bnVtID0gMDsKKyAgZGV2bGlzdC0+ZGV2X25leHQgPSBOVUxMOwogCiAgIGZvciAobWUgPSBt
b3VudF9saXN0OyBtZTsgbWUgPSBtZS0+bWVfbmV4dCkKLSAgICBnZXRfZGV2IChtZS0+bWVf
ZGV2bmFtZSwgbWUtPm1lX21vdW50ZGlyLCBOVUxMLCBtZS0+bWVfdHlwZSwKLSAgICAgICAg
ICAgICBtZS0+bWVfZHVtbXksIG1lLT5tZV9yZW1vdGUsIE5VTEwsIHRydWUpOworICAgIGlm
ICghZGV2X2V4YW1pbmVkIChkZXZsaXN0LCBtZS0+bWVfbW91bnRkaXIpKQorICAgICAgZ2V0
X2RldiAobWUtPm1lX2Rldm5hbWUsIG1lLT5tZV9tb3VudGRpciwgTlVMTCwgbWUtPm1lX3R5
cGUsCisgICAgICAgICAgICAgICBtZS0+bWVfZHVtbXksIG1lLT5tZV9yZW1vdGUsIE5VTEws
IHRydWUpOworCisgIHdoaWxlIChkZXZsaXN0KQorICAgIHsKKyAgICAgIGRldmxpc3QgPSBk
ZXZsaXN0LT5kZXZfbmV4dDsKKyAgICAgIGZyZWUgKGRldmxpc3RfaGVhZCk7CisgICAgICBk
ZXZsaXN0X2hlYWQgPSBkZXZsaXN0OworICAgIH0KIH0KIAogLyogQWRkIEZTVFlQRSB0byB0
aGUgbGlzdCBvZiBmaWxlIHN5c3RlbSB0eXBlcyB0byBkaXNwbGF5LiAqLwotLSAKMS43LjEx
LjIKCg==
--------------070300030709020401080209--


From MAILER-DAEMON Thu Aug 16 14:22:27 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T24iB-0006qq-Jo
	for mharc-coreutils@gnu.org; Thu, 16 Aug 2012 14:22:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52516)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <meyering@mx.meyering.net>) id 1T24i8-0006kG-QE
	for coreutils@gnu.org; Thu, 16 Aug 2012 14:22:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <meyering@mx.meyering.net>) id 1T24i7-0005k4-Sm
	for coreutils@gnu.org; Thu, 16 Aug 2012 14:22:24 -0400
Received: from mx.meyering.net ([88.168.87.75]:41387)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <meyering@mx.meyering.net>) id 1T24i7-0005jT-LI
	for coreutils@gnu.org; Thu, 16 Aug 2012 14:22:23 -0400
Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000)
	id E344E607CF; Thu, 16 Aug 2012 20:22:22 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH 3/3] tests: reverse args in Coreutils.pm-invoked diff,
	for consistency
Date: Thu, 16 Aug 2012 20:22:18 +0200
Message-Id: <1345141338-972-4-git-send-email-jim@meyering.net>
X-Mailer: git-send-email 1.7.12.rc3
In-Reply-To: <1345141338-972-1-git-send-email-jim@meyering.net>
References: <1345141338-972-1-git-send-email-jim@meyering.net>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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: Thu, 16 Aug 2012 18:22:26 -0000

From: Jim Meyering <meyering@redhat.com>

* tests/Coreutils.pm (_compare_files): Reverse diff arguments so
that we invoke diff -c $expected $actual, which is consistent with
how init.sh-using tests invoke "compare exp out".
---
 tests/Coreutils.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/Coreutils.pm b/tests/Coreutils.pm
index 0c8bb82..a0c1bba 100644
--- a/tests/Coreutils.pm
+++ b/tests/Coreutils.pm
@@ -130,14 +130,14 @@ sub _compare_files ($$$$$)
 {
   my ($program_name, $test_name, $in_or_out, $actual, $expected) = @_;

-  my $differ = compare ($expected, $actual);
+  my $differ = compare ($actual, $expected);
   if ($differ)
     {
       my $info = (defined $in_or_out ? "std$in_or_out " : '');
       warn "$program_name: test $test_name: ${info}mismatch, comparing "
-        . "$actual (actual) and $expected (expected)\n";
+        . "$expected (expected) and $actual (actual)\n";
       # Ignore any failure, discard stderr.
-      system "diff -c $actual $expected 2>/dev/null";
+      system "diff -c $expected $actual 2>/dev/null";
     }

   return $differ;
-- 
1.7.12.rc2



From MAILER-DAEMON Thu Aug 16 14:22:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T24iD-0006wj-Ax
	for mharc-coreutils@gnu.org; Thu, 16 Aug 2012 14:22:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52549)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <meyering@mx.meyering.net>) id 1T24i9-0006nO-Qq
	for coreutils@gnu.org; Thu, 16 Aug 2012 14:22:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <meyering@mx.meyering.net>) id 1T24i7-0005ji-LP
	for coreutils@gnu.org; Thu, 16 Aug 2012 14:22:25 -0400
Received: from mx.meyering.net ([88.168.87.75]:41385)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <meyering@mx.meyering.net>) id 1T24i7-0005jN-FG
	for coreutils@gnu.org; Thu, 16 Aug 2012 14:22:23 -0400
Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000)
	id ADCA260766; Thu, 16 Aug 2012 20:22:22 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: fix a few nits
Date: Thu, 16 Aug 2012 20:22:15 +0200
Message-Id: <1345141338-972-1-git-send-email-jim@meyering.net>
X-Mailer: git-send-email 1.7.12.rc3
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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: Thu, 16 Aug 2012 18:22:26 -0000

Here are three tiny changes:

[PATCH 1/3] maint: fix comment grammar to placate make syntax-check
[PATCH 2/3] maint: correct a stale comment in sort.c
[PATCH 3/3] tests: reverse args in Coreutils.pm-invoked diff, for consistency

 src/remove.c       |    2 +-
 src/sort.c         |    2 +-
 tests/Coreutils.pm |    6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)


From MAILER-DAEMON Thu Aug 16 14:22:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T24iF-00072y-51
	for mharc-coreutils@gnu.org; Thu, 16 Aug 2012 14:22:31 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52583)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <meyering@mx.meyering.net>) id 1T24iB-0006qi-Bv
	for coreutils@gnu.org; Thu, 16 Aug 2012 14:22:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <meyering@mx.meyering.net>) id 1T24i8-0005kV-NK
	for coreutils@gnu.org; Thu, 16 Aug 2012 14:22:27 -0400
Received: from mx.meyering.net ([88.168.87.75]:41388)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <meyering@mx.meyering.net>) id 1T24i7-0005jt-U9
	for coreutils@gnu.org; Thu, 16 Aug 2012 14:22:24 -0400
Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000)
	id D26CB607CA; Thu, 16 Aug 2012 20:22:22 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH 2/3] maint: correct a stale comment in sort.c
Date: Thu, 16 Aug 2012 20:22:17 +0200
Message-Id: <1345141338-972-3-git-send-email-jim@meyering.net>
X-Mailer: git-send-email 1.7.12.rc3
In-Reply-To: <1345141338-972-1-git-send-email-jim@meyering.net>
References: <1345141338-972-1-git-send-email-jim@meyering.net>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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: Thu, 16 Aug 2012 18:22:29 -0000

From: Jim Meyering <meyering@redhat.com>

* src/sort.c (fillbuf): Fix comment typo.  x2nrealloc no longer
doubles the size of its input buffer.
---
 src/sort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sort.c b/src/sort.c
index 85d7869..d362dc5 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -1813,7 +1813,7 @@ fillbuf (struct buffer *buf, FILE *fp, char const *file)

       {
         /* The current input line is too long to fit in the buffer.
-           Double the buffer size and try again, keeping it properly
+           Increase the buffer size and try again, keeping it properly
            aligned.  */
         size_t line_alloc = buf->alloc / sizeof (struct line);
         buf->buf = x2nrealloc (buf->buf, &line_alloc, sizeof (struct line));
-- 
1.7.12.rc2



From MAILER-DAEMON Thu Aug 16 14:22:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T24iD-0006yU-R3
	for mharc-coreutils@gnu.org; Thu, 16 Aug 2012 14:22:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52544)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <meyering@mx.meyering.net>) id 1T24i9-0006mx-N9
	for coreutils@gnu.org; Thu, 16 Aug 2012 14:22:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <meyering@mx.meyering.net>) id 1T24i7-0005jn-Lo
	for coreutils@gnu.org; Thu, 16 Aug 2012 14:22:25 -0400
Received: from mx.meyering.net ([88.168.87.75]:41386)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <meyering@mx.meyering.net>) id 1T24i7-0005jP-FO
	for coreutils@gnu.org; Thu, 16 Aug 2012 14:22:23 -0400
Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000)
	id B750D60271; Thu, 16 Aug 2012 20:22:22 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH 1/3] maint: fix comment grammar to placate make syntax-check
Date: Thu, 16 Aug 2012 20:22:16 +0200
Message-Id: <1345141338-972-2-git-send-email-jim@meyering.net>
X-Mailer: git-send-email 1.7.12.rc3
In-Reply-To: <1345141338-972-1-git-send-email-jim@meyering.net>
References: <1345141338-972-1-git-send-email-jim@meyering.net>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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: Thu, 16 Aug 2012 18:22:26 -0000

From: Jim Meyering <meyering@redhat.com>

* src/remove.c (rm_fts): s/can not/cannot/
---
 src/remove.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/remove.c b/src/remove.c
index 61ba5f3..c4972ac 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -419,7 +419,7 @@ rm_fts (FTS *fts, FTSENT *ent, struct rm_options const *x)
                && is_empty_dir (fts->fts_cwd_fd, ent->fts_accpath)))
         {
           /* This is the first (pre-order) encounter with a directory
-             that we can not delete.
+             that we cannot delete.
              Not recursive, so arrange to skip contents.  */
           int err = x->remove_empty_directories ? ENOTEMPTY : EISDIR;
           error (0, err, _("cannot remove %s"), quote (ent->fts_path));
-- 
1.7.12.rc2



From MAILER-DAEMON Fri Aug 17 04:10:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T2HdP-0007gx-05
	for mharc-coreutils@gnu.org; Fri, 17 Aug 2012 04:10:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43281)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2HdL-0007Y0-Ca
	for coreutils@gnu.org; Fri, 17 Aug 2012 04:10:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2HdE-0002mI-RM
	for coreutils@gnu.org; Fri, 17 Aug 2012 04:10:19 -0400
Received: from mx.meyering.net ([88.168.87.75]:43481)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2HdE-0002kZ-Ku
	for coreutils@gnu.org; Fri, 17 Aug 2012 04:10:12 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id E415460167;
	Fri, 17 Aug 2012 10:10:08 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: du bogus warning with bind mounts
In-Reply-To: <5023D9E3.4010000@redhat.com> (Ondrej Oprala's message of "Thu,
	09 Aug 2012 17:40:19 +0200")
References: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
	<87fw7wxz4i.fsf@rho.meyering.net> <50237FDC.3070502@redhat.com>
	<87zk64uz2w.fsf@rho.meyering.net> <5023D9E3.4010000@redhat.com>
Date: Fri, 17 Aug 2012 10:10:08 +0200
Message-ID: <87393m7xcv.fsf@rho.meyering.net>
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 17 Aug 2012 08:10:21 -0000

Ondrej Oprala wrote:
> Hi, here's the amended patch.
...
> Subject: [PATCH] du: Fix an issue with bogus warnings on bind-mounted
>  directories
>
> * NEWS: Mention the fix.
> * src/du.c: Include "mountlist.h".
>   (di_mnt): New global set.
>   (fill_mount_table): New function.
>   (hash_ins): Add HT parameter.
>   (process_file): Look up each dir dev/ino pair in the new set.
>   (main): Allocate, initialize, and free the new set.
> * tests/Makefile.am: Add a new file.
> * tests/du/bind-mount-dir-cycle: Add a test for the fix.
> ---
>  NEWS              |  3 +++
>  src/du.c          | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
>  tests/Makefile.am |  1 +
>  3 files changed, 62 insertions(+), 3 deletions(-)

Oops.  You omitted the new file, tests/du/bind-mount-dir-cycle.


From MAILER-DAEMON Fri Aug 17 04:11:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T2HeA-0007tA-B9
	for mharc-coreutils@gnu.org; Fri, 17 Aug 2012 04:11:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43542)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2He9-0007sw-2I
	for coreutils@gnu.org; Fri, 17 Aug 2012 04:11:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2He8-0003da-99
	for coreutils@gnu.org; Fri, 17 Aug 2012 04:11:08 -0400
Received: from mx.meyering.net ([88.168.87.75]:43486)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2He8-0003dV-2O
	for coreutils@gnu.org; Fri, 17 Aug 2012 04:11:08 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 90C436018D;
	Fri, 17 Aug 2012 10:11:07 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: du bogus warning with bind mounts
In-Reply-To: <502B8AD3.4040508@redhat.com> (Ondrej Oprala's message of "Wed,
	15 Aug 2012 13:41:07 +0200")
References: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
	<87fw7wxz4i.fsf@rho.meyering.net> <50237FDC.3070502@redhat.com>
	<87zk64uz2w.fsf@rho.meyering.net> <502B8AD3.4040508@redhat.com>
Date: Fri, 17 Aug 2012 10:11:07 +0200
Message-ID: <87wr0y6iqs.fsf@rho.meyering.net>
Lines: 6
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 17 Aug 2012 08:11:09 -0000

Ondrej Oprala wrote:
> Oops, I seem to have forgotten to add the test
> to the last patch I sent, sorry about the trouble, here
> it is again with the test added.

Oh.  I see you've already sent it.  Nevermind.


From MAILER-DAEMON Fri Aug 17 05:11:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T2IaX-0006TC-UE
	for mharc-coreutils@gnu.org; Fri, 17 Aug 2012 05:11:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36255)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2IaW-0006Sx-3y
	for coreutils@gnu.org; Fri, 17 Aug 2012 05:11:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2IaU-0003I3-DI
	for coreutils@gnu.org; Fri, 17 Aug 2012 05:11:28 -0400
Received: from mx.meyering.net ([88.168.87.75]:43649)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2IaU-0003Hw-1l
	for coreutils@gnu.org; Fri, 17 Aug 2012 05:11:26 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id C9EB360149;
	Fri, 17 Aug 2012 11:11:23 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: du bogus warning with bind mounts
In-Reply-To: <502B8AD3.4040508@redhat.com> (Ondrej Oprala's message of "Wed,
	15 Aug 2012 13:41:07 +0200")
References: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
	<87fw7wxz4i.fsf@rho.meyering.net> <50237FDC.3070502@redhat.com>
	<87zk64uz2w.fsf@rho.meyering.net> <502B8AD3.4040508@redhat.com>
Date: Fri, 17 Aug 2012 11:11:23 +0200
Message-ID: <87r4r57uis.fsf@rho.meyering.net>
Lines: 177
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 17 Aug 2012 09:11:29 -0000

Ondrej Oprala wrote:
>>From d8eab7abdf19b668065ff8be3700c9966eefdc39 Mon Sep 17 00:00:00 2001
> From: Ondrej Oprala <ooprala@redhat.com>
> Date: Thu, 9 Aug 2012 17:34:09 +0200
> Subject: [PATCH] du: Fix an issue with bogus warnings on bind-mounted
>  directories
>
> * NEWS: Mention the fix.
> * src/du.c: Include "mountlist.h".
>   (di_mnt): New global set.
>   (fill_mount_table): New function.
>   (hash_ins): Add HT parameter.
>   (process_file): Look up each dir dev/ino pair in the new set.
>   (main): Allocate, initialize, and free the new set.
> * tests/Makefile.am: Add a new file.
> * tests/du/bind-mount-dir-cycle: Add a test for the fix.

Thanks.

Please remember to build with --enable-gcc-warnings.
With that, compilation failed due to a shadowing warning
with the new di_set global shadowing a local by the same name.

Here's a log entry I'm adding:

  (di_files): Rename global from di_set, now that there are two.

In comments don't mention "table" when speaking about sets.
The fact that we're currently using a hash table to implement
sets is irrelevant and best not mentioned.  Otherwise, if we
ever change the underlying data structure, the comments would
become erroneous.

In fill_mount_table, there is no need to use xmalloc to allocate a struct stat.
Also, combine declarations and initializations and move declarations
into innermost scope.

I had to remove the warning-upon-failed-stat that I had recommended,
because otherwise, when I run the test, I would get this failure:

    + diff -u exp out
    --- exp 2012-08-17 10:53:52.832808872 +0200
    +++ out 2012-08-17 10:53:52.835808713 +0200
    @@ -1 +1,2 @@
    +du: warning: unable to stat /run/user/meyering/gvfs: Permission denied
     du: mount point 'a' already traversed

I'm squashing the following into your change set and will post
the result shortly.

=====================================================================
diff --git a/src/du.c b/src/du.c
index bfe543e..1a11e14 100644
--- a/src/du.c
+++ b/src/du.c
@@ -61,10 +61,11 @@ extern bool fts_debug;
 # define FTS_CROSS_CHECK(Fts)
 #endif

-/* A set of dev/ino pairs.  */
-static struct di_set *di_set;
+/* A set of dev/ino pairs to help identify files and directories
+   whose sizes have already been counted.  */
+static struct di_set *di_files;

-/* A hash table for mount points.  */
+/* A set containing a dev/ino pair for each local mount point directory.  */
 static struct di_set *di_mnt;

 /* Keep track of the preceding "level" (depth in hierarchy)
@@ -337,9 +338,9 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   exit (status);
 }

-/* Try to insert the INO/DEV pair into the di_set table.
+/* Try to insert the INO/DEV pair into DI_SET.
    Return true if the pair is successfully inserted,
-   false if the pair is already in the table.  */
+   false if the pair was already there.  */
 static bool
 hash_ins (struct di_set *di_set, ino_t ino, dev_t dev)
 {
@@ -465,7 +466,7 @@ process_file (FTS *fts, FTSENT *ent)
       if (excluded
           || (! opt_count_all
               && (hash_all || (! S_ISDIR (sb->st_mode) && 1 < sb->st_nlink))
-              && ! hash_ins (di_set, sb->st_ino, sb->st_dev)))
+              && ! hash_ins (di_files, sb->st_ino, sb->st_dev)))
         {
           /* If ignoring a directory in preorder, skip its children.
              Ignore the next fts_read output too, as it's a postorder
@@ -480,15 +481,13 @@ process_file (FTS *fts, FTSENT *ent)
           return true;
         }

-      /*Check if dir is already in the mount table.  */
-      if (S_ISDIR (sb->st_mode))
+      /* If this is a directory that is already in our set of mount point
+         dev/inode pairs, then diagnose it and avoid the cycle.  */
+      if (info == FTS_D && di_set_lookup (di_mnt, sb->st_dev, sb->st_ino))
         {
-          if (di_set_lookup (di_mnt, sb->st_dev, sb->st_ino))
-            {
-              fts_set (fts, ent, FTS_SKIP);
-              error (0, 0, _("mount point %s already traversed"), quote (file));
-              return false;
-            }
+          fts_set (fts, ent, FTS_SKIP);
+          error (0, 0, _("mount point %s already traversed"), quote (file));
+          return false;
         }

       switch (info)
@@ -638,25 +637,25 @@ du_files (char **files, int bit_flags)
   return ok;
 }

-/* Fill the di_mnt table with dev/ino pairs of mount points.  */
+/* Fill the di_mnt set with local mount point dev/ino pairs.  */

 static void
 fill_mount_table (void)
 {
-  struct mount_entry *mnt_ent;
-  struct mount_entry *mnt_free;
-  struct stat *buf = xmalloc (sizeof *buf);
-
-  mnt_ent = read_file_system_list (false);
+  struct mount_entry *mnt_ent = read_file_system_list (false);
   while (mnt_ent)
     {
+      struct mount_entry *mnt_free;
       if (!mnt_ent->me_remote && !mnt_ent->me_dummy)
         {
-          if (!stat (mnt_ent->me_mountdir, buf))
-            hash_ins (di_mnt, buf->st_ino, buf->st_dev);
+          struct stat buf;
+          if (!stat (mnt_ent->me_mountdir, &buf))
+            hash_ins (di_mnt, buf.st_ino, buf.st_dev);
           else
-            error (0, errno, _("warning: unable to stat %s"),
-                   mnt_ent->me_mountdir);
+            {
+              /* Ignore stat failure.  False positives are too common.
+                 E.g., "Permission denied" on /run/user/<name>/gvfs.  */
+            }
         }

       mnt_free = mnt_ent;
@@ -667,7 +666,6 @@ fill_mount_table (void)
       free (mnt_free->me_type);
       free (mnt_free);
     }
-  free (buf);
 }

 int
@@ -976,8 +974,8 @@ main (int argc, char **argv)

   fill_mount_table ();

-  di_set = di_set_alloc ();
-  if (!di_set)
+  di_files = di_set_alloc ();
+  if (!di_files)
     xalloc_die ();

   /* If not hashing everything, process_file won't find cycles on its
@@ -1055,7 +1053,7 @@ main (int argc, char **argv)
  argv_iter_done:

   argv_iter_free (ai);
-  di_set_free (di_set);
+  di_set_free (di_files);
   di_set_free (di_mnt);

   if (files_from && (ferror (stdin) || fclose (stdin) != 0) && ok)


From MAILER-DAEMON Fri Aug 17 05:48:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T2JA8-0001Ps-P6
	for mharc-coreutils@gnu.org; Fri, 17 Aug 2012 05:48:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56996)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2JA5-0001OM-Is
	for coreutils@gnu.org; Fri, 17 Aug 2012 05:48:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2JA3-0005Tp-J5
	for coreutils@gnu.org; Fri, 17 Aug 2012 05:48:13 -0400
Received: from mx.meyering.net ([88.168.87.75]:43742)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2JA3-0005Ti-6k
	for coreutils@gnu.org; Fri, 17 Aug 2012 05:48:11 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 58ABC600A4;
	Fri, 17 Aug 2012 11:48:10 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: du bogus warning with bind mounts
In-Reply-To: <87r4r57uis.fsf@rho.meyering.net> (Jim Meyering's message of
	"Fri, 17 Aug 2012 11:11:23 +0200")
References: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
	<87fw7wxz4i.fsf@rho.meyering.net> <50237FDC.3070502@redhat.com>
	<87zk64uz2w.fsf@rho.meyering.net> <502B8AD3.4040508@redhat.com>
	<87r4r57uis.fsf@rho.meyering.net>
Date: Fri, 17 Aug 2012 11:48:10 +0200
Message-ID: <87lihd7sth.fsf@rho.meyering.net>
Lines: 314
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 17 Aug 2012 09:48:15 -0000

Jim Meyering wrote:
> Ondrej Oprala wrote:
>>>From d8eab7abdf19b668065ff8be3700c9966eefdc39 Mon Sep 17 00:00:00 2001
>> From: Ondrej Oprala <ooprala@redhat.com>
>> Date: Thu, 9 Aug 2012 17:34:09 +0200
>> Subject: [PATCH] du: Fix an issue with bogus warnings on bind-mounted
>>  directories
>>
>> * NEWS: Mention the fix.
>> * src/du.c: Include "mountlist.h".
>>   (di_mnt): New global set.
>>   (fill_mount_table): New function.
>>   (hash_ins): Add HT parameter.
>>   (process_file): Look up each dir dev/ino pair in the new set.
>>   (main): Allocate, initialize, and free the new set.
>> * tests/Makefile.am: Add a new file.
>> * tests/du/bind-mount-dir-cycle: Add a test for the fix.
>
> Thanks.
>
> Please remember to build with --enable-gcc-warnings.
> With that, compilation failed due to a shadowing warning
> with the new di_set global shadowing a local by the same name.
>
> Here's a log entry I'm adding:
>
>   (di_files): Rename global from di_set, now that there are two.
>
> In comments don't mention "table" when speaking about sets.
> The fact that we're currently using a hash table to implement
> sets is irrelevant and best not mentioned.  Otherwise, if we
> ever change the underlying data structure, the comments would
> become erroneous.
>
> In fill_mount_table, there is no need to use xmalloc to allocate a struct stat.
> Also, combine declarations and initializations and move declarations
> into innermost scope.
>
> I had to remove the warning-upon-failed-stat that I had recommended,
> because otherwise, when I run the test, I would get this failure:
>
>     + diff -u exp out
>     --- exp 2012-08-17 10:53:52.832808872 +0200
>     +++ out 2012-08-17 10:53:52.835808713 +0200
>     @@ -1 +1,2 @@
>     +du: warning: unable to stat /run/user/meyering/gvfs: Permission denied
>      du: mount point 'a' already traversed
>
> I'm squashing the following into your change set and will post
> the result shortly.
>
> =====================================================================
> diff --git a/src/du.c b/src/du.c
> index bfe543e..1a11e14 100644

Actually, I had to make some fundamental changes, since
your change made the tests/du/slash test fail:

    $ src/du --exclude='[^/]*' -x /
    src/du: mount point '/' already traversed
    4       /

Such usage must not produce a diagnostic.
The fundamental change is to move the check for a bind mount
into the switch branch that handles the fts-reported case
of a directory cycle.

In the case of a bind mount, I've made du warn and exit with status of 1,
whereas before (with your change) it was merely issuing the diagnostic.
I'll still need to document that, at least in the commit log.

Also, the new test script had problems.
Stale (copied) initial comment and unused expected output
as well as ignored stdout and unchecked exit status from du.



>From 491914627db04fe789bfdbf796f9be21198a6b09 Mon Sep 17 00:00:00 2001
From: Ondrej Oprala <ooprala@redhat.com>
Date: Thu, 9 Aug 2012 17:34:09 +0200
Subject: [PATCH] du: handle bind-mounted directory cycles gracefully

Before this change, a directory cycle induced by a bind mount
would be treated as a fatal (probable disk corruption) error.
However, such cycles are relatively common, and can be avoided
efficiently, so now du merely emits a warning.

* NEWS (Bug fixes): Mention it.
* src/du.c: Include "mountlist.h".
(di_mnt): New global set.
(di_files): Rename global from di_set, now that there are two.
(fill_mount_table): New function.
(hash_ins): Add HT parameter.
(process_file): Look up each dir dev/ino pair in the new set.
(main): Allocate, initialize, and free the new set.
* tests/du/bind-mount-dir-cycle: Add a test for the fix.
* tests/Makefile.am (TESTS): Add it.
---
 NEWS                          |  3 ++
 src/du.c                      | 69 ++++++++++++++++++++++++++++++++++++-------
 tests/Makefile.am             |  1 +
 tests/du/bind-mount-dir-cycle | 44 +++++++++++++++++++++++++++
 4 files changed, 107 insertions(+), 10 deletions(-)
 create mode 100755 tests/du/bind-mount-dir-cycle

diff --git a/NEWS b/NEWS
index 012a633..05072fa 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,9 @@ GNU coreutils NEWS                                    -*- outline -*-

 ** Bug fixes

+  du no longer emits bogus warnings when traversing bind-mounted
+  directory cycles.
+
   cksum now prints checksums atomically so that concurrent
   processes will not intersperse their output.
   [the bug dates back to the initial implementation]
diff --git a/src/du.c b/src/du.c
index 7333941..be8b6e7 100644
--- a/src/du.c
+++ b/src/du.c
@@ -35,6 +35,7 @@
 #include "exclude.h"
 #include "fprintftime.h"
 #include "human.h"
+#include "mountlist.h"
 #include "quote.h"
 #include "quotearg.h"
 #include "stat-size.h"
@@ -60,8 +61,12 @@ extern bool fts_debug;
 # define FTS_CROSS_CHECK(Fts)
 #endif

-/* A set of dev/ino pairs.  */
-static struct di_set *di_set;
+/* A set of dev/ino pairs to help identify files and directories
+   whose sizes have already been counted.  */
+static struct di_set *di_files;
+
+/* A set containing a dev/ino pair for each local mount point directory.  */
+static struct di_set *di_mnt;

 /* Keep track of the preceding "level" (depth in hierarchy)
    from one call of process_file to the next.  */
@@ -333,11 +338,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   exit (status);
 }

-/* Try to insert the INO/DEV pair into the global table, HTAB.
+/* Try to insert the INO/DEV pair into DI_SET.
    Return true if the pair is successfully inserted,
-   false if the pair is already in the table.  */
+   false if the pair was already there.  */
 static bool
-hash_ins (ino_t ino, dev_t dev)
+hash_ins (struct di_set *di_set, ino_t ino, dev_t dev)
 {
   int inserted = di_set_insert (di_set, dev, ino);
   if (inserted < 0)
@@ -461,7 +466,7 @@ process_file (FTS *fts, FTSENT *ent)
       if (excluded
           || (! opt_count_all
               && (hash_all || (! S_ISDIR (sb->st_mode) && 1 < sb->st_nlink))
-              && ! hash_ins (sb->st_ino, sb->st_dev)))
+              && ! hash_ins (di_files, sb->st_ino, sb->st_dev)))
         {
           /* If ignoring a directory in preorder, skip its children.
              Ignore the next fts_read output too, as it's a postorder
@@ -490,7 +495,12 @@ process_file (FTS *fts, FTSENT *ent)
         case FTS_DC:
           if (cycle_warning_required (fts, ent))
             {
-              emit_cycle_warning (file);
+              /* If this is a mount point, then diagnose it and avoid
+                 the cycle.  */
+              if (di_set_lookup (di_mnt, sb->st_dev, sb->st_ino))
+                error (0, 0, _("mount point %s already traversed"), quote (file));
+              else
+                emit_cycle_warning (file);
               return false;
             }
           return true;
@@ -623,6 +633,37 @@ du_files (char **files, int bit_flags)
   return ok;
 }

+/* Fill the di_mnt set with local mount point dev/ino pairs.  */
+
+static void
+fill_mount_table (void)
+{
+  struct mount_entry *mnt_ent = read_file_system_list (false);
+  while (mnt_ent)
+    {
+      struct mount_entry *mnt_free;
+      if (!mnt_ent->me_remote && !mnt_ent->me_dummy)
+        {
+          struct stat buf;
+          if (!stat (mnt_ent->me_mountdir, &buf))
+            hash_ins (di_mnt, buf.st_ino, buf.st_dev);
+          else
+            {
+              /* Ignore stat failure.  False positives are too common.
+                 E.g., "Permission denied" on /run/user/<name>/gvfs.  */
+            }
+        }
+
+      mnt_free = mnt_ent;
+      mnt_ent = mnt_ent->me_next;
+
+      free (mnt_free->me_devname);
+      free (mnt_free->me_mountdir);
+      free (mnt_free->me_type);
+      free (mnt_free);
+    }
+}
+
 int
 main (int argc, char **argv)
 {
@@ -922,8 +963,15 @@ main (int argc, char **argv)
     xalloc_die ();

   /* Initialize the set of dev,inode pairs.  */
-  di_set = di_set_alloc ();
-  if (!di_set)
+
+  di_mnt = di_set_alloc ();
+  if (!di_mnt)
+    xalloc_die ();
+
+  fill_mount_table ();
+
+  di_files = di_set_alloc ();
+  if (!di_files)
     xalloc_die ();

   /* If not hashing everything, process_file won't find cycles on its
@@ -1001,7 +1049,8 @@ main (int argc, char **argv)
  argv_iter_done:

   argv_iter_free (ai);
-  di_set_free (di_set);
+  di_set_free (di_files);
+  di_set_free (di_mnt);

   if (files_from && (ferror (stdin) || fclose (stdin) != 0) && ok)
     error (EXIT_FAILURE, 0, _("error reading %s"), quote (files_from));
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 09d2658..5c612e8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -32,6 +32,7 @@ root_tests =					\
   cp/sparse-fiemap				\
   dd/skip-seek-past-dev				\
   df/problematic-chars				\
+  du/bind-mount-dir-cycle			\
   install/install-C-root			\
   ls/capability					\
   ls/nameless-uid				\
diff --git a/tests/du/bind-mount-dir-cycle b/tests/du/bind-mount-dir-cycle
new file mode 100755
index 0000000..db5a910
--- /dev/null
+++ b/tests/du/bind-mount-dir-cycle
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Exercise du's new ability to handle bind-mount-induced dir cycles.
+
+# Copyright (C) 2012 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+print_ver_ rm
+require_root_
+
+cleanup_()
+{
+  # When you take the undesirable shortcut of making /etc/mtab a link
+  # to /proc/mounts, unmounting "$other_partition_tmpdir" would fail.
+  # So, here we unmount a/b instead.
+  umount a/b
+}
+
+mkdir -p a/b
+mount --bind a a/b \
+  || skip_ "This test requires mount with a working --bind option."
+
+echo a > exp || framework_failure_
+echo "du: mount point 'a/b' already traversed" > exp-err || framework_failure_
+
+du a > out 2> err && fail=1
+sed 's/^[0-9][0-9]*	//' out > k && mv k out
+
+compare exp-err err || fail=1
+compare exp out || fail=1
+
+Exit $fail
--
1.7.12.rc2


From MAILER-DAEMON Sat Aug 18 02:17:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T2cM1-00040V-Pu
	for mharc-coreutils@gnu.org; Sat, 18 Aug 2012 02:17:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35707)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2cLz-00040N-26
	for coreutils@gnu.org; Sat, 18 Aug 2012 02:17:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T2cLx-0006FS-Lf
	for coreutils@gnu.org; Sat, 18 Aug 2012 02:17:46 -0400
Received: from mx.meyering.net ([88.168.87.75]:46825)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>)
	id 1T2cLx-0006FH-EE; Sat, 18 Aug 2012 02:17:45 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 2F8D0600A4;
	Sat, 18 Aug 2012 08:17:43 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: new snapshot available: coreutils-8.18.10-46444
Mail-Followup-To: coreutils@gnu.org
Date: Sat, 18 Aug 2012 08:17:43 +0200
Message-ID: <87boi867w8.fsf@rho.meyering.net>
Lines: 72
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: coordinator@translationproject.org, platform-testers@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, 18 Aug 2012 06:17:48 -0000

sort -u data loss... who would have guessed?
This is not your typical coreutils bug.
Actually, there were *two* sort -u bugs.
How many more are lurking?

Anyhow, here's a snapshot.
Please give this a try, and report any problems.
I will probably release coreutils-8.19 tomorrow.

coreutils snapshot:
  http://meyering.net/cu/coreutils-ss.tar.xz      4.9 MB
  http://meyering.net/cu/coreutils-ss.tar.xz.sig
  http://meyering.net/cu/coreutils-8.18.10-46444.tar.xz

There are .sig files here, too:
  http://people.redhat.com/meyering/cu/coreutils-ss.tar.xz
  http://people.redhat.com/meyering/cu/coreutils-8.18.10-46444.tar.xz

========================================================
NEWS

** Bug fixes

  df now fails when the list of mounted file systems (/etc/mtab) cannot
  be read, yet the file system type information is needed to process
  certain options like -a, -l, -t and -x.
  [This bug was present in "the beginning".]

  sort -u could fail to output one or more result lines.
  For example, this command would fail to print "1":
  (yes 7 | head -11; echo 1) | sort --p=1 -S32b -u
  [bug introduced in coreutils-8.6]

  sort -u could read freed memory.
  For example, this evokes a read from freed memory:
  perl -le 'print "a\n"."0"x900'|valgrind sort --p=1 -S32b -u>/dev/null
  [bug introduced in coreutils-8.6]

========================================================
Changes in coreutils since v8.18:

Bernhard Voelker (1):
      df: fail when the mount list is required but cannot be read

Jim Meyering (7):
      maint: post-release administrivia
      maint: fix comment grammar to placate make syntax-check
      maint: correct a stale comment in sort.c
      tests: reverse args in Coreutils.pm-invoked diff, for consistency
      sort: sort --unique (-u) could cause data loss
      tests: wrap the valgrind-requiring assertion in a function
      tests: trigger the sort -u free-memory-read bug

Krzysztof Goj (1):
      rm: new option --dir (-d) to remove empty directories

Paul Eggert (1):
      sort: simpler fix for sort -u data-loss bug, and for a FMR bug

========================================================
Changes in gnulib since v8.18:

* gnulib 39cedf6...bc33a8a (9):
  > test-parse-datetime: avoid glibc leap-second glitch
  > autoupdate
  > gnulib-tool: Fix indentation of generated gnulib-comp.m4 file.
  > ldexp: relax license
  > update from texinfo
  > gnulib-tool: Fix persistence of --witness-c-macro option.
  > count-leading-zeros: use a lookup table on non-gcc compilers
  > count-leading-zeros: new module
  > maintainer-makefile: Fix syntax error with dash.


From MAILER-DAEMON Sun Aug 19 11:36:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T37Xk-0004Qw-V5
	for mharc-coreutils@gnu.org; Sun, 19 Aug 2012 11:36:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45250)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T37Xi-0004Oq-Iq
	for coreutils@gnu.org; Sun, 19 Aug 2012 11:35:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T37Xh-0000up-Ip
	for coreutils@gnu.org; Sun, 19 Aug 2012 11:35:58 -0400
Received: from mx.meyering.net ([88.168.87.75]:51271)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T37Xh-0000tB-CK
	for coreutils@gnu.org; Sun, 19 Aug 2012 11:35:57 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id D028D6024F
	for <coreutils@gnu.org>; Sun, 19 Aug 2012 17:35:55 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH] tests: avoid split/filter test failure on very low-mem system
Date: Sun, 19 Aug 2012 17:35:55 +0200
Message-ID: <87mx1q51yc.fsf@rho.meyering.net>
Lines: 31
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 19 Aug 2012 15:35:59 -0000

I saw this test fail when run via make -j2 on a low-memory arm-based system,
but not when run in isolation.

>From e44943a25e4a225568b51a411f18ba61134d3eb3 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Sun, 19 Aug 2012 17:34:04 +0200
Subject: [PATCH] tests: avoid split/filter test failure on very low-mem
 system

* tests/split/filter: Use xz -1 when compressing, to minimize
memory usage.  Otherwise, xz could fail due to insufficient
virtual memory on a system with very little free memory.
---
 tests/split/filter | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/split/filter b/tests/split/filter
index dbcac5f..7a55818 100755
--- a/tests/split/filter
+++ b/tests/split/filter
@@ -29,7 +29,7 @@ for total_n_lines in 5 3000 20000; do
     # and would provide little added benefit.
     case $i:$total_n_lines in 2:5);; *) continue;; esac

-    split -l$i --filter='xz > $FILE.xz' in out- || fail=1
+    split -l$i --filter='xz -1 > $FILE.xz' in out- || fail=1
     xz -dc out-* > out || fail=1
     compare in out || fail=1
     rm -f out*
--
1.7.12.rc2


From MAILER-DAEMON Sun Aug 19 16:36:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T3CET-0001zk-A7
	for mharc-coreutils@gnu.org; Sun, 19 Aug 2012 16:36:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53271)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T3CER-0001z3-8r
	for coreutils@gnu.org; Sun, 19 Aug 2012 16:36:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T3CEQ-0004NI-94
	for coreutils@gnu.org; Sun, 19 Aug 2012 16:36:23 -0400
Received: from mx.meyering.net ([88.168.87.75]:51966)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T3CEQ-0004NC-21
	for coreutils@gnu.org; Sun, 19 Aug 2012 16:36:22 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id C3371600BC
	for <coreutils@gnu.org>; Sun, 19 Aug 2012 22:36:20 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: Re: new snapshot available: coreutils-8.18.10-46444
In-Reply-To: <87boi867w8.fsf@rho.meyering.net> (Jim Meyering's message of
	"Sat, 18 Aug 2012 08:17:43 +0200")
References: <87boi867w8.fsf@rho.meyering.net>
Date: Sun, 19 Aug 2012 22:36:20 +0200
Message-ID: <877gsu39h7.fsf@rho.meyering.net>
Lines: 20
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 19 Aug 2012 20:36:24 -0000

Jim Meyering wrote:
> sort -u data loss... who would have guessed?
> This is not your typical coreutils bug.
> Actually, there were *two* sort -u bugs.
> How many more are lurking?
>
> Anyhow, here's a snapshot.
> Please give this a try, and report any problems.
> I will probably release coreutils-8.19 tomorrow.
>
> coreutils snapshot:
>   http://meyering.net/cu/coreutils-ss.tar.xz      4.9 MB
>   http://meyering.net/cu/coreutils-ss.tar.xz.sig
>   http://meyering.net/cu/coreutils-8.18.10-46444.tar.xz
>
> There are .sig files here, too:
>   http://people.redhat.com/meyering/cu/coreutils-ss.tar.xz
>   http://people.redhat.com/meyering/cu/coreutils-8.18.10-46444.tar.xz

I will not make the release today.  Expect it tomorrow instead.


From MAILER-DAEMON Mon Aug 20 04:16:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T3NA7-00072y-2y
	for mharc-coreutils@gnu.org; Mon, 20 Aug 2012 04:16:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58520)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T3NA3-0006vc-PP
	for coreutils@gnu.org; Mon, 20 Aug 2012 04:16:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T3NA2-0000sC-ON
	for coreutils@gnu.org; Mon, 20 Aug 2012 04:16:35 -0400
Received: from mx.meyering.net ([88.168.87.75]:53507)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>)
	id 1T3NA0-0000rv-4A; Mon, 20 Aug 2012 04:16:32 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 6B2E160149;
	Mon, 20 Aug 2012 10:16:31 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: info-gnu@gnu.org
Subject: coreutils-8.19 released (fixes sort -u data loss bugs)
Mail-Followup-To: bug-coreutils@gnu.org
Date: Mon, 20 Aug 2012 10:16:26 +0200
Message-ID: <87k3wunfl1.fsf@rho.meyering.net>
Lines: 92
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
	micalg=pgp-sha256; protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: coordinator@translationproject.org, coreutils@gnu.org,
	coreutils-announce@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, 20 Aug 2012 08:16:37 -0000

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

This is to announce coreutils-8.19, a stable release.

There have been 13 commits by 4 people in the 8 days since 8.18.

This release is primarily to fix two data loss bugs in sort -u.
See the NEWS below for a brief summary.

Thanks to everyone who has contributed!
The following people contributed changes to this release:

  Bernhard Voelker (1)
  Jim Meyering (9)
  Krzysztof Goj (1)
  Paul Eggert (2)

Special thanks to Rasmus Borup Hansen for reporting the sort -u problem
along with a reproducer, and to Paul Eggert for spotting the second bug
and for his minimal patch that fixed both bugs.

Jim [on behalf of the coreutils maintainers]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Here is the GNU coreutils home page:
    http://gnu.org/s/coreutils/

For a summary of changes and contributors, see:
  http://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dshortlog;h=3Dv8.19
or run this command from a git-cloned coreutils directory:
  git shortlog v8.18..v8.19

To summarize the 9 gnulib-related changes, run these commands
From=20a git-cloned coreutils directory:
  git checkout v8.19
  git submodule summary v8.18

Here are the compressed sources and a GPG detached signature[*]:
  http://ftp.gnu.org/gnu/coreutils/coreutils-8.19.tar.xz
  http://ftp.gnu.org/gnu/coreutils/coreutils-8.19.tar.xz.sig

Use a mirror for higher download bandwidth:
  http://ftpmirror.gnu.org/coreutils/coreutils-8.19.tar.xz
  http://ftpmirror.gnu.org/coreutils/coreutils-8.19.tar.xz.sig

[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify coreutils-8.19.tar.xz.sig

If that command fails because you don't have the required public key,
then run this command to import it:

  gpg --keyserver keys.gnupg.net --recv-keys 7FD9FCCB000BEEEE

and rerun the 'gpg --verify' command.

This release was bootstrapped with the following tools:
  Autoconf 2.69.19-1bb10
  Automake 1.12a
  Gnulib v0.0-7581-gbc33a8a
  Bison 2.6.2.837-8dfc

NEWS

* Noteworthy changes in release 8.19 (2012-08-20) [stable]

** Bug fixes

  df now fails when the list of mounted file systems (/etc/mtab) cannot
  be read, yet the file system type information is needed to process
  certain options like -a, -l, -t and -x.
  [This bug was present in "the beginning".]

  sort -u could fail to output one or more result lines.
  For example, this command would fail to print "1":
  (yes 7 | head -11; echo 1) | sort --p=3D1 -S32b -u
  [bug introduced in coreutils-8.6]

  sort -u could read freed memory.
  For example, this evokes a read from freed memory:
  perl -le 'print "a\n"."0"x900'|valgrind sort --p=3D1 -S32b -u > /dev/null
  [bug introduced in coreutils-8.6]

** New features

  rm now accepts the --dir (-d) option which makes it remove empty director=
ies.
  This improves compatibility with Mac OS X and BSD systems which also honor
  the -d option.

=2D----
also posted as: https://savannah.gnu.org/forum/forum.php?forum_id=3D7342

--=-=-=
Content-Type: application/pgp-signature

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

iQIcBAEBCAAGBQJQMfJfAAoJEH/Z/MsAC+7uJUkP/ieitFskEKY3ZIxc+mOjJnMd
ztzExHA41ptikIQVvRsACnBKf0IlrTVMnAP9kYlWSwzXoz7D/OMSG6/A5wLCiO7l
XFigVbE1MqirNrDHMgzyk09Ak2V5AQTrQItc4YeEcNou8vcJDr483GNiXtcCQp8m
E1Q4SvCTeENcH3aBZdk/Ma27q3ZHa6fcwgdvZwubxB4JLnafmAYqIsUxbqBBuzQq
X0u4v6BR5rn5x9RXUdzAkM8oxmuKh5OFFfN/V2caWk9PIZAtBJTwhGfzU5TFIkzE
J8VjI+x+PbkVNMWiBmyphLzHs8zfpBr3fYjOm0S1vxpgP4faN5TTMdoXQpHZiMrL
9Z51f9m3bT5rlr/MJuLoVdtVRworGwov/fa0qJl6df6LB0HEZpLkKcyzrJJnX5m1
XkYcTmW//h0pU7obtzIQpd6p9hBWKPijW8N3KHl93Gxj33Mb24AVs4ucGPmemGVc
WM6bDQqwmviiBVij3CQKUJDZ0jS/lFBrMm+NLEKIQBksVdIXITEaKD1DmkbwTjTX
/CVsgnTOXa0CIcvMgDm13VgiVyUYNCAZDpMPN30PnMJIXM0W7ISAmsIYF0HNiXNQ
hHufM7s3kHL4gzojDN9JBjDV5dpCvtJPs15JbhY0ctGbjO+704OlmwtWDERMlETg
gelzEuMngt6gQCT9dF1W
=R708
-----END PGP SIGNATURE-----
--=-=-=--


From MAILER-DAEMON Mon Aug 20 05:24:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T3ODb-00049n-PV
	for mharc-coreutils@gnu.org; Mon, 20 Aug 2012 05:24:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33698)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T3ODZ-00046F-EU
	for coreutils@gnu.org; Mon, 20 Aug 2012 05:24:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T3ODY-0004wM-9E
	for coreutils@gnu.org; Mon, 20 Aug 2012 05:24:17 -0400
Received: from mx1.redhat.com ([209.132.183.28]:48995)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>)
	id 1T3ODV-0004vo-MU; Mon, 20 Aug 2012 05:24:13 -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 q7K9O9DQ021287
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 20 Aug 2012 05:24:09 -0400
Received: from [10.36.116.58] (ovpn-116-58.ams2.redhat.com [10.36.116.58])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7K9O5g3023836
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Mon, 20 Aug 2012 05:24:07 -0400
Message-ID: <50320235.3050106@draigBrady.com>
Date: Mon, 20 Aug 2012 10:24:05 +0100
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: removing "su" from coreutils [Re: Fwd: [PULL] su
References: <4FBE3059.3030806@suse.de> <4FBE32D2.5060905@draigBrady.com>
	<87aa0xbtqa.fsf_-_@rho.meyering.net>
	<4FBE3CB0.7090901@draigBrady.com>
In-Reply-To: <4FBE3CB0.7090901@draigBrady.com>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=UTF-8
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
	q7K9O9DQ021287
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: hurd-devel@gnu.org, Karel Zak <kzak@redhat.com>,
	Ludwig Nussel <ludwig.nussel@suse.de>,
	Coreutils <coreutils@gnu.org>, 8700@debbugs.gnu.org,
	=?UTF-8?B?T25kxZllaiBW?= =?UTF-8?B?YcWhw61r?= <ovasik@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: Mon, 20 Aug 2012 09:24:18 -0000

On 05/24/2012 02:50 PM, P=C3=A1draig Brady wrote:
> Note Fedora and Suse use su from coreutils
> while debian use their own:
> http://pkg-shadow.alioth.debian.org/
>=20
> Note also Fedora has `runuser` which is based on su:
> http://pkgs.fedoraproject.org/gitweb/?p=3Dcoreutils.git;a=3Dblob;f=3Dco=
reutils-8.7-runuser.patch;hb=3DHEAD
>=20
> There was also a very related request for
> `runuser` like functionality to be generally available:
> http://bugs.gnu.org/8700
>=20
> It's probably worth bringing runuser with su,
> no matter where they end up.

So with su being removed in favor of the util-linux implementation,
`runuser` is being implemented there too.
I.E. it will be available outside of redhat/fedora/centos/...
in util-linux >=3D 2.22, and so should address http://bugs.gnu.org/8700

Note from previous comments in this thread,
it seems like allowing runser to be built (as an option?)
without requiring PAM, would be useful.

For reference, here are utils with similar functionality:

chid,really
  Mentioned in feature request from debian
    http://bugs.gnu.org/8700

chroot --userspec=3DU:G --groups=3DG1,G2,G3 /
  since coreutils v7.4-16-gc45c51f
  beware of CVE-2005-4890

setuidgid
  coreutils internal only
  http://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dblob;f=3Dsrc/setuid=
gid.c;hb=3DHEAD

sg from pwdutils
  http://pubs.opengroup.org/onlinepubs/9699919799/utilities/newgrp.html

sudo -u -g

runas from titantools


cheers,
P=C3=A1draig.


From MAILER-DAEMON Mon Aug 20 14:36:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T3Wpu-0001pE-GI
	for mharc-coreutils@gnu.org; Mon, 20 Aug 2012 14:36:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47532)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <kzak@redhat.com>) id 1T3Wpr-0001n5-IC
	for coreutils@gnu.org; Mon, 20 Aug 2012 14:36:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <kzak@redhat.com>) id 1T3Wpp-0007xF-Qd
	for coreutils@gnu.org; Mon, 20 Aug 2012 14:36:23 -0400
Received: from mx1.redhat.com ([209.132.183.28]:38623)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <kzak@redhat.com>)
	id 1T3Wpp-0007ws-JE; Mon, 20 Aug 2012 14:36:21 -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 q7KIaErH002485
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Mon, 20 Aug 2012 14:36:14 -0400
Received: from x2 (ovpn-113-69.phx2.redhat.com [10.3.113.69])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7KIaCGc013823; Mon, 20 Aug 2012 14:36:13 -0400
Date: Mon, 20 Aug 2012 20:36:10 +0200
From: Karel Zak <kzak@redhat.com>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: removing "su" from coreutils [Re: Fwd: [PULL] su
Message-ID: <20120820183610.GA30992@x2.net.home>
References: <4FBE3059.3030806@suse.de> <4FBE32D2.5060905@draigBrady.com>
	<87aa0xbtqa.fsf_-_@rho.meyering.net>
	<4FBE3CB0.7090901@draigBrady.com> <50320235.3050106@draigBrady.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
In-Reply-To: <50320235.3050106@draigBrady.com>
User-Agent: Mutt/1.5.21 (2011-07-01)
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
	q7KIaErH002485
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: hurd-devel@gnu.org, Ludwig Nussel <ludwig.nussel@suse.de>,
	Coreutils <coreutils@gnu.org>, 8700@debbugs.gnu.org,
	=?utf-8?B?T25kxZllaiBWYcWhw61r?= <ovasik@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: Mon, 20 Aug 2012 18:36:24 -0000

On Mon, Aug 20, 2012 at 10:24:05AM +0100, P=E1draig Brady wrote:
> On 05/24/2012 02:50 PM, P=E1draig Brady wrote:
> > Note Fedora and Suse use su from coreutils
> > while debian use their own:
> > http://pkg-shadow.alioth.debian.org/
> >=20
> > Note also Fedora has `runuser` which is based on su:
> > http://pkgs.fedoraproject.org/gitweb/?p=3Dcoreutils.git;a=3Dblob;f=3D=
coreutils-8.7-runuser.patch;hb=3DHEAD
> >=20
> > There was also a very related request for
> > `runuser` like functionality to be generally available:
> > http://bugs.gnu.org/8700
> >=20
> > It's probably worth bringing runuser with su,
> > no matter where they end up.
>=20
> So with su being removed in favor of the util-linux implementation,
> `runuser` is being implemented there too.
> I.E. it will be available outside of redhat/fedora/centos/...
> in util-linux >=3D 2.22, and so should address http://bugs.gnu.org/8700

 My plan is to merge Fedora runuser patch (it means add -g -G options
 to su(1)) after 2.22. It's too late for 2.22 (as we have -rc2 now).

 The patch will be available ASAP after 2.22 release in the util-linux
 upstream tree and maybe will be in 2.22.1 too.

> Note from previous comments in this thread,
> it seems like allowing runser to be built (as an option?)
> without requiring PAM, would be useful.
>=20
> For reference, here are utils with similar functionality:

 Thanks for the references!

    Karel

--=20
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


From MAILER-DAEMON Mon Aug 20 15:17:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T3XTC-00069I-Gi
	for mharc-coreutils@gnu.org; Mon, 20 Aug 2012 15:17:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58632)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T3XT9-00067y-Qn
	for coreutils@gnu.org; Mon, 20 Aug 2012 15:17:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T3XT7-0004ep-8s
	for coreutils@gnu.org; Mon, 20 Aug 2012 15:16:59 -0400
Received: from mx.meyering.net ([88.168.87.75]:55318)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T3XT6-0004eY-QR
	for coreutils@gnu.org; Mon, 20 Aug 2012 15:16:57 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id F0FC760115;
	Mon, 20 Aug 2012 21:16:55 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: du bogus warning with bind mounts
In-Reply-To: <87lihd7sth.fsf@rho.meyering.net> (Jim Meyering's message of
	"Fri, 17 Aug 2012 11:48:10 +0200")
References: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
	<87fw7wxz4i.fsf@rho.meyering.net> <50237FDC.3070502@redhat.com>
	<87zk64uz2w.fsf@rho.meyering.net> <502B8AD3.4040508@redhat.com>
	<87r4r57uis.fsf@rho.meyering.net> <87lihd7sth.fsf@rho.meyering.net>
Date: Mon, 20 Aug 2012 21:16:55 +0200
Message-ID: <87txvxl6fs.fsf@rho.meyering.net>
Lines: 270
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Mon, 20 Aug 2012 19:17:01 -0000

Jim Meyering wrote:
> Jim Meyering wrote:
>> Ondrej Oprala wrote:
>>>>From d8eab7abdf19b668065ff8be3700c9966eefdc39 Mon Sep 17 00:00:00 2001
>>> From: Ondrej Oprala <ooprala@redhat.com>
>>> Date: Thu, 9 Aug 2012 17:34:09 +0200
...
>>From 491914627db04fe789bfdbf796f9be21198a6b09 Mon Sep 17 00:00:00 2001
> From: Ondrej Oprala <ooprala@redhat.com>
> Date: Thu, 9 Aug 2012 17:34:09 +0200
> Subject: [PATCH] du: handle bind-mounted directory cycles gracefully

I've rebased, moved the NEWS entry to the stanza for 8.20,
fixed a syntax-check violation that I may have introduced
(line longer than 80), added an "|| framework_failure_" in
the test, and improved the NEWS and commit log.
Also, I've spent enough time on this patch that I've actually
mentioned my own name in the log.

I'll wait for an ACK.

FYI, I tested by running this command:

  sudo make check -C tests TESTS=du/bind-mount-dir-cycle VERBOSE=yes


>From f39b64c807e91de504dba6349f5827d42b05a1a7 Mon Sep 17 00:00:00 2001
From: Ondrej Oprala <ooprala@redhat.com>
Date: Thu, 9 Aug 2012 17:34:09 +0200
Subject: [PATCH] du: handle bind-mounted directory cycles gracefully

Before this change, a directory cycle induced by a bind mount
would be treated as a fatal error, i.e., probable disk corruption.
However, such cycles are relatively common, and can be avoided
efficiently, so now du emits a warning but still exits nonzero.

* NEWS (Bug fixes): Mention it.
* src/du.c: Include "mountlist.h".
(di_mnt): New global set.
(di_files): Rename global from di_set, now that there are two.
(fill_mount_table): New function.
(hash_ins): Add DI_SET parameter.
(process_file): Look up each dir dev/ino pair in the new set.
(main): Allocate, initialize, and free the new set.
* tests/du/bind-mount-dir-cycle: Add a test for the fix.
* tests/Makefile.am (TESTS): Add it.

Improved by: Jim Meyering
---
 NEWS                          |  7 +++++
 src/du.c                      | 70 ++++++++++++++++++++++++++++++++++++-------
 tests/Makefile.am             |  1 +
 tests/du/bind-mount-dir-cycle | 44 +++++++++++++++++++++++++++
 4 files changed, 112 insertions(+), 10 deletions(-)
 create mode 100755 tests/du/bind-mount-dir-cycle

diff --git a/NEWS b/NEWS
index f7672d9..a1dae82 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,13 @@ GNU coreutils NEWS                                    -*- outline -*-

 * Noteworthy changes in release ?.? (????-??-??) [?]

+** Bug fixes
+
+  du no longer emits a "disk-corrupted"-style diagnostic when it detects
+  a directory cycle that is due to a bind-mounted directory. Instead,
+  it detects this precise type of cycle, diagnoses it as such and
+  eventually exits nonzero.
+

 * Noteworthy changes in release 8.19 (2012-08-20) [stable]

diff --git a/src/du.c b/src/du.c
index 7333941..ee90da9 100644
--- a/src/du.c
+++ b/src/du.c
@@ -35,6 +35,7 @@
 #include "exclude.h"
 #include "fprintftime.h"
 #include "human.h"
+#include "mountlist.h"
 #include "quote.h"
 #include "quotearg.h"
 #include "stat-size.h"
@@ -60,8 +61,12 @@ extern bool fts_debug;
 # define FTS_CROSS_CHECK(Fts)
 #endif

-/* A set of dev/ino pairs.  */
-static struct di_set *di_set;
+/* A set of dev/ino pairs to help identify files and directories
+   whose sizes have already been counted.  */
+static struct di_set *di_files;
+
+/* A set containing a dev/ino pair for each local mount point directory.  */
+static struct di_set *di_mnt;

 /* Keep track of the preceding "level" (depth in hierarchy)
    from one call of process_file to the next.  */
@@ -333,11 +338,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   exit (status);
 }

-/* Try to insert the INO/DEV pair into the global table, HTAB.
+/* Try to insert the INO/DEV pair into DI_SET.
    Return true if the pair is successfully inserted,
-   false if the pair is already in the table.  */
+   false if the pair was already there.  */
 static bool
-hash_ins (ino_t ino, dev_t dev)
+hash_ins (struct di_set *di_set, ino_t ino, dev_t dev)
 {
   int inserted = di_set_insert (di_set, dev, ino);
   if (inserted < 0)
@@ -461,7 +466,7 @@ process_file (FTS *fts, FTSENT *ent)
       if (excluded
           || (! opt_count_all
               && (hash_all || (! S_ISDIR (sb->st_mode) && 1 < sb->st_nlink))
-              && ! hash_ins (sb->st_ino, sb->st_dev)))
+              && ! hash_ins (di_files, sb->st_ino, sb->st_dev)))
         {
           /* If ignoring a directory in preorder, skip its children.
              Ignore the next fts_read output too, as it's a postorder
@@ -490,7 +495,13 @@ process_file (FTS *fts, FTSENT *ent)
         case FTS_DC:
           if (cycle_warning_required (fts, ent))
             {
-              emit_cycle_warning (file);
+              /* If this is a mount point, then diagnose it and avoid
+                 the cycle.  */
+              if (di_set_lookup (di_mnt, sb->st_dev, sb->st_ino))
+                error (0, 0, _("mount point %s already traversed"),
+                       quote (file));
+              else
+                emit_cycle_warning (file);
               return false;
             }
           return true;
@@ -623,6 +634,37 @@ du_files (char **files, int bit_flags)
   return ok;
 }

+/* Fill the di_mnt set with local mount point dev/ino pairs.  */
+
+static void
+fill_mount_table (void)
+{
+  struct mount_entry *mnt_ent = read_file_system_list (false);
+  while (mnt_ent)
+    {
+      struct mount_entry *mnt_free;
+      if (!mnt_ent->me_remote && !mnt_ent->me_dummy)
+        {
+          struct stat buf;
+          if (!stat (mnt_ent->me_mountdir, &buf))
+            hash_ins (di_mnt, buf.st_ino, buf.st_dev);
+          else
+            {
+              /* Ignore stat failure.  False positives are too common.
+                 E.g., "Permission denied" on /run/user/<name>/gvfs.  */
+            }
+        }
+
+      mnt_free = mnt_ent;
+      mnt_ent = mnt_ent->me_next;
+
+      free (mnt_free->me_devname);
+      free (mnt_free->me_mountdir);
+      free (mnt_free->me_type);
+      free (mnt_free);
+    }
+}
+
 int
 main (int argc, char **argv)
 {
@@ -922,8 +964,15 @@ main (int argc, char **argv)
     xalloc_die ();

   /* Initialize the set of dev,inode pairs.  */
-  di_set = di_set_alloc ();
-  if (!di_set)
+
+  di_mnt = di_set_alloc ();
+  if (!di_mnt)
+    xalloc_die ();
+
+  fill_mount_table ();
+
+  di_files = di_set_alloc ();
+  if (!di_files)
     xalloc_die ();

   /* If not hashing everything, process_file won't find cycles on its
@@ -1001,7 +1050,8 @@ main (int argc, char **argv)
  argv_iter_done:

   argv_iter_free (ai);
-  di_set_free (di_set);
+  di_set_free (di_files);
+  di_set_free (di_mnt);

   if (files_from && (ferror (stdin) || fclose (stdin) != 0) && ok)
     error (EXIT_FAILURE, 0, _("error reading %s"), quote (files_from));
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 69078bd..acd816d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -32,6 +32,7 @@ root_tests =					\
   cp/sparse-fiemap				\
   dd/skip-seek-past-dev				\
   df/problematic-chars				\
+  du/bind-mount-dir-cycle			\
   install/install-C-root			\
   ls/capability					\
   ls/nameless-uid				\
diff --git a/tests/du/bind-mount-dir-cycle b/tests/du/bind-mount-dir-cycle
new file mode 100755
index 0000000..8f9e197
--- /dev/null
+++ b/tests/du/bind-mount-dir-cycle
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Exercise du's new ability to handle bind-mount-induced dir cycles.
+
+# Copyright (C) 2012 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+print_ver_ rm
+require_root_
+
+cleanup_()
+{
+  # When you take the undesirable shortcut of making /etc/mtab a link
+  # to /proc/mounts, unmounting "$other_partition_tmpdir" would fail.
+  # So, here we unmount a/b instead.
+  umount a/b
+}
+
+mkdir -p a/b || framework_failure_
+mount --bind a a/b \
+  || skip_ "This test requires mount with a working --bind option."
+
+echo a > exp || framework_failure_
+echo "du: mount point 'a/b' already traversed" > exp-err || framework_failure_
+
+du a > out 2> err && fail=1
+sed 's/^[0-9][0-9]*	//' out > k && mv k out
+
+compare exp-err err || fail=1
+compare exp out || fail=1
+
+Exit $fail
--
1.7.12


From MAILER-DAEMON Tue Aug 21 06:23:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T3lcD-00087n-BD
	for mharc-coreutils@gnu.org; Tue, 21 Aug 2012 06:23:17 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39723)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T3lcA-00087Y-Q9
	for coreutils@gnu.org; Tue, 21 Aug 2012 06:23:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T3lc5-0001hh-0x
	for coreutils@gnu.org; Tue, 21 Aug 2012 06:23:14 -0400
Received: from mx1.redhat.com ([209.132.183.28]:51181)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T3lc4-0001ha-P8
	for coreutils@gnu.org; Tue, 21 Aug 2012 06:23:08 -0400
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 q7LAN77W018902
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 21 Aug 2012 06:23:07 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7LAN58T004558
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Tue, 21 Aug 2012 06:23:06 -0400
Message-ID: <50336189.5000901@redhat.com>
Date: Tue, 21 Aug 2012 12:23:05 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: du bogus warning with bind mounts
References: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
	<87fw7wxz4i.fsf@rho.meyering.net> <50237FDC.3070502@redhat.com>
	<87zk64uz2w.fsf@rho.meyering.net> <502B8AD3.4040508@redhat.com>
	<87r4r57uis.fsf@rho.meyering.net> <87lihd7sth.fsf@rho.meyering.net>
	<87txvxl6fs.fsf@rho.meyering.net>
In-Reply-To: <87txvxl6fs.fsf@rho.meyering.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 21 Aug 2012 10:23:15 -0000

Hi,
Sure, that looks great. Thanks for the help.
Cheers,
  Ondrej.


From MAILER-DAEMON Tue Aug 21 11:14:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T3q9t-0000xx-42
	for mharc-coreutils@gnu.org; Tue, 21 Aug 2012 11:14:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55566)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <pth@suse.de>)
	id 1T3q9m-0000xW-AC
	for coreutils@gnu.org; Tue, 21 Aug 2012 11:14:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <pth@suse.de>) id 1T3q9l-00051O-Dv
	for coreutils@gnu.org; Tue, 21 Aug 2012 11:14:14 -0400
Received: from cantor2.suse.de ([195.135.220.15]:49648 helo=mx2.suse.de)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <pth@suse.de>)
	id 1T3q9l-00050b-7P
	for coreutils@gnu.org; Tue, 21 Aug 2012 11:14:13 -0400
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 256DDA3A78
	for <coreutils@gnu.org>; Tue, 21 Aug 2012 17:14:11 +0200 (CEST)
Date: Tue, 21 Aug 2012 17:14:11 +0200
From: Philipp Thomas <pth@suse.de>
To: coreutils@gnu.org
Subject: Premature removal of su from coreutils
Message-ID: <20120821151411.GH1118@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.2-1-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-2.6
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: Tue, 21 Aug 2012 15:14:20 -0000

Why was su removed from coreutils before util-linux 2.22, which will include
the enhanced su, has been released? Now I have to wait for the release of
util-linux before I can make packages of 8.18 or newer.

Philipp




From MAILER-DAEMON Tue Aug 21 11:31:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T3qQj-0004fR-IN
	for mharc-coreutils@gnu.org; Tue, 21 Aug 2012 11:31:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54554)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T3qQe-0004fK-4e
	for coreutils@gnu.org; Tue, 21 Aug 2012 11:31:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T3qQU-0003J0-Jn
	for coreutils@gnu.org; Tue, 21 Aug 2012 11:31:40 -0400
Received: from mx1.redhat.com ([209.132.183.28]:63489)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T3qQU-0003Ia-C3
	for coreutils@gnu.org; Tue, 21 Aug 2012 11:31:30 -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 q7LFVSvg019058
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 21 Aug 2012 11:31:28 -0400
Received: from [10.36.116.20] (ovpn-116-20.ams2.redhat.com [10.36.116.20])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7LFVOXV002618
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Tue, 21 Aug 2012 11:31:26 -0400
Message-ID: <5033A9CB.1020009@draigBrady.com>
Date: Tue, 21 Aug 2012 16:31:23 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Philipp Thomas <pth@suse.de>
Subject: Re: Premature removal of su from coreutils
References: <20120821151411.GH1118@paradies.suse.de>
In-Reply-To: <20120821151411.GH1118@paradies.suse.de>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
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
	q7LFVSvg019058
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 21 Aug 2012 15:31:44 -0000

On 08/21/2012 04:14 PM, Philipp Thomas wrote:
> Why was su removed from coreutils before util-linux 2.22, which will in=
clude
> the enhanced su, has been released? Now I have to wait for the release =
of
> util-linux before I can make packages of 8.18 or newer.

Yes not ideal, but we did communicate on this,
so util-linux 2.22 is going to be released very soon
(currently at rc2).

thanks,
P=E1draig.


From MAILER-DAEMON Tue Aug 21 13:52:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T3scS-0006tT-S8
	for mharc-coreutils@gnu.org; Tue, 21 Aug 2012 13:52:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50720)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T3scP-0006rE-Ht
	for coreutils@gnu.org; Tue, 21 Aug 2012 13:51:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T3scO-0000FO-IG
	for coreutils@gnu.org; Tue, 21 Aug 2012 13:51:57 -0400
Received: from mx.meyering.net ([88.168.87.75]:58735)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T3scO-0000F7-91
	for coreutils@gnu.org; Tue, 21 Aug 2012 13:51:56 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id F1362600AE;
	Tue, 21 Aug 2012 19:51:53 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: du bogus warning with bind mounts
In-Reply-To: <50336189.5000901@redhat.com> (Ondrej Oprala's message of "Tue,
	21 Aug 2012 12:23:05 +0200")
References: <305815138.561338.1344434507966.JavaMail.root@redhat.com>
	<87fw7wxz4i.fsf@rho.meyering.net> <50237FDC.3070502@redhat.com>
	<87zk64uz2w.fsf@rho.meyering.net> <502B8AD3.4040508@redhat.com>
	<87r4r57uis.fsf@rho.meyering.net> <87lihd7sth.fsf@rho.meyering.net>
	<87txvxl6fs.fsf@rho.meyering.net> <50336189.5000901@redhat.com>
Date: Tue, 21 Aug 2012 19:51:53 +0200
Message-ID: <87boi4i152.fsf@rho.meyering.net>
Lines: 15
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: 836557@bugs.debian.org, Alan Jenkins <alan-jenkins@tuffmail.co.uk>,
	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, 21 Aug 2012 17:51:58 -0000

[Re: http://bugs.gnu.org/11844
 du: continue processing after bind-mount induced dir-cycle ]

Ondrej Oprala wrote:
> Sure, that looks great. Thanks for the help.

I added this to the log:

    * THANKS.in: Update.
    This implements the proposal in http://bugs.gnu.org/11844.
    Originally reported in http://bugs.debian.org/563254 by Alan Jenkins
    and more recently as http://bugzilla.redhat.com/836557

and pushed:
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=cf7e1b5b8fb53aef2a9103a32


From MAILER-DAEMON Wed Aug 22 02:53:36 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T44oq-0004Hq-CD
	for mharc-coreutils@gnu.org; Wed, 22 Aug 2012 02:53:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38000)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T44ok-0004HT-Cl
	for coreutils@gnu.org; Wed, 22 Aug 2012 02:53:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T44of-0006Ut-P3
	for coreutils@gnu.org; Wed, 22 Aug 2012 02:53:30 -0400
Received: from moutng.kundenserver.de ([212.227.17.8]:59980)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T44of-0006UW-Es
	for coreutils@gnu.org; Wed, 22 Aug 2012 02:53:25 -0400
Received: from [192.168.2.108] (p4FF7283D.dip.t-dialin.net [79.247.40.61])
	by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis)
	id 0Lj4zW-1TenkL1XTC-00cboc; Wed, 22 Aug 2012 08:53:23 +0200
Message-ID: <503481E2.1020009@bernhard-voelker.de>
Date: Wed, 22 Aug 2012 08:53:22 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: [PATCH] tests: correct print_ver_ arguments
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:XRWlipKsWsbUhnn0Wxkq1pLfZLsalljgAecd6qr5ZmQ
	o1WX5bI/Io6OhiSoq+4ThD9dzLrOHu/qxPROz3C+iUztNqgUaz
	p8HjFyyHzFcKS+RvIX6N6J6BFQIndCPAUceng4o2v4MiUWIyAo
	dwqipC6C4NzOrElPkhZSCLU7mR4ghHuOvlxaq0tMnyDfBAqkqL
	OJxgaEBlvNn/PtdyH5mskknpN27eZ4z+fUdFPM0XhQzplzwRri
	k/Iv+2Ht/Nt4bQ3oB93kZUHZAlt+k4pbPKzqKBT5uEvYpGS2Z1
	1wJu1ztFGWtbarkC55j0ZMV2wAFXL/vY8V59VtSS0ipBQUJ1nC
	ffp2RhesPumP6vyICa9sYCDwdQdNUzlLYk4MCfk4j
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.17.8
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, 22 Aug 2012 06:53:35 -0000

I noticed (too late) that the new tests/du/bind-mount-dir-cycle
calls print_ver_ with rm as argument instead of du.
A little script found other wrong uses, too.

Have a nice day,
Berny



>From cc5ac9fc522533cead606e6496fbe0df76e089af Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Wed, 22 Aug 2012 08:48:09 +0200
Subject: [PATCH] tests: correct print_ver_ arguments

Some tests have been derived from other tests while
the argument(s) to print_ver_ have not been adapted.

The following snippet found the wrong ones:

  grep print_ver_ $(git ls-files | grep  ^tests) \
  | sed 's#:print_ver_##' \
  | grep -v '\.log' \
  | while read a b ; do
      for i in $b ; do
          grep -q "$i " $a ||
          echo Test: $a, args: $b, offending: $i
      done
    done

* tests/chown/basic: s/\(print_ver_\) chgrp/\1 chown/
* tests/cp/cp-parents: s/(print_ver_\) mv/\1 cp/
* tests/du/bind-mount-dir-cycle: s/(print_ver_\) rm/\1 du/
* tests/misc/wc-parallel: s/(print_ver_\) md5sum/\1 wc/
---
 tests/chown/basic             |    2 +-
 tests/cp/cp-parents           |    2 +-
 tests/du/bind-mount-dir-cycle |    2 +-
 tests/misc/wc-parallel        |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/chown/basic b/tests/chown/basic
index 7c8951c..6225400 100755
--- a/tests/chown/basic
+++ b/tests/chown/basic
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ chgrp
+print_ver_ chown
 require_root_

 touch f || framework_failure_
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents
index b325c72..506e708 100755
--- a/tests/cp/cp-parents
+++ b/tests/cp/cp-parents
@@ -18,7 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ mv
+print_ver_ cp

 working_umask_or_skip_

diff --git a/tests/du/bind-mount-dir-cycle b/tests/du/bind-mount-dir-cycle
index 8f9e197..516ceae 100755
--- a/tests/du/bind-mount-dir-cycle
+++ b/tests/du/bind-mount-dir-cycle
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ rm
+print_ver_ du
 require_root_

 cleanup_()
diff --git a/tests/misc/wc-parallel b/tests/misc/wc-parallel
index 074160f..6611b47 100755
--- a/tests/misc/wc-parallel
+++ b/tests/misc/wc-parallel
@@ -18,7 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ md5sum
+print_ver_ wc

 (mkdir tmp && cd tmp && seq 2000 | xargs touch)

-- 
1.7.7




From MAILER-DAEMON Wed Aug 22 03:57:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T45oy-0004my-Cg
	for mharc-coreutils@gnu.org; Wed, 22 Aug 2012 03:57:48 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51522)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T45or-0004lq-LD
	for coreutils@gnu.org; Wed, 22 Aug 2012 03:57:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T45oq-0007GH-H1
	for coreutils@gnu.org; Wed, 22 Aug 2012 03:57:41 -0400
Received: from mx.meyering.net ([88.168.87.75]:60831)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T45oq-0007GD-9d
	for coreutils@gnu.org; Wed, 22 Aug 2012 03:57:40 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 2B106601D2;
	Wed, 22 Aug 2012 09:57:39 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] tests: correct print_ver_ arguments
In-Reply-To: <503481E2.1020009@bernhard-voelker.de> (Bernhard Voelker's
	message of "Wed, 22 Aug 2012 08:53:22 +0200")
References: <503481E2.1020009@bernhard-voelker.de>
Date: Wed, 22 Aug 2012 09:57:39 +0200
Message-ID: <87393fgxzg.fsf@rho.meyering.net>
Lines: 53
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
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, 22 Aug 2012 07:57:47 -0000

Bernhard Voelker wrote:
> I noticed (too late) that the new tests/du/bind-mount-dir-cycle
> calls print_ver_ with rm as argument instead of du.
> A little script found other wrong uses, too.
...
> Subject: [PATCH] tests: correct print_ver_ arguments
>
> Some tests have been derived from other tests while
> the argument(s) to print_ver_ have not been adapted.
>
> The following snippet found the wrong ones:
>
>   grep print_ver_ $(git ls-files | grep  ^tests) \
>   | sed 's#:print_ver_##' \
>   | grep -v '\.log' \
>   | while read a b ; do
>       for i in $b ; do
>           grep -q "$i " $a ||
>           echo Test: $a, args: $b, offending: $i
>       done
>     done
>
> * tests/chown/basic: s/\(print_ver_\) chgrp/\1 chown/
> * tests/cp/cp-parents: s/(print_ver_\) mv/\1 cp/
> * tests/du/bind-mount-dir-cycle: s/(print_ver_\) rm/\1 du/
> * tests/misc/wc-parallel: s/(print_ver_\) md5sum/\1 wc/

Nice!
Thanks for doing that.

What do you think about adding a syntax-check to run that script?
Here's a variant of your script:

#!/bin/sh
git grep -w print_ver_ tests					\
  | sed 's#:print_ver_##'					\
  | while read file names; do					\
      for i in $names; do					\
        case $i in install) i=ginstall;; esac;			\
	grep -w "$i" $file|grep -vw print_ver_|grep -q .	\
	  || echo Test: $file, args: $names, offending: $i;	\
      done;							\
    done

That new version is slightly more efficient (no need for git ls-files)
and catches two more offenders by using the tighter grep -w and filtering
out print_ver_ lines:

    Test: tests/chown/basic, args: chgrp, offending: chgrp
    Test: tests/cp/acl, args: mv getfacl setfacl, offending: mv

It also handles the special case of install that we test via the
"ginstall" name.


From MAILER-DAEMON Wed Aug 22 05:42:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T47Si-0007ZA-PZ
	for mharc-coreutils@gnu.org; Wed, 22 Aug 2012 05:42:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55776)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T47Sb-0007TH-G8
	for coreutils@gnu.org; Wed, 22 Aug 2012 05:42:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T47SW-0005MH-6u
	for coreutils@gnu.org; Wed, 22 Aug 2012 05:42:49 -0400
Received: from moutng.kundenserver.de ([212.227.17.10]:65463)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T47SV-0005MD-Sd
	for coreutils@gnu.org; Wed, 22 Aug 2012 05:42:44 -0400
Received: from [192.168.2.108] (p4FF7283D.dip.t-dialin.net [79.247.40.61])
	by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis)
	id 0MCucZ-1Sw6z30lIB-009g9Y; Wed, 22 Aug 2012 11:42:42 +0200
Message-ID: <5034A991.90305@bernhard-voelker.de>
Date: Wed, 22 Aug 2012 11:42:41 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] tests: correct print_ver_ arguments
References: <503481E2.1020009@bernhard-voelker.de>
	<87393fgxzg.fsf@rho.meyering.net>
In-Reply-To: <87393fgxzg.fsf@rho.meyering.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:PxEfW883X3e7g4S8WfHzZlxuCuh2L3aq8zm1aBnIne8
	e94YRPSb7C7/r5rJqhUIKiV6GtF2/iOp+eLK+8IU9pYFRRF340
	Nuv3oDkYi5Q2tHrfX3XiQrt+QMRbA7lI1g4TwXIN32Igf2iHA1
	8tGB4jQkvv1UcvIQmeZ2s8xOmn/ueumOOJ7aRino3GQ1YVEbWV
	HUtkAErm1w1gKc1d0ze8n52Av7j1wmCOb8U8tOSliMMbq7+h7G
	XIbU9qaNJj7CVt2+wTvxFbzJJPw6R11842fVQSQZJMCFWoBmVQ
	h6BmnPbQMjV2Rk/EaFNyYd6+dTlUGmXCBfpeAaB9HjQuwwpD2r
	f3jonbmCugs3Op5wMaU/gbFxi4ZmisZfXKfM4KuPA
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 22 Aug 2012 09:42:54 -0000



On 08/22/2012 09:57 AM, Jim Meyering wrote:
> Bernhard Voelker wrote:

>> Subject: [PATCH] tests: correct print_ver_ arguments

> Nice!

Thanks.

> What do you think about adding a syntax-check to run that script?

Never done before, but below is what seems to work - together
with the 2 additional fixed tests.

Have a nice day,
Berny


>From ff7e6b4f805c1bfdbb7e050e60428347fea617b9 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Wed, 22 Aug 2012 11:39:16 +0200
Subject: [PATCH] tests: correct print_ver_ arguments and add a rule to
 enforce this

Some tests have been derived from other tests while
the argument(s) to print_ver_ have not been adapted.
Add a new cfg.mk rule to prohibit this.

* cfg.mk (sc_prohibit_test_calls_print_ver_with_irrelevant_argument):
New rule, to prohit test scripts calling print_env_ for programs not
actually being used during the test.
* tests/chown/basic: s/\(print_ver_\) chgrp/\1 chown/
* tests/cp/acl: s/\(print_ver_\) mv/\1 cp/
* tests/cp/capability: s/\(print_ver_\) ls/\1 cp/
* tests/cp/cp-parents: s/(print_ver_\) mv/\1 cp/
* tests/du/bind-mount-dir-cycle: s/(print_ver_\) rm/\1 du/
* tests/misc/wc-parallel: s/(print_ver_\) md5sum/\1 wc/
---
 cfg.mk                        |   16 ++++++++++++++++
 tests/chown/basic             |    2 +-
 tests/cp/acl                  |    2 +-
 tests/cp/capability           |    2 +-
 tests/cp/cp-parents           |    2 +-
 tests/du/bind-mount-dir-cycle |    2 +-
 tests/misc/wc-parallel        |    2 +-
 7 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 19a84fa..77f10df 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -329,6 +329,22 @@ sc_some_programs_must_avoid_exit_failure:
 	    && { echo '$(ME): do not use EXIT_FAILURE in the above'	\
 		  1>&2; exit 1; } || :

+# Ensure that tests call the print_ver_ function for programs which are
+# actually used in that test.
+sc_prohibit_test_calls_print_ver_with_irrelevant_argument:
+	@git grep -w print_ver_ tests					\
+	  | sed 's#:print_ver_##'					\
+	  | while read file name; do					\
+	      for i in $$name; do					\
+		case "$$i" in install) i=ginstall;; esac;		\
+		grep -w "$$i" $$file|grep -vw print_ver_|grep -q .	\
+		  || { echo "$(ME): do not call print_ver_ for programs"\
+			"not actually being used in this test";		\
+		       echo "Test: $$file, offending: $$i."		\
+		       1>&2; exit 1; }					\
+	      done;							\
+	    done
+
 # Exempt the contents of any usage function from the following.
 _continued_string_col_1 = \
 s/^usage .*?\n}//ms;/\\\n\w/ and print ("$$ARGV\n"),$$e=1;END{$$e||=0;exit $$e}
diff --git a/tests/chown/basic b/tests/chown/basic
index 7c8951c..6225400 100755
--- a/tests/chown/basic
+++ b/tests/chown/basic
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ chgrp
+print_ver_ chown
 require_root_

 touch f || framework_failure_
diff --git a/tests/cp/acl b/tests/cp/acl
index 26a7f42..4520fc9 100755
--- a/tests/cp/acl
+++ b/tests/cp/acl
@@ -18,7 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ mv getfacl setfacl
+print_ver_ cp getfacl setfacl

 require_acl_

diff --git a/tests/cp/capability b/tests/cp/capability
index 1338c94..94e5aea 100755
--- a/tests/cp/capability
+++ b/tests/cp/capability
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ ls
+print_ver_ cp
 require_root_
 working_umask_or_skip_

diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents
index b325c72..506e708 100755
--- a/tests/cp/cp-parents
+++ b/tests/cp/cp-parents
@@ -18,7 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ mv
+print_ver_ cp

 working_umask_or_skip_

diff --git a/tests/du/bind-mount-dir-cycle b/tests/du/bind-mount-dir-cycle
index 8f9e197..516ceae 100755
--- a/tests/du/bind-mount-dir-cycle
+++ b/tests/du/bind-mount-dir-cycle
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ rm
+print_ver_ du
 require_root_

 cleanup_()
diff --git a/tests/misc/wc-parallel b/tests/misc/wc-parallel
index 074160f..6611b47 100755
--- a/tests/misc/wc-parallel
+++ b/tests/misc/wc-parallel
@@ -18,7 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ md5sum
+print_ver_ wc

 (mkdir tmp && cd tmp && seq 2000 | xargs touch)

-- 
1.7.7



From MAILER-DAEMON Wed Aug 22 06:41:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T48NX-0004E5-T0
	for mharc-coreutils@gnu.org; Wed, 22 Aug 2012 06:41:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37315)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T48NP-0004Ds-TW
	for coreutils@gnu.org; Wed, 22 Aug 2012 06:41:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T48NK-0005sT-Tn
	for coreutils@gnu.org; Wed, 22 Aug 2012 06:41:31 -0400
Received: from mx.meyering.net ([88.168.87.75]:32999)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T48NK-0005sG-MJ
	for coreutils@gnu.org; Wed, 22 Aug 2012 06:41:26 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id E8FDF600A4;
	Wed, 22 Aug 2012 12:41:25 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] tests: correct print_ver_ arguments
In-Reply-To: <5034A991.90305@bernhard-voelker.de> (Bernhard Voelker's message
	of "Wed, 22 Aug 2012 11:42:41 +0200")
References: <503481E2.1020009@bernhard-voelker.de>
	<87393fgxzg.fsf@rho.meyering.net> <5034A991.90305@bernhard-voelker.de>
Date: Wed, 22 Aug 2012 12:41:25 +0200
Message-ID: <87ipcbfbu2.fsf@rho.meyering.net>
Lines: 78
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
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, 22 Aug 2012 10:41:38 -0000

Bernhard Voelker wrote:
> On 08/22/2012 09:57 AM, Jim Meyering wrote:
>> Bernhard Voelker wrote:
>
>>> Subject: [PATCH] tests: correct print_ver_ arguments
>
>> Nice!
>
> Thanks.
>
>> What do you think about adding a syntax-check to run that script?
>
> Never done before, but below is what seems to work - together
> with the 2 additional fixed tests.
>
> Have a nice day,
> Berny
>
>
>>From ff7e6b4f805c1bfdbb7e050e60428347fea617b9 Mon Sep 17 00:00:00 2001
> From: Bernhard Voelker <mail@bernhard-voelker.de>
> Date: Wed, 22 Aug 2012 11:39:16 +0200
> Subject: [PATCH] tests: correct print_ver_ arguments and add a rule to
>  enforce this
>
> Some tests have been derived from other tests while
> the argument(s) to print_ver_ have not been adapted.
> Add a new cfg.mk rule to prohibit this.
>
> * cfg.mk (sc_prohibit_test_calls_print_ver_with_irrelevant_argument):
> New rule, to prohit test scripts calling print_env_ for programs not
> actually being used during the test.
> * tests/chown/basic: s/\(print_ver_\) chgrp/\1 chown/
> * tests/cp/acl: s/\(print_ver_\) mv/\1 cp/
> * tests/cp/capability: s/\(print_ver_\) ls/\1 cp/
> * tests/cp/cp-parents: s/(print_ver_\) mv/\1 cp/
> * tests/du/bind-mount-dir-cycle: s/(print_ver_\) rm/\1 du/
> * tests/misc/wc-parallel: s/(print_ver_\) md5sum/\1 wc/
> ---
>  cfg.mk                        |   16 ++++++++++++++++
>  tests/chown/basic             |    2 +-
>  tests/cp/acl                  |    2 +-
>  tests/cp/capability           |    2 +-
>  tests/cp/cp-parents           |    2 +-
>  tests/du/bind-mount-dir-cycle |    2 +-
>  tests/misc/wc-parallel        |    2 +-
>  7 files changed, 22 insertions(+), 6 deletions(-)
>
> diff --git a/cfg.mk b/cfg.mk
> index 19a84fa..77f10df 100644
> --- a/cfg.mk
> +++ b/cfg.mk
> @@ -329,6 +329,22 @@ sc_some_programs_must_avoid_exit_failure:
>  	    && { echo '$(ME): do not use EXIT_FAILURE in the above'	\
>  		  1>&2; exit 1; } || :
>
> +# Ensure that tests call the print_ver_ function for programs which are
> +# actually used in that test.
> +sc_prohibit_test_calls_print_ver_with_irrelevant_argument:
> +	@git grep -w print_ver_ tests					\
> +	  | sed 's#:print_ver_##'					\
> +	  | while read file name; do					\
> +	      for i in $$name; do					\
> +		case "$$i" in install) i=ginstall;; esac;		\
> +		grep -w "$$i" $$file|grep -vw print_ver_|grep -q .	\
> +		  || { echo "$(ME): do not call print_ver_ for programs"\
> +			"not actually being used in this test";		\
> +		       echo "Test: $$file, offending: $$i."		\
> +		       1>&2; exit 1; }					\
> +	      done;							\
> +	    done

Thanks!
When there are two or more offending files, it would be nice
to report all of them before failing.  The above stops at the first.
Other tests set fail=0 before everything, set fail=1 when printing a
line, and print the "echo $(ME): ..." diagnostic at the end, referring
to "the above".


From MAILER-DAEMON Wed Aug 22 09:09:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4AgO-0001M0-AX
	for mharc-coreutils@gnu.org; Wed, 22 Aug 2012 09:09:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47141)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T4AgH-0001Hw-SS
	for coreutils@gnu.org; Wed, 22 Aug 2012 09:09:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T4AgC-0003vb-Bv
	for coreutils@gnu.org; Wed, 22 Aug 2012 09:09:09 -0400
Received: from moutng.kundenserver.de ([212.227.126.187]:61431)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T4AgC-0003vM-16
	for coreutils@gnu.org; Wed, 22 Aug 2012 09:09:04 -0400
Received: from [192.168.2.108] (p4FF7283D.dip.t-dialin.net [79.247.40.61])
	by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis)
	id 0MZwSd-1TNcfZ0VeZ-00LIWL; Wed, 22 Aug 2012 15:09:02 +0200
Message-ID: <5034D9ED.9090000@bernhard-voelker.de>
Date: Wed, 22 Aug 2012 15:09:01 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] tests: correct print_ver_ arguments
References: <503481E2.1020009@bernhard-voelker.de>
	<87393fgxzg.fsf@rho.meyering.net>
	<5034A991.90305@bernhard-voelker.de>
	<87ipcbfbu2.fsf@rho.meyering.net>
In-Reply-To: <87ipcbfbu2.fsf@rho.meyering.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:aKPY6KdyXztNFxCmlrNN8ExpjuWLLVHiSbO8U/lv0o6
	2fIVZ3wJYuGdxzKNjg8FcheHcYDJ97nqGsEUsS5Zq9IYx1xzLQ
	4RbM5xLjPSVML72Ur4oWdNJoCsKGRCI34jQucr4X10XwAQkcE9
	NZCbPd4GQPjzfXSgmWlPWf3VuBgkUguPp6q848M7ZnbHQc/Zk5
	B7MJIX0FVQ02Mqe7w9YohvTm7hMyDIksYcASDwpKG8fs7U/BrB
	+Nm0EB/IYakhBH00C+bBr0cpcDrldY4WIsGc12EGn+2WKoMO7k
	t7TNQK2uNEHcURg+0F5q9XXvuPF8lG/zxxanMbdhkQ1GgEUFGr
	mJyQIREhuhrv7CGizSB/kaxykKu+ZdkkwfmRekUL9
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.126.187
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, 22 Aug 2012 13:09:15 -0000


On 08/22/2012 12:41 PM, Jim Meyering wrote:
> Thanks!
> When there are two or more offending files, it would be nice
> to report all of them before failing.  The above stops at the first.

Yes, alright. Here comes the amended version.

Have a nice day,
Berny

>From ee25eb729ce153fd64a09cfcff06b956e544d704 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Wed, 22 Aug 2012 15:04:04 +0200
Subject: [PATCH] tests: correct print_ver_ arguments and add a rule to
 enforce this

Some tests have been derived from other tests while
the argument(s) to print_ver_ have not been adapted.
Add a new cfg.mk rule to prohibit this.

* cfg.mk (sc_prohibit_test_calls_print_ver_with_irrelevant_argument):
New rule, to prohit test scripts calling print_env_ for programs not
actually being used during the test.
* tests/chown/basic: s/\(print_ver_\) chgrp/\1 chown/
* tests/cp/acl: s/\(print_ver_\) mv/\1 cp/
* tests/cp/capability: s/\(print_ver_\) ls/\1 cp/
* tests/cp/cp-parents: s/(print_ver_\) mv/\1 cp/
* tests/du/bind-mount-dir-cycle: s/(print_ver_\) rm/\1 du/
* tests/misc/wc-parallel: s/(print_ver_\) md5sum/\1 wc/
---
 cfg.mk                        |   18 ++++++++++++++++++
 tests/chown/basic             |    2 +-
 tests/cp/acl                  |    2 +-
 tests/cp/capability           |    2 +-
 tests/cp/cp-parents           |    2 +-
 tests/du/bind-mount-dir-cycle |    2 +-
 tests/misc/wc-parallel        |    2 +-
 7 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 19a84fa..3c4ee61 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -329,6 +329,24 @@ sc_some_programs_must_avoid_exit_failure:
 	    && { echo '$(ME): do not use EXIT_FAILURE in the above'	\
 		  1>&2; exit 1; } || :

+# Ensure that tests call the print_ver_ function for programs which are
+# actually used in that test.
+sc_prohibit_test_calls_print_ver_with_irrelevant_argument:
+	@git grep -w print_ver_ tests					\
+	  | sed 's#:print_ver_##'					\
+	  | { fail=0;							\
+	      while read file name; do					\
+		for i in $$name; do					\
+		  case "$$i" in install) i=ginstall;; esac;		\
+		  grep -w "$$i" $$file|grep -vw print_ver_|grep -q .	\
+		    || { fail=1;					\
+		         echo "*** Test: $$file, offending: $$i." 1>&2; };\
+		done;							\
+	      done;							\
+	      test $$fail = 0 || exit 1;				\
+	    } || { echo "$(ME): the above test(s) call print_ver_ for"	\
+		    "program(s) they don't use" 1>&2; exit 1; }
+
 # Exempt the contents of any usage function from the following.
 _continued_string_col_1 = \
 s/^usage .*?\n}//ms;/\\\n\w/ and print ("$$ARGV\n"),$$e=1;END{$$e||=0;exit $$e}
diff --git a/tests/chown/basic b/tests/chown/basic
index 7c8951c..6225400 100755
--- a/tests/chown/basic
+++ b/tests/chown/basic
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ chgrp
+print_ver_ chown
 require_root_

 touch f || framework_failure_
diff --git a/tests/cp/acl b/tests/cp/acl
index 26a7f42..4520fc9 100755
--- a/tests/cp/acl
+++ b/tests/cp/acl
@@ -18,7 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ mv getfacl setfacl
+print_ver_ cp getfacl setfacl

 require_acl_

diff --git a/tests/cp/capability b/tests/cp/capability
index 1338c94..94e5aea 100755
--- a/tests/cp/capability
+++ b/tests/cp/capability
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ ls
+print_ver_ cp
 require_root_
 working_umask_or_skip_

diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents
index b325c72..506e708 100755
--- a/tests/cp/cp-parents
+++ b/tests/cp/cp-parents
@@ -18,7 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ mv
+print_ver_ cp

 working_umask_or_skip_

diff --git a/tests/du/bind-mount-dir-cycle b/tests/du/bind-mount-dir-cycle
index 8f9e197..516ceae 100755
--- a/tests/du/bind-mount-dir-cycle
+++ b/tests/du/bind-mount-dir-cycle
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ rm
+print_ver_ du
 require_root_

 cleanup_()
diff --git a/tests/misc/wc-parallel b/tests/misc/wc-parallel
index 074160f..6611b47 100755
--- a/tests/misc/wc-parallel
+++ b/tests/misc/wc-parallel
@@ -18,7 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 . "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ md5sum
+print_ver_ wc

 (mkdir tmp && cd tmp && seq 2000 | xargs touch)

-- 
1.7.7



From MAILER-DAEMON Wed Aug 22 10:00:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4BUB-00009C-0N
	for mharc-coreutils@gnu.org; Wed, 22 Aug 2012 10:00:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54823)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T4BU4-00006D-NF
	for coreutils@gnu.org; Wed, 22 Aug 2012 10:00:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T4BTx-0005pU-Kt
	for coreutils@gnu.org; Wed, 22 Aug 2012 10:00:36 -0400
Received: from mx1.redhat.com ([209.132.183.28]:18475)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T4BTx-0005hJ-C9
	for coreutils@gnu.org; Wed, 22 Aug 2012 10:00:29 -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 q7ME0JJ4030238
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 22 Aug 2012 10:00:19 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7ME0FnP004042
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Wed, 22 Aug 2012 10:00:17 -0400
Message-ID: <5034E5EF.3060500@redhat.com>
Date: Wed, 22 Aug 2012 16:00:15 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: RFE: hash-type in sum utils
References: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
In-Reply-To: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, 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, 22 Aug 2012 14:00:41 -0000

Hi, I haven't heard from this thread since I posted the last patch,
are there still things to correct or should I consider it closed?
Cheers,
  Ondrej.


From MAILER-DAEMON Wed Aug 22 11:01:51 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4CRL-0004hf-AH
	for mharc-coreutils@gnu.org; Wed, 22 Aug 2012 11:01:51 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55632)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T4CRF-0004Q5-0I
	for coreutils@gnu.org; Wed, 22 Aug 2012 11:01:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T4CR9-0003lH-7C
	for coreutils@gnu.org; Wed, 22 Aug 2012 11:01:44 -0400
Received: from mx.meyering.net ([88.168.87.75]:33717)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T4CR8-0003l2-VT
	for coreutils@gnu.org; Wed, 22 Aug 2012 11:01:39 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 58D7A601D2;
	Wed, 22 Aug 2012 17:01:37 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: RFE: hash-type in sum utils
In-Reply-To: <5034E5EF.3060500@redhat.com> (Ondrej Oprala's message of "Wed,
	22 Aug 2012 16:00:15 +0200")
References: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
	<5034E5EF.3060500@redhat.com>
Date: Wed, 22 Aug 2012 17:01:37 +0200
Message-ID: <87k3wrdl7y.fsf@rho.meyering.net>
Lines: 31
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, 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, 22 Aug 2012 15:01:49 -0000

Ondrej Oprala wrote:
> Hi, I haven't heard from this thread since I posted the last patch,
> are there still things to correct or should I consider it closed?

There are still things to fix.
For example, in your new test,

  +for i in 'a\b' 'a\' a$'\n'b a$'\t'b; do
  +  :> "$i"
  +  md5sum --tag "$i" >> check.md5sum
  +done

The uses of $'\n' and $'\t' are not portable.
Use something like this instead:

===============================================
nl='
'
tab='	'

for i in 'a\b' 'a\' "a${nl}b" "a${tab}b"; do
...
===============================================

Also, please include some literal expected output to
show how escaping makes a difference in the output format.
Of course, you will use the usual "compare out exp || fail=1"
to verify that actual and expected are the same.

IMHO, the manual entry would be better with two
simple examples that demonstrate the new output format.


From MAILER-DAEMON Wed Aug 22 11:05:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4CUX-0004zb-3d
	for mharc-coreutils@gnu.org; Wed, 22 Aug 2012 11:05:09 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43013)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T4CUR-0004vE-EF
	for coreutils@gnu.org; Wed, 22 Aug 2012 11:05:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T4CUL-0004Jr-2p
	for coreutils@gnu.org; Wed, 22 Aug 2012 11:05:03 -0400
Received: from mx.meyering.net ([88.168.87.75]:33735)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T4CUK-0004Jm-RV
	for coreutils@gnu.org; Wed, 22 Aug 2012 11:04:57 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 58D7B600BC;
	Wed, 22 Aug 2012 17:04:55 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH] tests: correct print_ver_ arguments
In-Reply-To: <5034D9ED.9090000@bernhard-voelker.de> (Bernhard Voelker's
	message of "Wed, 22 Aug 2012 15:09:01 +0200")
References: <503481E2.1020009@bernhard-voelker.de>
	<87393fgxzg.fsf@rho.meyering.net> <5034A991.90305@bernhard-voelker.de>
	<87ipcbfbu2.fsf@rho.meyering.net>
	<5034D9ED.9090000@bernhard-voelker.de>
Date: Wed, 22 Aug 2012 17:04:55 +0200
Message-ID: <87ehmzdl2g.fsf@rho.meyering.net>
Lines: 16
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
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, 22 Aug 2012 15:05:07 -0000

Bernhard Voelker wrote:
> On 08/22/2012 12:41 PM, Jim Meyering wrote:
>> Thanks!
>> When there are two or more offending files, it would be nice
>> to report all of them before failing.  The above stops at the first.
>
> Yes, alright. Here comes the amended version.
...
> Subject: [PATCH] tests: correct print_ver_ arguments and add a rule to
>  enforce this
>
> Some tests have been derived from other tests while
> the argument(s) to print_ver_ have not been adapted.
> Add a new cfg.mk rule to prohibit this.

Pushed.  Thanks.


From MAILER-DAEMON Wed Aug 22 12:05:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4DR1-00060b-Ra
	for mharc-coreutils@gnu.org; Wed, 22 Aug 2012 12:05:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44415)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4DQu-0005za-C1
	for coreutils@gnu.org; Wed, 22 Aug 2012 12:05:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4DQq-0007yz-EW
	for coreutils@gnu.org; Wed, 22 Aug 2012 12:05:28 -0400
Received: from mx1.redhat.com ([209.132.183.28]:33282)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4DQq-0007wf-6n
	for coreutils@gnu.org; Wed, 22 Aug 2012 12:05:24 -0400
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 q7MG5LvZ007355
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 22 Aug 2012 12:05:21 -0400
Received: from [10.36.116.69] (ovpn-116-69.ams2.redhat.com [10.36.116.69])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q7MG5HGY022703
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 22 Aug 2012 12:05:19 -0400
Message-ID: <5035033C.6080204@draigBrady.com>
Date: Wed, 22 Aug 2012 17:05:16 +0100
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: RFE: hash-type in sum utils
References: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
	<5034E5EF.3060500@redhat.com>
In-Reply-To: <5034E5EF.3060500@redhat.com>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=UTF-8
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
	q7MG5LvZ007355
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, 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, 22 Aug 2012 16:05:34 -0000

On 08/22/2012 03:00 PM, Ondrej Oprala wrote:
> Hi, I haven't heard from this thread since I posted the last patch,
> are there still things to correct or should I consider it closed?

The --tag description in the texinfo is a bit sparse.  It says:

"If the file is not binary, put a leading whitespace before the algorithm=
's name."

More accurately it could say:

"When operating in @option{--text} mode, put a leading space before the a=
lgorithm's name.
On @option{--text} mode significant systems, this enables compatibility w=
ith existing
BSD (binary) checksums, while also allowing operating in @option{--text} =
mode".

It's worth considering though, do we want to support --text mode
at all with --tag?  I.E. we could avoid the default leading space,
and have --tag imply --binary and be mutually exclusive with --text?

On the other hand, having distinguished text/binary modes,
does allow you to portably verify arbitrary terminal input
in a concise way like:

  md5sum -c <(echo ' MD5 (-) =3D c0710d6b4f15dfa88f600b0e6b624077') &&
    echo "input matched"

The tag is a bit redundant in this use case though since
an explicit util would be used.

I'm 60:40 for having --tag imply --binary given the above.

cheers,
P=C3=A1draig.


From MAILER-DAEMON Wed Aug 22 12:35:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4Du1-0006sv-QU
	for mharc-coreutils@gnu.org; Wed, 22 Aug 2012 12:35:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41907)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T4Dtw-0006rd-Nh
	for coreutils@gnu.org; Wed, 22 Aug 2012 12:35:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T4Dts-0002Ul-FD
	for coreutils@gnu.org; Wed, 22 Aug 2012 12:35:28 -0400
Received: from mx1.redhat.com ([209.132.183.28]:18570)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T4Dts-0002Su-6O
	for coreutils@gnu.org; Wed, 22 Aug 2012 12:35:24 -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 q7MGZKtB010564
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 22 Aug 2012 12:35:20 -0400
Received: from [10.3.113.100] (ovpn-113-100.phx2.redhat.com [10.3.113.100])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7MGZIB5014380; Wed, 22 Aug 2012 12:35:18 -0400
Message-ID: <50350A45.8020706@redhat.com>
Date: Wed, 22 Aug 2012 10:35:17 -0600
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
Subject: Re: RFE: hash-type in sum utils
References: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
	<5034E5EF.3060500@redhat.com> <5035033C.6080204@draigBrady.com>
In-Reply-To: <5035033C.6080204@draigBrady.com>
X-Enigmail-Version: 1.4.3
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig6CAE75B1923E27A397D44B33"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, coreutils@gnu.org,
	Ondrej Oprala <ooprala@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, 22 Aug 2012 16:35:32 -0000

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

On 08/22/2012 10:05 AM, P=C3=A1draig Brady wrote:
> On 08/22/2012 03:00 PM, Ondrej Oprala wrote:
>> Hi, I haven't heard from this thread since I posted the last patch,
>> are there still things to correct or should I consider it closed?
>=20
> The --tag description in the texinfo is a bit sparse.  It says:
>=20
> "If the file is not binary, put a leading whitespace before the algorit=
hm's name."
>=20
> More accurately it could say:
>=20
> "When operating in @option{--text} mode, put a leading space before the=
 algorithm's name.
> On @option{--text} mode significant systems, this enables compatibility=
 with existing
> BSD (binary) checksums, while also allowing operating in @option{--text=
} mode".
>=20
> It's worth considering though, do we want to support --text mode
> at all with --tag?  I.E. we could avoid the default leading space,
> and have --tag imply --binary and be mutually exclusive with --text?

I'm fine with --tag implying --binary.  --text mode is almost always the
wrong thing to use, and it should have never been the default on
text-mode systems, nor should it be the default output (we're stuck with
that for normal output, where the presence of '*' to indicate binary
output, but only from systems where text mode differs, causes no end of
grief; but for BSD output we don't have to repeat the mistake).

>=20
> I'm 60:40 for having --tag imply --binary given the above.

I'm 90:10 for having --tag imply --binary.

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


--------------enig6CAE75B1923E27A397D44B33
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://enigmail.mozdev.org/

iQEcBAEBCAAGBQJQNQpGAAoJEKeha0olJ0NqeH8IAIrAthcEpb6J942ztBY8vUG4
1k29fcpgRuolPaW3sxkgu7bxmnrNPoB1keDjkF0BF5FyhC29VMY4Q4Vsac9P54oG
Ue6VMwfl4hyEmA+hqiCEF+t+CF2lfT7tGqB7RAy5niuHZGC7XBE1kUMyqqo9tGE/
qC9flBt01XCxBWuLWEqj2d+4fbrsEQ4B2ucuwqRDM0wQvw8xz/yoE9hXaXcm3KZ8
sTGxG4etnsMzCCziQqms/fcAuiG9vT9eWNPJzqWikfhiccL/Gebo7DAG442vZ/Mu
8VHnB1KHSdH5IY+d4iftBKkcski9KyqShVX0yUc1Yi+xQHTqtjPipxJedDPOHeg=
=9wXs
-----END PGP SIGNATURE-----

--------------enig6CAE75B1923E27A397D44B33--


From MAILER-DAEMON Wed Aug 22 12:38:11 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4DwZ-0007oG-U8
	for mharc-coreutils@gnu.org; Wed, 22 Aug 2012 12:38:11 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43374)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T4DwX-0007o8-Fa
	for coreutils@gnu.org; Wed, 22 Aug 2012 12:38:10 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T4DwW-0003Wd-2h
	for coreutils@gnu.org; Wed, 22 Aug 2012 12:38:09 -0400
Received: from mx.meyering.net ([88.168.87.75]:33991)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T4DwV-0003WP-RA
	for coreutils@gnu.org; Wed, 22 Aug 2012 12:38:07 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id DDB6860115;
	Wed, 22 Aug 2012 18:38:06 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Eric Blake <eblake@redhat.com>
Subject: Re: RFE: hash-type in sum utils
In-Reply-To: <50350A45.8020706@redhat.com> (Eric Blake's message of "Wed, 22
	Aug 2012 10:35:17 -0600")
References: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
	<5034E5EF.3060500@redhat.com> <5035033C.6080204@draigBrady.com>
	<50350A45.8020706@redhat.com>
Date: Wed, 22 Aug 2012 18:38:06 +0200
Message-ID: <87628aevbl.fsf@rho.meyering.net>
Lines: 36
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: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, coreutils@gnu.org,
	Ondrej Oprala <ooprala@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, 22 Aug 2012 16:38:10 -0000

Eric Blake wrote:
> On 08/22/2012 10:05 AM, P=E1draig Brady wrote:
>> On 08/22/2012 03:00 PM, Ondrej Oprala wrote:
>>> Hi, I haven't heard from this thread since I posted the last patch,
>>> are there still things to correct or should I consider it closed?
>>
>> The --tag description in the texinfo is a bit sparse.  It says:
>>
>> "If the file is not binary, put a leading whitespace before the
>> algorithm's name."
>>
>> More accurately it could say:
>>
>> "When operating in @option{--text} mode, put a leading space before
>> the algorithm's name.
>> On @option{--text} mode significant systems, this enables
>> compatibility with existing
>> BSD (binary) checksums, while also allowing operating in @option{--text}=
 mode".
>>
>> It's worth considering though, do we want to support --text mode
>> at all with --tag?  I.E. we could avoid the default leading space,
>> and have --tag imply --binary and be mutually exclusive with --text?
>
> I'm fine with --tag implying --binary.  --text mode is almost always the
> wrong thing to use, and it should have never been the default on
> text-mode systems, nor should it be the default output (we're stuck with
> that for normal output, where the presence of '*' to indicate binary
> output, but only from systems where text mode differs, causes no end of
> grief; but for BSD output we don't have to repeat the mistake).
>
>>
>> I'm 60:40 for having --tag imply --binary given the above.
>
> I'm 90:10 for having --tag imply --binary.

I agree wholeheartedly.  Simpler is better.


From MAILER-DAEMON Wed Aug 22 16:53:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4HvA-0006lN-Jc
	for mharc-coreutils@gnu.org; Wed, 22 Aug 2012 16:53:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48791)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gcgcg-coreutils@m.gmane.org>) id 1T4HU9-0001dS-5Q
	for coreutils@gnu.org; Wed, 22 Aug 2012 16:25:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gcgcg-coreutils@m.gmane.org>) id 1T4HU8-0003ug-1s
	for coreutils@gnu.org; Wed, 22 Aug 2012 16:25:05 -0400
Received: from plane.gmane.org ([80.91.229.3]:36426)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gcgcg-coreutils@m.gmane.org>) id 1T4HU7-0003rY-Rj
	for coreutils@gnu.org; Wed, 22 Aug 2012 16:25:03 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gcgcg-coreutils@m.gmane.org>) id 1T4HU7-00046k-F8
	for coreutils@gnu.org; Wed, 22 Aug 2012 22:25:03 +0200
Received: from cl-pat-tr.clearspring.com ([8.18.54.254])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <coreutils@gnu.org>; Wed, 22 Aug 2012 22:25:03 +0200
Received: from sds by cl-pat-tr.clearspring.com with local (Gmexim 0.1
	(Debian)) id 1AlnuQ-0007hv-00
	for <coreutils@gnu.org>; Wed, 22 Aug 2012 22:25:03 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: coreutils@gnu.org
From: Sam Steingold <sds@gnu.org>
Subject: comm: use numeric sort (optionally)
Date: Wed, 22 Aug 2012 16:17:08 -0400
Organization: disorganization
Lines: 10
Message-ID: <87sjbeisvv.fsf@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: cl-pat-tr.clearspring.com
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)
X-Attribution: Sam
X-Disclaimer: You should not expect anyone to agree with me.
Cancel-Lock: sha1:zwTyFfadmgegYW1irv4BnL6qp90=
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 80.91.229.3
X-Mailman-Approved-At: Wed, 22 Aug 2012 16:52:59 -0400
X-BeenThere: coreutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: sds@gnu.org
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, 22 Aug 2012 20:25:06 -0000

Hi,
I have a file of numbers (integers IDs) which are sorted numerically,
but comm complains that they are not.
I suggest that comm accept "-n" option (like sort) to use numeric sort.
Thanks.
-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://pmw.org.il http://truepeace.org
http://ffii.org http://www.memritv.org http://camera.org
Isn't "Microsoft Works" an advertisement lie?



From MAILER-DAEMON Wed Aug 22 18:01:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4IzF-00055N-Lf
	for mharc-coreutils@gnu.org; Wed, 22 Aug 2012 18:01:17 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41554)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4Iz9-00055E-W4
	for coreutils@gnu.org; Wed, 22 Aug 2012 18:01:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4Iz6-0003ZS-0h
	for coreutils@gnu.org; Wed, 22 Aug 2012 18:01:11 -0400
Received: from mx1.redhat.com ([209.132.183.28]:18517)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>)
	id 1T4Iyx-0003PO-RB; Wed, 22 Aug 2012 18:00: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 q7MM0uKK027992
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 22 Aug 2012 18:00:56 -0400
Received: from [10.36.116.69] (ovpn-116-69.ams2.redhat.com [10.36.116.69])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q7MM0rM8004906
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 22 Aug 2012 18:00:55 -0400
Message-ID: <50355695.2030201@draigBrady.com>
Date: Wed, 22 Aug 2012 23:00:53 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: sds@gnu.org
Subject: Re: comm: use numeric sort (optionally)
References: <87sjbeisvv.fsf@gnu.org>
In-Reply-To: <87sjbeisvv.fsf@gnu.org>
X-Enigmail-Version: 1.3.2
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
	q7MM0uKK027992
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: coreutils@gnu.org, 6366@debbugs.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, 22 Aug 2012 22:01:16 -0000

unarchive 6366
stop

On 08/22/2012 09:17 PM, Sam Steingold wrote:
> Hi,
> I have a file of numbers (integers IDs) which are sorted numerically,
> but comm complains that they are not.
> I suggest that comm accept "-n" option (like sort) to use numeric sort.
> Thanks.

Yes.
comm, join, uniq really should support the same field selection
and comparision flags as sort.

There are already bugs for that:
http://bugs.gnu.org/5832
http://bugs.gnu.org/6366

For reference, the following examples show
expected an unexpected behavior respectively:

$ comm --nocheck <(printf "%s\n" a b c j k) <(printf "%s\n" a b d e j)
		a
		b
c
	d
	e
		j
k

$ comm --nocheck <(printf "%s\n" 1 2 3 10 11) <(printf "%s\n" 1 2 5 6 10)
		1
		2
3
10
11
	5
	6
	10

cheers,
P=E1draig.


From MAILER-DAEMON Thu Aug 23 03:55:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4SGU-0005VD-Tq
	for mharc-coreutils@gnu.org; Thu, 23 Aug 2012 03:55:42 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46853)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T4SGS-0005Us-M9
	for coreutils@gnu.org; Thu, 23 Aug 2012 03:55:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T4SGR-0001rQ-Lj
	for coreutils@gnu.org; Thu, 23 Aug 2012 03:55:40 -0400
Received: from mx1.redhat.com ([209.132.183.28]:1899)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T4SGR-0001rA-DW
	for coreutils@gnu.org; Thu, 23 Aug 2012 03:55:39 -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 q7N7tbWq017253
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 23 Aug 2012 03:55:37 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q7N7tY67021910
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 23 Aug 2012 03:55:35 -0400
Message-ID: <5035E1F5.9050106@redhat.com>
Date: Thu, 23 Aug 2012 09:55:33 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: RFE: hash-type in sum utils
References: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
	<5034E5EF.3060500@redhat.com> <5035033C.6080204@draigBrady.com>
	<50350A45.8020706@redhat.com> <87628aevbl.fsf@rho.meyering.net>
In-Reply-To: <87628aevbl.fsf@rho.meyering.net>
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
	q7N7tbWq017253
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, 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, 23 Aug 2012 07:55:41 -0000

On 08/22/2012 06:38 PM, Jim Meyering wrote:
> Eric Blake wrote:
>> On 08/22/2012 10:05 AM, P=E1draig Brady wrote:
>>> On 08/22/2012 03:00 PM, Ondrej Oprala wrote:
>>>> Hi, I haven't heard from this thread since I posted the last patch,
>>>> are there still things to correct or should I consider it closed?
>>> The --tag description in the texinfo is a bit sparse.  It says:
>>>
>>> "If the file is not binary, put a leading whitespace before the
>>> algorithm's name."
>>>
>>> More accurately it could say:
>>>
>>> "When operating in @option{--text} mode, put a leading space before
>>> the algorithm's name.
>>> On @option{--text} mode significant systems, this enables
>>> compatibility with existing
>>> BSD (binary) checksums, while also allowing operating in @option{--te=
xt} mode".
>>>
>>> It's worth considering though, do we want to support --text mode
>>> at all with --tag?  I.E. we could avoid the default leading space,
>>> and have --tag imply --binary and be mutually exclusive with --text?
>> I'm fine with --tag implying --binary.  --text mode is almost always t=
he
>> wrong thing to use, and it should have never been the default on
>> text-mode systems, nor should it be the default output (we're stuck wi=
th
>> that for normal output, where the presence of '*' to indicate binary
>> output, but only from systems where text mode differs, causes no end o=
f
>> grief; but for BSD output we don't have to repeat the mistake).
>>
>>> I'm 60:40 for having --tag imply --binary given the above.
>> I'm 90:10 for having --tag imply --binary.
> I agree wholeheartedly.  Simpler is better.
>
Ok, I'm almost done with the changes, I just have one question.
What should the sum utils do if they get --tag --text as arguments?
Would it be possible to add BOOL TEXT and end with an error
if(text && prefix_tag) ?


From MAILER-DAEMON Thu Aug 23 04:37:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4SuZ-0005tm-Nr
	for mharc-coreutils@gnu.org; Thu, 23 Aug 2012 04:37:07 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50007)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4SuU-0005qQ-4A
	for coreutils@gnu.org; Thu, 23 Aug 2012 04:37:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4SuP-0006wE-UQ
	for coreutils@gnu.org; Thu, 23 Aug 2012 04:37:02 -0400
Received: from mx1.redhat.com ([209.132.183.28]:7951)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4SuN-0006va-N9
	for coreutils@gnu.org; Thu, 23 Aug 2012 04:36:57 -0400
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 q7N8aWpg029607
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 23 Aug 2012 04:36:42 -0400
Received: from [10.36.116.65] (ovpn-116-65.ams2.redhat.com [10.36.116.65])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q7N8aSVP030213
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 23 Aug 2012 04:36:30 -0400
Message-ID: <5035EB8C.1040507@draigBrady.com>
Date: Thu, 23 Aug 2012 09:36:28 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: RFE: hash-type in sum utils
References: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
	<5034E5EF.3060500@redhat.com> <5035033C.6080204@draigBrady.com>
	<50350A45.8020706@redhat.com> <87628aevbl.fsf@rho.meyering.net>
	<5035E1F5.9050106@redhat.com>
In-Reply-To: <5035E1F5.9050106@redhat.com>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
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
	q7N8aWpg029607
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, 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, 23 Aug 2012 08:37:06 -0000

On 08/23/2012 08:55 AM, Ondrej Oprala wrote:
> On 08/22/2012 06:38 PM, Jim Meyering wrote:
>> Eric Blake wrote:
>>> On 08/22/2012 10:05 AM, P=E1draig Brady wrote:
>>>> On 08/22/2012 03:00 PM, Ondrej Oprala wrote:
>>>>> Hi, I haven't heard from this thread since I posted the last patch,
>>>>> are there still things to correct or should I consider it closed?
>>>> The --tag description in the texinfo is a bit sparse.  It says:
>>>>
>>>> "If the file is not binary, put a leading whitespace before the
>>>> algorithm's name."
>>>>
>>>> More accurately it could say:
>>>>
>>>> "When operating in @option{--text} mode, put a leading space before
>>>> the algorithm's name.
>>>> On @option{--text} mode significant systems, this enables
>>>> compatibility with existing
>>>> BSD (binary) checksums, while also allowing operating in @option{--t=
ext} mode".
>>>>
>>>> It's worth considering though, do we want to support --text mode
>>>> at all with --tag?  I.E. we could avoid the default leading space,
>>>> and have --tag imply --binary and be mutually exclusive with --text?
>>> I'm fine with --tag implying --binary.  --text mode is almost always =
the
>>> wrong thing to use, and it should have never been the default on
>>> text-mode systems, nor should it be the default output (we're stuck w=
ith
>>> that for normal output, where the presence of '*' to indicate binary
>>> output, but only from systems where text mode differs, causes no end =
of
>>> grief; but for BSD output we don't have to repeat the mistake).
>>>
>>>> I'm 60:40 for having --tag imply --binary given the above.
>>> I'm 90:10 for having --tag imply --binary.
>> I agree wholeheartedly.  Simpler is better.
>>
> Ok, I'm almost done with the changes, I just have one question.
> What should the sum utils do if they get --tag --text as arguments?
> Would it be possible to add BOOL TEXT and end with an error
> if(text && prefix_tag) ?

Yes, if both are specified it should do something like:

if (prefix_tag && text)
  {
    /* This could be supported in a backwards compatible way
       by prefixing the output line with a space in text mode.
       However that's invasive enough that it was agreed to
       not support this mode with --tag, as --text use cases
       are adequately supported by the default output format.  */
    error(0, 0, _("--tag does not support --text mode"));
    usage (EXIT_FAILURE);
  }

thanks!
P=E1draig.


From MAILER-DAEMON Thu Aug 23 05:06:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4TNF-0002AS-99
	for mharc-coreutils@gnu.org; Thu, 23 Aug 2012 05:06:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49558)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T4TNB-0002AM-Pm
	for coreutils@gnu.org; Thu, 23 Aug 2012 05:06:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T4TN9-0006rH-R2
	for coreutils@gnu.org; Thu, 23 Aug 2012 05:06:41 -0400
Received: from mx1.redhat.com ([209.132.183.28]:17464)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T4TN9-0006rB-G1
	for coreutils@gnu.org; Thu, 23 Aug 2012 05:06:39 -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 q7N96ZJZ005340
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 23 Aug 2012 05:06:36 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7N96Ue1001649
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Thu, 23 Aug 2012 05:06:32 -0400
Message-ID: <5035F296.10805@redhat.com>
Date: Thu, 23 Aug 2012 11:06:30 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
Subject: Re: RFE: hash-type in sum utils
References: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
	<5034E5EF.3060500@redhat.com> <5035033C.6080204@draigBrady.com>
	<50350A45.8020706@redhat.com> <87628aevbl.fsf@rho.meyering.net>
	<5035E1F5.9050106@redhat.com> <5035EB8C.1040507@draigBrady.com>
In-Reply-To: <5035EB8C.1040507@draigBrady.com>
Content-Type: multipart/mixed; boundary="------------000606050208020500040306"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, 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, 23 Aug 2012 09:06:43 -0000

This is a multi-part message in MIME format.
--------------000606050208020500040306
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 q7N96ZJZ005340

On 08/23/2012 10:36 AM, P=E1draig Brady wrote:
> On 08/23/2012 08:55 AM, Ondrej Oprala wrote:
>> On 08/22/2012 06:38 PM, Jim Meyering wrote:
>>> Eric Blake wrote:
>>>> On 08/22/2012 10:05 AM, P=E1draig Brady wrote:
>>>>> On 08/22/2012 03:00 PM, Ondrej Oprala wrote:
>>>>>> Hi, I haven't heard from this thread since I posted the last patch=
,
>>>>>> are there still things to correct or should I consider it closed?
>>>>> The --tag description in the texinfo is a bit sparse.  It says:
>>>>>
>>>>> "If the file is not binary, put a leading whitespace before the
>>>>> algorithm's name."
>>>>>
>>>>> More accurately it could say:
>>>>>
>>>>> "When operating in @option{--text} mode, put a leading space before
>>>>> the algorithm's name.
>>>>> On @option{--text} mode significant systems, this enables
>>>>> compatibility with existing
>>>>> BSD (binary) checksums, while also allowing operating in @option{--=
text} mode".
>>>>>
>>>>> It's worth considering though, do we want to support --text mode
>>>>> at all with --tag?  I.E. we could avoid the default leading space,
>>>>> and have --tag imply --binary and be mutually exclusive with --text=
?
>>>> I'm fine with --tag implying --binary.  --text mode is almost always=
 the
>>>> wrong thing to use, and it should have never been the default on
>>>> text-mode systems, nor should it be the default output (we're stuck =
with
>>>> that for normal output, where the presence of '*' to indicate binary
>>>> output, but only from systems where text mode differs, causes no end=
 of
>>>> grief; but for BSD output we don't have to repeat the mistake).
>>>>
>>>>> I'm 60:40 for having --tag imply --binary given the above.
>>>> I'm 90:10 for having --tag imply --binary.
>>> I agree wholeheartedly.  Simpler is better.
>>>
>> Ok, I'm almost done with the changes, I just have one question.
>> What should the sum utils do if they get --tag --text as arguments?
>> Would it be possible to add BOOL TEXT and end with an error
>> if(text && prefix_tag) ?
> Yes, if both are specified it should do something like:
>
> if (prefix_tag && text)
>    {
>      /* This could be supported in a backwards compatible way
>         by prefixing the output line with a space in text mode.
>         However that's invasive enough that it was agreed to
>         not support this mode with --tag, as --text use cases
>         are adequately supported by the default output format.  */
>      error(0, 0, _("--tag does not support --text mode"));
>      usage (EXIT_FAILURE);
>    }
>
> thanks!
> P=E1draig.
Alright then, I've redone the tests, made the news and coreutils.texi
entry a bit more verbose, redone the utils to work in binary mode with
--tag specified and added the check in case both TAG and TEXT are given
as arguments.
Cheers,
  Ondrej.

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

>From 8f4858cb7f190099293dce31535d752362487443 Mon Sep 17 00:00:00 2001
From: Ondrej Oprala <ooprala@redhat.com>
Date: Thu, 2 Aug 2012 13:31:50 +0200
Subject: [PATCH] md5sum,sha1sum,sha224sum,sha256sum,sha384sum,sha512sum: add
 --tag option

* NEWS: Add new feature info.
* doc/coreutils.texi (md5sum invocation): Add detailed information
about the new --tag option.
* src/md5sum.c: Add the new --tag option for BSD-style output.
(bsd_split_3): Add ESCAPED_FILENAME parameter.
(print_filename): New function.
(filename_unescape): New function.
* tests/misc/md5sum-bsd: Add tests for the new feature.
---
 NEWS                  |   4 +
 doc/coreutils.texi    |  10 +++
 src/md5sum.c          | 214 ++++++++++++++++++++++++++++++++------------------
 tests/misc/md5sum-bsd |  33 ++++++++
 4 files changed, 183 insertions(+), 78 deletions(-)

diff --git a/NEWS b/NEWS
index d8a47ab..b96e7d3 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,10 @@ GNU coreutils NEWS                                    -*- outline -*-
 
 ** Bug fixes
 
+  md5sum now accepts the --tag option to print BSD-style output with GNU
+  file name escaping.  This also affects sha1sum, sha224sum, sha256sum,
+  sha384sum and sha512sum.
+
   du no longer emits a "disk-corrupted"-style diagnostic when it detects
   a directory cycle that is due to a bind-mounted directory.  Instead,
   it detects this precise type of cycle, diagnoses it as such and
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 62b31fe..0710fce 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -3705,6 +3705,16 @@ If all listed files are readable and are consistent with the associated
 MD5 checksums, exit successfully.  Otherwise exit with a status code
 indicating there was a failure.
 
+@item --tag
+@opindex --tag
+@cindex BSD output
+Create a BSD style output. If the file name contains a '\' or a newline,
+put a '\' at the beginning of the corresponding line. Filenames containing
+these characters will also be escaped just as they would be without
+@option{--tag}. The @option{--tag} option implies binary mode. If both
+@option{--tag} and @option{--text} are specified, issue a warning and
+exit nonzero.
+
 @item -t
 @itemx --text
 @opindex -t
diff --git a/src/md5sum.c b/src/md5sum.c
index f7e0849..85c96b5 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -135,7 +135,8 @@ enum
 {
   STATUS_OPTION = CHAR_MAX + 1,
   QUIET_OPTION,
-  STRICT_OPTION
+  STRICT_OPTION,
+  TAG_OPTION
 };
 
 static struct option const long_options[] =
@@ -147,6 +148,7 @@ static struct option const long_options[] =
   { "text", no_argument, NULL, 't' },
   { "warn", no_argument, NULL, 'w' },
   { "strict", no_argument, NULL, STRICT_OPTION },
+  { "tag", no_argument, NULL, TAG_OPTION },
   { GETOPT_HELP_OPTION_DECL },
   { GETOPT_VERSION_OPTION_DECL },
   { NULL, 0, NULL, 0 }
@@ -179,6 +181,9 @@ With no FILE, or when FILE is -, read standard input.\n\
       printf (_("\
   -c, --check          read %s sums from the FILEs and check them\n"),
               DIGEST_TYPE_STRING);
+      fputs (_("\
+      --tag            create a BSD-style checksum\n\
+"), stdout);
       if (O_BINARY)
         fputs (_("\
   -t, --text           read in text mode (default if reading tty stdin)\n\
@@ -215,23 +220,72 @@ space for text), and name for each FILE.\n"),
 
 #define ISWHITE(c) ((c) == ' ' || (c) == '\t')
 
+/* Given a file name, S of length S_LEN, that is not NUL-terminated,
+   modify it in place, performing the equivalent of this sed substitution:
+   's/\\n/\n/g;s/\\\\/\\/g' i.e., replacing each "\\n" string with a newline
+   and each "\\\\" with a single backslash, NUL-terminate it and return S.
+   If S is not a valid escaped file name, i.e., if it ends with an odd number
+   of backslashes or if it contains a backslash followed by anything other
+   than "n" or another backslash, return NULL.  */
+
+static char *
+filename_unescape (char *s, size_t s_len)
+{
+  char *dst = s;
+
+  for (size_t i = 0; i < s_len; i++)
+    {
+      switch (s[i])
+        {
+        case '\\':
+          if (i == s_len - 1)
+            {
+              /* File name ends with an unescaped backslash: invalid.  */
+              return NULL;
+            }
+          ++i;
+          switch (s[i])
+            {
+            case 'n':
+              *dst++ = '\n';
+              break;
+            case '\\':
+              *dst++ = '\\';
+              break;
+            default:
+              /* Only '\' or 'n' may follow a backslash.  */
+              return NULL;
+            }
+          break;
+
+        case '\0':
+          /* The file name may not contain a NUL.  */
+          return NULL;
+
+        default:
+          *dst++ = s[i];
+          break;
+        }
+    }
+  *dst = '\0';
+
+  return s;
+}
+
 /* Split the checksum string S (of length S_LEN) from a BSD 'md5' or
    'sha1' command into two parts: a hexadecimal digest, and the file
    name.  S is modified.  Return true if successful.  */
 
 static bool
 bsd_split_3 (char *s, size_t s_len, unsigned char **hex_digest,
-             char **file_name)
+             char **file_name, bool escaped_filename)
 {
   size_t i;
 
   if (s_len == 0)
     return false;
 
-  *file_name = s;
-
-  /* Find end of filename. The BSD 'md5' and 'sha1' commands do not escape
-     filenames, so search backwards for the last ')'. */
+  /* Find end of filename.  */
   i = s_len - 1;
   while (i && s[i] != ')')
     i--;
@@ -239,6 +293,11 @@ bsd_split_3 (char *s, size_t s_len, unsigned char **hex_digest,
   if (s[i] != ')')
     return false;
 
+  *file_name = s;
+
+  if (escaped_filename && filename_unescape (s, i) == NULL)
+    return false;
+
   s[i++] = '\0';
 
   while (ISWHITE (s[i]))
@@ -271,7 +330,14 @@ split_3 (char *s, size_t s_len,
   while (ISWHITE (s[i]))
     ++i;
 
+  if (s[i] == '\\')
+    {
+      ++i;
+      escaped_filename = true;
+    }
+
   /* Check for BSD-style checksum line. */
+
   algo_name_len = strlen (DIGEST_TYPE_STRING);
   if (STREQ_LEN (s + i, DIGEST_TYPE_STRING, algo_name_len))
     {
@@ -282,7 +348,7 @@ split_3 (char *s, size_t s_len,
           *binary = 0;
           return bsd_split_3 (s +      i + algo_name_len + 1,
                               s_len - (i + algo_name_len + 1),
-                              hex_digest, file_name);
+                              hex_digest, file_name, escaped_filename);
         }
     }
 
@@ -293,11 +359,6 @@ split_3 (char *s, size_t s_len,
   if (s_len - i < min_digest_line_length + (s[i] == '\\'))
     return false;
 
-  if (s[i] == '\\')
-    {
-      ++i;
-      escaped_filename = true;
-    }
   *hex_digest = (unsigned char *) &s[i];
 
   /* The first field has to be the n-character hexadecimal
@@ -333,49 +394,8 @@ split_3 (char *s, size_t s_len,
   *file_name = &s[i];
 
   if (escaped_filename)
-    {
-      /* Translate each '\n' string in the file name to a NEWLINE,
-         and each '\\' string to a backslash.  */
+    return filename_unescape (&s[i], s_len - i) != NULL;
 
-      char *dst = &s[i];
-
-      while (i < s_len)
-        {
-          switch (s[i])
-            {
-            case '\\':
-              if (i == s_len - 1)
-                {
-                  /* A valid line does not end with a backslash.  */
-                  return false;
-                }
-              ++i;
-              switch (s[i++])
-                {
-                case 'n':
-                  *dst++ = '\n';
-                  break;
-                case '\\':
-                  *dst++ = '\\';
-                  break;
-                default:
-                  /* Only '\' or 'n' may follow a backslash.  */
-                  return false;
-                }
-              break;
-
-            case '\0':
-              /* The file name may not contain a NUL.  */
-              return false;
-              break;
-
-            default:
-              *dst++ = s[i++];
-              break;
-            }
-        }
-      *dst = '\0';
-    }
   return true;
 }
 
@@ -636,6 +656,31 @@ digest_check (const char *checkfile_name)
           && (!strict || n_improperly_formatted_lines == 0));
 }
 
+static void
+print_filename (char const *file)
+{
+  /* Translate each NEWLINE byte to the string, "\\n",
+     and each backslash to "\\\\".  */
+  while (*file)
+    {
+      switch (*file)
+        {
+        case '\n':
+          fputs ("\\n", stdout);
+          break;
+
+        case '\\':
+          fputs ("\\\\", stdout);
+          break;
+
+        default:
+          putchar (*file);
+          break;
+        }
+      file++;
+    }
+}
+
 int
 main (int argc, char **argv)
 {
@@ -646,6 +691,8 @@ main (int argc, char **argv)
   int opt;
   bool ok = true;
   int binary = -1;
+  bool prefix_tag = false;
+  bool text = false;
 
   /* Setting values of global variables.  */
   initialize_main (&argc, &argv);
@@ -675,6 +722,7 @@ main (int argc, char **argv)
         quiet = false;
         break;
       case 't':
+        text = true;
         binary = 0;
         break;
       case 'w':
@@ -690,6 +738,10 @@ main (int argc, char **argv)
       case STRICT_OPTION:
         strict = true;
         break;
+      case TAG_OPTION:
+        prefix_tag = true;
+        binary = 1;
+        break;
       case_GETOPT_HELP_CHAR;
       case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
       default:
@@ -734,6 +786,17 @@ main (int argc, char **argv)
      usage (EXIT_FAILURE);
    }
 
+  if (text && prefix_tag)
+   {
+     /* This could be supported in a backwards compatible way
+        by prefixing the output line with a space in text mode.
+        However that's invasive enough that it was agreed to
+        not support this mode with --tag, as --text use cases
+        are adequately supported by the default output format.  */
+     error (0, 0, _("--tag does not support --text mode"));
+     usage (EXIT_FAILURE);
+   }
+
   if (!O_BINARY && binary < 0)
     binary = 0;
 
@@ -754,41 +817,36 @@ main (int argc, char **argv)
             ok = false;
           else
             {
+              if (prefix_tag)
+                {
+                  if (strchr (file, '\n') || strchr (file, '\\'))
+                    putchar ('\\');
+
+                  fputs (DIGEST_TYPE_STRING, stdout);
+                  fputs (" (", stdout);
+                  print_filename (file);
+                  fputs (") = ", stdout);
+                }
+
               size_t i;
 
               /* Output a leading backslash if the file name contains
                  a newline or backslash.  */
-              if (strchr (file, '\n') || strchr (file, '\\'))
+              if (!prefix_tag && (strchr (file, '\n') || strchr (file, '\\')))
                 putchar ('\\');
 
               for (i = 0; i < (digest_hex_bytes / 2); ++i)
                 printf ("%02x", bin_buffer[i]);
 
-              putchar (' ');
-              if (file_is_binary)
-                putchar ('*');
-              else
-                putchar (' ');
-
-              /* Translate each NEWLINE byte to the string, "\\n",
-                 and each backslash to "\\\\".  */
-              for (i = 0; i < strlen (file); ++i)
+              if (!prefix_tag)
                 {
-                  switch (file[i])
-                    {
-                    case '\n':
-                      fputs ("\\n", stdout);
-                      break;
-
-                    case '\\':
-                      fputs ("\\\\", stdout);
-                      break;
-
-                    default:
-                      putchar (file[i]);
-                      break;
-                    }
+                  putchar (' ');
+
+                  putchar (file_is_binary ? '*' : ' ');
+
+                  print_filename (file);
                 }
+
               putchar ('\n');
             }
         }
diff --git a/tests/misc/md5sum-bsd b/tests/misc/md5sum-bsd
index 8226d7a..f29eabb 100755
--- a/tests/misc/md5sum-bsd
+++ b/tests/misc/md5sum-bsd
@@ -38,4 +38,37 @@ md5sum --strict -c check.md5 || fail=1
 # an option to avoid the ambiguity.
 tail -n+2 check.md5 | md5sum --strict -c && fail=1
 
+#--tag option test
+
+for i in 'a' ' b' '*c' 'dd' ' '; do
+  echo "$i" > "$i"
+  md5sum --tag "$i" >> check.md5sum
+done
+sed 's/  / /' check.md5sum > check.md5
+
+md5sum --strict -c check.md5sum || fail=1
+md5sum --strict -c check.md5 || fail=1
+
+#--tag testing filenames with \t \n and trailing \
+
+nl='
+'
+tab='	'
+for i in 'a\b' 'a\' "a${nl}b" "a${tab}b"; do
+  :> "$i"
+  md5sum --tag "$i" >> check.md5sum
+done
+
+md5sum --strict -c check.md5sum || fail=1
+
+ex_file='test
+\\file'
+ex_output='\MD5 (test\n\\\\file) = d41d8cd98f00b204e9800998ecf8427e'
+
+touch "$ex_file"
+echo -E "$ex_output" > exp
+md5sum --tag "$ex_file" > out
+
+compare exp out || fail=1
+
 Exit $fail
-- 
1.7.11.4


--------------000606050208020500040306--


From MAILER-DAEMON Thu Aug 23 05:16:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4TWv-0004u9-Ir
	for mharc-coreutils@gnu.org; Thu, 23 Aug 2012 05:16:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37450)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4TWq-0004tm-Gu
	for coreutils@gnu.org; Thu, 23 Aug 2012 05:16:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4TWj-00018k-Qs
	for coreutils@gnu.org; Thu, 23 Aug 2012 05:16:40 -0400
Received: from mx1.redhat.com ([209.132.183.28]:63426)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4TWj-00018R-Dw
	for coreutils@gnu.org; Thu, 23 Aug 2012 05:16:33 -0400
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 q7N9GWsi005946
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 23 Aug 2012 05:16:32 -0400
Received: from [10.36.116.65] (ovpn-116-65.ams2.redhat.com [10.36.116.65])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q7N9GT5f011456
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 23 Aug 2012 05:16:30 -0400
Message-ID: <5035F4ED.40303@draigBrady.com>
Date: Thu, 23 Aug 2012 10:16:29 +0100
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: RFE: hash-type in sum utils
References: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
	<5034E5EF.3060500@redhat.com> <5035033C.6080204@draigBrady.com>
	<50350A45.8020706@redhat.com> <87628aevbl.fsf@rho.meyering.net>
	<5035E1F5.9050106@redhat.com> <5035EB8C.1040507@draigBrady.com>
	<5035F296.10805@redhat.com>
In-Reply-To: <5035F296.10805@redhat.com>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=UTF-8
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
	q7N9GWsi005946
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, 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, 23 Aug 2012 09:16:44 -0000

On 08/23/2012 10:06 AM, Ondrej Oprala wrote:
> echo -E "$ex_output" > exp

That's using the shell's version which may not be portable.
To select the built echo binary use: env echo ...
Or even better, use: printf

cheers,
P=C3=A1draig.


From MAILER-DAEMON Thu Aug 23 05:32:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4Tlg-0005wb-ST
	for mharc-coreutils@gnu.org; Thu, 23 Aug 2012 05:32:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53399)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T4TlY-0005mk-Gw
	for coreutils@gnu.org; Thu, 23 Aug 2012 05:31:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T4TlW-0005By-HB
	for coreutils@gnu.org; Thu, 23 Aug 2012 05:31:52 -0400
Received: from mx1.redhat.com ([209.132.183.28]:2051)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ooprala@redhat.com>) id 1T4TlW-0005Bj-8D
	for coreutils@gnu.org; Thu, 23 Aug 2012 05:31:50 -0400
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 q7N9VlsT027887
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 23 Aug 2012 05:31:47 -0400
Received: from [10.34.4.237] (unused-4-237.brq.redhat.com [10.34.4.237])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7N9Vi0Q012302
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Thu, 23 Aug 2012 05:31:45 -0400
Message-ID: <5035F880.1030101@redhat.com>
Date: Thu, 23 Aug 2012 11:31:44 +0200
From: Ondrej Oprala <ooprala@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
Subject: Re: RFE: hash-type in sum utils
References: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
	<5034E5EF.3060500@redhat.com> <5035033C.6080204@draigBrady.com>
	<50350A45.8020706@redhat.com> <87628aevbl.fsf@rho.meyering.net>
	<5035E1F5.9050106@redhat.com> <5035EB8C.1040507@draigBrady.com>
	<5035F296.10805@redhat.com> <5035F4ED.40303@draigBrady.com>
In-Reply-To: <5035F4ED.40303@draigBrady.com>
Content-Type: multipart/mixed; boundary="------------090901010907040102090407"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, 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, 23 Aug 2012 09:31:59 -0000

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

On 08/23/2012 11:16 AM, P=C3=A1draig Brady wrote:
> On 08/23/2012 10:06 AM, Ondrej Oprala wrote:
>> echo -E "$ex_output" > exp
> That's using the shell's version which may not be portable.
> To select the built echo binary use: env echo ...
> Or even better, use: printf
>
> cheers,
> P=C3=A1draig.
>
Corrected :)
Cheers,
  Ondrej.

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

RnJvbSA0YjZlYTY5ZDMxYjkzMDk4YWY1YTkxNjUzNzliZThjOGY0MmQ4YzY1IE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBPbmRyZWogT3ByYWxhIDxvb3ByYWxhQHJlZGhhdC5j
b20+CkRhdGU6IFRodSwgMiBBdWcgMjAxMiAxMzozMTo1MCArMDIwMApTdWJqZWN0OiBbUEFU
Q0hdIG1kNXN1bSxzaGExc3VtLHNoYTIyNHN1bSxzaGEyNTZzdW0sc2hhMzg0c3VtLHNoYTUx
MnN1bTogYWRkCiAtLXRhZyBvcHRpb24KCiogTkVXUzogQWRkIG5ldyBmZWF0dXJlIGluZm8u
CiogZG9jL2NvcmV1dGlscy50ZXhpIChtZDVzdW0gaW52b2NhdGlvbik6IEFkZCBkZXRhaWxl
ZCBpbmZvcm1hdGlvbgphYm91dCB0aGUgbmV3IC0tdGFnIG9wdGlvbi4KKiBzcmMvbWQ1c3Vt
LmM6IEFkZCB0aGUgbmV3IC0tdGFnIG9wdGlvbiBmb3IgQlNELXN0eWxlIG91dHB1dC4KKGJz
ZF9zcGxpdF8zKTogQWRkIEVTQ0FQRURfRklMRU5BTUUgcGFyYW1ldGVyLgoocHJpbnRfZmls
ZW5hbWUpOiBOZXcgZnVuY3Rpb24uCihmaWxlbmFtZV91bmVzY2FwZSk6IE5ldyBmdW5jdGlv
bi4KKiB0ZXN0cy9taXNjL21kNXN1bS1ic2Q6IEFkZCB0ZXN0cyBmb3IgdGhlIG5ldyBmZWF0
dXJlLgotLS0KIE5FV1MgICAgICAgICAgICAgICAgICB8ICAgNCArCiBkb2MvY29yZXV0aWxz
LnRleGkgICAgfCAgMTAgKysrCiBzcmMvbWQ1c3VtLmMgICAgICAgICAgfCAyMTQgKysrKysr
KysrKysrKysrKysrKysrKysrKysrKysrKystLS0tLS0tLS0tLS0tLS0tLS0KIHRlc3RzL21p
c2MvbWQ1c3VtLWJzZCB8ICAzMyArKysrKysrKwogNCBmaWxlcyBjaGFuZ2VkLCAxODMgaW5z
ZXJ0aW9ucygrKSwgNzggZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvTkVXUyBiL05FV1MK
aW5kZXggZDhhNDdhYi4uYjk2ZTdkMyAxMDA2NDQKLS0tIGEvTkVXUworKysgYi9ORVdTCkBA
IC00LDYgKzQsMTAgQEAgR05VIGNvcmV1dGlscyBORVdTICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgLSotIG91dGxpbmUgLSotCiAKICoqIEJ1ZyBmaXhlcwogCisgIG1k
NXN1bSBub3cgYWNjZXB0cyB0aGUgLS10YWcgb3B0aW9uIHRvIHByaW50IEJTRC1zdHlsZSBv
dXRwdXQgd2l0aCBHTlUKKyAgZmlsZSBuYW1lIGVzY2FwaW5nLiAgVGhpcyBhbHNvIGFmZmVj
dHMgc2hhMXN1bSwgc2hhMjI0c3VtLCBzaGEyNTZzdW0sCisgIHNoYTM4NHN1bSBhbmQgc2hh
NTEyc3VtLgorCiAgIGR1IG5vIGxvbmdlciBlbWl0cyBhICJkaXNrLWNvcnJ1cHRlZCItc3R5
bGUgZGlhZ25vc3RpYyB3aGVuIGl0IGRldGVjdHMKICAgYSBkaXJlY3RvcnkgY3ljbGUgdGhh
dCBpcyBkdWUgdG8gYSBiaW5kLW1vdW50ZWQgZGlyZWN0b3J5LiAgSW5zdGVhZCwKICAgaXQg
ZGV0ZWN0cyB0aGlzIHByZWNpc2UgdHlwZSBvZiBjeWNsZSwgZGlhZ25vc2VzIGl0IGFzIHN1
Y2ggYW5kCmRpZmYgLS1naXQgYS9kb2MvY29yZXV0aWxzLnRleGkgYi9kb2MvY29yZXV0aWxz
LnRleGkKaW5kZXggNjJiMzFmZS4uMDcxMGZjZSAxMDA2NDQKLS0tIGEvZG9jL2NvcmV1dGls
cy50ZXhpCisrKyBiL2RvYy9jb3JldXRpbHMudGV4aQpAQCAtMzcwNSw2ICszNzA1LDE2IEBA
IElmIGFsbCBsaXN0ZWQgZmlsZXMgYXJlIHJlYWRhYmxlIGFuZCBhcmUgY29uc2lzdGVudCB3
aXRoIHRoZSBhc3NvY2lhdGVkCiBNRDUgY2hlY2tzdW1zLCBleGl0IHN1Y2Nlc3NmdWxseS4g
IE90aGVyd2lzZSBleGl0IHdpdGggYSBzdGF0dXMgY29kZQogaW5kaWNhdGluZyB0aGVyZSB3
YXMgYSBmYWlsdXJlLgogCitAaXRlbSAtLXRhZworQG9waW5kZXggLS10YWcKK0BjaW5kZXgg
QlNEIG91dHB1dAorQ3JlYXRlIGEgQlNEIHN0eWxlIG91dHB1dC4gSWYgdGhlIGZpbGUgbmFt
ZSBjb250YWlucyBhICdcJyBvciBhIG5ld2xpbmUsCitwdXQgYSAnXCcgYXQgdGhlIGJlZ2lu
bmluZyBvZiB0aGUgY29ycmVzcG9uZGluZyBsaW5lLiBGaWxlbmFtZXMgY29udGFpbmluZwor
dGhlc2UgY2hhcmFjdGVycyB3aWxsIGFsc28gYmUgZXNjYXBlZCBqdXN0IGFzIHRoZXkgd291
bGQgYmUgd2l0aG91dAorQG9wdGlvbnstLXRhZ30uIFRoZSBAb3B0aW9uey0tdGFnfSBvcHRp
b24gaW1wbGllcyBiaW5hcnkgbW9kZS4gSWYgYm90aAorQG9wdGlvbnstLXRhZ30gYW5kIEBv
cHRpb257LS10ZXh0fSBhcmUgc3BlY2lmaWVkLCBpc3N1ZSBhIHdhcm5pbmcgYW5kCitleGl0
IG5vbnplcm8uCisKIEBpdGVtIC10CiBAaXRlbXggLS10ZXh0CiBAb3BpbmRleCAtdApkaWZm
IC0tZ2l0IGEvc3JjL21kNXN1bS5jIGIvc3JjL21kNXN1bS5jCmluZGV4IGY3ZTA4NDkuLjg1
Yzk2YjUgMTAwNjQ0Ci0tLSBhL3NyYy9tZDVzdW0uYworKysgYi9zcmMvbWQ1c3VtLmMKQEAg
LTEzNSw3ICsxMzUsOCBAQCBlbnVtCiB7CiAgIFNUQVRVU19PUFRJT04gPSBDSEFSX01BWCAr
IDEsCiAgIFFVSUVUX09QVElPTiwKLSAgU1RSSUNUX09QVElPTgorICBTVFJJQ1RfT1BUSU9O
LAorICBUQUdfT1BUSU9OCiB9OwogCiBzdGF0aWMgc3RydWN0IG9wdGlvbiBjb25zdCBsb25n
X29wdGlvbnNbXSA9CkBAIC0xNDcsNiArMTQ4LDcgQEAgc3RhdGljIHN0cnVjdCBvcHRpb24g
Y29uc3QgbG9uZ19vcHRpb25zW10gPQogICB7ICJ0ZXh0Iiwgbm9fYXJndW1lbnQsIE5VTEws
ICd0JyB9LAogICB7ICJ3YXJuIiwgbm9fYXJndW1lbnQsIE5VTEwsICd3JyB9LAogICB7ICJz
dHJpY3QiLCBub19hcmd1bWVudCwgTlVMTCwgU1RSSUNUX09QVElPTiB9LAorICB7ICJ0YWci
LCBub19hcmd1bWVudCwgTlVMTCwgVEFHX09QVElPTiB9LAogICB7IEdFVE9QVF9IRUxQX09Q
VElPTl9ERUNMIH0sCiAgIHsgR0VUT1BUX1ZFUlNJT05fT1BUSU9OX0RFQ0wgfSwKICAgeyBO
VUxMLCAwLCBOVUxMLCAwIH0KQEAgLTE3OSw2ICsxODEsOSBAQCBXaXRoIG5vIEZJTEUsIG9y
IHdoZW4gRklMRSBpcyAtLCByZWFkIHN0YW5kYXJkIGlucHV0LlxuXAogICAgICAgcHJpbnRm
IChfKCJcCiAgIC1jLCAtLWNoZWNrICAgICAgICAgIHJlYWQgJXMgc3VtcyBmcm9tIHRoZSBG
SUxFcyBhbmQgY2hlY2sgdGhlbVxuIiksCiAgICAgICAgICAgICAgIERJR0VTVF9UWVBFX1NU
UklORyk7CisgICAgICBmcHV0cyAoXygiXAorICAgICAgLS10YWcgICAgICAgICAgICBjcmVh
dGUgYSBCU0Qtc3R5bGUgY2hlY2tzdW1cblwKKyIpLCBzdGRvdXQpOwogICAgICAgaWYgKE9f
QklOQVJZKQogICAgICAgICBmcHV0cyAoXygiXAogICAtdCwgLS10ZXh0ICAgICAgICAgICBy
ZWFkIGluIHRleHQgbW9kZSAoZGVmYXVsdCBpZiByZWFkaW5nIHR0eSBzdGRpbilcblwKQEAg
LTIxNSwyMyArMjIwLDcyIEBAIHNwYWNlIGZvciB0ZXh0KSwgYW5kIG5hbWUgZm9yIGVhY2gg
RklMRS5cbiIpLAogCiAjZGVmaW5lIElTV0hJVEUoYykgKChjKSA9PSAnICcgfHwgKGMpID09
ICdcdCcpCiAKKy8qIEdpdmVuIGEgZmlsZSBuYW1lLCBTIG9mIGxlbmd0aCBTX0xFTiwgdGhh
dCBpcyBub3QgTlVMLXRlcm1pbmF0ZWQsCisgICBtb2RpZnkgaXQgaW4gcGxhY2UsIHBlcmZv
cm1pbmcgdGhlIGVxdWl2YWxlbnQgb2YgdGhpcyBzZWQgc3Vic3RpdHV0aW9uOgorICAgJ3Mv
XFxuL1xuL2c7cy9cXFxcL1xcL2cnIGkuZS4sIHJlcGxhY2luZyBlYWNoICJcXG4iIHN0cmlu
ZyB3aXRoIGEgbmV3bGluZQorICAgYW5kIGVhY2ggIlxcXFwiIHdpdGggYSBzaW5nbGUgYmFj
a3NsYXNoLCBOVUwtdGVybWluYXRlIGl0IGFuZCByZXR1cm4gUy4KKyAgIElmIFMgaXMgbm90
IGEgdmFsaWQgZXNjYXBlZCBmaWxlIG5hbWUsIGkuZS4sIGlmIGl0IGVuZHMgd2l0aCBhbiBv
ZGQgbnVtYmVyCisgICBvZiBiYWNrc2xhc2hlcyBvciBpZiBpdCBjb250YWlucyBhIGJhY2tz
bGFzaCBmb2xsb3dlZCBieSBhbnl0aGluZyBvdGhlcgorICAgdGhhbiAibiIgb3IgYW5vdGhl
ciBiYWNrc2xhc2gsIHJldHVybiBOVUxMLiAgKi8KKworc3RhdGljIGNoYXIgKgorZmlsZW5h
bWVfdW5lc2NhcGUgKGNoYXIgKnMsIHNpemVfdCBzX2xlbikKK3sKKyAgY2hhciAqZHN0ID0g
czsKKworICBmb3IgKHNpemVfdCBpID0gMDsgaSA8IHNfbGVuOyBpKyspCisgICAgeworICAg
ICAgc3dpdGNoIChzW2ldKQorICAgICAgICB7CisgICAgICAgIGNhc2UgJ1xcJzoKKyAgICAg
ICAgICBpZiAoaSA9PSBzX2xlbiAtIDEpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg
IC8qIEZpbGUgbmFtZSBlbmRzIHdpdGggYW4gdW5lc2NhcGVkIGJhY2tzbGFzaDogaW52YWxp
ZC4gICovCisgICAgICAgICAgICAgIHJldHVybiBOVUxMOworICAgICAgICAgICAgfQorICAg
ICAgICAgICsraTsKKyAgICAgICAgICBzd2l0Y2ggKHNbaV0pCisgICAgICAgICAgICB7Cisg
ICAgICAgICAgICBjYXNlICduJzoKKyAgICAgICAgICAgICAgKmRzdCsrID0gJ1xuJzsKKyAg
ICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlICdcXCc6CisgICAgICAgICAg
ICAgICpkc3QrKyA9ICdcXCc7CisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAg
ZGVmYXVsdDoKKyAgICAgICAgICAgICAgLyogT25seSAnXCcgb3IgJ24nIG1heSBmb2xsb3cg
YSBiYWNrc2xhc2guICAqLworICAgICAgICAgICAgICByZXR1cm4gTlVMTDsKKyAgICAgICAg
ICAgIH0KKyAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlICdcMCc6CisgICAgICAg
ICAgLyogVGhlIGZpbGUgbmFtZSBtYXkgbm90IGNvbnRhaW4gYSBOVUwuICAqLworICAgICAg
ICAgIHJldHVybiBOVUxMOworCisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgKmRzdCsr
ID0gc1tpXTsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgIH0KKyAgKmRzdCA9
ICdcMCc7CisKKyAgcmV0dXJuIHM7Cit9CisKIC8qIFNwbGl0IHRoZSBjaGVja3N1bSBzdHJp
bmcgUyAob2YgbGVuZ3RoIFNfTEVOKSBmcm9tIGEgQlNEICdtZDUnIG9yCiAgICAnc2hhMScg
Y29tbWFuZCBpbnRvIHR3byBwYXJ0czogYSBoZXhhZGVjaW1hbCBkaWdlc3QsIGFuZCB0aGUg
ZmlsZQogICAgbmFtZS4gIFMgaXMgbW9kaWZpZWQuICBSZXR1cm4gdHJ1ZSBpZiBzdWNjZXNz
ZnVsLiAgKi8KIAogc3RhdGljIGJvb2wKIGJzZF9zcGxpdF8zIChjaGFyICpzLCBzaXplX3Qg
c19sZW4sIHVuc2lnbmVkIGNoYXIgKipoZXhfZGlnZXN0LAotICAgICAgICAgICAgIGNoYXIg
KipmaWxlX25hbWUpCisgICAgICAgICAgICAgY2hhciAqKmZpbGVfbmFtZSwgYm9vbCBlc2Nh
cGVkX2ZpbGVuYW1lKQogewogICBzaXplX3QgaTsKIAogICBpZiAoc19sZW4gPT0gMCkKICAg
ICByZXR1cm4gZmFsc2U7CiAKLSAgKmZpbGVfbmFtZSA9IHM7Ci0KLSAgLyogRmluZCBlbmQg
b2YgZmlsZW5hbWUuIFRoZSBCU0QgJ21kNScgYW5kICdzaGExJyBjb21tYW5kcyBkbyBub3Qg
ZXNjYXBlCi0gICAgIGZpbGVuYW1lcywgc28gc2VhcmNoIGJhY2t3YXJkcyBmb3IgdGhlIGxh
c3QgJyknLiAqLworICAvKiBGaW5kIGVuZCBvZiBmaWxlbmFtZS4gICovCiAgIGkgPSBzX2xl
biAtIDE7CiAgIHdoaWxlIChpICYmIHNbaV0gIT0gJyknKQogICAgIGktLTsKQEAgLTIzOSw2
ICsyOTMsMTEgQEAgYnNkX3NwbGl0XzMgKGNoYXIgKnMsIHNpemVfdCBzX2xlbiwgdW5zaWdu
ZWQgY2hhciAqKmhleF9kaWdlc3QsCiAgIGlmIChzW2ldICE9ICcpJykKICAgICByZXR1cm4g
ZmFsc2U7CiAKKyAgKmZpbGVfbmFtZSA9IHM7CisKKyAgaWYgKGVzY2FwZWRfZmlsZW5hbWUg
JiYgZmlsZW5hbWVfdW5lc2NhcGUgKHMsIGkpID09IE5VTEwpCisgICAgcmV0dXJuIGZhbHNl
OworCiAgIHNbaSsrXSA9ICdcMCc7CiAKICAgd2hpbGUgKElTV0hJVEUgKHNbaV0pKQpAQCAt
MjcxLDcgKzMzMCwxNCBAQCBzcGxpdF8zIChjaGFyICpzLCBzaXplX3Qgc19sZW4sCiAgIHdo
aWxlIChJU1dISVRFIChzW2ldKSkKICAgICArK2k7CiAKKyAgaWYgKHNbaV0gPT0gJ1xcJykK
KyAgICB7CisgICAgICArK2k7CisgICAgICBlc2NhcGVkX2ZpbGVuYW1lID0gdHJ1ZTsKKyAg
ICB9CisKICAgLyogQ2hlY2sgZm9yIEJTRC1zdHlsZSBjaGVja3N1bSBsaW5lLiAqLworCiAg
IGFsZ29fbmFtZV9sZW4gPSBzdHJsZW4gKERJR0VTVF9UWVBFX1NUUklORyk7CiAgIGlmIChT
VFJFUV9MRU4gKHMgKyBpLCBESUdFU1RfVFlQRV9TVFJJTkcsIGFsZ29fbmFtZV9sZW4pKQog
ICAgIHsKQEAgLTI4Miw3ICszNDgsNyBAQCBzcGxpdF8zIChjaGFyICpzLCBzaXplX3Qgc19s
ZW4sCiAgICAgICAgICAgKmJpbmFyeSA9IDA7CiAgICAgICAgICAgcmV0dXJuIGJzZF9zcGxp
dF8zIChzICsgICAgICBpICsgYWxnb19uYW1lX2xlbiArIDEsCiAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICBzX2xlbiAtIChpICsgYWxnb19uYW1lX2xlbiArIDEpLAotICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgaGV4X2RpZ2VzdCwgZmlsZV9uYW1lKTsKKyAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgIGhleF9kaWdlc3QsIGZpbGVfbmFtZSwgZXNjYXBl
ZF9maWxlbmFtZSk7CiAgICAgICAgIH0KICAgICB9CiAKQEAgLTI5MywxMSArMzU5LDYgQEAg
c3BsaXRfMyAoY2hhciAqcywgc2l6ZV90IHNfbGVuLAogICBpZiAoc19sZW4gLSBpIDwgbWlu
X2RpZ2VzdF9saW5lX2xlbmd0aCArIChzW2ldID09ICdcXCcpKQogICAgIHJldHVybiBmYWxz
ZTsKIAotICBpZiAoc1tpXSA9PSAnXFwnKQotICAgIHsKLSAgICAgICsraTsKLSAgICAgIGVz
Y2FwZWRfZmlsZW5hbWUgPSB0cnVlOwotICAgIH0KICAgKmhleF9kaWdlc3QgPSAodW5zaWdu
ZWQgY2hhciAqKSAmc1tpXTsKIAogICAvKiBUaGUgZmlyc3QgZmllbGQgaGFzIHRvIGJlIHRo
ZSBuLWNoYXJhY3RlciBoZXhhZGVjaW1hbApAQCAtMzMzLDQ5ICszOTQsOCBAQCBzcGxpdF8z
IChjaGFyICpzLCBzaXplX3Qgc19sZW4sCiAgICpmaWxlX25hbWUgPSAmc1tpXTsKIAogICBp
ZiAoZXNjYXBlZF9maWxlbmFtZSkKLSAgICB7Ci0gICAgICAvKiBUcmFuc2xhdGUgZWFjaCAn
XG4nIHN0cmluZyBpbiB0aGUgZmlsZSBuYW1lIHRvIGEgTkVXTElORSwKLSAgICAgICAgIGFu
ZCBlYWNoICdcXCcgc3RyaW5nIHRvIGEgYmFja3NsYXNoLiAgKi8KKyAgICByZXR1cm4gZmls
ZW5hbWVfdW5lc2NhcGUgKCZzW2ldLCBzX2xlbiAtIGkpICE9IE5VTEw7CiAKLSAgICAgIGNo
YXIgKmRzdCA9ICZzW2ldOwotCi0gICAgICB3aGlsZSAoaSA8IHNfbGVuKQotICAgICAgICB7
Ci0gICAgICAgICAgc3dpdGNoIChzW2ldKQotICAgICAgICAgICAgewotICAgICAgICAgICAg
Y2FzZSAnXFwnOgotICAgICAgICAgICAgICBpZiAoaSA9PSBzX2xlbiAtIDEpCi0gICAgICAg
ICAgICAgICAgewotICAgICAgICAgICAgICAgICAgLyogQSB2YWxpZCBsaW5lIGRvZXMgbm90
IGVuZCB3aXRoIGEgYmFja3NsYXNoLiAgKi8KLSAgICAgICAgICAgICAgICAgIHJldHVybiBm
YWxzZTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICsraTsKLSAgICAgICAg
ICAgICAgc3dpdGNoIChzW2krK10pCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAg
ICAgIGNhc2UgJ24nOgotICAgICAgICAgICAgICAgICAgKmRzdCsrID0gJ1xuJzsKLSAgICAg
ICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgJ1xcJzoKLSAgICAg
ICAgICAgICAgICAgICpkc3QrKyA9ICdcXCc7Ci0gICAgICAgICAgICAgICAgICBicmVhazsK
LSAgICAgICAgICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgICAgICAgLyogT25seSAn
XCcgb3IgJ24nIG1heSBmb2xsb3cgYSBiYWNrc2xhc2guICAqLwotICAgICAgICAgICAgICAg
ICAgcmV0dXJuIGZhbHNlOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgYnJl
YWs7Ci0KLSAgICAgICAgICAgIGNhc2UgJ1wwJzoKLSAgICAgICAgICAgICAgLyogVGhlIGZp
bGUgbmFtZSBtYXkgbm90IGNvbnRhaW4gYSBOVUwuICAqLwotICAgICAgICAgICAgICByZXR1
cm4gZmFsc2U7Ci0gICAgICAgICAgICAgIGJyZWFrOwotCi0gICAgICAgICAgICBkZWZhdWx0
OgotICAgICAgICAgICAgICAqZHN0KysgPSBzW2krK107Ci0gICAgICAgICAgICAgIGJyZWFr
OwotICAgICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICAqZHN0ID0gJ1wwJzsKLSAgICB9
CiAgIHJldHVybiB0cnVlOwogfQogCkBAIC02MzYsNiArNjU2LDMxIEBAIGRpZ2VzdF9jaGVj
ayAoY29uc3QgY2hhciAqY2hlY2tmaWxlX25hbWUpCiAgICAgICAgICAgJiYgKCFzdHJpY3Qg
fHwgbl9pbXByb3Blcmx5X2Zvcm1hdHRlZF9saW5lcyA9PSAwKSk7CiB9CiAKK3N0YXRpYyB2
b2lkCitwcmludF9maWxlbmFtZSAoY2hhciBjb25zdCAqZmlsZSkKK3sKKyAgLyogVHJhbnNs
YXRlIGVhY2ggTkVXTElORSBieXRlIHRvIHRoZSBzdHJpbmcsICJcXG4iLAorICAgICBhbmQg
ZWFjaCBiYWNrc2xhc2ggdG8gIlxcXFwiLiAgKi8KKyAgd2hpbGUgKCpmaWxlKQorICAgIHsK
KyAgICAgIHN3aXRjaCAoKmZpbGUpCisgICAgICAgIHsKKyAgICAgICAgY2FzZSAnXG4nOgor
ICAgICAgICAgIGZwdXRzICgiXFxuIiwgc3Rkb3V0KTsKKyAgICAgICAgICBicmVhazsKKwor
ICAgICAgICBjYXNlICdcXCc6CisgICAgICAgICAgZnB1dHMgKCJcXFxcIiwgc3Rkb3V0KTsK
KyAgICAgICAgICBicmVhazsKKworICAgICAgICBkZWZhdWx0OgorICAgICAgICAgIHB1dGNo
YXIgKCpmaWxlKTsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgZmlsZSsr
OworICAgIH0KK30KKwogaW50CiBtYWluIChpbnQgYXJnYywgY2hhciAqKmFyZ3YpCiB7CkBA
IC02NDYsNiArNjkxLDggQEAgbWFpbiAoaW50IGFyZ2MsIGNoYXIgKiphcmd2KQogICBpbnQg
b3B0OwogICBib29sIG9rID0gdHJ1ZTsKICAgaW50IGJpbmFyeSA9IC0xOworICBib29sIHBy
ZWZpeF90YWcgPSBmYWxzZTsKKyAgYm9vbCB0ZXh0ID0gZmFsc2U7CiAKICAgLyogU2V0dGlu
ZyB2YWx1ZXMgb2YgZ2xvYmFsIHZhcmlhYmxlcy4gICovCiAgIGluaXRpYWxpemVfbWFpbiAo
JmFyZ2MsICZhcmd2KTsKQEAgLTY3NSw2ICs3MjIsNyBAQCBtYWluIChpbnQgYXJnYywgY2hh
ciAqKmFyZ3YpCiAgICAgICAgIHF1aWV0ID0gZmFsc2U7CiAgICAgICAgIGJyZWFrOwogICAg
ICAgY2FzZSAndCc6CisgICAgICAgIHRleHQgPSB0cnVlOwogICAgICAgICBiaW5hcnkgPSAw
OwogICAgICAgICBicmVhazsKICAgICAgIGNhc2UgJ3cnOgpAQCAtNjkwLDYgKzczOCwxMCBA
QCBtYWluIChpbnQgYXJnYywgY2hhciAqKmFyZ3YpCiAgICAgICBjYXNlIFNUUklDVF9PUFRJ
T046CiAgICAgICAgIHN0cmljdCA9IHRydWU7CiAgICAgICAgIGJyZWFrOworICAgICAgY2Fz
ZSBUQUdfT1BUSU9OOgorICAgICAgICBwcmVmaXhfdGFnID0gdHJ1ZTsKKyAgICAgICAgYmlu
YXJ5ID0gMTsKKyAgICAgICAgYnJlYWs7CiAgICAgICBjYXNlX0dFVE9QVF9IRUxQX0NIQVI7
CiAgICAgICBjYXNlX0dFVE9QVF9WRVJTSU9OX0NIQVIgKFBST0dSQU1fTkFNRSwgQVVUSE9S
Uyk7CiAgICAgICBkZWZhdWx0OgpAQCAtNzM0LDYgKzc4NiwxNyBAQCBtYWluIChpbnQgYXJn
YywgY2hhciAqKmFyZ3YpCiAgICAgIHVzYWdlIChFWElUX0ZBSUxVUkUpOwogICAgfQogCisg
IGlmICh0ZXh0ICYmIHByZWZpeF90YWcpCisgICB7CisgICAgIC8qIFRoaXMgY291bGQgYmUg
c3VwcG9ydGVkIGluIGEgYmFja3dhcmRzIGNvbXBhdGlibGUgd2F5CisgICAgICAgIGJ5IHBy
ZWZpeGluZyB0aGUgb3V0cHV0IGxpbmUgd2l0aCBhIHNwYWNlIGluIHRleHQgbW9kZS4KKyAg
ICAgICAgSG93ZXZlciB0aGF0J3MgaW52YXNpdmUgZW5vdWdoIHRoYXQgaXQgd2FzIGFncmVl
ZCB0bworICAgICAgICBub3Qgc3VwcG9ydCB0aGlzIG1vZGUgd2l0aCAtLXRhZywgYXMgLS10
ZXh0IHVzZSBjYXNlcworICAgICAgICBhcmUgYWRlcXVhdGVseSBzdXBwb3J0ZWQgYnkgdGhl
IGRlZmF1bHQgb3V0cHV0IGZvcm1hdC4gICovCisgICAgIGVycm9yICgwLCAwLCBfKCItLXRh
ZyBkb2VzIG5vdCBzdXBwb3J0IC0tdGV4dCBtb2RlIikpOworICAgICB1c2FnZSAoRVhJVF9G
QUlMVVJFKTsKKyAgIH0KKwogICBpZiAoIU9fQklOQVJZICYmIGJpbmFyeSA8IDApCiAgICAg
YmluYXJ5ID0gMDsKIApAQCAtNzU0LDQxICs4MTcsMzYgQEAgbWFpbiAoaW50IGFyZ2MsIGNo
YXIgKiphcmd2KQogICAgICAgICAgICAgb2sgPSBmYWxzZTsKICAgICAgICAgICBlbHNlCiAg
ICAgICAgICAgICB7CisgICAgICAgICAgICAgIGlmIChwcmVmaXhfdGFnKQorICAgICAgICAg
ICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIGlmIChzdHJjaHIgKGZpbGUsICdcbicpIHx8
IHN0cmNociAoZmlsZSwgJ1xcJykpCisgICAgICAgICAgICAgICAgICAgIHB1dGNoYXIgKCdc
XCcpOworCisgICAgICAgICAgICAgICAgICBmcHV0cyAoRElHRVNUX1RZUEVfU1RSSU5HLCBz
dGRvdXQpOworICAgICAgICAgICAgICAgICAgZnB1dHMgKCIgKCIsIHN0ZG91dCk7CisgICAg
ICAgICAgICAgICAgICBwcmludF9maWxlbmFtZSAoZmlsZSk7CisgICAgICAgICAgICAgICAg
ICBmcHV0cyAoIikgPSAiLCBzdGRvdXQpOworICAgICAgICAgICAgICAgIH0KKwogICAgICAg
ICAgICAgICBzaXplX3QgaTsKIAogICAgICAgICAgICAgICAvKiBPdXRwdXQgYSBsZWFkaW5n
IGJhY2tzbGFzaCBpZiB0aGUgZmlsZSBuYW1lIGNvbnRhaW5zCiAgICAgICAgICAgICAgICAg
IGEgbmV3bGluZSBvciBiYWNrc2xhc2guICAqLwotICAgICAgICAgICAgICBpZiAoc3RyY2hy
IChmaWxlLCAnXG4nKSB8fCBzdHJjaHIgKGZpbGUsICdcXCcpKQorICAgICAgICAgICAgICBp
ZiAoIXByZWZpeF90YWcgJiYgKHN0cmNociAoZmlsZSwgJ1xuJykgfHwgc3RyY2hyIChmaWxl
LCAnXFwnKSkpCiAgICAgICAgICAgICAgICAgcHV0Y2hhciAoJ1xcJyk7CiAKICAgICAgICAg
ICAgICAgZm9yIChpID0gMDsgaSA8IChkaWdlc3RfaGV4X2J5dGVzIC8gMik7ICsraSkKICAg
ICAgICAgICAgICAgICBwcmludGYgKCIlMDJ4IiwgYmluX2J1ZmZlcltpXSk7CiAKLSAgICAg
ICAgICAgICAgcHV0Y2hhciAoJyAnKTsKLSAgICAgICAgICAgICAgaWYgKGZpbGVfaXNfYmlu
YXJ5KQotICAgICAgICAgICAgICAgIHB1dGNoYXIgKCcqJyk7Ci0gICAgICAgICAgICAgIGVs
c2UKLSAgICAgICAgICAgICAgICBwdXRjaGFyICgnICcpOwotCi0gICAgICAgICAgICAgIC8q
IFRyYW5zbGF0ZSBlYWNoIE5FV0xJTkUgYnl0ZSB0byB0aGUgc3RyaW5nLCAiXFxuIiwKLSAg
ICAgICAgICAgICAgICAgYW5kIGVhY2ggYmFja3NsYXNoIHRvICJcXFxcIi4gICovCi0gICAg
ICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBzdHJsZW4gKGZpbGUpOyArK2kpCisgICAgICAg
ICAgICAgIGlmICghcHJlZml4X3RhZykKICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAg
ICAgICAgICBzd2l0Y2ggKGZpbGVbaV0pCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAg
ICAgICAgICAgICAgICAgY2FzZSAnXG4nOgotICAgICAgICAgICAgICAgICAgICAgIGZwdXRz
ICgiXFxuIiwgc3Rkb3V0KTsKLSAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLQotICAg
ICAgICAgICAgICAgICAgICBjYXNlICdcXCc6Ci0gICAgICAgICAgICAgICAgICAgICAgZnB1
dHMgKCJcXFxcIiwgc3Rkb3V0KTsKLSAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLQot
ICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgICAgICAgICAgIHB1
dGNoYXIgKGZpbGVbaV0pOwotICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAg
ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBwdXRjaGFyICgnICcpOworCisg
ICAgICAgICAgICAgICAgICBwdXRjaGFyIChmaWxlX2lzX2JpbmFyeSA/ICcqJyA6ICcgJyk7
CisKKyAgICAgICAgICAgICAgICAgIHByaW50X2ZpbGVuYW1lIChmaWxlKTsKICAgICAgICAg
ICAgICAgICB9CisKICAgICAgICAgICAgICAgcHV0Y2hhciAoJ1xuJyk7CiAgICAgICAgICAg
ICB9CiAgICAgICAgIH0KZGlmZiAtLWdpdCBhL3Rlc3RzL21pc2MvbWQ1c3VtLWJzZCBiL3Rl
c3RzL21pc2MvbWQ1c3VtLWJzZAppbmRleCA4MjI2ZDdhLi4xNGFiYzA3IDEwMDc1NQotLS0g
YS90ZXN0cy9taXNjL21kNXN1bS1ic2QKKysrIGIvdGVzdHMvbWlzYy9tZDVzdW0tYnNkCkBA
IC0zOCw0ICszOCwzNyBAQCBtZDVzdW0gLS1zdHJpY3QgLWMgY2hlY2subWQ1IHx8IGZhaWw9
MQogIyBhbiBvcHRpb24gdG8gYXZvaWQgdGhlIGFtYmlndWl0eS4KIHRhaWwgLW4rMiBjaGVj
ay5tZDUgfCBtZDVzdW0gLS1zdHJpY3QgLWMgJiYgZmFpbD0xCiAKKyMtLXRhZyBvcHRpb24g
dGVzdAorCitmb3IgaSBpbiAnYScgJyBiJyAnKmMnICdkZCcgJyAnOyBkbworICBlY2hvICIk
aSIgPiAiJGkiCisgIG1kNXN1bSAtLXRhZyAiJGkiID4+IGNoZWNrLm1kNXN1bQorZG9uZQor
c2VkICdzLyAgLyAvJyBjaGVjay5tZDVzdW0gPiBjaGVjay5tZDUKKworbWQ1c3VtIC0tc3Ry
aWN0IC1jIGNoZWNrLm1kNXN1bSB8fCBmYWlsPTEKK21kNXN1bSAtLXN0cmljdCAtYyBjaGVj
ay5tZDUgfHwgZmFpbD0xCisKKyMtLXRhZyB0ZXN0aW5nIGZpbGVuYW1lcyB3aXRoIFx0IFxu
IGFuZCB0cmFpbGluZyBcCisKK25sPScKKycKK3RhYj0nCScKK2ZvciBpIGluICdhXGInICdh
XCcgImEke25sfWIiICJhJHt0YWJ9YiI7IGRvCisgIDo+ICIkaSIKKyAgbWQ1c3VtIC0tdGFn
ICIkaSIgPj4gY2hlY2subWQ1c3VtCitkb25lCisKK21kNXN1bSAtLXN0cmljdCAtYyBjaGVj
ay5tZDVzdW0gfHwgZmFpbD0xCisKK2V4X2ZpbGU9J3Rlc3QKK1xcZmlsZScKK2V4X291dHB1
dD0nXE1ENSAodGVzdFxuXFxcXGZpbGUpID0gZDQxZDhjZDk4ZjAwYjIwNGU5ODAwOTk4ZWNm
ODQyN2UnCisKK3RvdWNoICIkZXhfZmlsZSIKK3ByaW50ZiAiJXNcbiIgIiRleF9vdXRwdXQi
ID4gZXhwCittZDVzdW0gLS10YWcgIiRleF9maWxlIiA+IG91dAorCitjb21wYXJlIGV4cCBv
dXQgfHwgZmFpbD0xCisKIEV4aXQgJGZhaWwKLS0gCjEuNy4xMS40Cgo=
--------------090901010907040102090407--


From MAILER-DAEMON Fri Aug 24 06:09:27 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4qpT-0001JM-6M
	for mharc-coreutils@gnu.org; Fri, 24 Aug 2012 06:09:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45048)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4qpQ-0001I4-Oy
	for coreutils@gnu.org; Fri, 24 Aug 2012 06:09:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4qpP-00082R-TE
	for coreutils@gnu.org; Fri, 24 Aug 2012 06:09:24 -0400
Received: from mx1.redhat.com ([209.132.183.28]:2006)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4qpP-000828-L9
	for coreutils@gnu.org; Fri, 24 Aug 2012 06:09:23 -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 q7OA9Li5002445
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <coreutils@gnu.org>; Fri, 24 Aug 2012 06:09:21 -0400
Received: from [10.36.116.79] (ovpn-116-79.ams2.redhat.com [10.36.116.79])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7OA9JMM000784
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Fri, 24 Aug 2012 06:09:20 -0400
Message-ID: <503752CE.8080301@draigBrady.com>
Date: Fri, 24 Aug 2012 11:09:18 +0100
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: RFE: hash-type in sum utils
References: <597807603.706219.1343311598463.JavaMail.root@redhat.com>
	<50116758.9050802@draigBrady.com>
In-Reply-To: <50116758.9050802@draigBrady.com>
X-Enigmail-Version: 1.3.2
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
	q7OA9Li5002445
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 24 Aug 2012 10:09:25 -0000

On 07/26/2012 04:50 PM, P=C3=A1draig Brady wrote:
> BTW, I'm wondering why we enable escaping on output when
> there are '\' characters in the name, but no '\n' chars?
> Avoiding that would increase compatibility with the BSDs.

But also complicate unescaping within and outside of *sum.
So I won't change that I think.

cheers,
P=C3=A1draig.


From MAILER-DAEMON Fri Aug 24 06:14:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4quQ-0004CJ-Md
	for mharc-coreutils@gnu.org; Fri, 24 Aug 2012 06:14:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59063)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4quN-00049w-QO
	for coreutils@gnu.org; Fri, 24 Aug 2012 06:14:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4quK-00014H-Vo
	for coreutils@gnu.org; Fri, 24 Aug 2012 06:14:31 -0400
Received: from mx1.redhat.com ([209.132.183.28]:7199)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4quK-000144-N8
	for coreutils@gnu.org; Fri, 24 Aug 2012 06:14:28 -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 q7OAERQQ003834
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 24 Aug 2012 06:14:27 -0400
Received: from [10.36.116.79] (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 q7OAEOjH029361
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 24 Aug 2012 06:14:25 -0400
Message-ID: <503753FF.6030803@draigBrady.com>
Date: Fri, 24 Aug 2012 11:14:23 +0100
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: RFE: hash-type in sum utils
References: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
	<5034E5EF.3060500@redhat.com> <5035033C.6080204@draigBrady.com>
	<50350A45.8020706@redhat.com> <87628aevbl.fsf@rho.meyering.net>
	<5035E1F5.9050106@redhat.com> <5035EB8C.1040507@draigBrady.com>
	<5035F296.10805@redhat.com> <5035F4ED.40303@draigBrady.com>
	<5035F880.1030101@redhat.com>
In-Reply-To: <5035F880.1030101@redhat.com>
X-Enigmail-Version: 1.3.2
Content-Type: multipart/mixed; boundary="------------000307030004040506080004"
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, 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, 24 Aug 2012 10:14:33 -0000

This is a multi-part message in MIME format.
--------------000307030004040506080004
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id q7OAERQQ003834

On 08/23/2012 10:31 AM, Ondrej Oprala wrote:
> On 08/23/2012 11:16 AM, P=C3=A1draig Brady wrote:
>> On 08/23/2012 10:06 AM, Ondrej Oprala wrote:
>>> echo -E "$ex_output" > exp
>> That's using the shell's version which may not be portable.
>> To select the built echo binary use: env echo ...
>> Or even better, use: printf

> Corrected :)

Cool.
I've adjusted docs/tests/filename_unescape()
in the attached diff, which I'll push in a little while.

Note the filename_unescape() adjustment is to
ensure that '\0' is not written outside the
passed in buffer limits. This eases ongoing maintenance,
but is currently inconsequential as in the BSD case
we will write '\0' to the same place just after,
while in the standard case with the file name at
the end of the line, '\0' will already be present.

thanks!
P=C3=A1draig.

--------------000307030004040506080004
Content-Type: text/plain;
 name="sum-bsd.diff"
Content-Disposition: attachment;
 filename="sum-bsd.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL2RvYy9jb3JldXRpbHMudGV4aSBiL2RvYy9jb3JldXRpbHMudGV4aQpp
bmRleCAwNzEwZmNlLi44OGQzOTU2IDEwMDY0NAotLS0gYS9kb2MvY29yZXV0aWxzLnRleGkK
KysrIGIvZG9jL2NvcmV1dGlscy50ZXhpCkBAIC0zNzA4LDEyICszNzA4LDEzIEBAIGluZGlj
YXRpbmcgdGhlcmUgd2FzIGEgZmFpbHVyZS4KIEBpdGVtIC0tdGFnCiBAb3BpbmRleCAtLXRh
ZwogQGNpbmRleCBCU0Qgb3V0cHV0Ci1DcmVhdGUgYSBCU0Qgc3R5bGUgb3V0cHV0LiBJZiB0
aGUgZmlsZSBuYW1lIGNvbnRhaW5zIGEgJ1wnIG9yIGEgbmV3bGluZSwKLXB1dCBhICdcJyBh
dCB0aGUgYmVnaW5uaW5nIG9mIHRoZSBjb3JyZXNwb25kaW5nIGxpbmUuIEZpbGVuYW1lcyBj
b250YWluaW5nCi10aGVzZSBjaGFyYWN0ZXJzIHdpbGwgYWxzbyBiZSBlc2NhcGVkIGp1c3Qg
YXMgdGhleSB3b3VsZCBiZSB3aXRob3V0Ci1Ab3B0aW9uey0tdGFnfS4gVGhlIEBvcHRpb257
LS10YWd9IG9wdGlvbiBpbXBsaWVzIGJpbmFyeSBtb2RlLiBJZiBib3RoCi1Ab3B0aW9uey0t
dGFnfSBhbmQgQG9wdGlvbnstLXRleHR9IGFyZSBzcGVjaWZpZWQsIGlzc3VlIGEgd2Fybmlu
ZyBhbmQKLWV4aXQgbm9uemVyby4KK091dHB1dCBCU0Qgc3R5bGUgY2hlY2tzdW1zLCB3aGlj
aCBpbmRpY2F0ZSB0aGUgY2hlY2tzdW0gYWxnb3JpdGhtIHVzZWQuCitBcyBhIEBhY3Jvbnlt
e0dOVX0gZXh0ZW5zaW9uLCBmaWxlIG5hbWVzIHdpdGggcHJvYmxlbWF0aWMgY2hhcmFjdGVy
cworYXJlIGVzY2FwZWQgYXMgZGVzY3JpYmVkIGFib3ZlLCB3aXRoIHRoZSBzYW1lIGVzY2Fw
aW5nIGluZGljYXRvciBvZiBAc2FtcHtcfQorYXQgdGhlIHN0YXJ0IG9mIHRoZSBsaW5lLCBi
ZWluZyB1c2VkLgorVGhlIEBvcHRpb257LS10YWd9IG9wdGlvbiBpbXBsaWVzIGJpbmFyeSBt
b2RlLCBhbmQgaXMgZGlzYWxsb3dlZCB3aXRoCitAb3B0aW9uey0tdGV4dH0gbW9kZSBhcyBz
dXBwb3J0aW5nIHRoYXQgd291bGQgdW5uZWNlc3NhcmlseSBjb21wbGljYXRlCit0aGUgb3V0
cHV0IGZvcm1hdCwgd2hpbGUgcHJvdmlkaW5nIGxpdHRsZSBiZW5lZml0LgogCiBAaXRlbSAt
dAogQGl0ZW14IC0tdGV4dApkaWZmIC0tZ2l0IGEvc3JjL21kNXN1bS5jIGIvc3JjL21kNXN1
bS5jCmluZGV4IDg1Yzk2YjUuLmVhNzZjNTIgMTAwNjQ0Ci0tLSBhL3NyYy9tZDVzdW0uYwor
KysgYi9zcmMvbWQ1c3VtLmMKQEAgLTI2Nyw3ICsyNjcsOCBAQCBmaWxlbmFtZV91bmVzY2Fw
ZSAoY2hhciAqcywgc2l6ZV90IHNfbGVuKQogICAgICAgICAgIGJyZWFrOwogICAgICAgICB9
CiAgICAgfQotICAqZHN0ID0gJ1wwJzsKKyAgaWYgKGRzdCA8IHMgKyBzX2xlbikKKyAgICAq
ZHN0ID0gJ1wwJzsKIAogICByZXR1cm4gczsKIH0KZGlmZiAtLWdpdCBhL3Rlc3RzL21pc2Mv
bWQ1c3VtLWJzZCBiL3Rlc3RzL21pc2MvbWQ1c3VtLWJzZAppbmRleCAxNGFiYzA3Li4yOTcw
NDg0IDEwMDc1NQotLS0gYS90ZXN0cy9taXNjL21kNXN1bS1ic2QKKysrIGIvdGVzdHMvbWlz
Yy9tZDVzdW0tYnNkCkBAIC0xLDUgKzEsNiBAQAogIyEvYmluL3NoCi0jIG1ha2Ugc3VyZSAn
bWQ1c3VtIC1jJyB3b3JrcyBmb3IgYWx0ZXJuYXRlIEJTRCBmb3JtYXQgKG1kNSAtcikKKyMg
J21kNXN1bScgdGVzdHMgZm9yIGdlbmVyYXRpb24gYW5kIGNoZWNraW5nIG9mCisjIEJTRCB0
cmFkaXRpb25hbCBhbmQgYWx0ZXJuYXRlIGZvcm1hdHMgKG1kNSBbLXJdKQogCiAjIENvcHly
aWdodCAoQykgMjAxMS0yMDEyIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLgogCkBA
IC0xOSw2ICsyMCw5IEBACiAuICIke3NyY2Rpcj0ufS9pbml0LnNoIjsgcGF0aF9wcmVwZW5k
XyAuLi9zcmMKIHByaW50X3Zlcl8gbWQ1c3VtCiAKKyMjIEJTRCBhbHRlcm5hdGUgZm9ybWF0
IHRlc3RzICMjCisKKyMgRW5zdXJlIHdlIGNhbiAtLWNoZWNrIEJTRCBhbHRlcm5hdGUgZm9y
bWF0LgogIyBOb3RlIHdlIHN0YXJ0IHRoaXMgbGlzdCB3aXRoIGEgbmFtZQogIyB0aGF0J3Mg
dW5hbWJpZ3VvdXMgaW4gQlNEIGZvcm1hdC4KICMgSS5FLiBvbmUgbm90IHN0YXJ0aW5nIHdp
dGggJyAnIG9yICcqJwpAQCAtMzgsMzcgKzQyLDQ0IEBAIG1kNXN1bSAtLXN0cmljdCAtYyBj
aGVjay5tZDUgfHwgZmFpbD0xCiAjIGFuIG9wdGlvbiB0byBhdm9pZCB0aGUgYW1iaWd1aXR5
LgogdGFpbCAtbisyIGNoZWNrLm1kNSB8IG1kNXN1bSAtLXN0cmljdCAtYyAmJiBmYWlsPTEK
IAotIy0tdGFnIG9wdGlvbiB0ZXN0CiAKKyMjIEJTRCB0cmFkaXRpb25hbCBmb3JtYXQgdGVz
dHMgKC0tdGFnIG9wdGlvbikgIyMKKworIyBFbnN1cmUgLS10YWcgYW5kIC0tdGV4dCBhcmUg
bXV0dWFsbHkgZXhjbHVzaXZlCisjIFdlIGRvbid0IHN1cHBvcnQgLS10ZXh0IHdpdGggQlNE
IHRyYWRpdGlvbiBmb3JtYXQsCisjIGFzIHRoYXQgd291bGQgY29tcGxpY2F0ZSB0aGUgb3V0
cHV0IGZvcm1hdCwKKyMgd2hpbGUgcHJvdmlkaW5nIGxpdHRsZSBiZW5lZml0IG92ZXIgLS10
ZXh0IHByb2Nlc3NpbmcKKyMgYXZhaWxhYmxlIHdpdGggdGhlIGRlZmF1bHQgbWQ1c3VtIG91
dHB1dCBmb3JtYXQuCittZDVzdW0gLS10YWcgLS10ZXh0IC9kZXYvbnVsbCAmJiBmYWlsPTEK
KworIyBFbnN1cmUgd2UgY2FuIC0tY2hlY2sgQlNEIHRyYWRpdGlvbmFsIGZvcm1hdCB3ZSBw
cm9kdWNlCitybSBjaGVjay5tZDUKIGZvciBpIGluICdhJyAnIGInICcqYycgJ2RkJyAnICc7
IGRvCiAgIGVjaG8gIiRpIiA+ICIkaSIKLSAgbWQ1c3VtIC0tdGFnICIkaSIgPj4gY2hlY2su
bWQ1c3VtCisgIG1kNXN1bSAtLXRhZyAiJGkiID4+IGNoZWNrLm1kNQogZG9uZQotc2VkICdz
LyAgLyAvJyBjaGVjay5tZDVzdW0gPiBjaGVjay5tZDUKLQotbWQ1c3VtIC0tc3RyaWN0IC1j
IGNoZWNrLm1kNXN1bSB8fCBmYWlsPTEKIG1kNXN1bSAtLXN0cmljdCAtYyBjaGVjay5tZDUg
fHwgZmFpbD0xCiAKLSMtLXRhZyB0ZXN0aW5nIGZpbGVuYW1lcyB3aXRoIFx0IFxuIGFuZCB0
cmFpbGluZyBcCi0KKyMgRW5zdXJlIHdlIGNhbiAtLWNoZWNrIEJTRCB0cmFkaXRpb25hbCBm
b3JtYXQgd2UgcHJvZHVjZQorIyB3aXRoIHRoZSBHTlUgZXh0ZW5zaW9uIG9mIGVzY2FwZWQg
bmV3bGluZXMKIG5sPScKICcKIHRhYj0nCScKK3JtIGNoZWNrLm1kNQogZm9yIGkgaW4gJ2Fc
YicgJ2FcJyAiYSR7bmx9YiIgImEke3RhYn1iIjsgZG8KICAgOj4gIiRpIgotICBtZDVzdW0g
LS10YWcgIiRpIiA+PiBjaGVjay5tZDVzdW0KKyAgbWQ1c3VtIC0tdGFnICIkaSIgPj4gY2hl
Y2subWQ1CiBkb25lCittZDVzdW0gLS1zdHJpY3QgLWMgY2hlY2subWQ1IHx8IGZhaWw9MQog
Ci1tZDVzdW0gLS1zdHJpY3QgLWMgY2hlY2subWQ1c3VtIHx8IGZhaWw9MQotCisjIEVuc3Vy
ZSBCU0QgdHJhZGl0aW9uYWwgZm9ybWF0IHdpdGggR05VIGV4dGVuc2lvbiBlc2NhcGVzCisj
IGlzIGluIHRoZSBleHBlY3RlZCBmb3JtYXQKIGV4X2ZpbGU9J3Rlc3QKIFxcZmlsZScKIGV4
X291dHB1dD0nXE1ENSAodGVzdFxuXFxcXGZpbGUpID0gZDQxZDhjZDk4ZjAwYjIwNGU5ODAw
OTk4ZWNmODQyN2UnCi0KIHRvdWNoICIkZXhfZmlsZSIKIHByaW50ZiAiJXNcbiIgIiRleF9v
dXRwdXQiID4gZXhwCiBtZDVzdW0gLS10YWcgIiRleF9maWxlIiA+IG91dAotCiBjb21wYXJl
IGV4cCBvdXQgfHwgZmFpbD0xCiAKIEV4aXQgJGZhaWwK
--------------000307030004040506080004--


From MAILER-DAEMON Fri Aug 24 10:46:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4v9t-0005jC-8A
	for mharc-coreutils@gnu.org; Fri, 24 Aug 2012 10:46:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55396)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4v9q-0005ip-NV
	for coreutils@gnu.org; Fri, 24 Aug 2012 10:46:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4v9k-00043f-Pg
	for coreutils@gnu.org; Fri, 24 Aug 2012 10:46:46 -0400
Received: from mx1.redhat.com ([209.132.183.28]:56484)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T4v9k-00043X-H8
	for coreutils@gnu.org; Fri, 24 Aug 2012 10:46:40 -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 q7OEkdcO017029
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 24 Aug 2012 10:46:39 -0400
Received: from [10.36.116.84] (ovpn-116-84.ams2.redhat.com [10.36.116.84])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7OEka8i027835
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Fri, 24 Aug 2012 10:46:37 -0400
Message-ID: <503793CB.8020200@draigBrady.com>
Date: Fri, 24 Aug 2012 15:46:35 +0100
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Ondrej Oprala <ooprala@redhat.com>
Subject: Re: RFE: hash-type in sum utils
References: <638334381.1645273.1343907704773.JavaMail.root@redhat.com>
	<5034E5EF.3060500@redhat.com> <5035033C.6080204@draigBrady.com>
	<50350A45.8020706@redhat.com> <87628aevbl.fsf@rho.meyering.net>
	<5035E1F5.9050106@redhat.com> <5035EB8C.1040507@draigBrady.com>
	<5035F296.10805@redhat.com> <5035F4ED.40303@draigBrady.com>
	<5035F880.1030101@redhat.com> <503753FF.6030803@draigBrady.com>
In-Reply-To: <503753FF.6030803@draigBrady.com>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=UTF-8
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
	q7OEkdcO017029
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: D Yu Bolkhovityanov <D.Yu.Bolkhovityanov@inp.nsk.su>, 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, 24 Aug 2012 14:46:47 -0000

On 08/24/2012 11:14 AM, P=C3=A1draig Brady wrote:
> On 08/23/2012 10:31 AM, Ondrej Oprala wrote:
>> On 08/23/2012 11:16 AM, P=C3=A1draig Brady wrote:
>>> On 08/23/2012 10:06 AM, Ondrej Oprala wrote:
>>>> echo -E "$ex_output" > exp
>>> That's using the shell's version which may not be portable.
>>> To select the built echo binary use: env echo ...
>>> Or even better, use: printf
>=20
>> Corrected :)
>=20
> Cool.
> I've adjusted docs/tests/filename_unescape()
> in the attached diff, which I'll push in a little while.
>=20
> Note the filename_unescape() adjustment is to
> ensure that '\0' is not written outside the
> passed in buffer limits. This eases ongoing maintenance,
> but is currently inconsequential as in the BSD case
> we will write '\0' to the same place just after,
> while in the standard case with the file name at
> the end of the line, '\0' will already be present.

On final validation before commit I noticed this issue:

$ md5sum --tag --check /dev/null
md5sum: the --binary and --text options are meaningless when verifying ch=
ecksums

The following diff adjusts things to have a less confusing error:

$ md5sum --tag --check /dev/null
md5sum: the --tag option is meaningless when verifying checksums

pushing now...
P=C3=A1draig.

diff --git a/src/md5sum.c b/src/md5sum.c
index ea76c52..3f35eb8 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -693,7 +693,6 @@ main (int argc, char **argv)
   bool ok =3D true;
   int binary =3D -1;
   bool prefix_tag =3D false;
-  bool text =3D false;

   /* Setting values of global variables.  */
   initialize_main (&argc, &argv);
@@ -723,7 +722,6 @@ main (int argc, char **argv)
         quiet =3D false;
         break;
       case 't':
-        text =3D true;
         binary =3D 0;
         break;
       case 'w':
@@ -752,6 +750,24 @@ main (int argc, char **argv)
   min_digest_line_length =3D MIN_DIGEST_LINE_LENGTH;
   digest_hex_bytes =3D DIGEST_HEX_BYTES;

+  if (prefix_tag && !binary)
+   {
+     /* This could be supported in a backwards compatible way
+        by prefixing the output line with a space in text mode.
+        However that's invasive enough that it was agreed to
+        not support this mode with --tag, as --text use cases
+        are adequately supported by the default output format.  */
+     error (0, 0, _("--tag does not support --text mode"));
+     usage (EXIT_FAILURE);
+   }
+
+  if (prefix_tag && do_check)
+    {
+      error (0, 0, _("the --tag option is meaningless when "
+                     "verifying checksums"));
+      usage (EXIT_FAILURE);
+    }
+
   if (0 <=3D binary && do_check)
     {
       error (0, 0, _("the --binary and --text options are meaningless wh=
en "
@@ -787,17 +803,6 @@ main (int argc, char **argv)
      usage (EXIT_FAILURE);
    }

-  if (text && prefix_tag)
-   {
-     /* This could be supported in a backwards compatible way
-        by prefixing the output line with a space in text mode.
-        However that's invasive enough that it was agreed to
-        not support this mode with --tag, as --text use cases
-        are adequately supported by the default output format.  */
-     error (0, 0, _("--tag does not support --text mode"));
-     usage (EXIT_FAILURE);
-   }
-
   if (!O_BINARY && binary < 0)
     binary =3D 0;


From MAILER-DAEMON Sun Aug 26 13:49:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T5gxM-0001Z2-MP
	for mharc-coreutils@gnu.org; Sun, 26 Aug 2012 13:49:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59750)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <pclouds@gmail.com>) id 1T5Zgs-0008KX-I8
	for coreutils@gnu.org; Sun, 26 Aug 2012 06:03:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <pclouds@gmail.com>) id 1T5Zgr-0007gW-FT
	for coreutils@gnu.org; Sun, 26 Aug 2012 06:03:34 -0400
Received: from mail-pb0-f41.google.com ([209.85.160.41]:44028)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <pclouds@gmail.com>) id 1T5Zgr-0007gQ-8t
	for coreutils@gnu.org; Sun, 26 Aug 2012 06:03:33 -0400
Received: by pbbro12 with SMTP id ro12so6013265pbb.0
	for <coreutils@gnu.org>; Sun, 26 Aug 2012 03:03:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer;
	bh=Q+Rb7dmfrb8rwqD4jrXS4EgsgkUlaBWVF/KAvB6PVMs=;
	b=HumJwHidCne/lbmk1c06ya7mBeQP3dQeYzgpU3X7TRH1dY6+zGTLJ++ZW1iMTCxIUz
	6ZAV+U0jsQLPYWttMAztkcRantnlZukzxqPvKIKJUduOqI2Z299vzD9iUEDMNanj+e2/
	XC/LUBzFZVlu01s+JXeL91GaGf3EDC4USBN0RBnKPjax4hz+s2NLSz5x5HIBuTVFNH5A
	nhwNg8aysd+zCwj5KdtrzZU7TfafWb3ofkwlqDraqOP8gtF2x3oEdf5bFxhgSNL/jiQv
	WTl1MGGa1gGMEB/XKFINNGawMBO5vaRHWqYLkuAMZoks7SYqmow64gUvzS/sWn2lxj3Q
	R1Og==
Received: by 10.68.197.228 with SMTP id ix4mr26487414pbc.40.1345975411601;
	Sun, 26 Aug 2012 03:03:31 -0700 (PDT)
Received: from pclouds@gmail.com ([115.74.35.79])
	by mx.google.com with ESMTPS id to6sm12280117pbc.12.2012.08.26.03.03.28
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sun, 26 Aug 2012 03:03:30 -0700 (PDT)
Received: by pclouds@gmail.com (sSMTP sendmail emulation);
	Sun, 26 Aug 2012 16:57:23 +0700
From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?=
	<pclouds@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH] df: allow translators to reorder "1K-blocks" header
Date: Sun, 26 Aug 2012 16:57:22 +0700
Message-Id: <1345975042-32705-1-git-send-email-pclouds@gmail.com>
X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.160.41
X-Mailman-Approved-At: Sun, 26 Aug 2012 13:49:03 -0400
Cc: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?=
	<pclouds@gmail.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: Sun, 26 Aug 2012 10:03:35 -0000

* src/df.c (get_header): Mark "%s-%s" for translation. Give
translators some hint what it is for.
---
 src/df.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/df.c b/src/df.c
index 9d956cd..1de44af 100644
--- a/src/df.c
+++ b/src/df.c
@@ -315,7 +315,8 @@ get_header (void)
 
           char *num = human_readable (output_block_size, buf, opts, 1, 1);
 
-          if (asprintf (&cell, "%s-%s", num, header) == -1)
+          /* TRANSLATORS: this is "1K-blocks" header in df */
+          if (asprintf (&cell, _("%s-%s"), num, header) == -1)
             cell = NULL;
         }
       else if (header_mode == POSIX_MODE && field == TOTAL_FIELD)
@@ -323,7 +324,8 @@ get_header (void)
           char buf[INT_BUFSIZE_BOUND (uintmax_t)];
           char *num = umaxtostr (output_block_size, buf);
 
-          if (asprintf (&cell, "%s-%s", num, header) == -1)
+          /* TRANSLATORS: this is "1024-blocks" header in "df -P" */
+          if (asprintf (&cell, _("%s-%s"), num, header) == -1)
             cell = NULL;
         }
       else
-- 
1.7.12.rc2.18.g61b472e



From MAILER-DAEMON Sun Aug 26 16:40:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T5jd2-0001Yf-S3
	for mharc-coreutils@gnu.org; Sun, 26 Aug 2012 16:40:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35182)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T5jcz-0001Y4-Qw
	for coreutils@gnu.org; Sun, 26 Aug 2012 16:40:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T5jcy-0003y5-Uj
	for coreutils@gnu.org; Sun, 26 Aug 2012 16:40:13 -0400
Received: from mx.meyering.net ([88.168.87.75]:48882)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T5jcy-0003xX-Nv
	for coreutils@gnu.org; Sun, 26 Aug 2012 16:40:12 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id A7EF4600CC;
	Sun, 26 Aug 2012 22:40:11 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: =?utf-8?B?Tmd1eeG7hW4gVGjDoWkgTmfhu41j?= Duy <pclouds@gmail.com>
Subject: Re: [PATCH] df: allow translators to reorder "1K-blocks" header
In-Reply-To: <1345975042-32705-1-git-send-email-pclouds@gmail.com>
	(=?utf-8?B?Ik5ndXnhu4VuCVRow6FpIE5n4buNYw==?= Duy"'s message of "Sun, 26
	Aug 2012 16:57:22 +0700")
References: <1345975042-32705-1-git-send-email-pclouds@gmail.com>
Date: Sun, 26 Aug 2012 22:40:11 +0200
Message-ID: <871uito09g.fsf@rho.meyering.net>
Lines: 6
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Sun, 26 Aug 2012 20:40:15 -0000

Nguy=E1=BB=85n Th=C3=A1i Ng=E1=BB=8Dc Duy wrote:
> * src/df.c (get_header): Mark "%s-%s" for translation. Give
> translators some hint what it is for.

Thank you!
Pushed with minor tweaks.


From MAILER-DAEMON Sun Aug 26 18:18:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T5l9e-0005ZT-JP
	for mharc-coreutils@gnu.org; Sun, 26 Aug 2012 18:18:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59666)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T5l9V-0005Yu-2p
	for coreutils@gnu.org; Sun, 26 Aug 2012 18:18:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T5l9N-0004gj-Mr
	for coreutils@gnu.org; Sun, 26 Aug 2012 18:17:53 -0400
Received: from mx.meyering.net ([88.168.87.75]:49099)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T5l9M-0004gM-9r
	for coreutils@gnu.org; Sun, 26 Aug 2012 18:17:45 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 8B1A460158
	for <coreutils@gnu.org>; Mon, 27 Aug 2012 00:17:43 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH 1/3] tests: don't require @acronym{...} around POSIX
Date: Mon, 27 Aug 2012 00:17:43 +0200
Message-ID: <87pq6dmh6g.fsf@rho.meyering.net>
Lines: 1715
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 26 Aug 2012 22:18:01 -0000

Updating to the latest gnulib made a test in doc/Makefile.am fail.
This addresses the problem, and then syncs to latest gnulib:

>From 9766362d074a5b5a29f5798a63a7db43f82eaf09 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Sun, 26 Aug 2012 13:26:26 +0200
Subject: [PATCH 1/3] tests: don't require @acronym{...} around POSIX

* doc/Makefile.am (check-texinfo): Remove POSIX-checking part.
---
 doc/Makefile.am | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 0de9213..dea2756 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -61,7 +61,6 @@ syntax_checks =		\
 .PHONY: $(syntax_checks) check-texinfo

 # List words/regexps here that should not appear in the texinfo documentation.
-BAD_POSIX_PERL = /\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/
 check-texinfo: $(syntax_checks)
 	$(AM_V_GEN)fail=0;						\
 	grep '@url{' $(srcdir)/*.texi && fail=1;			\
@@ -70,9 +69,6 @@ check-texinfo: $(syntax_checks)
 	grep -n filename $(srcdir)/*.texi				\
 	    | $(EGREP) -v 'setfilename|[{]filename[}]'			\
 	  && fail=1;							\
-	$(PERL) -e 1 2> /dev/null && { $(PERL) -ne			\
-	  '$(BAD_POSIX_PERL) and print,exit 1'				\
-	  $(srcdir)/*.texi 2> /dev/null || fail=1; };			\
 	exit $$fail

 sc-avoid-builtin:
--
1.7.12.70.g851f7e6


>From 26db95ca472d772d3f00891c110a611c3331fbed Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Sun, 26 Aug 2012 13:28:34 +0200
Subject: [PATCH 2/3] maint: stop using @acronym{...} in texinfo sources

* doc/coreutils.texi: Remove all uses of @acronym{...},
per recommendation by Karl Berry.
* doc/perm.texi: Likewise.
* cfg.mk (local-checks-to-skip): Remove exemption, enabling
the @acronym{-prohibiting syntax-check rule.
---
 cfg.mk             |   3 +-
 doc/coreutils.texi | 434 ++++++++++++++++++++++++++---------------------------
 doc/perm.texi      |  12 +-
 3 files changed, 224 insertions(+), 225 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 9db8022..9244225 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -22,8 +22,7 @@ manual_title = Core GNU utilities
 url_dir_list = http://ftp.gnu.org/gnu/$(PACKAGE)

 # Tests not to run as part of "make distcheck".
-local-checks-to-skip = \
-  sc_texinfo_acronym
+local-checks-to-skip =

 # Tools used to bootstrap this package, used for "announcement".
 bootstrap-tools = autoconf,automake,gnulib,bison
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index e015fc5..f2620bc 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -272,7 +272,7 @@ Top
 * Charset selection in ptx::     Underlying character set considerations
 * Input processing in ptx::      Input fields, contexts, and keyword selection
 * Output formatting in ptx::     Types of output format, and sizing the fields
-* Compatibility in ptx::         The @acronym{GNU} extensions to @command{ptx}
+* Compatibility in ptx::         The GNU extensions to @command{ptx}

 Operating on fields

@@ -503,9 +503,9 @@ Introduction
 please get involved in improving this manual.  The entire @sc{gnu} community
 will benefit.

-@cindex @acronym{POSIX}
+@cindex POSIX
 The @sc{gnu} utilities documented here are mostly compatible with the
-@acronym{POSIX} standard.
+POSIX standard.
 @cindex bugs, reporting
 Please report bugs to @email{bug-coreutils@@gnu.org}.  Remember
 to include the version number, machine architecture, input files, and
@@ -584,7 +584,7 @@ Common options
 @itemx --null
 @opindex --null
 @cindex output @sc{nul}-byte-terminated lines
-Output a zero byte (@acronym{ASCII} @sc{nul}) at the end of each line,
+Output a zero byte (ASCII @sc{nul}) at the end of each line,
 rather than a newline.  This option enables other programs to parse the
 output of @command{\cmd\} even when that output would contain data
 with embedded newlines.
@@ -739,7 +739,7 @@ Common options
 * Traversing symlinks::         -H, -L, or -P, in some programs.
 * Treating / specially::        --preserve-root and --no-preserve-root.
 * Special built-in utilities::  @command{break}, @command{:}, @dots{}
-* Standards conformance::       Conformance to the @acronym{POSIX} standard.
+* Standards conformance::       Conformance to the POSIX standard.
 @end menu


@@ -755,7 +755,7 @@ Exit status
 that can be used to change how other commands work.
 For the vast majority of commands, an exit status of zero indicates
 success.  Failure is indicated by a nonzero value---typically
-@samp{1}, though it may differ on unusual platforms as @acronym{POSIX}
+@samp{1}, though it may differ on unusual platforms as POSIX
 requires only that it be nonzero.

 However, some of the programs documented here do produce
@@ -947,7 +947,7 @@ Block size
 @cindex kibibyte, definition of
 kibibyte: @math{2^{10} = 1024}.  @samp{K} is special: the SI prefix is
 @samp{k} and the ISO/IEC 80000-13 prefix is @samp{Ki}, but tradition and
-@acronym{POSIX} use @samp{k} to mean @samp{KiB}.
+POSIX use @samp{k} to mean @samp{KiB}.
 @item MB
 @cindex megabyte, definition of
 megabyte: @math{10^6 = 1,000,000}.
@@ -1047,7 +1047,7 @@ Signal specifications
 number like @samp{1}, or an exit status of a process terminated by the
 signal.  A signal name can be given in canonical form or prefixed by
 @samp{SIG}@.  The case of the letters is ignored.  The following signal names
-and numbers are supported on all @acronym{POSIX} compliant systems:
+and numbers are supported on all POSIX compliant systems:

 @table @samp
 @item HUP
@@ -1068,7 +1068,7 @@ Signal specifications

 @noindent
 Other supported signal names have system-dependent corresponding
-numbers.  All systems conforming to @acronym{POSIX} 1003.1-2001 also
+numbers.  All systems conforming to POSIX 1003.1-2001 also
 support the following signals:

 @table @samp
@@ -1103,7 +1103,7 @@ Signal specifications
 @end table

 @noindent
-@acronym{POSIX} 1003.1-2001 systems that support the @acronym{XSI} extension
+POSIX 1003.1-2001 systems that support the XSI extension
 also support the following signals:

 @table @samp
@@ -1124,7 +1124,7 @@ Signal specifications
 @end table

 @noindent
-@acronym{POSIX} 1003.1-2001 systems that support the @acronym{XRT} extension
+POSIX 1003.1-2001 systems that support the XRT extension
 also support at least eight real-time signals called @samp{RTMIN},
 @samp{RTMIN+1}, @dots{}, @samp{RTMAX-1}, @samp{RTMAX}.

@@ -1142,7 +1142,7 @@ Disambiguating names and IDs
 What if a user or group @emph{name} is a string of digits?
 @footnote{Using a number as a user name is common in some environments.}
 Should the command interpret it as a user name or as an ID@?
-@acronym{POSIX} requires that @command{chown} and @command{chgrp}
+POSIX requires that @command{chown} and @command{chgrp}
 first attempt to resolve the specified string as a name, and
 only once that fails, then try to interpret it as an ID@.
 This is troublesome when you want to specify a numeric ID, say 42,
@@ -1316,7 +1316,7 @@ Trailing slashes
 interpret a trailing slash as a request to dereference the symbolic link
 and so must rename the indirectly referenced @emph{directory} and not
 the symbolic link.  Although it may seem surprising that such behavior
-be the default, it is required by @acronym{POSIX} and is consistent with
+be the default, it is required by POSIX and is consistent with
 other parts of that standard.

 @node Traversing symlinks
@@ -1392,7 +1392,7 @@ Treating / specially
 actually unlink files, these commands are arguably more dangerous
 when operating recursively on @file{/}, since they often work much
 more quickly, and hence damage more files before an alert user can
-interrupt them.  Tradition and @acronym{POSIX} require these commands
+interrupt them.  Tradition and POSIX require these commands
 to operate recursively on @file{/}, so they default to
 @option{--no-preserve-root}, but using the @option{--preserve-root}
 option makes them safer for most purposes.  For convenience you can
@@ -1414,7 +1414,7 @@ Special built-in utilities
 exiting.

 Here is a list of the special built-in utilities that are standardized
-by @acronym{POSIX} 1003.1-2004.
+by POSIX 1003.1-2004.

 @quotation
 @t{.@: : break continue eval exec exit export readonly
@@ -1435,30 +1435,30 @@ Standards conformance

 @vindex POSIXLY_CORRECT
 In a few cases, the @sc{gnu} utilities' default behavior is
-incompatible with the @acronym{POSIX} standard.  To suppress these
+incompatible with the POSIX standard.  To suppress these
 incompatibilities, define the @env{POSIXLY_CORRECT} environment
-variable.  Unless you are checking for @acronym{POSIX} conformance, you
+variable.  Unless you are checking for POSIX conformance, you
 probably do not need to define @env{POSIXLY_CORRECT}.

-Newer versions of @acronym{POSIX} are occasionally incompatible with older
-versions.  For example, older versions of @acronym{POSIX} required the
+Newer versions of POSIX are occasionally incompatible with older
+versions.  For example, older versions of POSIX required the
 command @samp{sort +1} to sort based on the second and succeeding
-fields in each input line, but starting with @acronym{POSIX} 1003.1-2001
+fields in each input line, but starting with POSIX 1003.1-2001
 the same command is required to sort the file named @file{+1}, and you
 must instead use the command @samp{sort -k 2} to get the field-based
 sort.

 @vindex _POSIX2_VERSION
-The @sc{gnu} utilities normally conform to the version of @acronym{POSIX}
+The @sc{gnu} utilities normally conform to the version of POSIX
 that is standard for your system.  To cause them to conform to a
-different version of @acronym{POSIX}, define the @env{_POSIX2_VERSION}
+different version of POSIX, define the @env{_POSIX2_VERSION}
 environment variable to a value of the form @var{yyyymm} specifying
 the year and month the standard was adopted.  Three values are currently
 supported for @env{_POSIX2_VERSION}: @samp{199209} stands for
-@acronym{POSIX} 1003.2-1992, @samp{200112} stands for @acronym{POSIX}
-1003.1-2001, and @samp{200809} stands for @acronym{POSIX} 1003.1-2008.
+POSIX 1003.2-1992, @samp{200112} stands for POSIX
+1003.1-2001, and @samp{200809} stands for POSIX 1003.1-2008.
 For example, if you have a newer system but are running software
-that assumes an older version of @acronym{POSIX} and uses @samp{sort +1}
+that assumes an older version of POSIX and uses @samp{sort +1}
 or @samp{tail +10}, you can work around any compatibility problems by setting
 @samp{_POSIX2_VERSION=199209} in your environment.

@@ -1546,7 +1546,7 @@ cat invocation

 @item -u
 @opindex -u
-Ignored; for @acronym{POSIX} compatibility.
+Ignored; for POSIX compatibility.

 @item -v
 @itemx --show-nonprinting
@@ -1879,8 +1879,8 @@ od invocation
 @opindex --strings
 @cindex string constants, outputting
 Instead of the normal output, output only @dfn{string constants}: at
-least @var{bytes} consecutive @acronym{ASCII} graphic characters,
-followed by a zero byte (@acronym{ASCII} @sc{nul}).
+least @var{bytes} consecutive ASCII graphic characters,
+followed by a zero byte (ASCII @sc{nul}).
 Prefixes and suffixes on @var{bytes} are interpreted as for the
 @option{-j} option.

@@ -1898,14 +1898,14 @@ od invocation
 in the order that you specified.

 Adding a trailing ``z'' to any type specification appends a display
-of the @acronym{ASCII} character representation of the printable characters
+of the ASCII character representation of the printable characters
 to the output line generated by the type specification.

 @table @samp
 @item a
 named character, ignoring high-order bit
 @item c
-@acronym{ASCII} character or backslash escape,
+ASCII character or backslash escape,
 @item d
 signed decimal
 @item f
@@ -1993,7 +1993,7 @@ od invocation

 @item -c
 @opindex -c
-Output as @acronym{ASCII} characters or backslash escapes.  Equivalent to
+Output as ASCII characters or backslash escapes.  Equivalent to
 @samp{-t c}.

 @item -d
@@ -2053,7 +2053,7 @@ base64 invocation

 @command{base64} transforms data read from a file, or standard input,
 into (or from) base64 encoded form.  The base64 encoded form uses
-printable @acronym{ASCII} characters to represent binary data.
+printable ASCII characters to represent binary data.
 Synopses:

 @smallexample
@@ -2277,7 +2277,7 @@ pr invocation

 @item
 Some small @var{letter options} (@option{-s}, @option{-w}) have been
-redefined for better @acronym{POSIX} compliance.  The output of some further
+redefined for better POSIX compliance.  The output of some further
 cases has been adapted to other Unix systems.  These changes are not
 compatible with earlier versions of the program.

@@ -2294,7 +2294,7 @@ pr invocation
 @item
 Some of the option-arguments (compare @option{-s}, @option{-e},
 @option{-i}, @option{-n}) cannot be specified as separate arguments from the
-preceding option letter (already stated in the @acronym{POSIX} specification).
+preceding option letter (already stated in the POSIX specification).
 @end itemize

 The program accepts the following options.  Also see @ref{Common options}.
@@ -2375,7 +2375,7 @@ pr invocation
 The default date format is @samp{%Y-%m-%d %H:%M} (for example,
 @samp{2001-12-04 23:59});
 but if the @env{POSIXLY_CORRECT} environment variable is set
-and the @env{LC_TIME} locale category specifies the @acronym{POSIX}
+and the @env{LC_TIME} locale category specifies the POSIX
 locale, the default is @samp{%b %e %H:%M %Y} (for example,
 @samp{Dec@ @ 4 23:59 2001}.

@@ -2432,7 +2432,7 @@ pr invocation
 no column alignment used; may be used with
 @option{--sep-string[=@var{string}]}.  @option{-J} has been introduced
 (together with @option{-W} and @option{--sep-string})
-to disentangle the old (@acronym{POSIX}-compliant) options @option{-w} and
+to disentangle the old (POSIX-compliant) options @option{-w} and
 @option{-s} along with the three column options.


@@ -2478,7 +2478,7 @@ pr invocation
 printed with single column output only.  The TAB width varies
 with the TAB position, e.g., with the left @var{margin} specified
 by @option{-o} option.  With multicolumn output priority is given to
-@samp{equal width of output columns} (a @acronym{POSIX} specification).
+@samp{equal width of output columns} (a POSIX specification).
 The TAB width is fixed to the value of the first column and does
 not change with different values of left @var{margin}.  That means a
 fixed number of spaces is always printed in the place of the
@@ -2519,7 +2519,7 @@ pr invocation
 character} with @option{-w}.  Without @option{-s} the default separator
 @samp{space} is set.  @option{-s[char]} turns off line truncation of all
 three column options (@option{-COLUMN}|@option{-a -COLUMN}|@option{-m}) unless
-@option{-w} is set.  This is a @acronym{POSIX}-compliant formulation.
+@option{-w} is set.  This is a POSIX-compliant formulation.


 @item -S[@var{string}]
@@ -2569,7 +2569,7 @@ pr invocation
 off the default page width and any line truncation and column alignment.
 Lines of full length are merged, regardless of the column options
 set.  No @var{page_width} setting is possible with single column output.
-A @acronym{POSIX}-compliant formulation.
+A POSIX-compliant formulation.

 @item -W @var{page_width}
 @itemx --page_width=@var{page_width}
@@ -2961,7 +2961,7 @@ tail invocation
 then @dots{}} to decide which syntax to use.

 Even if your script assumes the standard behavior, you should still
-beware usages whose behaviors differ depending on the @acronym{POSIX}
+beware usages whose behaviors differ depending on the POSIX
 version.  For example, avoid @samp{tail - main.c}, since it might be
 interpreted as either @samp{tail main.c} or as @samp{tail -- -
 main.c}; avoid @samp{tail -c 4}, since it might mean either @samp{tail
@@ -3428,7 +3428,7 @@ wc invocation
 space between fields so that the numbers and file names normally line
 up nicely in columns.  The width of the count fields varies depending
 on the inputs, so you should not depend on a particular field width.
-However, as a @acronym{GNU} extension, if only one count is printed,
+However, as a GNU extension, if only one count is printed,
 it is guaranteed to be printed without leading spaces.

 By default, @command{wc} prints three counts: the newline, words, and byte
@@ -3490,17 +3490,17 @@ wc invocation
 @c @cindex including files from @command{\cmd\}
 Disallow processing files named on the command line, and instead process
 those named in file @var{file}; each name being terminated by a zero byte
-(@acronym{ASCII} @sc{nul}).
+(ASCII @sc{nul}).
 This is useful \withTotalOption\
 when the list of file names is so long that it may exceed a command line
 length limitation.
 In such cases, running @command{\cmd\} via @command{xargs} is undesirable
 because it splits the list into pieces and makes @command{\cmd\} print
 \subListOutput\ for each sublist rather than for the entire list.
-One way to produce a list of @acronym{ASCII} @sc{nul} terminated file
+One way to produce a list of ASCII @sc{nul} terminated file
 names is with @sc{gnu}
 @command{find}, using its @option{-print0} predicate.
-If @var{file} is @samp{-} then the @acronym{ASCII} @sc{nul} terminated
+If @var{file} is @samp{-} then the ASCII @sc{nul} terminated
 file names are read from standard input.
 @end macro
 @filesZeroFromOption{wc,,a total}
@@ -3593,7 +3593,7 @@ cksum invocation
 @command{cksum} output for the original files (typically given in the
 distribution).

-The CRC algorithm is specified by the @acronym{POSIX} standard.  It is not
+The CRC algorithm is specified by the POSIX standard.  It is not
 compatible with the BSD or System V @command{sum} algorithms (see the
 previous section); it is more robust.

@@ -3654,7 +3654,7 @@ md5sum invocation
 @cindex binary input files
 Treat each input file as binary, by reading it in binary mode and
 outputting a @samp{*} flag.  This is the inverse of @option{--text}.
-On systems like @acronym{GNU} that do not distinguish between binary
+On systems like GNU that do not distinguish between binary
 and text files, this option merely flags each input mode as binary:
 the MD5 checksum is unaffected.  This option is the default on systems
 like MS-DOS that distinguish between binary and text files, except
@@ -3709,7 +3709,7 @@ md5sum invocation
 @opindex --tag
 @cindex BSD output
 Output BSD style checksums, which indicate the checksum algorithm used.
-As a @acronym{GNU} extension, file names with problematic characters
+As a GNU extension, file names with problematic characters
 are escaped as described above, with the same escaping indicator of @samp{\}
 at the start of the line, being used.
 The @option{--tag} option implies binary mode, and is disallowed with
@@ -3723,7 +3723,7 @@ md5sum invocation
 @cindex text input files
 Treat each input file as text, by reading it in text mode and
 outputting a @samp{ } flag.  This is the inverse of @option{--binary}.
-This option is the default on systems like @acronym{GNU} that do not
+This option is the default on systems like GNU that do not
 distinguish between binary and text files.  On other systems, it is
 the default for reading standard input when standard input is a
 terminal.  This mode is never defaulted to if @option{--tag} is used.
@@ -3900,7 +3900,7 @@ sort invocation
 @vindex LC_COLLATE
 Unless otherwise specified, all comparisons use the character collating
 sequence specified by the @env{LC_COLLATE} locale.@footnote{If you
-use a non-@acronym{POSIX} locale (e.g., by setting @env{LC_ALL}
+use a non-POSIX locale (e.g., by setting @env{LC_ALL}
 to @samp{en_US}), then @command{sort} may produce output that is sorted
 differently than you're accustomed to.  In that case, set the @env{LC_ALL}
 environment variable to @samp{C}@.  Note that setting only @env{LC_COLLATE}
@@ -3935,7 +3935,7 @@ sort invocation
 specified globally or as part of a specific key field.  If no key
 fields are specified, global options apply to comparison of entire
 lines; otherwise the global options are inherited by key fields that do
-not specify any special options of their own.  In pre-@acronym{POSIX}
+not specify any special options of their own.  In pre-POSIX
 versions of @command{sort}, global options affect only later key fields,
 so portable shell scripts should specify global options first.

@@ -3963,7 +3963,7 @@ sort invocation
 @vindex LC_CTYPE
 Sort in @dfn{phone directory} order: ignore all characters except
 letters, digits and blanks when sorting.
-By default letters and digits are those of @acronym{ASCII} and a blank
+By default letters and digits are those of ASCII and a blank
 is a space or a tab, but the @env{LC_CTYPE} locale can change this.

 @item -f
@@ -4021,17 +4021,17 @@ sort invocation
 @cindex human numeric sort
 @vindex LC_NUMERIC
 Sort numerically, first by numeric sign (negative, zero, or positive);
-then by @acronym{SI} suffix (either empty, or @samp{k} or @samp{K}, or
+then by SI suffix (either empty, or @samp{k} or @samp{K}, or
 one of @samp{MGTPEZY}, in that order; @pxref{Block size}); and finally
 by numeric value.  For example, @samp{1023M} sorts before @samp{1G}
-because @samp{M} (mega) precedes @samp{G} (giga) as an @acronym{SI}
+because @samp{M} (mega) precedes @samp{G} (giga) as an SI
 suffix.  This option sorts values that are consistently scaled to the
 nearest suffix, regardless of whether suffixes denote powers of 1000
 or 1024, and it therefore sorts the output of any single invocation of
 the @command{df}, @command{du}, or @command{ls} commands that are
 invoked with their @option{--human-readable} or @option{--si} options.
 The syntax for numbers is the same as for the @option{--numeric-sort}
-option; the @acronym{SI} suffix must immediately follow the number.
+option; the SI suffix must immediately follow the number.

 @item -i
 @itemx --ignore-nonprinting
@@ -4276,7 +4276,7 @@ sort invocation
 as @option{-k 2}, or fields consisting of a range, as @option{-k 2,3},
 retain the field separators present between the endpoints of the range.

-To specify @acronym{ASCII} @sc{nul} as the field separator,
+To specify ASCII @sc{nul} as the field separator,
 use the two-character string @samp{\0}, e.g., @samp{sort -t '\0'}.

 @item -T @var{tempdir}
@@ -4325,9 +4325,9 @@ sort invocation
 @opindex -z
 @opindex --zero-terminated
 @cindex process zero-terminated items
-Delimit items with a zero byte rather than a newline (@acronym{ASCII} @sc{lf}).
-I.e., treat input as items separated by @acronym{ASCII} @sc{nul}
-and terminate output items with @acronym{ASCII} @sc{nul}.
+Delimit items with a zero byte rather than a newline (ASCII @sc{lf}).
+I.e., treat input as items separated by ASCII @sc{nul}
+and terminate output items with ASCII @sc{nul}.
 This option can be useful in conjunction with @samp{perl -0} or
 @samp{find -print0} and @samp{xargs -0} which do the same in order to
 reliably handle arbitrary file names (even those containing blanks
@@ -4340,9 +4340,9 @@ sort invocation
 Historical (BSD and System V) implementations of @command{sort} have
 differed in their interpretation of some options, particularly
 @option{-b}, @option{-f}, and @option{-n}.
-@sc{gnu} sort follows the @acronym{POSIX}
+@sc{gnu} sort follows the POSIX
 behavior, which is usually (but not always!) like the System V behavior.
-According to @acronym{POSIX}, @option{-n} no longer implies @option{-b}.  For
+According to POSIX, @option{-n} no longer implies @option{-b}.  For
 consistency, @option{-M} has been changed in the same way.  This may
 affect the meaning of character positions in field specifications in
 obscure cases.  The only fix is to add an explicit @option{-b}.
@@ -4517,7 +4517,7 @@ sort invocation
 @c @end example

 @item
-Use the common @acronym{DSU, Decorate Sort Undecorate} idiom to
+Use the common DSU, Decorate Sort Undecorate idiom to
 sort lines according to their length.

 @example
@@ -4777,12 +4777,12 @@ uniq invocation
 @item prepend
 Output a newline before each group of repeated lines.
 With @option{--zero-terminated} (@option{-z}), use a zero
-byte (@acronym{ASCII} @sc{nul}) instead of a newline.
+byte (ASCII @sc{nul}) instead of a newline.

 @item separate
 Separate groups of repeated lines with a single newline.
 With @option{--zero-terminated} (@option{-z}), use a zero
-byte (@acronym{ASCII} @sc{nul}) instead of a newline.
+byte (ASCII @sc{nul}) instead of a newline.
 This is the same as using @samp{prepend}, except that
 no delimiter is inserted before the first group, and hence
 may be better suited for output direct to users.
@@ -4988,10 +4988,10 @@ Charset selection in ptx

 @c FIXME:  People don't necessarily know what an IBM-PC was these days.
 As it is set up now, the program assumes that the input file is coded
-using 8-bit @acronym{ISO} 8859-1 code, also known as Latin-1 character set,
+using 8-bit ISO 8859-1 code, also known as Latin-1 character set,
 @emph{unless} it is compiled for MS-DOS, in which case it uses the
 character set of the IBM-PC@.  (@sc{gnu} @command{ptx} is not known to work on
-smaller MS-DOS machines anymore.)  Compared to 7-bit @acronym{ASCII}, the set
+smaller MS-DOS machines anymore.)  Compared to 7-bit ASCII, the set
 of characters which are letters is different; this alters the behavior
 of regular expression matching.  Thus, the default regular expression
 for a keyword allows foreign or diacriticized letters.  Keyword sorting,
@@ -5276,7 +5276,7 @@ Output formatting in ptx
 @code{~\@{ @}} respectively.  Other diacriticized characters of the
 underlying character set produce an appropriate @TeX{} sequence as far
 as possible.  The other non-graphical characters, like newline and tab,
-and all other characters which are not part of @acronym{ASCII}, are merely
+and all other characters which are not part of ASCII, are merely
 changed to exactly one space, with no special attempt to compress
 consecutive spaces.  Let me know how to improve this special character
 processing for @TeX{}.
@@ -5330,7 +5330,7 @@ Compatibility in ptx
 line width computations.

 @item
-All 256 bytes, even @acronym{ASCII} @sc{nul} bytes, are always read and
+All 256 bytes, even ASCII @sc{nul} bytes, are always read and
 processed from input file with no adverse effect, even if @sc{gnu} extensions
 are disabled.  However, System V @command{ptx} does not accept 8-bit
 characters, a few control characters are rejected, and the tilde
@@ -5636,7 +5636,7 @@ cut invocation

 @item --complement
 @opindex --complement
-This option is a @acronym{GNU} extension.
+This option is a GNU extension.
 Select for printing the complement of the bytes, characters or fields
 selected with the @option{-b}, @option{-c} or @option{-f} options.
 In other words, do @emph{not} print the bytes, characters or fields
@@ -5752,7 +5752,7 @@ join invocation
 If @samp{join -t ''} is specified then the whole line is considered which
 matches the default operation of sort.

-If the input has no unpairable lines, a @acronym{GNU} extension is
+If the input has no unpairable lines, a GNU extension is
 available; the sort order can be any order that considers two fields
 to be equal if and only if the sort comparison described above
 considers them to be equal.  For example:
@@ -5854,7 +5854,7 @@ join invocation
 (using either of the @option{-a} or @option{-v} options), there is no way
 to specify the join field using @var{m.n} in @var{field-list}
 if there are unpairable lines in both files.
-To give @command{join} that functionality, @acronym{POSIX} invented the @samp{0}
+To give @command{join} that functionality, POSIX invented the @samp{0}
 field specification notation.

 The elements in @var{field-list}
@@ -5872,7 +5872,7 @@ join invocation
 Use @samp{sort -t @var{char}}, without the @option{-b} option of
 @samp{sort}, to produce this ordering.  If @samp{join -t ''} is specified,
 the whole line is considered, matching the default operation of sort.
-If @samp{-t '\0'} is specified then the @acronym{ASCII} @sc{nul}
+If @samp{-t '\0'} is specified then the ASCII @sc{nul}
 character is used to delimit the fields.

 @item -v @var{file-number}
@@ -6013,10 +6013,10 @@ Character sets
 as well as digits.

 Many historically common and even accepted uses of ranges are not
-portable.  For example, on @acronym{EBCDIC} hosts using the @samp{A-Z}
+portable.  For example, on EBCDIC hosts using the @samp{A-Z}
 range will not do what most would expect because @samp{A} through @samp{Z}
-are not contiguous as they are in @acronym{ASCII}@.
-If you can rely on a @acronym{POSIX} compliant version of @command{tr}, then
+are not contiguous as they are in ASCII@.
+If you can rely on a POSIX compliant version of @command{tr}, then
 the best way to work around this is to use character classes (see below).
 Otherwise, it is most portable (and most ugly) to enumerate the members
 of the ranges.
@@ -6136,7 +6136,7 @@ Translating
 @var{set2}, the extra characters at the end of @var{set2} are ignored.

 On the other hand, making @var{set1} longer than @var{set2} is not
-portable; @acronym{POSIX} says that the result is undefined.  In this situation,
+portable; POSIX says that the result is undefined.  In this situation,
 BSD @command{tr} pads @var{set2} to the length of @var{set1} by repeating
 the last character of @var{set2} as many times as necessary.  System V
 @command{tr} truncates @var{set1} to the length of @var{set2}.
@@ -6161,7 +6161,7 @@ Translating
 @noindent
 By the way, the above idiom is not portable because it uses ranges, and
 it assumes that the octal code for newline is 012.
-Assuming a @acronym{POSIX} compliant @command{tr}, here is a better
+Assuming a POSIX compliant @command{tr}, here is a better
 way to write it:

 @example
@@ -6339,7 +6339,7 @@ unexpand invocation
 @command{unexpand} writes the contents of each given @var{file}, or
 standard input if none are given or for a @var{file} of @samp{-}, to
 standard output, converting blanks at the beginning of each line into
-as many tab characters as needed.  In the default @acronym{POSIX}
+as many tab characters as needed.  In the default POSIX
 locale, a @dfn{blank} is a space or a tab; other locales may specify
 additional blank characters.  Synopsis:

@@ -6418,7 +6418,7 @@ ls invocation

 @vindex LC_ALL
 By default, the output is sorted alphabetically, according to the locale
-settings in effect.@footnote{If you use a non-@acronym{POSIX}
+settings in effect.@footnote{If you use a non-POSIX
 locale (e.g., by setting @env{LC_ALL} to @samp{en_US}), then @command{ls} may
 produce output that is sorted differently than you're accustomed to.
 In that case, set the @env{LC_ALL} environment variable to @samp{C}.}
@@ -6901,7 +6901,7 @@ Sorting the output
 @cindex sorting @command{ls} output
 These options change the order in which @command{ls} sorts the information
 it outputs.  By default, sorting is done by character code
-(e.g., @acronym{ASCII} order).
+(e.g., ASCII order).

 @table @samp

@@ -7213,7 +7213,7 @@ General output formatting
 @c FIXME: remove in 2009, if Apple Terminal has been fixed for long enough.
 Some terminal emulators (at least Apple Terminal 1.5 (133) from Mac OS X 10.4.8)
 do not properly align columns to the right of a TAB following a
-non-@acronym{ASCII} byte.  If you use such a terminal emulator, use the
+non-ASCII byte.  If you use such a terminal emulator, use the
 @option{-T0} option or put @code{TABSIZE=0} in your environment to tell
 @command{ls} to align using spaces, not tabs.

@@ -7276,25 +7276,25 @@ Formatting file timestamps
 spaces in one of the two formats.

 @item full-iso
-List timestamps in full using @acronym{ISO} 8601 date, time, and time zone
+List timestamps in full using ISO 8601 date, time, and time zone
 format with nanosecond precision, e.g., @samp{2002-03-30
 23:45:56.477817180 -0700}.  This style is equivalent to
 @samp{+%Y-%m-%d %H:%M:%S.%N %z}.

 This is useful because the time output includes all the information that
 is available from the operating system.  For example, this can help
-explain @command{make}'s behavior, since @acronym{GNU} @command{make}
+explain @command{make}'s behavior, since GNU @command{make}
 uses the full timestamp to determine whether a file is out of date.

 @item long-iso
-List @acronym{ISO} 8601 date and time in minutes, e.g.,
+List ISO 8601 date and time in minutes, e.g.,
 @samp{2002-03-30 23:45}.  These timestamps are shorter than
 @samp{full-iso} timestamps, and are usually good enough for everyday
 work.  This style is equivalent to @samp{+%Y-%m-%d %H:%M}.

 @item iso
-List @acronym{ISO} 8601 dates for non-recent timestamps (e.g.,
-@samp{2002-03-30@ }), and @acronym{ISO} 8601 month, day, hour, and
+List ISO 8601 dates for non-recent timestamps (e.g.,
+@samp{2002-03-30@ }), and ISO 8601 month, day, hour, and
 minute for recent timestamps (e.g., @samp{03-30 23:45}).  These
 timestamps are uglier than @samp{long-iso} timestamps, but they carry
 nearly the same information in a smaller space and their brevity helps
@@ -7318,7 +7318,7 @@ Formatting file timestamps
 widely, but they are easier for many people to read.

 The @env{LC_TIME} locale category specifies the timestamp format.  The
-default @acronym{POSIX} locale uses timestamps like @samp{Mar 30@
+default POSIX locale uses timestamps like @samp{Mar 30@
 @ 2002} and @samp{Mar 30 23:45}; in this locale, the following two
 @command{ls} invocations are equivalent:

@@ -7337,21 +7337,21 @@ Formatting file timestamps

 @item posix-@var{style}
 @vindex LC_TIME
-List @acronym{POSIX}-locale timestamps if the @env{LC_TIME} locale
-category is @acronym{POSIX}, @var{style} timestamps otherwise.  For
+List POSIX-locale timestamps if the @env{LC_TIME} locale
+category is POSIX, @var{style} timestamps otherwise.  For
 example, the @samp{posix-long-iso} style lists
 timestamps like @samp{Mar 30@ @ 2002} and @samp{Mar 30 23:45} when in
-the @acronym{POSIX} locale, and like @samp{2002-03-30 23:45} otherwise.
+the POSIX locale, and like @samp{2002-03-30 23:45} otherwise.
 @end table
 @end table

 @vindex TIME_STYLE
 You can specify the default value of the @option{--time-style} option
 with the environment variable @env{TIME_STYLE}; if @env{TIME_STYLE} is not set
-the default style is @samp{locale}.  @acronym{GNU} Emacs 21.3 and
+the default style is @samp{locale}.  GNU Emacs 21.3 and
 later use the @option{--dired} option and therefore can parse any date
 format, but if you are using Emacs 21.1 or 21.2 and specify a
-non-@acronym{POSIX} locale you may need to set
+non-POSIX locale you may need to set
 @samp{TIME_STYLE="posix-long-iso"}.

 To avoid certain denial-of-service attacks, timestamps that would be
@@ -7417,7 +7417,7 @@ Formatting the file names
 @item shell
 Quote strings for the shell if they contain shell metacharacters or would
 cause ambiguous output.
-The quoting is suitable for @acronym{POSIX}-compatible shells like
+The quoting is suitable for POSIX-compatible shells like
 @command{bash}, but it does not always work for incompatible shells
 like @command{csh}.
 @item shell-always
@@ -7628,7 +7628,7 @@ cp invocation
 However, when copying to a dangling symbolic link, @command{cp}
 refuses by default, and fails with a diagnostic, since the operation
 is inherently dangerous.  This behavior is contrary to historical
-practice and to @acronym{POSIX}@.
+practice and to POSIX@.
 Set @env{POSIXLY_CORRECT} to make @command{cp} attempt to create
 the target of a dangling destination symlink, in spite of the possible risk.
 Also, when an option like
@@ -7896,7 +7896,7 @@ cp invocation
 non-@sc{gnu} systems, @option{-r} implies the equivalent of
 @option{-L} and @option{--copy-contents} for historical reasons.
 Also, it is not portable to use @option{-R} to copy symbolic links
-unless you also specify @option{-P}, as @acronym{POSIX} allows
+unless you also specify @option{-P}, as POSIX allows
 implementations that dereference symbolic links by default.

 @item --reflink[=@var{when}]
@@ -8131,19 +8131,19 @@ dd invocation

 @item ascii
 @opindex ascii@r{, converting to}
-Convert @acronym{EBCDIC} to @acronym{ASCII},
-using the conversion table specified by @acronym{POSIX}@.
+Convert EBCDIC to ASCII,
+using the conversion table specified by POSIX@.
 This provides a 1:1 translation for all 256 bytes.

 @item ebcdic
 @opindex ebcdic@r{, converting to}
-Convert @acronym{ASCII} to @acronym{EBCDIC}@.
+Convert ASCII to EBCDIC@.
 This is the inverse of the @samp{ascii} conversion.

 @item ibm
 @opindex alternate ebcdic@r{, converting to}
-Convert @acronym{ASCII} to alternate @acronym{EBCDIC},
-using the alternate conversion table specified by @acronym{POSIX}@.
+Convert ASCII to alternate EBCDIC,
+using the alternate conversion table specified by POSIX@.
 This is not a 1:1 translation, but reflects common historical practice
 for @samp{~}, @samp{[}, and @samp{]}.

@@ -8194,7 +8194,7 @@ dd invocation
 (since there is nothing to swap it with).

 @item sync
-@opindex sync @r{(padding with @acronym{ASCII} @sc{nul}s)}
+@opindex sync @r{(padding with ASCII @sc{nul}s)}
 Pad every input block to size of @samp{ibs} with trailing zero bytes.
 When used with @samp{block} or @samp{unblock}, pad with spaces instead of
 zero bytes.
@@ -8271,7 +8271,7 @@ dd invocation
 @opindex cio
 @cindex concurrent I/O
 Use concurrent I/O mode for data.  This mode performs direct I/O
-and drops the @acronym{POSIX} requirement to serialize all I/O to the same file.
+and drops the POSIX requirement to serialize all I/O to the same file.
 A file cannot be opened in CIO mode and with a standard open at the
 same time.

@@ -8347,7 +8347,7 @@ dd invocation
 @cindex controlling terminal
 Do not assign the file to be a controlling terminal for @command{dd}.
 This has no effect when the file is not a terminal.
-On many hosts (e.g., @acronym{GNU}/Linux hosts), this option has no effect
+On many hosts (e.g., GNU/Linux hosts), this option has no effect
 at all.

 @item nofollow
@@ -8982,7 +8982,7 @@ shred invocation
 For more details, see the source code and Peter Gutmann's paper
 @uref{http://www.cs.auckland.ac.nz/~pgut001/pubs/secure_del.html,
 @cite{Secure Deletion of Data from Magnetic and Solid-State Memory}},
-from the proceedings of the Sixth @acronym{USENIX} Security Symposium (San Jose,
+from the proceedings of the Sixth USENIX Security Symposium (San Jose,
 California, July 22--25, 1996).

 @strong{Please note} that @command{shred} relies on a very important assumption:
@@ -9236,10 +9236,10 @@ link invocation
 @command{link} simply calls @code{link (@var{filename}, @var{linkname})}
 to create the link.

-On a @acronym{GNU} system, this command acts like @samp{ln --directory
+On a GNU system, this command acts like @samp{ln --directory
 --no-target-directory @var{filename} @var{linkname}}.  However, the
 @option{--directory} and @option{--no-target-directory} options are
-not specified by @acronym{POSIX}, and the @command{link} command is
+not specified by POSIX, and the @command{link} command is
 more portable in practice.

 If @var{filename} is a symbolic link, it is unspecified whether
@@ -9306,7 +9306,7 @@ ln invocation
 a directory; on those where it is allowed, only the super-user can do
 so (and with caution, since creating a cycle will cause problems to many
 other utilities).  Hard links cannot cross file system boundaries.  (These
-restrictions are not mandated by @acronym{POSIX}, however.)
+restrictions are not mandated by POSIX, however.)

 @cindex dereferencing symbolic links
 @cindex symbolic link, defined
@@ -9527,7 +9527,7 @@ mkdir invocation
 everyone) for the point of the departure.  @xref{File permissions}.

 Normally the directory has the desired file mode bits at the moment it
-is created.  As a @acronym{GNU} extension, @var{mode} may also mention
+is created.  As a GNU extension, @var{mode} may also mention
 special mode bits, but in this case there may be a temporary window
 during which the directory exists but its special mode bits are
 incorrect.  @xref{Directory Setuid and Setgid}, for how the
@@ -9963,8 +9963,8 @@ chown invocation
 @xref{Disambiguating names and IDs}.

 Some older scripts may still use @samp{.} in place of the @samp{:} separator.
-@acronym{POSIX} 1003.1-2001 (@pxref{Standards conformance}) does not
-require support for that, but for backward compatibility @acronym{GNU}
+POSIX 1003.1-2001 (@pxref{Standards conformance}) does not
+require support for that, but for backward compatibility GNU
 @command{chown} supports @samp{.} so long as no ambiguity results.
 New scripts should avoid the use of @samp{.} because it is not
 portable, and because it has undesirable results if the entire
@@ -10461,7 +10461,7 @@ touch invocation
 example, @option{--date="2004-02-27 14:19:13.489392193 +0530"}
 specifies the instant of time that is 489,392,193 nanoseconds after
 February 27, 2004 at 2:19:13 PM in a time zone that is 5 hours and 30
-minutes east of @acronym{UTC}@.  @xref{Date input formats}.
+minutes east of UTC@.  @xref{Date input formats}.
 File systems that do not support high-resolution time stamps
 silently ignore any excess precision here.

@@ -10481,7 +10481,7 @@ touch invocation
 created, but option @option{-c} must also be used to avoid warning
 about files that do not exist.  Not all systems support changing the
 timestamps of symlinks, since underlying system support for this
-action was not required until @acronym{POSIX} 2008.  Also, on some
+action was not required until POSIX 2008.  Also, on some
 systems, the mere act of examining a symbolic link changes the access
 time, such that only changes to the modification time will persist
 long enough to be observable.  When coupled with option @option{-r}, a
@@ -10665,10 +10665,10 @@ df invocation
 @opindex -P
 @opindex --portability
 @cindex one-line output format
-@cindex @acronym{POSIX} output format
+@cindex POSIX output format
 @cindex portable output format
 @cindex output format, portable
-Use the @acronym{POSIX} output format.  This is like the default format except
+Use the POSIX output format.  This is like the default format except
 for the following:

 @enumerate
@@ -10679,7 +10679,7 @@ df invocation
 some network mounts), the columns are misaligned.

 @item
-The labels in the header output line are changed to conform to @acronym{POSIX}.
+The labels in the header output line are changed to conform to POSIX.

 @item
 The default block size and output format are unaffected by the
@@ -10721,8 +10721,8 @@ df invocation
 @table @samp

 @item nfs
-@cindex @acronym{NFS} file system type
-An @acronym{NFS} file system, i.e., one mounted over a network from another
+@cindex NFS file system type
+An NFS file system, i.e., one mounted over a network from another
 machine.  This is the one type name which seems to be used uniformly by
 all systems.

@@ -10983,19 +10983,19 @@ du invocation
 @env{LC_TIME} locale category.

 @item full-iso
-List timestamps in full using @acronym{ISO} 8601 date, time, and time zone
+List timestamps in full using ISO 8601 date, time, and time zone
 format with nanosecond precision, e.g., @samp{2002-03-30
 23:45:56.477817180 -0700}.  This style is equivalent to
 @samp{+%Y-%m-%d %H:%M:%S.%N %z}.

 @item long-iso
-List @acronym{ISO} 8601 date and time in minutes, e.g.,
+List ISO 8601 date and time in minutes, e.g.,
 @samp{2002-03-30 23:45}.  These timestamps are shorter than
 @samp{full-iso} timestamps, and are usually good enough for everyday
 work.  This style is equivalent to @samp{+%Y-%m-%d %H:%M}.

 @item iso
-List @acronym{ISO} 8601 dates for timestamps, e.g., @samp{2002-03-30}.
+List ISO 8601 dates for timestamps, e.g., @samp{2002-03-30}.
 This style is equivalent to @samp{+%Y-%m-%d}.
 @end table

@@ -11421,7 +11421,7 @@ echo invocation
 example, @code{echo -ne hello} outputs @samp{-ne hello} instead of
 plain @samp{hello}.

-@acronym{POSIX} does not require support for any options, and says
+POSIX does not require support for any options, and says
 that the behavior of @command{echo} is implementation-defined if any
 @var{string} contains a backslash or if the first argument is
 @option{-n}.  Portable programs can use the @command{printf} command
@@ -11497,8 +11497,8 @@ printf invocation
 character.  Any remaining characters are silently ignored if the
 @env{POSIXLY_CORRECT} environment variable is set; otherwise, a
 warning is printed.  For example, @samp{printf "%d" "'a"} outputs
-@samp{97} on hosts that use the @acronym{ASCII} character set, since
-@samp{a} has the numeric value 97 in @acronym{ASCII}.
+@samp{97} on hosts that use the ASCII character set, since
+@samp{a} has the numeric value 97 in ASCII.

 @end itemize

@@ -11526,8 +11526,8 @@ printf invocation
 @cindex ISO/IEC 10646
 @vindex LC_CTYPE
 @command{printf} interprets two character syntaxes introduced in
-@acronym{ISO} C 99:
-@samp{\u} for 16-bit Unicode (@acronym{ISO}/@acronym{IEC} 10646)
+ISO C 99:
+@samp{\u} for 16-bit Unicode (ISO/IEC 10646)
 characters, specified as
 four hexadecimal digits @var{hhhh}, and @samp{\U} for 32-bit Unicode
 characters, specified as eight hexadecimal digits @var{hhhhhhhh}.
@@ -11554,7 +11554,7 @@ printf invocation

 @noindent
 will be output correctly in all locales supporting the Euro symbol
-(@acronym{ISO}-8859-15, UTF-8, and others).  Similarly, a Chinese string
+(ISO-8859-15, UTF-8, and others).  Similarly, a Chinese string

 @example
 $ env printf '\u4e2d\u6587'
@@ -11568,7 +11568,7 @@ printf invocation
 your shell's search path, and not a shell alias or a built-in function.

 For larger strings, you don't need to look up the hexadecimal code
-values of each character one by one.  @acronym{ASCII} characters mixed with \u
+values of each character one by one.  ASCII characters mixed with \u
 escape sequences is also known as the JAVA source file encoding.  You can
 use GNU recode 3.5c (or newer) to convert strings to this encoding.  Here
 is how to convert a piece of text into a shell script which will output
@@ -11650,7 +11650,7 @@ false invocation

 Portable programs should not assume that the exit status of
 @command{false} is 1, as it is greater than 1 on some
-non-@acronym{GNU} hosts.
+non-GNU hosts.


 @node true invocation
@@ -12126,7 +12126,7 @@ String expressions
 In the regular expression, @code{\+}, @code{\?}, and @code{\|} are
 operators which respectively match one or more, zero or one, or separate
 alternatives.  SunOS and other @command{expr}'s treat these as regular
-characters.  (@acronym{POSIX} allows either behavior.)
+characters.  (POSIX allows either behavior.)
 @xref{Top, , Regular Expression Library, regex, Regex}, for details of
 regular expression syntax.  Some examples are in @ref{Examples of expr}.

@@ -12158,7 +12158,7 @@ String expressions
 This makes it possible to test @code{expr length + "$x"} or
 @code{expr + "$x" : '.*/\(.\)'} and have it do the right thing even if
 the value of @var{$x} happens to be (for example) @code{/} or @code{index}.
-This operator is a @acronym{GNU} extension.  Portable shell scripts should use
+This operator is a GNU extension.  Portable shell scripts should use
 @code{@w{" $token"} : @w{' \(.*\)'}} instead of @code{+ "$token"}.

 @end table
@@ -12505,8 +12505,8 @@ basename invocation
 @end macro
 @basenameAndDirname

-@acronym{POSIX} allows the implementation to define the results if
-@var{name} is empty or @samp{//}.  In the former case, @acronym{GNU}
+POSIX allows the implementation to define the results if
+@var{name} is empty or @samp{//}.  In the former case, GNU
 @command{basename} returns the empty string.  In the latter case, the
 result is @samp{//} on platforms where @var{//} is distinct from
 @var{/}, and @samp{/} on platforms where there is no difference.
@@ -12581,8 +12581,8 @@ dirname invocation

 @basenameAndDirname

-@acronym{POSIX} allows the implementation to define the results if
-@var{name} is @samp{//}.  With @acronym{GNU} @command{dirname}, the
+POSIX allows the implementation to define the results if
+@var{name} is @samp{//}.  With GNU @command{dirname}, the
 result is @samp{//} on platforms where @var{//} is distinct from
 @var{/}, and @samp{/} on platforms where there is no difference.

@@ -12662,13 +12662,13 @@ pathchk invocation
 A file name is empty.

 @item
-A file name contains a character outside the @acronym{POSIX} portable file
+A file name contains a character outside the POSIX portable file
 name character set, namely, the ASCII letters and digits, @samp{.},
 @samp{_}, @samp{-}, and @samp{/}.

 @item
 The length of a file name or one of its components exceeds the
-@acronym{POSIX} minimum limits for portability.
+POSIX minimum limits for portability.
 @end enumerate

 @item -P
@@ -12678,7 +12678,7 @@ pathchk invocation

 @item --portability
 @opindex --portability
-Print an error message if a file name is not portable to all @acronym{POSIX}
+Print an error message if a file name is not portable to all POSIX
 hosts.  This option is equivalent to @samp{-p -P}.

 @end table
@@ -13090,8 +13090,8 @@ stty invocation
 @opindex --file
 Set the line opened by the file name specified in @var{device} instead of
 the tty line connected to standard input.  This option is necessary
-because opening a @acronym{POSIX} tty requires use of the
-@code{O_NONDELAY} flag to prevent a @acronym{POSIX} tty from blocking
+because opening a POSIX tty requires use of the
+@code{O_NONDELAY} flag to prevent a POSIX tty from blocking
 until the carrier detect line is high if
 the @code{clocal} flag is not set.  Hence, it is not always possible
 to allow the shell to open the device in the traditional manner.
@@ -13113,9 +13113,9 @@ stty invocation
 case, that is, when @emph{not} negated (unless stated otherwise,
 of course).

-Some settings are not available on all @acronym{POSIX} systems, since they use
+Some settings are not available on all POSIX systems, since they use
 extensions.  Such arguments are marked below with
-``Non-@acronym{POSIX}'' in their description.  On non-@acronym{POSIX}
+``Non-POSIX'' in their description.  On non-POSIX
 systems, those or other settings also may not
 be available, but it's not feasible to document all the variations: just
 try it and see.
@@ -13186,7 +13186,7 @@ Control
 @cindex hardware flow control
 @cindex flow control, hardware
 @cindex RTS/CTS flow control
-Enable RTS/CTS flow control.  Non-@acronym{POSIX}@.  May be negated.
+Enable RTS/CTS flow control.  Non-POSIX@.  May be negated.
 @end table


@@ -13266,20 +13266,20 @@ Input
 @item iuclc
 @opindex iuclc
 @cindex uppercase, translating to lowercase
-Translate uppercase characters to lowercase.  Non-@acronym{POSIX}@.  May be
+Translate uppercase characters to lowercase.  Non-POSIX@.  May be
 negated.  Note ilcuc is not implemented, as one would not be able to issue
 almost any (lowercase) Unix command, after invoking it.

 @item ixany
 @opindex ixany
 Allow any character to restart output (only the start character
-if negated).  Non-@acronym{POSIX}@.  May be negated.
+if negated).  Non-POSIX@.  May be negated.

 @item imaxbel
 @opindex imaxbel
 @cindex beeping at input buffer full
 Enable beeping and not flushing input buffer if a character arrives
-when the input buffer is full.  Non-@acronym{POSIX}@.  May be negated.
+when the input buffer is full.  Non-POSIX@.  May be negated.
 @end table


@@ -13297,76 +13297,76 @@ Output
 @item olcuc
 @opindex olcuc
 @cindex lowercase, translating to output
-Translate lowercase characters to uppercase.  Non-@acronym{POSIX}@.  May be
+Translate lowercase characters to uppercase.  Non-POSIX@.  May be
 negated.  (Note ouclc is not currently implemented.)

 @item ocrnl
 @opindex ocrnl
 @cindex return, translating to newline
-Translate carriage return to newline.  Non-@acronym{POSIX}@.  May be negated.
+Translate carriage return to newline.  Non-POSIX@.  May be negated.

 @item onlcr
 @opindex onlcr
 @cindex newline, translating to crlf
-Translate newline to carriage return-newline.  Non-@acronym{POSIX}@.  May be
+Translate newline to carriage return-newline.  Non-POSIX@.  May be
 negated.

 @item onocr
 @opindex onocr
-Do not print carriage returns in the first column.  Non-@acronym{POSIX}@.
+Do not print carriage returns in the first column.  Non-POSIX@.
 May be negated.

 @item onlret
 @opindex onlret
-Newline performs a carriage return.  Non-@acronym{POSIX}@.  May be negated.
+Newline performs a carriage return.  Non-POSIX@.  May be negated.

 @item ofill
 @opindex ofill
 @cindex pad instead of timing for delaying
 Use fill (padding) characters instead of timing for delays.
-Non-@acronym{POSIX}@.
+Non-POSIX@.
 May be negated.

 @item ofdel
 @opindex ofdel
 @cindex pad character
-Use @acronym{ASCII} @sc{del} characters for fill instead of
-@acronym{ASCII} @sc{nul} characters.  Non-@acronym{POSIX}@.
+Use ASCII @sc{del} characters for fill instead of
+ASCII @sc{nul} characters.  Non-POSIX@.
 May be negated.

 @item nl1
 @itemx nl0
 @opindex nl@var{n}
-Newline delay style.  Non-@acronym{POSIX}.
+Newline delay style.  Non-POSIX.

 @item cr3
 @itemx cr2
 @itemx cr1
 @itemx cr0
 @opindex cr@var{n}
-Carriage return delay style.  Non-@acronym{POSIX}.
+Carriage return delay style.  Non-POSIX.

 @item tab3
 @itemx tab2
 @itemx tab1
 @itemx tab0
 @opindex tab@var{n}
-Horizontal tab delay style.  Non-@acronym{POSIX}.
+Horizontal tab delay style.  Non-POSIX.

 @item bs1
 @itemx bs0
 @opindex bs@var{n}
-Backspace delay style.  Non-@acronym{POSIX}.
+Backspace delay style.  Non-POSIX.

 @item vt1
 @itemx vt0
 @opindex vt@var{n}
-Vertical tab delay style.  Non-@acronym{POSIX}.
+Vertical tab delay style.  Non-POSIX.

 @item ff1
 @itemx ff0
 @opindex ff@var{n}
-Form feed delay style.  Non-@acronym{POSIX}.
+Form feed delay style.  Non-POSIX.
 @end table


@@ -13388,7 +13388,7 @@ Local

 @item iexten
 @opindex iexten
-Enable non-@acronym{POSIX} special characters.  May be negated.
+Enable non-POSIX special characters.  May be negated.

 @item echo
 @opindex echo
@@ -13422,12 +13422,12 @@ Local
 @cindex case translation
 Enable input and output of uppercase characters by preceding their
 lowercase equivalents with @samp{\}, when @code{icanon} is set.
-Non-@acronym{POSIX}@.  May be negated.
+Non-POSIX@.  May be negated.

 @item tostop
 @opindex tostop
 @cindex background jobs, stopping at terminal write
-Stop background jobs that try to write to the terminal.  Non-@acronym{POSIX}@.
+Stop background jobs that try to write to the terminal.  Non-POSIX@.
 May be negated.

 @item echoprt
@@ -13435,7 +13435,7 @@ Local
 @opindex echoprt
 @opindex prterase
 Echo erased characters backward, between @samp{\} and @samp{/}.
-Non-@acronym{POSIX}@.  May be negated.
+Non-POSIX@.  May be negated.

 @item echoctl
 @itemx ctlecho
@@ -13444,7 +13444,7 @@ Local
 @cindex control characters, using @samp{^@var{c}}
 @cindex hat notation for control characters
 Echo control characters in hat notation (@samp{^@var{c}}) instead
-of literally.  Non-@acronym{POSIX}@.  May be negated.
+of literally.  Non-POSIX@.  May be negated.

 @item echoke
 @itemx crtkill
@@ -13453,7 +13453,7 @@ Local
 Echo the @code{kill} special character by erasing each character on
 the line as indicated by the @code{echoprt} and @code{echoe} settings,
 instead of by the @code{echoctl} and @code{echok} settings.
-Non-@acronym{POSIX}@.
+Non-POSIX@.
 May be negated.
 @end table

@@ -13541,18 +13541,18 @@ Combination

 @item decctlq
 @opindex decctlq
-Same as @option{-ixany}.  Non-@acronym{POSIX}@.  May be negated.
+Same as @option{-ixany}.  Non-POSIX@.  May be negated.

 @item tabs
 @opindex tabs
-Same as @code{tab0}.  Non-@acronym{POSIX}@.  May be negated.  If negated, same
+Same as @code{tab0}.  Non-POSIX@.  May be negated.  If negated, same
 as @code{tab3}.

 @item lcase
 @itemx LCASE
 @opindex lcase
 @opindex LCASE
-Same as @code{xcase iuclc olcuc}.  Non-@acronym{POSIX}@.  May be negated.
+Same as @code{xcase iuclc olcuc}.  Non-POSIX@.  May be negated.
 (Used for terminals with uppercase characters only.)

 @item crt
@@ -13614,11 +13614,11 @@ Characters

 @item eol2
 @opindex eol2
-Alternate character to end the line.  Non-@acronym{POSIX}.
+Alternate character to end the line.  Non-POSIX.

 @item swtch
 @opindex swtch
-Switch to a different shell layer.  Non-@acronym{POSIX}.
+Switch to a different shell layer.  Non-POSIX.

 @item start
 @opindex start
@@ -13634,20 +13634,20 @@ Characters

 @item dsusp
 @opindex dsusp
-Send a terminal stop signal after flushing the input.  Non-@acronym{POSIX}.
+Send a terminal stop signal after flushing the input.  Non-POSIX.

 @item rprnt
 @opindex rprnt
-Redraw the current line.  Non-@acronym{POSIX}.
+Redraw the current line.  Non-POSIX.

 @item werase
 @opindex werase
-Erase the last word typed.  Non-@acronym{POSIX}.
+Erase the last word typed.  Non-POSIX.

 @item lnext
 @opindex lnext
 Enter the next character typed literally, even if it is a special
-character.  Non-@acronym{POSIX}.
+character.  Non-POSIX.
 @end table


@@ -13678,13 +13678,13 @@ Special
 @item rows @var{n}
 @opindex rows
 Tell the tty kernel driver that the terminal has @var{n} rows.
-Non-@acronym{POSIX}.
+Non-POSIX.

 @item cols @var{n}
 @itemx columns @var{n}
 @opindex cols
 @opindex columns
-Tell the kernel that the terminal has @var{n} columns.  Non-@acronym{POSIX}.
+Tell the kernel that the terminal has @var{n} columns.  Non-POSIX.

 @item size
 @opindex size
@@ -13694,11 +13694,11 @@ Special
 terminal has.  (Systems that don't support rows and columns in the kernel
 typically use the environment variables @env{LINES} and @env{COLUMNS}
 instead; however, GNU @command{stty} does not know anything about them.)
-Non-@acronym{POSIX}.
+Non-POSIX.

 @item line @var{n}
 @opindex line
-Use line discipline @var{n}.  Non-@acronym{POSIX}.
+Use line discipline @var{n}.  Non-POSIX.

 @item speed
 @opindex speed
@@ -14244,22 +14244,22 @@ Time conversion specifiers
 hour (@samp{01}@dots{}@samp{12})
 @item %k
 hour, space padded (@samp{ 0}@dots{}@samp{23}); equivalent to @samp{%_H}@.
-This is a @acronym{GNU} extension.
+This is a GNU extension.
 @item %l
 hour, space padded (@samp{ 1}@dots{}@samp{12}); equivalent to @samp{%_I}@.
-This is a @acronym{GNU} extension.
+This is a GNU extension.
 @item %M
 minute (@samp{00}@dots{}@samp{59})
 @item %N
 nanoseconds (@samp{000000000}@dots{}@samp{999999999}).
-This is a @acronym{GNU} extension.
+This is a GNU extension.
 @item %p
 locale's equivalent of either @samp{AM} or @samp{PM};
 blank in many locales.
 Noon is treated as @samp{PM} and midnight as @samp{AM}.
 @item %P
 like @samp{%p}, except lower case.
-This is a @acronym{GNU} extension.
+This is a GNU extension.
 @item %r
 locale's 12-hour clock time (e.g., @samp{11:11:04 PM})
 @item %R
@@ -14272,7 +14272,7 @@ Time conversion specifiers
 seconds since the epoch, i.e., since 1970-01-01 00:00:00 UTC@.
 Leap seconds are not counted unless leap second support is available.
 @xref{%s-examples}, for examples.
-This is a @acronym{GNU} extension.
+This is a GNU extension.
 @item %S
 @cindex leap seconds
 second (@samp{00}@dots{}@samp{60}).
@@ -14282,7 +14282,7 @@ Time conversion specifiers
 @item %X
 locale's time representation (e.g., @samp{23:13:48})
 @item %z
-@w{@acronym{RFC} 2822/@acronym{ISO} 8601} style numeric time zone
+@w{RFC 2822/ISO 8601} style numeric time zone
 (e.g., @samp{-0600} or @samp{+0530}), or nothing if no
 time zone is determinable.  This value reflects the numeric time zone
 appropriate for the current time, using the time zone rules specified
@@ -14290,20 +14290,20 @@ Time conversion specifiers
 The time (and optionally, the time zone rules) can be overridden
 by the @option{--date} option.
 @item %:z
-@w{@acronym{RFC} 3339/@acronym{ISO} 8601} style numeric time zone with
+@w{RFC 3339/ISO 8601} style numeric time zone with
 @samp{:} (e.g., @samp{-06:00} or @samp{+05:30}), or nothing if no time
 zone is determinable.
-This is a @acronym{GNU} extension.
+This is a GNU extension.
 @item %::z
 Numeric time zone to the nearest second with @samp{:} (e.g.,
 @samp{-06:00:00} or @samp{+05:30:00}), or nothing if no time zone is
 determinable.
-This is a @acronym{GNU} extension.
+This is a GNU extension.
 @item %:::z
 Numeric time zone with @samp{:} using the minimum necessary precision
 (e.g., @samp{-06}, @samp{+05:30}, or @samp{-04:56:02}), or nothing if
 no time zone is determinable.
-This is a @acronym{GNU} extension.
+This is a GNU extension.
 @item %Z
 alphabetic time zone abbreviation (e.g., @samp{EDT}), or nothing if no
 time zone is determinable.  See @samp{%z} for how it is determined.
@@ -14341,19 +14341,19 @@ Date conversion specifiers
 @item %e
 day of month, space padded; same as @samp{%_d}
 @item %F
-full date in @acronym{ISO} 8601 format; same as @samp{%Y-%m-%d}.
+full date in ISO 8601 format; same as @samp{%Y-%m-%d}.
 This is a good choice for a date format, as it is standard and
 is easy to sort in the usual case where years are in the range
 0000@dots{}9999.
 @item %g
-year corresponding to the @acronym{ISO} week number, but without the century
+year corresponding to the ISO week number, but without the century
 (range @samp{00} through @samp{99}).  This has the same format and value
-as @samp{%y}, except that if the @acronym{ISO} week number (see
+as @samp{%y}, except that if the ISO week number (see
 @samp{%V}) belongs
 to the previous or next year, that year is used instead.
 @item %G
-year corresponding to the @acronym{ISO} week number.  This has the
-same format and value as @samp{%Y}, except that if the @acronym{ISO}
+year corresponding to the ISO week number.  This has the
+same format and value as @samp{%Y}, except that if the ISO
 week number (see
 @samp{%V}) belongs to the previous or next year, that year is used
 instead.
@@ -14373,12 +14373,12 @@ Date conversion specifiers
 (@samp{00}@dots{}@samp{53}).
 Days in a new year preceding the first Sunday are in week zero.
 @item %V
-@acronym{ISO} week number, that is, the
+ISO week number, that is, the
 week number of year, with Monday as the first day of the week
 (@samp{01}@dots{}@samp{53}).
 If the week containing January 1 has four or more days in
 the new year, then it is considered week 1; otherwise, it is week 53 of
-the previous year, and the next week is week 1.  (See the @acronym{ISO} 8601
+the previous year, and the next week is week 1.  (See the ISO 8601
 standard.)
 @item %w
 day of week (@samp{0}@dots{}@samp{6}) with 0 corresponding to Sunday
@@ -14428,7 +14428,7 @@ Padding and other flags
 Seconds since the epoch are not padded, though,
 since there is no natural width for them.

-As a @acronym{GNU} extension, @command{date} recognizes any of the
+As a GNU extension, @command{date} recognizes any of the
 following optional flags after the @samp{%}:

 @table @samp
@@ -14460,7 +14460,7 @@ Padding and other flags
 @result{}  1/ 2
 @end example

-As a @acronym{GNU} extension, you can specify the field width
+As a GNU extension, you can specify the field width
 (after any flag, if present) as a decimal number.  If the natural size of the
 output of the field has less than the specified number of characters,
 the result is written right adjusted and padded to the given
@@ -14554,7 +14554,7 @@ Options for date
 @samp{yesterday}, etc.  For example, @option{--date="2004-02-27
 14:19:13.489392193 +0530"} specifies the instant of time that is
 489,392,193 nanoseconds after February 27, 2004 at 2:19:13 PM in a
-time zone that is 5 hours and 30 minutes east of @acronym{UTC}.@*
+time zone that is 5 hours and 30 minutes east of UTC.@*
 Note: input currently must be in locale independent format.  E.g., the
 LC_TIME=C below is needed to print back the correct date in many locales:
 @example
@@ -14576,7 +14576,7 @@ Options for date
 @itemx --iso-8601[=@var{timespec}]
 @opindex -I[@var{timespec}]
 @opindex --iso-8601[=@var{timespec}]
-Display the date using the @acronym{ISO} 8601 format, @samp{%Y-%m-%d}.
+Display the date using the ISO 8601 format, @samp{%Y-%m-%d}.

 The argument @var{timespec} specifies the number of additional
 terms of the time to include.  It can be one of the following:
@@ -14623,7 +14623,7 @@ Options for date

 This format conforms to
 @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt, Internet
-@acronym{RFCs} 2822} and
+RFCs 2822} and
 @uref{ftp://ftp.rfc-editor.org/in-notes/rfc822.txt, 822}, the
 current and previous standards for Internet email.

@@ -14631,10 +14631,10 @@ Options for date
 @opindex --rfc-3339=@var{timespec}
 Display the date using a format specified by
 @uref{ftp://ftp.rfc-editor.org/in-notes/rfc3339.txt, Internet
-@acronym{RFC} 3339}.  This is a subset of the @acronym{ISO} 8601
+RFC 3339}.  This is a subset of the ISO 8601
 format, except that it also permits applications to use a space rather
 than a @samp{T} to separate dates from times.  Unlike the other
-standard formats, @acronym{RFC} 3339 format is always suitable as
+standard formats, RFC 3339 format is always suitable as
 input for the @option{--date} (@option{-d}) and @option{--file}
 (@option{-f}) options, regardless of the current locale.

@@ -14650,7 +14650,7 @@ Options for date
 Print the full-date and full-time separated by a space, e.g.,
 @samp{2005-09-14 00:56:06+05:30}.  The output ends with a numeric
 time-offset; here the @samp{+05:30} means that local time is five
-hours and thirty minutes east of @acronym{UTC}@.  This is equivalent to
+hours and thirty minutes east of UTC@.  This is equivalent to
 the format @samp{%Y-%m-%d %H:%M:%S%:z}.

 @item ns
@@ -14679,7 +14679,7 @@ Options for date
 @cindex GMT
 @cindex leap seconds
 @vindex TZ
-Use Coordinated Universal Time (@acronym{UTC}) by operating as if the
+Use Coordinated Universal Time (UTC) by operating as if the
 @env{TZ} environment variable were set to the string @samp{UTC0}.
 Coordinated
 Universal Time is often called ``Greenwich Mean Time'' (@sc{gmt}) for
@@ -14733,7 +14733,7 @@ Examples of date

 @item
 To print a date without the leading zero for one-digit days
-of the month, you can use the (@acronym{GNU} extension)
+of the month, you can use the (GNU extension)
 @samp{-} flag to suppress
 the padding altogether:

@@ -14743,7 +14743,7 @@ Examples of date

 @item
 To print the current date and time in the format required by many
-non-@acronym{GNU} versions of @command{date} when setting the system clock:
+non-GNU versions of @command{date} when setting the system clock:

 @example
 date +%m%d%H%M%Y.%S
@@ -14757,7 +14757,7 @@ Examples of date
 @end example

 @item
-To print the date in @acronym{RFC} 2822 format,
+To print the date in RFC 2822 format,
 use @samp{date --rfc-2822}.  Here is some example output:

 @example
@@ -15034,9 +15034,9 @@ uname invocation
 @cindex kernel name
 @cindex name of kernel
 Print the kernel name.
-@acronym{POSIX} 1003.1-2001 (@pxref{Standards conformance}) calls this
+POSIX 1003.1-2001 (@pxref{Standards conformance}) calls this
 ``the implementation of the operating system'', because the
-@acronym{POSIX} specification itself has no notion of ``kernel''.
+POSIX specification itself has no notion of ``kernel''.
 The kernel name might be the same as the operating system name printed
 by the @option{-o} or @option{--operating-system} option, but it might
 differ.  Some operating systems (e.g., FreeBSD, HP-UX) have the same
@@ -15443,9 +15443,9 @@ env invocation
 mention the same variable the earlier is ignored.

 Environment variable names can be empty, and can contain any
-characters other than @samp{=} and @acronym{ASCII} @sc{nul}.
+characters other than @samp{=} and ASCII @sc{nul}.
 However, it is wise to limit yourself to names that
-consist solely of underscores, digits, and @acronym{ASCII} letters,
+consist solely of underscores, digits, and ASCII letters,
 and that begin with a non-digit, as applications like the shell do not
 work well with other names.

@@ -15602,10 +15602,10 @@ nice invocation
 lets applications determine the order in which threads are scheduled
 to run.  Unlike a priority, a niceness is merely advice to the
 scheduler, which the scheduler is free to ignore.  Also, as a point of
-terminology, @acronym{POSIX} defines the behavior of @command{nice} in
+terminology, POSIX defines the behavior of @command{nice} in
 terms of a @dfn{nice value}, which is the nonnegative difference
 between a niceness and the minimum niceness.  Though @command{nice}
-conforms to @acronym{POSIX}, its documentation and diagnostics use the
+conforms to POSIX, its documentation and diagnostics use the
 term ``niceness'' for compatibility with historical practice.

 @var{command} must not be a special built-in utility (@pxref{Special
@@ -15711,8 +15711,8 @@ nohup invocation

 If standard input is a terminal, it is redirected from
 @file{/dev/null} so that terminal sessions do not mistakenly consider
-the terminal to be used by the command.  This is a @acronym{GNU}
-extension; programs intended to be portable to non-@acronym{GNU} hosts
+the terminal to be used by the command.  This is a GNU
+extension; programs intended to be portable to non-GNU hosts
 should use @samp{nohup @var{command} [@var{arg}]@dots{} </dev/null}
 instead.

@@ -15983,7 +15983,7 @@ kill invocation

 If a negative @var{pid} argument is desired as the first one, it
 should be preceded by @option{--}.  However, as a common extension to
-@acronym{POSIX}, @option{--} is not required with @samp{kill
+POSIX, @option{--} is not required with @samp{kill
 -@var{signal} -@var{pid}}.  The following commands are equivalent:

 @example
@@ -16392,7 +16392,7 @@ I/O redirection
 For filter programs to work together, the format of the data has to be
 agreed upon.  The most straightforward and easiest format to use is simply
 lines of text.  Unix data files are generally just streams of bytes, with
-lines delimited by the @acronym{ASCII} @sc{lf} (Line Feed) character,
+lines delimited by the ASCII @sc{lf} (Line Feed) character,
 conventionally called a ``newline'' in the Unix literature.  (This is
 @code{'\n'} if you're a C programmer.)  This is the format used by all
 the traditional filtering programs.  (Many earlier operating systems
@@ -16660,7 +16660,7 @@ Putting the tools together
 The second @command{tr} command operates on the complement of the listed
 characters, which are all the letters, the digits, the underscore, and
 the blank.  The @samp{\n} represents the newline character; it has to
-be left alone.  (The @acronym{ASCII} tab character should also be included for
+be left alone.  (The ASCII tab character should also be included for
 good measure in a production script.)

 At this point, we have data consisting of words separated by blank space.
diff --git a/doc/perm.texi b/doc/perm.texi
index 6c466f2..eb19c2b 100644
--- a/doc/perm.texi
+++ b/doc/perm.texi
@@ -112,7 +112,7 @@ Mode Structure

 @table @asis
 @item ext2
-On @acronym{GNU} and @acronym{GNU}/Linux the file attributes specific to
+On GNU and GNU/Linux the file attributes specific to
 the ext2 file system are set using @command{chattr}.

 @item FFS
@@ -345,7 +345,7 @@ Changing Special Mode Bits
 +t
 @end example

-The combination @samp{o+s} has no effect.  On @acronym{GNU} systems
+The combination @samp{o+s} has no effect.  On GNU systems
 the combinations @samp{u+t} and @samp{g+t} have no effect, and
 @samp{o+t} acts like plain @samp{+t}.

@@ -563,7 +563,7 @@ Operator Numeric Modes
 setuid and setgid bits, whereas the latter preserves them.
 @xref{Directory Setuid and Setgid}.

-Operator numeric modes are a @acronym{GNU} extension.
+Operator numeric modes are a GNU extension.

 @node Directory Setuid and Setgid
 @section Directories and the Set-User-ID and Set-Group-ID Bits
@@ -630,10 +630,10 @@ Directory Setuid and Setgid
 chmod 00755 D
 @end example

-This behavior is a @acronym{GNU} extension.  Portable scripts should
+This behavior is a GNU extension.  Portable scripts should
 not rely on requests to set or clear these bits on directories, as
-@acronym{POSIX} allows implementations to ignore these requests.
-The @acronym{GNU} behavior with numeric modes of four or fewer digits
+POSIX allows implementations to ignore these requests.
+The GNU behavior with numeric modes of four or fewer digits
 is intended for scripts portable to systems that preserve these bits;
 the behavior with numeric modes of five or more digits is for scripts
 portable to systems that do not preserve the bits.
--
1.7.12.70.g851f7e6


>From 58afeebe08ce400756a3f7554a207d7393a44a90 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Sun, 26 Aug 2012 22:47:57 +0200
Subject: [PATCH 3/3] build: update gnulib submodule to latest

---
 gnulib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnulib b/gnulib
index bc33a8a..68f693f 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit bc33a8a0c77285b2bdb5c5d0a4243f7b442a0293
+Subproject commit 68f693ff1db33bf24695f0f42c62e7801966fd06
--
1.7.12.70.g851f7e6


From MAILER-DAEMON Tue Aug 28 23:40:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6Z98-0004XX-Du
	for mharc-coreutils@gnu.org; Tue, 28 Aug 2012 23:40:50 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36238)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <toddrpartridge@gmail.com>) id 1T6V7w-0003TL-DH
	for coreutils@gnu.org; Tue, 28 Aug 2012 19:23:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <toddrpartridge@gmail.com>) id 1T6V7v-0005Eo-Cl
	for coreutils@gnu.org; Tue, 28 Aug 2012 19:23:20 -0400
Received: from mail-vb0-f41.google.com ([209.85.212.41]:56244)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <toddrpartridge@gmail.com>) id 1T6V7v-0005Ed-1V
	for coreutils@gnu.org; Tue, 28 Aug 2012 19:23:19 -0400
Received: by vbkv13 with SMTP id v13so7484883vbk.0
	for <coreutils@gnu.org>; Tue, 28 Aug 2012 16:23:18 -0700 (PDT)
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=EuijY5USMZR8Zr+PsqOEimKCITgbmvhDBu0LOcNd13c=;
	b=aPaUz4KGHQBtYlNRQSTvMSjtnJ7C7iNXsxBkJGsTft7Wi2SYwVWX3iNSg+s6gT3F1r
	E13Uh2r5wK4cmXuLuKS3Nzvw+Zwx/s7rUpocxrz5JeKD/evaOA3dATUTGR+RMFQzyVPZ
	8XO6dfx/yGBX7RXHa3kSa6C+qpN8uGgLc5gu5MXP6Ogdqfb7U5HtlhqpbVt36k2n0KxN
	32nkpNny7TNlSLe92CgttpiTNsSbeyW1rkSSFxVsXkv53nxt3gNC3o46TVVHSb/sTWG+
	3n1OgZwT93Os8NqnPXQrpd6NtJ1u5hZLtdMwCvDKgGuAQkwT1gEavskRFbYni2zNFozk
	riDA==
MIME-Version: 1.0
Received: by 10.52.67.240 with SMTP id q16mr13581189vdt.45.1346196198456; Tue,
	28 Aug 2012 16:23:18 -0700 (PDT)
Received: by 10.58.164.167 with HTTP; Tue, 28 Aug 2012 16:23:18 -0700 (PDT)
Date: Tue, 28 Aug 2012 19:23:18 -0400
Message-ID: <CALuyvcQy6rOJrrG5cDVuudRp-wF=n-ecZF-6Ld+ypW0fCWkHRQ@mail.gmail.com>
Subject: `readlink -f` and trailing slash
From: Todd Partridge <toddrpartridge@gmail.com>
To: coreutils@gnu.org
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.41
X-Mailman-Approved-At: Tue, 28 Aug 2012 23:40:49 -0400
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, 28 Aug 2012 23:23:21 -0000

I was wondering if this be possible to define because I see people use
it `readlink -f` to discover the full path a number of times.  When
using `readlink -f` it prints the full path; however, if one enters
the full path with a trailing slash on a directory, it does not
include the trailing slash.  I think it would be good for a couple
programs one of which is `rsync`.  Using a trailing slash with rsync
for the source directory would copy the contents of the directory,
without it the directory itself is copied.  Seems to me that there was
another program that did this too.  Would it be possible to append a
trailing slash to `readlink -f` for those that specify that when then
type it?  e.g. `readlink -f libtool/` would return
`/usr/share/libtool/` rather than `/usr/share/libtool`.  Just a
thought, but be very very nice.

Thank you for you work on coreutils.

-- 
Todd Partridge
First they ignore you, then they laugh at you, then they fight you,
then you win.
 - Mohandas Gandhi
Computer Blog (Linux): http://linuxtidbits.wordpress.com


From MAILER-DAEMON Wed Aug 29 01:57:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6bHh-0003QI-Lf
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 01:57:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39640)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T6bHe-0003Nq-N8
	for coreutils@gnu.org; Wed, 29 Aug 2012 01:57:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T6bHd-0005kZ-Cm
	for coreutils@gnu.org; Wed, 29 Aug 2012 01:57:46 -0400
Received: from mx1.redhat.com ([209.132.183.28]:49545)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T6bHd-0005kF-4H
	for coreutils@gnu.org; Wed, 29 Aug 2012 01:57:45 -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 q7T5vgR7024726
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 29 Aug 2012 01:57:42 -0400
Received: from [10.3.113.60] (ovpn-113-60.phx2.redhat.com [10.3.113.60])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7T5vfo3003163; Wed, 29 Aug 2012 01:57:42 -0400
Message-ID: <503DAF55.4030000@redhat.com>
Date: Tue, 28 Aug 2012 22:57:41 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Todd Partridge <toddrpartridge@gmail.com>
Subject: Re: `readlink -f` and trailing slash
References: <CALuyvcQy6rOJrrG5cDVuudRp-wF=n-ecZF-6Ld+ypW0fCWkHRQ@mail.gmail.com>
In-Reply-To: <CALuyvcQy6rOJrrG5cDVuudRp-wF=n-ecZF-6Ld+ypW0fCWkHRQ@mail.gmail.com>
X-Enigmail-Version: 1.4.4
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigF932CD49799DA17BDAD51963"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 29 Aug 2012 05:57:47 -0000

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

On 08/28/2012 04:23 PM, Todd Partridge wrote:

Thanks for the report.  However,

>  Would it be possible to append a
> trailing slash to `readlink -f` for those that specify that when then
> type it?  e.g. `readlink -f libtool/` would return
> `/usr/share/libtool/` rather than `/usr/share/libtool`.

I'm afraid this is not possible.  'readlink -f' mirrors the behavior of
the realpath(3) function (and its counterpart canonicalize_file_name()
wrapper in glibc), and POSIX requires realpath() to strip trailing slashe=
s.

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


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

iQEcBAEBCAAGBQJQPa9VAAoJEKeha0olJ0NqGMgH/Reeir6ByWosegc4ZuQcPLCp
E4OyyOctOSWEgPOJkX2oYD4v9UeDVOWXMTF3gqd4hbaLGf+XfgZqMQbkhtTe0HX3
6zPod4cSb9/SVaqENdxWMy3G9H8nBPMDiAOPLHSrIAvNTbt39U/FwsKKnfAnH90O
hP5BU2XOk9bVgCv8RcjV0EE0PXaBqDilXGZawBgRPTbOexUGFqSTD3+wFSPM24P+
UW1DeIxTruYfnw7t/iiOhrX17aDfm1Vj4vI1xbUQDmyVziBalTcf74Z97eNvPRlZ
LCd4y6hop83oABjtaOgDRzYdfNVNYm6iZ295brVKV/qr8N3NF/hhyeCGJG8j1+Q=
=DrTF
-----END PGP SIGNATURE-----

--------------enigF932CD49799DA17BDAD51963--


From MAILER-DAEMON Wed Aug 29 02:15:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6bYp-0005Xt-Hn
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 02:15:31 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51280)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T6bYn-0005W3-6i
	for coreutils@gnu.org; Wed, 29 Aug 2012 02:15:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T6bYg-0002O6-Vb
	for coreutils@gnu.org; Wed, 29 Aug 2012 02:15:29 -0400
Received: from moutng.kundenserver.de ([212.227.126.171]:57893)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T6bYg-0002MM-LR
	for coreutils@gnu.org; Wed, 29 Aug 2012 02:15:22 -0400
Received: from [192.168.2.108] (p4FF74984.dip.t-dialin.net [79.247.73.132])
	by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis)
	id 0M0spD-1TuJlP0NUl-00uPn4; Wed, 29 Aug 2012 08:15:20 +0200
Message-ID: <503DB377.1090203@bernhard-voelker.de>
Date: Wed, 29 Aug 2012 08:15:19 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Todd Partridge <toddrpartridge@gmail.com>
Subject: Re: `readlink -f` and trailing slash
References: <CALuyvcQy6rOJrrG5cDVuudRp-wF=n-ecZF-6Ld+ypW0fCWkHRQ@mail.gmail.com>
In-Reply-To: <CALuyvcQy6rOJrrG5cDVuudRp-wF=n-ecZF-6Ld+ypW0fCWkHRQ@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:+tWOYyYqxSWR7p0ptFTKd6D8sj4jKGsBiFWSaEmQr3l
	ZQKj4ln0T4fq9VmeY5MnOTW2KfdRbvj8OeXKxprEmkTAvDF9RS
	oUc3FyK5XSctFRTqCS+c7woBm8pvVVuh+hbCusvdvzNnzr35y8
	XW909qqwdgZ4K+/wzQXWBGpPyaiXYcSvgHcBhnBU+joMjitUf2
	X4N432DlSEpGpDUO659cw+WwL7BOnpl8+voObTt1I8qzhIXf0i
	6zyUlSfc68Wa2Lk9Wp2WuOBlBnHu7gmJwONq0uZ4HphlDHtuVQ
	4PAqn9lWDjW390oYFkmNb0/2nM/inXEz24W7ZnFWT8nAtMek0m
	u4BvaFJLHkFU3KPCMdtgRsxuQhjbSSx40ZTlwORzU
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.126.171
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, 29 Aug 2012 06:15:30 -0000

On 08/29/2012 01:23 AM, Todd Partridge wrote:
> Using a trailing slash with rsync
> for the source directory would copy the contents of the directory,
> without it the directory itself is copied.

This is not the answer for your readlink question,
but may help you nontheless.

That behaviour of rsync has always confused me.
To be 100% sure what rsync does, I've got into the way
of appending a "/." to both the source and the target
directory for rsync:

  $ rsync -avx libtool/. /to/some/where/.

Have a nice day,
Berny


From MAILER-DAEMON Wed Aug 29 16:50:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6pDD-0003HY-SU
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 16:50:07 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47381)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1T6pDC-0003GS-07
	for coreutils@gnu.org; Wed, 29 Aug 2012 16:50:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1T6pDA-0006SC-57
	for coreutils@gnu.org; Wed, 29 Aug 2012 16:50:05 -0400
Received: from mail-qa0-f48.google.com ([209.85.216.48]:41205)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1T6pDA-0006O2-1c
	for coreutils@gnu.org; Wed, 29 Aug 2012 16:50:04 -0400
Received: by qady1 with SMTP id y1so940514qad.0
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 13:50:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:user-agent:mime-version:to:subject
	:content-type; bh=f0TZarrZX3iDTTcXlOVAomLEwNTQpMPihLumbSgprUc=;
	b=YykagBcrPUxaAhW8LbZ2I2qmoNYpvVbx8q+4zjU2ISnnHh/k/NE+buu77uNxRGjORv
	svhCNmR3zrFBhNGckyf4lizsKyZSadxczJ+fRKEVyNLNVPIxG0h8GMcrxS+NhU6YVUbC
	NTOxPK00DhJTcf/QCnaoTDfm6h/raBJ3Ze0rO5P4xPRE42y2L59slrBUO4o5EMnPyd8N
	qtlxlP2+iuzHRlOC/+4ZbzE9BBJlw7ucsWYTVeDrN2YqP2EdhWiVye8/sHAlEmCq27tM
	4HocJBLOfMyUDhzcM1W0HbNXrLN/ZYQXrQL8nl4CnNRv0b4zISDNnO2Bvq9aM9gj5DjW
	0XiQ==
Received: by 10.224.193.132 with SMTP id du4mr6318087qab.75.1346273401866;
	Wed, 29 Aug 2012 13:50:01 -0700 (PDT)
Received: from [143.48.11.9] (tango.cshl.edu. [143.48.11.9])
	by mx.google.com with ESMTPS id gx4sm33936qab.3.2012.08.29.13.50.00
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 13:50:01 -0700 (PDT)
Message-ID: <503E8078.9090009@gmail.com>
Date: Wed, 29 Aug 2012 16:50:00 -0400
From: Assaf Gordon <assafgordon@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.4) Gecko/20120510 Icedove/10.0.4
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: sort: new feature: use environment variable to set buffer size
Content-Type: multipart/mixed; boundary="------------090102010807080403040603"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.216.48
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, 29 Aug 2012 20:50:07 -0000

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

Hello,

I'd like to suggest a new feature to sort: the ability to set the buffer size (-S/--buffer-size X) using an environment variable.

In summary:
 $ export SORT_BUFFER_SIZE=20G 
 $ someprogram | sort -k1,1 > output.txt
 # sort will use 20G of RAM, as if "--buffer-size 20G" was specified.


The rational:
recent commits improved the guessed buffer size when sort is given an input file,
but these don't apply if sort is used as part of a pipe line, with a pipe as input, e.g.
  some | program | sort | other | programs > file 

(Tested with v8.19 on linux 2.6.32, sort consumes few MBs of RAM, even though many GBs are available).
This results in many small temporary files being created.

The script (which uses sort) is not under my direct control, but even if it was,
I don't want to hard-code the amount of memory used, to keep it portable to different servers.

AFAIK, there are four aspects of sort the affect performance:
1. number of threads:
changeable with "--parallel=X" and with environment variable OMP_NUM_THREADS.

2. temporary files location:
changeable with "--temporary-directory=DIR" and with environment variable TMPDIR.

3. memory usage:
changeable with "--buffer-size=SIZE" but not with environment variable.

4. compression program:
changeable with "--compression-program=PROG" but not with environment variable.
(but at the moment, I do not address this aspect).


With the attached patch, sort will read an environment variable named "SORT_BUFFER_SIZE", and will treat it as if "--buffer-size" was specified (but only if "--buffer-size" wasn't used on the command line).

If this is conceptually acceptable, I'll prepare a proper patch (with NEWS, help, docs, etc.).

Regards,
 -gordon

--------------090102010807080403040603
Content-Type: text/x-diff;
 name="0001-sort-accept-buffer-size-from-environment-variable.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0001-sort-accept-buffer-size-from-environment-variable.patch"

>From db8f1c319d772c5b13df51894f279c3a7276416e Mon Sep 17 00:00:00 2001
From: "A. Gordon" <gordon@cshl.edu>
Date: Wed, 29 Aug 2012 16:42:31 -0400
Subject: [PATCH] sort: accept buffer size from environment variable.

---
 src/sort.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/sort.c b/src/sort.c
index 9dbfee1..1505a6d 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -4648,6 +4648,13 @@ main (int argc, char **argv)
       files = &minus;
     }
 
+  if (sort_size == 0)
+    {
+      char const *buffer_size = getenv ("SORT_BUFFER_SIZE");
+      if (buffer_size)
+        specify_sort_size(-1,'S',buffer_size);
+    }
+
   /* Need to re-check that we meet the minimum requirement for memory
      usage with the final value for NMERGE. */
   if (0 < sort_size)
-- 
1.7.9.1


--------------090102010807080403040603--


From MAILER-DAEMON Wed Aug 29 17:55:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEM-0003eX-2l
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:22 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39233)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEJ-0003da-Iz
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEH-0003Ka-Lz
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:19 -0400
Received: from mail-wi0-f169.google.com ([209.85.212.169]:63728)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEH-0003JR-GN
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:17 -0400
Received: by wibhm2 with SMTP id hm2so5990119wib.0
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer;
	bh=zXDNglKcaRWA0Rf0QssIPeiCcMYGC4kvg+K+EvCl5Ag=;
	b=IE/sP9R38qG6Y433ZpZSRzmcNX2Bulpud8n2ll0az+0PQDmA1X/+mIEVbqD49mnNzd
	ADrEm8dd8zz+/hgHxfFP4pb+AC5SlJ18f6yd23ZOjjMHN1m6yh9mHjx08nkVqJFXnSlp
	qCtu39oTMGMCav7jzX40e4ZQN7dncQ2JyRbpqXudk9vsEQ70L4kHFUpLZAn2C6TZAOAw
	6x0obqdn5VCJukZRbhtlSsdLkrWwGy+P6BkoLBRL2rkFYzTsBIKmr/1cuk9HM1hv1cyd
	EHyHpWyS6JK9lVqFO9PddZdHnjAZLhFGIIeEjSXerVaUSsLGIMWJhQ3CYioILlGJyPEA
	/n1w==
Received: by 10.180.80.134 with SMTP id r6mr6569632wix.1.1346277315963;
	Wed, 29 Aug 2012 14:55:15 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.14
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:15 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 00/22] Towards a non-recursive build system for coreutils?
Date: Wed, 29 Aug 2012 23:54:37 +0200
Message-Id: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:20 -0000

[NOTE: I'm sending this to the main coreutils for lack of a dedicated
       "coreutils-patch" list; I hope it's OK!]

OK, these are the easy pieces actually, but we have to start somewhere.
This series consists of:

  - some preparatory refactorings;
  - the merging of the "sub build systems" for 'doc/' and 'man/' in
    the top-level one;
  - some follow-up cleanings and fixlets;
  - few independent, "while-we-are-at-it" fixlets and improvements.

It's worth noting that the above steps are mostly intermixed, i.e.,
the preparatory refactoring for the 'man/' merge comes after the
actual 'doc/' merge.

While this series is not perfect, it seems clear and clean enough,
and I think it's ready for inclusion (but any further testing would
be appreciated).

Thoughts, opinions, ACK, NAK?

-*-*-*-

Stefano Lattarini (22):
  build: don't abuse Automake internals (with its 'check-am' rule)
  maint: slightly improve .gitignore
  build: add extra *.texi files to coreutils_TEXINFOS, not EXTRA_DIST
  build: prefer '$(top_srcdir)/doc' over '$(srcdir)' in doc Makefile
  build: use 'check-local' to extend the 'check' target
  build: don't use recursive make to build the 'doc' subdirectory
  build: don't define $(SUFFIXES) explicitly
  maint: simplify definition of $MAN in configure.ac
  build: add an explicative comment
  build: fix a stray usage of uninitialized $(ME)
  build: rename common_dep -> mandep in man/Makefile
  maint: typofix: s/it's/its/
  build: rely on VPATH capabilities in man/Makefile
  build: make some rule less dependent of exact source tree layout
  build: convenience target 'all_programs' at top-level
  build: rework some recipes in main/Makefile.am, for future changes
  build: don't use recursive make to build the 'man' subdirectory
  maint: move man-related syntax checks in cfg.mk
  maint: adjust syntax check 'check-x-vs-1'
  maint: adjust syntax check 'sc_option_desc_uppercase'
  build: remove redundant indirection with variable '$(doc_srcdir)'
  maint: update gitignore entries

 .gitignore                    |   4 +-
 Makefile.am                   |   9 +-
 cfg.mk                        |  53 ++++++++--
 configure.ac                  |  25 ++---
 doc/.gitignore                |   1 +
 doc/{Makefile.am => local.mk} |  53 +++++-----
 man/Makefile.am               | 219 ------------------------------------------
 man/local.mk                  | 183 +++++++++++++++++++++++++++++++++++
 tests/check.mk                |   2 +-
 9 files changed, 279 insertions(+), 270 deletions(-)
 rename doc/{Makefile.am => local.mk} (71%)
 delete mode 100644 man/Makefile.am
 create mode 100644 man/local.mk

-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEM-0003f2-6D
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:22 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39243)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEK-0003dg-FT
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEJ-0003Le-J1
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:20 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:41983)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEJ-0003LP-BC
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:19 -0400
Received: by wibhn17 with SMTP id hn17so972505wib.12
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=0btcHEhcucFDfGfZcYPYeyI89odZi7Bae7Pw27liEbs=;
	b=Ylmx1fCnqZ/Y46OrvrJXz+2hyLDAY1or1MDPby/Ou8YRIM/yzSZshLgVoTzxlwQQoU
	V1UantguiWnF8DMxujaW9Z56AgcOjpRlr7b9Ekzj6A4Ko9ppP1ceZpC3zH7PRmmbwtd2
	7WGkdtnvLXOLi6j/fOfZoSf1GEbPENyJyXuH3ldcgzaBLC+sm/gm09p5FD6N9ujUI1ys
	8dGXzwrCj1v9foNwsVa9aByN5cgn/04NUkOwkVFlpciwN0DhzICgy1od8CA+Blwv9ICS
	W7dF8pshAd2OlXlcr/Dg6oPc5tgv5rlo0QHdumDbb8tIVkIjfBHGYWb8JzEy8KfErMiE
	+vHA==
Received: by 10.180.24.4 with SMTP id q4mr11520313wif.19.1346277318530;
	Wed, 29 Aug 2012 14:55:18 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.17
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:17 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 02/22] maint: slightly improve .gitignore
Date: Wed, 29 Aug 2012 23:54:39 +0200
Message-Id: <1028d2186d7ef62820f85286467354149dfe6578.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:21 -0000

* .gitignore: Ignore '.deps' only when it's a directory.
Ignore '*.trs' only if they are in a subdirectory of the
'tests/' directory.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 .gitignore | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 383361b..aad59bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,8 +2,7 @@
 *.[EIOX]
 *.bak
 *.o
-*.trs
-*/.deps
+*/.deps/
 *~
 ._bootmp
 .gdb-history
@@ -155,6 +154,7 @@
 /src/version.h
 /stamp-h1
 /tests/*/*.log
+/tests/*/*.trs
 /tests/.built-programs
 /tests/t?
 /tests/test-suite.log
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEN-0003jE-Ei
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39246)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEK-0003di-Oi
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEI-0003LJ-GG
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:20 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:44102)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEI-0003Kk-9o
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:18 -0400
Received: by wgbdt14 with SMTP id dt14so647175wgb.30
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=KTLnIdckNRtJAdy1LWF16XxQ4giU6uJvC4u2QJoNYzY=;
	b=eenq7qg+WYek4gpWsSF/QWpx50NjBCeaps2xHHvEDxzn5NhbVYOtYzQAWOPgVjLZQM
	0Zva+88BWsXyW9I76haFO+mmnpIdA7I8K2exCIZ/hlMzsTPc0Lt9hE/cFi5HGhprOcsd
	g/cLvASKA11E+xDpOnIiQeUrHo9HJHjj/cRJH7x7gYnjdBDMXQw8pUDmRufMof+30cPc
	iJg2PUsiDsIY76GtGwMwzME0OLk6JTxwLKVGAZJeAQVUSFasbGiG2UwbhWX3jg5tYYcq
	/S/dF/Ow7J+IlcnlolTNM/S3dHZh/KmFvWyGeQPQRUcStN0aFCshGkAlakM6iVHALzUz
	fAOQ==
Received: by 10.216.242.204 with SMTP id i54mr1760003wer.114.1346277317337;
	Wed, 29 Aug 2012 14:55:17 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.16
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:16 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 01/22] build: don't abuse Automake internals (with its
	'check-am' rule)
Date: Wed, 29 Aug 2012 23:54:38 +0200
Message-Id: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:21 -0000

* tests/check.mk (check-am): Remove; obtain the same effect by moving
its dependency '.built-programs' ...
(check_DATA): ... to this variable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 tests/check.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/check.mk b/tests/check.mk
index cb67b9d..7ced678 100644
--- a/tests/check.mk
+++ b/tests/check.mk
@@ -38,7 +38,7 @@ check: vc_exe_in_TESTS
 
 CLEANFILES =
 CLEANFILES += .built-programs
-check-am: .built-programs
+check_DATA = .built-programs
 .built-programs: $(top_srcdir)/src/Makefile.am
 	$(AM_V_GEN)(cd $(top_builddir)/src				\
             && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEO-0003oC-TJ
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39278)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEL-0003e2-OO
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEK-0003Ly-Fk
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:21 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:41983)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEK-0003LP-87
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:20 -0400
Received: by mail-wi0-f177.google.com with SMTP id hn17so972505wib.12
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=5wCYxb07hPczj3AHHMM0cYvEiJlkPwxRO4c6byQanVs=;
	b=VcWzsQfH6q+lrI1UoNp9J6DnQ+r6iBresy0MOIZVcIs4xx+a8jTUyHFk3qJCUwBuzC
	zzuFqjhS+8nXPB+vs7TAI9UfCBz0MN4GAr2P8lkGaxYHAs6xilg1S2FxH67oj4eRkrkT
	O2Gr74bvZgwmdX/CmNu1+MHAVmmpZjm2NjGtmsKL3mvIntG3w3rZ33x+mhqAn6SB8+sS
	pcSN0NoqodWFB4V+aOJOixyPBA4UpIjfHbDMWFXMSzwA3nQi1ml7vOreFmajlPMT04cZ
	lnQI2MJvXwFSq5884Ki8q99xzbNrAGat/cGYyfyrRpZr9S4t4BpHJrYBNeSL3pyC0KSa
	Me0g==
Received: by 10.180.7.200 with SMTP id l8mr6534456wia.9.1346277319825;
	Wed, 29 Aug 2012 14:55:19 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.18
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:19 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 03/22] build: add extra *.texi files to coreutils_TEXINFOS,
	not EXTRA_DIST
Date: Wed, 29 Aug 2012 23:54:40 +0200
Message-Id: <0c6cbef4a79ecf62012c4d776babddb0f503f876.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:23 -0000

* doc/Makefile.am (coreutils_TEXINFO): List them here, instead of ...
(EXTRA_DIST): ... listing them here.  This ensure the rebuild rules
will be more faithful.
($(DVIS), $(INFO_DEPS)): No need to depend on $(EXTRA_DIST) now.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 doc/Makefile.am | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index dea2756..9a50714 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -17,7 +17,7 @@
 
 info_TEXINFOS = coreutils.texi
 
-EXTRA_DIST = perm.texi parse-datetime.texi constants.texi fdl.texi
+coreutils_TEXINFOS = perm.texi parse-datetime.texi constants.texi fdl.texi
 
 # The following is necessary if the package name is 8 characters or longer.
 # If the info documentation would be split into 10 or more separate files,
@@ -40,9 +40,6 @@ constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
 
 MAINTAINERCLEANFILES = constants.texi
 
-$(DVIS): $(EXTRA_DIST)
-$(INFO_DEPS): $(EXTRA_DIST)
-
 # Extended regular expressions to match word starts and ends.
 _W = (^|[^A-Za-z0-9_])
 W_ = ([^A-Za-z0-9_]|$$)
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEQ-0003sa-8Q
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39313)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEN-0003i9-4d
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEL-0003Oq-Ps
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:23 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:44102)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEL-0003Kk-Ja
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:21 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so647175wgb.30
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=ocLRe7kxHy/4pANp5Mex+aIJKma0Ci6axFr6pwFlkXQ=;
	b=0oPpcw0bsjzxMQXAV/LGMxkIdTeDuJjUTzqC5jsg17ta2QTIvT9uAbM5/uCCLPC/+M
	tyWMLyQnx5pKRxKpndamq0M7OuPduIbB3X49hwBgRACU3dpRxd8XwYdp5+k5+XCL7hY3
	5denZdhTlJkFTWi18EodoptB74JkdpqocWdPyBOA0quDp8GNnhCjURVLR2AbIF6tcDS5
	DoAtTOR9X8VtJ+Tkb62hxR8TKA6PhOT+5hRfc+cO3RYHRLejTPUOPPcv4NVSSF1nXw8X
	quO9f40gnELnBPfncJ/laexz2Ofx3Nkphj77Tsz05wZ6L/6SypnffMepicOIZN/EcH4k
	ohWA==
Received: by 10.216.233.216 with SMTP id p66mr1521174weq.152.1346277321082;
	Wed, 29 Aug 2012 14:55:21 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.19
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:20 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 04/22] build: prefer '$(top_srcdir)/doc' over '$(srcdir)' in
	doc Makefile
Date: Wed, 29 Aug 2012 23:54:41 +0200
Message-Id: <e6f0937345e70fadec71d814a07fb98c3b520ab3.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:24 -0000

This is just a preparatory refactoring that will become useful in
a future change (where the doc/Makefile.am makefile will be merged
with the top-level one).

* doc/Makefile.am (doc_srcdir): New, defined to '$(top_srcdir)/doc'.
Use it throughout instead of "bare" '$(srcdir)'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 doc/Makefile.am | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 9a50714..4e5150f 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -19,6 +19,8 @@ info_TEXINFOS = coreutils.texi
 
 coreutils_TEXINFOS = perm.texi parse-datetime.texi constants.texi fdl.texi
 
+doc_srcdir = $(top_srcdir)/doc
+
 # The following is necessary if the package name is 8 characters or longer.
 # If the info documentation would be split into 10 or more separate files,
 # then this is necessary even if the package name is 7 characters long.
@@ -60,21 +62,21 @@ syntax_checks =		\
 # List words/regexps here that should not appear in the texinfo documentation.
 check-texinfo: $(syntax_checks)
 	$(AM_V_GEN)fail=0;						\
-	grep '@url{' $(srcdir)/*.texi && fail=1;			\
-	grep '\$$@"' $(srcdir)/*.texi && fail=1;			\
-	grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1;	\
-	grep -n filename $(srcdir)/*.texi				\
+	grep '@url{' $(doc_srcdir)/*.texi && fail=1;			\
+	grep '\$$@"' $(doc_srcdir)/*.texi && fail=1;			\
+	grep -n '[^[:punct:]]@footnote' $(doc_srcdir)/*.texi && fail=1;	\
+	grep -n filename $(doc_srcdir)/*.texi				\
 	    | $(EGREP) -v 'setfilename|[{]filename[}]'			\
 	  && fail=1;							\
 	exit $$fail
 
 sc-avoid-builtin:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi	\
+	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(doc_srcdir)/*.texi \
 	  && exit 1 || :
 
 sc-avoid-path:
 	$(AM_V_GEN)fail=0;						\
-	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi		\
+	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(doc_srcdir)/*.texi	\
 	  | $(EGREP) -v							\
 	  'PATH=|path search|search path|@vindex PATH$$|@env[{]PATH[}]'	\
 	  && fail=1;							\
@@ -82,28 +84,28 @@ sc-avoid-path:
 
 # Use "time zone", not "timezone".
 sc-avoid-timezone:
-	$(AM_V_GEN)$(EGREP) timezone $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) timezone $(doc_srcdir)/*.texi && exit 1 || :
 
 # Check for insufficient exponent grouping, e.g.,
 # @math{2^64} should be @math{2^{64}}.
 sc-exponent-grouping:
-	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(doc_srcdir)/*.texi && exit 1 || :
 
 # E.g., use @sc{nul}, not NUL.
 sc-use-small-caps-NUL:
-	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(doc_srcdir)/*.texi && exit 1 || :
 
 # Say I/O, not IO.
 sc-avoid-io:
-	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(doc_srcdir)/*.texi && exit 1 || :
 
 # I prefer nonzero over non-zero.
 sc-avoid-non-zero:
-	$(AM_V_GEN)$(EGREP) non-zero $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) non-zero $(doc_srcdir)/*.texi && exit 1 || :
 
 # Use "zeros", not "zeroes" (nothing wrong with "zeroes"; just be consistent).
 sc-avoid-zeroes:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi \
+	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(doc_srcdir)/*.texi \
 	  && exit 1 || :
 
 # ME = $(subdir)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
@@ -122,6 +124,6 @@ find_upper_case_var =		\
    END {$$m and (warn "$(ME): do not use upper case in \@var{...}\n"), exit 1}'
 sc-lower-case-var:
 	$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
-	  $(PERL) -lne $(find_upper_case_var) $(srcdir)/*.texi
+	  $(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi
 
 check: check-texinfo
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEX-0004Ak-0Z
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39400)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEP-0003rN-Qm
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEO-0003Qn-D6
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:25 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:44102)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEO-0003Kk-6S
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:24 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so647175wgb.30
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=yYIgy39Zg3hA5dFZgvrWEkSdWETuqPFK1zWzJnYrEqQ=;
	b=OmGq1HtGTlk8Hvd/g/2ptuKygBHcIqg/EcI3vl8GtlQCvCcglhZ7iVBWmBz8FFuOtm
	1Mo2Q1FGVW7up3ctphXahAlm4Ry0AizDsy9IwZ8HBI/tJthnJ6bDCcUMHIqotqPV4Xv3
	SxqvMaRlmdlkIJURlvMqXrumHUihEMWyd60S17R+6DPx+odIrnBCPSNTyJ0WKyw+0Ax5
	fHmRgG/z50vnY2p4A/wdzHHXCs4zNAaN7lYwX4YG4f7MlgknPCxoUdAUTvF945USu/qM
	Z2HdfdeZxQqk9kLb7iwlHG/3NyXFwFBVWgri7lPQRHtlkWJzZu3bWsPw0GB+SF0BpoH7
	yTiA==
Received: by 10.180.83.66 with SMTP id o2mr6504591wiy.14.1346277323713;
	Wed, 29 Aug 2012 14:55:23 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.22
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:23 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 06/22] build: don't use recursive make to build the 'doc'
	subdirectory
Date: Wed, 29 Aug 2012 23:54:43 +0200
Message-Id: <99f015ef31ba8c09a35c65e1b280f46fa6177c5e.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:28 -0000

* doc/Makefile.am: Rename ...
* doc/local.mk: ... like this.  With further adjustments ...
(info_TEXINFOS): Prepend 'doc/' to all '*.texi' files listed in
here.
(coreutils_TEXINFOS): Likewise, and rename ...
(doc_coreutils_TEXINFOS): ... like this.
(constants.texi): Rename ...
(doc/constants.texi): ... like this.  Adjust the recipe to avoid
spurious errors.
(MAINTAINERCLEANFILES): Adjust, and extend with '+=' rather than
setting it with '='.
(ME): Delete.
(find_upper_case_var): Use '$@', not '$(ME)', in error messages.
* Makefile.am: Include 'doc/local.mk'.
(SUBDIRS): Remove 'doc'.
* configure.ac (AC_CONFIG_FILES): Remove 'doc/Makefile'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 Makefile.am                   |  4 +++-
 configure.ac                  |  1 -
 doc/{Makefile.am => local.mk} | 22 ++++++++++++----------
 3 files changed, 15 insertions(+), 12 deletions(-)
 rename doc/{Makefile.am => local.mk} (90%)

diff --git a/Makefile.am b/Makefile.am
index 72d93d5..0446e43 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@
 
 ALL_RECURSIVE_TARGETS =
 
-SUBDIRS = lib src doc man po tests gnulib-tests
+SUBDIRS = lib src man po tests gnulib-tests
 
 changelog_etc =				\
   ChangeLog-2005			\
@@ -169,3 +169,5 @@ check-git-hook-script-sync:
 	     done;							\
 	rm -rf $$t;							\
 	test $$fail = 0
+
+include $(top_srcdir)/doc/local.mk
diff --git a/configure.ac b/configure.ac
index 5651fd1..52918ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -492,7 +492,6 @@ gt_LOCALE_FR
 
 AC_CONFIG_FILES(
   Makefile
-  doc/Makefile
   lib/Makefile
   man/Makefile
   po/Makefile.in
diff --git a/doc/Makefile.am b/doc/local.mk
similarity index 90%
rename from doc/Makefile.am
rename to doc/local.mk
index 121c7cc..665dd21 100644
--- a/doc/Makefile.am
+++ b/doc/local.mk
@@ -1,4 +1,5 @@
 # Make coreutils documentation.				-*-Makefile-*-
+# This is included by the top-level Makefile.am.
 
 # Copyright (C) 1995-2012 Free Software Foundation, Inc.
 
@@ -15,9 +16,13 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-info_TEXINFOS = coreutils.texi
+info_TEXINFOS = doc/coreutils.texi
 
-coreutils_TEXINFOS = perm.texi parse-datetime.texi constants.texi fdl.texi
+doc_coreutils_TEXINFOS = \
+  doc/perm.texi \
+  doc/parse-datetime.texi \
+  doc/constants.texi \
+  doc/fdl.texi
 
 doc_srcdir = $(top_srcdir)/doc
 
@@ -31,16 +36,16 @@ doc_srcdir = $(top_srcdir)/doc
 # old systems.
 AM_MAKEINFOFLAGS = --no-split
 
-constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
+doc/constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
 	$(AM_V_GEN)LC_ALL=C; export LC_ALL; \
 	{ sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
 	    $(top_srcdir)/src/tail.c && \
 	  sed -n -e \
 	      's/.*\(DEFAULT_PASSES\)[ =]* \([0-9]*\).*/@set SHRED_\1 \2/p'\
-	    $(top_srcdir)/src/shred.c; } > t-$@ \
-	  && mv t-$@ $@
+	    $(top_srcdir)/src/shred.c; } > $@-t \
+	  && mv $@-t $@
 
-MAINTAINERCLEANFILES = constants.texi
+MAINTAINERCLEANFILES += doc/constants.texi
 
 # Extended regular expressions to match word starts and ends.
 _W = (^|[^A-Za-z0-9_])
@@ -108,9 +113,6 @@ sc-avoid-zeroes:
 	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(doc_srcdir)/*.texi \
 	  && exit 1 || :
 
-# ME = $(subdir)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
-ME = doc/Makefile
-
 # The quantity inside @var{...} should not contain upper case letters.
 # The leading backslash exemption is to permit in-macro uses like
 # @var{\varName\} where the upper case letter is part of a parameter name.
@@ -121,7 +123,7 @@ find_upper_case_var =		\
        $$v = $$1;		\
        $$v =~ /[A-Z]/ && $$v !~ /^\\/ and (print "$$ARGV:$$.:$$_"), $$m = 1 \
      }				\
-   END {$$m and (warn "$(ME): do not use upper case in \@var{...}\n"), exit 1}'
+   END {$$m and (warn "$@: do not use upper case in \@var{...}\n"), exit 1}'
 sc-lower-case-var:
 	$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
 	  $(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEX-0004Cc-Q3
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39493)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qET-0003zS-F8
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qES-0003UF-6l
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:29 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:51229)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qES-0003PV-0Z
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:28 -0400
Received: by mail-wi0-f171.google.com with SMTP id hq4so5416240wib.12
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=CKHZXX4A4Ij5FnBYVH7a7AVdd5dD5Bggis/daW9S0po=;
	b=Rj4y0xwiddf1OfWzzgwesJExWcK9sAeCQDTP5B8Vu+B5UVpPbZsNd1ZwzVtsqNpgej
	ObvEC/igqHBuNKVtb9rNgsliknC98rKiBW48z1c4wRt6teFdqR4lbo6QsioewD07zMAF
	GK/QfJXM68UWoPeIsIVzVOEbHPC90cbwrqig3pyNb8VtE1/u9WryWF306IM/oDXM+Lfq
	chO7DnO9K/9s2wOCDBgEu3V4a1sLb4UOIOcNE9RLDWX7q3C+vRB9ZyncQgegwtp7K1uw
	yGdTR3SAK35JBofZCDUiZdYVxH4ndG5MSe0Mf3/x9v+yFeCfqxDlAvpzS0gtbyNYivU+
	JNFA==
Received: by 10.180.105.163 with SMTP id gn3mr6567144wib.2.1346277327590;
	Wed, 29 Aug 2012 14:55:27 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.26
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:26 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 09/22] build: add an explicative comment
Date: Wed, 29 Aug 2012 23:54:46 +0200
Message-Id: <19222838acc5ea7769f80c39dc92a8c746321de7.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:30 -0000

* man/Makefile.am (EXTRA_DIST): Here, portability issues of the
employed idiom.  Reformat the definition a little while at it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 8e9df08..44eb310 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -19,10 +19,19 @@ dist_man1_MANS = $(MAN)
 
 man_aux = $(dist_man1_MANS:.1=.x)
 
-EXTRA_DIST = $(man_aux) $(NO_INSTALL_PROGS_DEFAULT:%=%.x) help2man \
-	$(NO_INSTALL_PROGS_DEFAULT:%=%.1)
+EXTRA_DIST = $(man_aux) help2man
 MAINTAINERCLEANFILES = $(dist_man1_MANS)
 
+# The "$(VAR:%=%.x)" idiom is not portable according to POSIX, but in
+# practice it works with several make implementation (GNU, BSD, CCS make
+# from Solaris 10, Sun distributed make).  In addition, since only
+# maintainers are expected to build release tarballs (and they should
+# use GNU make when doing so), it's not big deal if this won't work with
+# some dumber make implementation.
+EXTRA_DIST += \
+  $(NO_INSTALL_PROGS_DEFAULT:%=%.x) \
+  $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
+
 # Depend on ../.version to get version number changes.
 common_dep = ../.version
 
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:36 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEZ-0004JC-UZ
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39544)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEW-00048J-8O
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEV-0003WC-1u
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:32 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:38623)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEU-0003Vk-SQ
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:30 -0400
Received: by weys10 with SMTP id s10so676800wey.0
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=X6/zHPDqlIeSSwVv4hD8ocH9PKaBw2wTJDBI1qu5q+4=;
	b=bLtdxfxsiMTZM5FO2E832Jt4lcYaie/VeATgPwBOaIUL27/Is1gWt9RYyPnblZj7ct
	Rv25VtVvTcQ0gT8r3O9lVrC3BneHoEu4Fd9LX30InoZ0a5iXIvsyNCGrVCdaYoTBA411
	7d34IKTYQRqyvIou9zXCOBv1Lzzy46dihFniODTWArw+7ruM1GQJM6h4yDg213Ayy1F0
	lqRqabQCuznx5AM/BdspWbpATcwdn9JM5Xxl10tUjKtG2tKzKtEPYVaYZwtfgmsUGHe+
	QNn+sSjXgDMeDyVkA/WYEZCJi5IxmHdaZPydF5ER+C45gip4mXLfqJe34hbuEOCSxtmx
	idpA==
Received: by 10.180.82.230 with SMTP id l6mr43086330wiy.21.1346277330050;
	Wed, 29 Aug 2012 14:55:30 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.27
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:28 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 10/22] build: fix a stray usage of uninitialized $(ME)
Date: Wed, 29 Aug 2012 23:54:47 +0200
Message-Id: <30552c5693c2e33989f76952c157c41946760bfc.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:33 -0000

* man/Makefile.am (sc_option_desc_uppercase): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 44eb310..84b585f 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -185,7 +185,7 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
 .PHONY: sc_option_desc_uppercase
 sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
 	@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
-	    { echo 1>&2 '$(ME): found initial capitals in --help';   \
+	    { echo 1>&2 '$@: found initial capitals in --help';   \
 	      exit 1; } || :;
 
 .PHONY: sc_man_file_correlation
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEb-0004Lj-3N
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39603)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEY-0004EM-DB
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEX-0003Xv-Dx
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:34 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:44102)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEX-0003Kk-8I
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:33 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so647175wgb.30
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=ULOhDYlNnOst1LR/iQlkGXKNiw+aKh8eaethMfytSE0=;
	b=vMB2MKhDEe8lpa/SlU5heSKRjRbLcKYhz/ZyHPaaXvfVmTLlAjvQRf/jnJ8yiZUitP
	aKH30Hm8x7h2PO0As6PLcTIjNw+VpZZJPmloHyhqZ06j5okwJvBk2lMeprTf26gPJRpT
	nZYT1ko/MBng0F7K8E0iESk+m2M+AkWcyQkHniAclS+pYlscxln/HuiXTRgWwKN8yAIs
	usERVuux50kPcmL3KCvbz5uRsncnq/5uh0KgOk+BDb065qzxknbkpgnsqx+qHx9k3DbC
	LF6N13R7wtoqeBED/komjcXnUL3PNNfVvFeUWAgIg94GAVnGpQU+tP+fChq4A1PPR4pS
	YzKw==
Received: by 10.180.86.106 with SMTP id o10mr6476360wiz.22.1346277332795;
	Wed, 29 Aug 2012 14:55:32 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.31
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:32 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 12/22] maint: typofix: s/it's/its/
Date: Wed, 29 Aug 2012 23:54:49 +0200
Message-Id: <9d69f618d7a3fca68599d5b5d09cf42beea4abd8.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:35 -0000

* man/Makefile.am: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index ef0fbd9..ff8b01e 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -55,7 +55,7 @@ date.1:		$(mandep)	$(srcdir)/date.x	../src/date.c
 dd.1:		$(mandep)	$(srcdir)/dd.x		../src/dd.c
 df.1:		$(mandep)	$(srcdir)/df.x		../src/df.c
 
-# Note that dir depends on ls.c, since that's where it's --help text is.
+# Note that dir depends on ls.c, since that's where its --help text is.
 dir.1:		$(mandep)	$(srcdir)/dir.x		../src/ls.c
 
 dircolors.1:	$(mandep)	$(srcdir)/dircolors.x	../src/dircolors.c
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEd-0004Rv-IP
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39616)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEZ-0004GJ-0O
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEW-0003X6-6h
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:34 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:44102)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEV-0003Kk-UL
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:32 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so647175wgb.30
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=sIBW0UQeWtLwsN3FYB4rstCYRF4WCBMOFiLnNRMNzQY=;
	b=S8qaQbor2aJhqqBsQCowlWQby/FzTfnYZgwM1mLGrE/3+AZ6gm4hOTw2owrxKBlaB+
	+7QEPBtD25QSDjTLqMYSWgoPIU+s3XUT+KwPoPE96aSYKMAc83/RPi5Ct9CvcRSLPJVW
	abI2TdA18pcgdB2Aj17HPgJ7fJ+RFD5Kkjnemz8zhmUHQWEbkGJQ002DH969Br3GOAsb
	v/BxETMYIAzQy4wq5n9OL+PG4RXF86faMtSxgXpDAK8aOsJDnpnT+VpMBJ2DFMcU5aeU
	wrzeLtEPBKix6MJZx3yfFE0rjmtZalccdBSle5AYpaXIcaO3GXdkVe0mhXAAs1rHrPOn
	kDKQ==
Received: by 10.216.209.8 with SMTP id r8mr1765170weo.51.1346277331494;
	Wed, 29 Aug 2012 14:55:31 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.30
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:30 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 11/22] build: rename common_dep -> mandep in man/Makefile
Date: Wed, 29 Aug 2012 23:54:48 +0200
Message-Id: <5861c47c9bebfbef390e790301d33bee2861955f.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:38 -0000

This is mostly a preparatory refactoring in view of future changes.

* man/Makefile.am (common_dep): Rename ...
(mandep): ... like this.
All usages adjusted.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 212 ++++++++++++++++++++++++++++----------------------------
 1 file changed, 106 insertions(+), 106 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 84b585f..ef0fbd9 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -33,116 +33,116 @@ EXTRA_DIST += \
   $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
 
 # Depend on ../.version to get version number changes.
-common_dep = ../.version
+mandep = ../.version
 
 # Note that arch depends on uname.c
-arch.1:		$(common_dep)	$(srcdir)/arch.x	../src/uname.c
-
-base64.1:	$(common_dep)	$(srcdir)/base64.x	../src/base64.c
-basename.1:	$(common_dep)	$(srcdir)/basename.x	../src/basename.c
-cat.1:		$(common_dep)	$(srcdir)/cat.x		../src/cat.c
-chcon.1:	$(common_dep)	$(srcdir)/chcon.x	../src/chcon.c
-chgrp.1:	$(common_dep)	$(srcdir)/chgrp.x	../src/chgrp.c
-chmod.1:	$(common_dep)	$(srcdir)/chmod.x	../src/chmod.c
-chown.1:	$(common_dep)	$(srcdir)/chown.x	../src/chown.c
-chroot.1:	$(common_dep)	$(srcdir)/chroot.x	../src/chroot.c
-cksum.1:	$(common_dep)	$(srcdir)/cksum.x	../src/cksum.c
-comm.1:		$(common_dep)	$(srcdir)/comm.x	../src/comm.c
-cp.1:		$(common_dep)	$(srcdir)/cp.x		../src/cp.c
-csplit.1:	$(common_dep)	$(srcdir)/csplit.x	../src/csplit.c
-cut.1:		$(common_dep)	$(srcdir)/cut.x		../src/cut.c
-date.1:		$(common_dep)	$(srcdir)/date.x	../src/date.c
-dd.1:		$(common_dep)	$(srcdir)/dd.x		../src/dd.c
-df.1:		$(common_dep)	$(srcdir)/df.x		../src/df.c
+arch.1:		$(mandep)	$(srcdir)/arch.x	../src/uname.c
+
+base64.1:	$(mandep)	$(srcdir)/base64.x	../src/base64.c
+basename.1:	$(mandep)	$(srcdir)/basename.x	../src/basename.c
+cat.1:		$(mandep)	$(srcdir)/cat.x		../src/cat.c
+chcon.1:	$(mandep)	$(srcdir)/chcon.x	../src/chcon.c
+chgrp.1:	$(mandep)	$(srcdir)/chgrp.x	../src/chgrp.c
+chmod.1:	$(mandep)	$(srcdir)/chmod.x	../src/chmod.c
+chown.1:	$(mandep)	$(srcdir)/chown.x	../src/chown.c
+chroot.1:	$(mandep)	$(srcdir)/chroot.x	../src/chroot.c
+cksum.1:	$(mandep)	$(srcdir)/cksum.x	../src/cksum.c
+comm.1:		$(mandep)	$(srcdir)/comm.x	../src/comm.c
+cp.1:		$(mandep)	$(srcdir)/cp.x		../src/cp.c
+csplit.1:	$(mandep)	$(srcdir)/csplit.x	../src/csplit.c
+cut.1:		$(mandep)	$(srcdir)/cut.x		../src/cut.c
+date.1:		$(mandep)	$(srcdir)/date.x	../src/date.c
+dd.1:		$(mandep)	$(srcdir)/dd.x		../src/dd.c
+df.1:		$(mandep)	$(srcdir)/df.x		../src/df.c
 
 # Note that dir depends on ls.c, since that's where it's --help text is.
-dir.1:		$(common_dep)	$(srcdir)/dir.x		../src/ls.c
-
-dircolors.1:	$(common_dep)	$(srcdir)/dircolors.x	../src/dircolors.c
-dirname.1:	$(common_dep)	$(srcdir)/dirname.x	../src/dirname.c
-du.1:		$(common_dep)	$(srcdir)/du.x		../src/du.c
-echo.1:		$(common_dep)	$(srcdir)/echo.x	../src/echo.c
-env.1:		$(common_dep)	$(srcdir)/env.x		../src/env.c
-expand.1:	$(common_dep)	$(srcdir)/expand.x	../src/expand.c
-expr.1:		$(common_dep)	$(srcdir)/expr.x	../src/expr.c
-factor.1:	$(common_dep)	$(srcdir)/factor.x	../src/factor.c
-false.1:	$(common_dep)	$(srcdir)/false.x	../src/false.c
-fmt.1:		$(common_dep)	$(srcdir)/fmt.x		../src/fmt.c
-fold.1:		$(common_dep)	$(srcdir)/fold.x	../src/fold.c
-groups.1:	$(common_dep)	$(srcdir)/groups.x	../src/groups.c
-head.1:		$(common_dep)	$(srcdir)/head.x	../src/head.c
-hostid.1:	$(common_dep)	$(srcdir)/hostid.x	../src/hostid.c
-hostname.1:	$(common_dep)	$(srcdir)/hostname.x	../src/hostname.c
-id.1:		$(common_dep)	$(srcdir)/id.x		../src/id.c
-install.1:	$(common_dep)	$(srcdir)/install.x	../src/install.c
-join.1:		$(common_dep)	$(srcdir)/join.x	../src/join.c
-kill.1:		$(common_dep)	$(srcdir)/kill.x	../src/kill.c
-link.1:		$(common_dep)	$(srcdir)/link.x	../src/link.c
-ln.1:		$(common_dep)	$(srcdir)/ln.x		../src/ln.c
-logname.1:	$(common_dep)	$(srcdir)/logname.x	../src/logname.c
-ls.1:		$(common_dep)	$(srcdir)/ls.x		../src/ls.c
-md5sum.1:	$(common_dep)	$(srcdir)/md5sum.x	../src/md5sum.c
-mkdir.1:	$(common_dep)	$(srcdir)/mkdir.x	../src/mkdir.c
-mkfifo.1:	$(common_dep)	$(srcdir)/mkfifo.x	../src/mkfifo.c
-mknod.1:	$(common_dep)	$(srcdir)/mknod.x	../src/mknod.c
-mktemp.1:	$(common_dep)	$(srcdir)/mktemp.x	../src/mktemp.c
-mv.1:		$(common_dep)	$(srcdir)/mv.x		../src/mv.c
-nice.1:		$(common_dep)	$(srcdir)/nice.x	../src/nice.c
-nl.1:		$(common_dep)	$(srcdir)/nl.x		../src/nl.c
-nohup.1:	$(common_dep)	$(srcdir)/nohup.x	../src/nohup.c
-nproc.1:	$(common_dep)	$(srcdir)/nproc.x	../src/nproc.c
-od.1:		$(common_dep)	$(srcdir)/od.x		../src/od.c
-paste.1:	$(common_dep)	$(srcdir)/paste.x	../src/paste.c
-pathchk.1:	$(common_dep)	$(srcdir)/pathchk.x	../src/pathchk.c
-pinky.1:	$(common_dep)	$(srcdir)/pinky.x	../src/pinky.c
-pr.1:		$(common_dep)	$(srcdir)/pr.x		../src/pr.c
-printenv.1:	$(common_dep)	$(srcdir)/printenv.x	../src/printenv.c
-printf.1:	$(common_dep)	$(srcdir)/printf.x	../src/printf.c
-ptx.1:		$(common_dep)	$(srcdir)/ptx.x		../src/ptx.c
-pwd.1:		$(common_dep)	$(srcdir)/pwd.x		../src/pwd.c
-readlink.1:	$(common_dep)	$(srcdir)/readlink.x	../src/readlink.c
-realpath.1:	$(common_dep)	$(srcdir)/realpath.x	../src/realpath.c
-rm.1:		$(common_dep)	$(srcdir)/rm.x		../src/rm.c
-rmdir.1:	$(common_dep)	$(srcdir)/rmdir.x	../src/rmdir.c
-runcon.1:	$(common_dep)	$(srcdir)/runcon.x	../src/runcon.c
-seq.1:		$(common_dep)	$(srcdir)/seq.x		../src/seq.c
-sha1sum.1:	$(common_dep)	$(srcdir)/sha1sum.x	../src/md5sum.c
-sha224sum.1:	$(common_dep)	$(srcdir)/sha224sum.x	../src/md5sum.c
-sha256sum.1:	$(common_dep)	$(srcdir)/sha256sum.x	../src/md5sum.c
-sha384sum.1:	$(common_dep)	$(srcdir)/sha384sum.x	../src/md5sum.c
-sha512sum.1:	$(common_dep)	$(srcdir)/sha512sum.x	../src/md5sum.c
-shred.1:	$(common_dep)	$(srcdir)/shred.x	../src/shred.c
-shuf.1:		$(common_dep)	$(srcdir)/shuf.x	../src/shuf.c
-sleep.1:	$(common_dep)	$(srcdir)/sleep.x	../src/sleep.c
-sort.1:		$(common_dep)	$(srcdir)/sort.x	../src/sort.c
-split.1:	$(common_dep)	$(srcdir)/split.x	../src/split.c
-stat.1:		$(common_dep)	$(srcdir)/stat.x	../src/stat.c
-stdbuf.1:	$(common_dep)	$(srcdir)/stdbuf.x	../src/stdbuf.c
-stty.1:		$(common_dep)	$(srcdir)/stty.x	../src/stty.c
-sum.1:		$(common_dep)	$(srcdir)/sum.x		../src/sum.c
-sync.1:		$(common_dep)	$(srcdir)/sync.x	../src/sync.c
-tac.1:		$(common_dep)	$(srcdir)/tac.x		../src/tac.c
-tail.1:		$(common_dep)	$(srcdir)/tail.x	../src/tail.c
-tee.1:		$(common_dep)	$(srcdir)/tee.x		../src/tee.c
-test.1:		$(common_dep)	$(srcdir)/test.x	../src/test.c
-timeout.1:	$(common_dep)	$(srcdir)/timeout.x	../src/timeout.c
-touch.1:	$(common_dep)	$(srcdir)/touch.x	../src/touch.c
-tr.1:		$(common_dep)	$(srcdir)/tr.x		../src/tr.c
-true.1:		$(common_dep)	$(srcdir)/true.x	../src/true.c
-truncate.1:	$(common_dep)	$(srcdir)/truncate.x	../src/truncate.c
-tsort.1:	$(common_dep)	$(srcdir)/tsort.x	../src/tsort.c
-tty.1:		$(common_dep)	$(srcdir)/tty.x		../src/tty.c
-uname.1:	$(common_dep)	$(srcdir)/uname.x	../src/uname.c
-unexpand.1:	$(common_dep)	$(srcdir)/unexpand.x	../src/unexpand.c
-uniq.1:		$(common_dep)	$(srcdir)/uniq.x	../src/uniq.c
-unlink.1:	$(common_dep)	$(srcdir)/unlink.x	../src/unlink.c
-uptime.1:	$(common_dep)	$(srcdir)/uptime.x	../src/uptime.c
-users.1:	$(common_dep)	$(srcdir)/users.x	../src/users.c
-vdir.1:		$(common_dep)	$(srcdir)/vdir.x	../src/ls.c
-wc.1:		$(common_dep)	$(srcdir)/wc.x		../src/wc.c
-who.1:		$(common_dep)	$(srcdir)/who.x		../src/who.c
-whoami.1:	$(common_dep)	$(srcdir)/whoami.x	../src/whoami.c
-yes.1:		$(common_dep)	$(srcdir)/yes.x		../src/yes.c
+dir.1:		$(mandep)	$(srcdir)/dir.x		../src/ls.c
+
+dircolors.1:	$(mandep)	$(srcdir)/dircolors.x	../src/dircolors.c
+dirname.1:	$(mandep)	$(srcdir)/dirname.x	../src/dirname.c
+du.1:		$(mandep)	$(srcdir)/du.x		../src/du.c
+echo.1:		$(mandep)	$(srcdir)/echo.x	../src/echo.c
+env.1:		$(mandep)	$(srcdir)/env.x		../src/env.c
+expand.1:	$(mandep)	$(srcdir)/expand.x	../src/expand.c
+expr.1:		$(mandep)	$(srcdir)/expr.x	../src/expr.c
+factor.1:	$(mandep)	$(srcdir)/factor.x	../src/factor.c
+false.1:	$(mandep)	$(srcdir)/false.x	../src/false.c
+fmt.1:		$(mandep)	$(srcdir)/fmt.x		../src/fmt.c
+fold.1:		$(mandep)	$(srcdir)/fold.x	../src/fold.c
+groups.1:	$(mandep)	$(srcdir)/groups.x	../src/groups.c
+head.1:		$(mandep)	$(srcdir)/head.x	../src/head.c
+hostid.1:	$(mandep)	$(srcdir)/hostid.x	../src/hostid.c
+hostname.1:	$(mandep)	$(srcdir)/hostname.x	../src/hostname.c
+id.1:		$(mandep)	$(srcdir)/id.x		../src/id.c
+install.1:	$(mandep)	$(srcdir)/install.x	../src/install.c
+join.1:		$(mandep)	$(srcdir)/join.x	../src/join.c
+kill.1:		$(mandep)	$(srcdir)/kill.x	../src/kill.c
+link.1:		$(mandep)	$(srcdir)/link.x	../src/link.c
+ln.1:		$(mandep)	$(srcdir)/ln.x		../src/ln.c
+logname.1:	$(mandep)	$(srcdir)/logname.x	../src/logname.c
+ls.1:		$(mandep)	$(srcdir)/ls.x		../src/ls.c
+md5sum.1:	$(mandep)	$(srcdir)/md5sum.x	../src/md5sum.c
+mkdir.1:	$(mandep)	$(srcdir)/mkdir.x	../src/mkdir.c
+mkfifo.1:	$(mandep)	$(srcdir)/mkfifo.x	../src/mkfifo.c
+mknod.1:	$(mandep)	$(srcdir)/mknod.x	../src/mknod.c
+mktemp.1:	$(mandep)	$(srcdir)/mktemp.x	../src/mktemp.c
+mv.1:		$(mandep)	$(srcdir)/mv.x		../src/mv.c
+nice.1:		$(mandep)	$(srcdir)/nice.x	../src/nice.c
+nl.1:		$(mandep)	$(srcdir)/nl.x		../src/nl.c
+nohup.1:	$(mandep)	$(srcdir)/nohup.x	../src/nohup.c
+nproc.1:	$(mandep)	$(srcdir)/nproc.x	../src/nproc.c
+od.1:		$(mandep)	$(srcdir)/od.x		../src/od.c
+paste.1:	$(mandep)	$(srcdir)/paste.x	../src/paste.c
+pathchk.1:	$(mandep)	$(srcdir)/pathchk.x	../src/pathchk.c
+pinky.1:	$(mandep)	$(srcdir)/pinky.x	../src/pinky.c
+pr.1:		$(mandep)	$(srcdir)/pr.x		../src/pr.c
+printenv.1:	$(mandep)	$(srcdir)/printenv.x	../src/printenv.c
+printf.1:	$(mandep)	$(srcdir)/printf.x	../src/printf.c
+ptx.1:		$(mandep)	$(srcdir)/ptx.x		../src/ptx.c
+pwd.1:		$(mandep)	$(srcdir)/pwd.x		../src/pwd.c
+readlink.1:	$(mandep)	$(srcdir)/readlink.x	../src/readlink.c
+realpath.1:	$(mandep)	$(srcdir)/realpath.x	../src/realpath.c
+rm.1:		$(mandep)	$(srcdir)/rm.x		../src/rm.c
+rmdir.1:	$(mandep)	$(srcdir)/rmdir.x	../src/rmdir.c
+runcon.1:	$(mandep)	$(srcdir)/runcon.x	../src/runcon.c
+seq.1:		$(mandep)	$(srcdir)/seq.x		../src/seq.c
+sha1sum.1:	$(mandep)	$(srcdir)/sha1sum.x	../src/md5sum.c
+sha224sum.1:	$(mandep)	$(srcdir)/sha224sum.x	../src/md5sum.c
+sha256sum.1:	$(mandep)	$(srcdir)/sha256sum.x	../src/md5sum.c
+sha384sum.1:	$(mandep)	$(srcdir)/sha384sum.x	../src/md5sum.c
+sha512sum.1:	$(mandep)	$(srcdir)/sha512sum.x	../src/md5sum.c
+shred.1:	$(mandep)	$(srcdir)/shred.x	../src/shred.c
+shuf.1:		$(mandep)	$(srcdir)/shuf.x	../src/shuf.c
+sleep.1:	$(mandep)	$(srcdir)/sleep.x	../src/sleep.c
+sort.1:		$(mandep)	$(srcdir)/sort.x	../src/sort.c
+split.1:	$(mandep)	$(srcdir)/split.x	../src/split.c
+stat.1:		$(mandep)	$(srcdir)/stat.x	../src/stat.c
+stdbuf.1:	$(mandep)	$(srcdir)/stdbuf.x	../src/stdbuf.c
+stty.1:		$(mandep)	$(srcdir)/stty.x	../src/stty.c
+sum.1:		$(mandep)	$(srcdir)/sum.x		../src/sum.c
+sync.1:		$(mandep)	$(srcdir)/sync.x	../src/sync.c
+tac.1:		$(mandep)	$(srcdir)/tac.x		../src/tac.c
+tail.1:		$(mandep)	$(srcdir)/tail.x	../src/tail.c
+tee.1:		$(mandep)	$(srcdir)/tee.x		../src/tee.c
+test.1:		$(mandep)	$(srcdir)/test.x	../src/test.c
+timeout.1:	$(mandep)	$(srcdir)/timeout.x	../src/timeout.c
+touch.1:	$(mandep)	$(srcdir)/touch.x	../src/touch.c
+tr.1:		$(mandep)	$(srcdir)/tr.x		../src/tr.c
+true.1:		$(mandep)	$(srcdir)/true.x	../src/true.c
+truncate.1:	$(mandep)	$(srcdir)/truncate.x	../src/truncate.c
+tsort.1:	$(mandep)	$(srcdir)/tsort.x	../src/tsort.c
+tty.1:		$(mandep)	$(srcdir)/tty.x		../src/tty.c
+uname.1:	$(mandep)	$(srcdir)/uname.x	../src/uname.c
+unexpand.1:	$(mandep)	$(srcdir)/unexpand.x	../src/unexpand.c
+uniq.1:		$(mandep)	$(srcdir)/uniq.x	../src/uniq.c
+unlink.1:	$(mandep)	$(srcdir)/unlink.x	../src/unlink.c
+uptime.1:	$(mandep)	$(srcdir)/uptime.x	../src/uptime.c
+users.1:	$(mandep)	$(srcdir)/users.x	../src/users.c
+vdir.1:		$(mandep)	$(srcdir)/vdir.x	../src/ls.c
+wc.1:		$(mandep)	$(srcdir)/wc.x		../src/wc.c
+who.1:		$(mandep)	$(srcdir)/who.x		../src/who.c
+whoami.1:	$(mandep)	$(srcdir)/whoami.x	../src/whoami.c
+yes.1:		$(mandep)	$(srcdir)/yes.x		../src/yes.c
 
 # This is required so that changes to e.g., emit_bug_reporting_address
 # provoke regeneration of all $(MAN) files.
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEd-0004RD-9w
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39665)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEb-0004Lh-1J
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEa-0003Zv-85
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:36 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:51229)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEa-0003PV-1o
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:36 -0400
Received: by mail-wi0-f171.google.com with SMTP id hq4so5416240wib.12
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=Lcw7Je1mQLciJ2kNS8Q++n56yTl2ZBWQnEycURum7gI=;
	b=k3Z8J/0wMWbTGe0dVfLZ1DFt2ITP4I58dsrTb0qro6/VuiGTZgkBSFSi4VQ8MZ1fQI
	Qin9deEb4G8xt/uHSwjLpAzevegq4aRy6UaRSBwBaUpDZnuA+r3ORuv6WMsqTN2NNfA7
	iMuJGtYW4jnrvbzX2G+0tSZXuD/6Ce/K3RqZRj38opwQCoX2PcMIJLx6++t8W9b1NRzb
	FaOOyOqSPvFMq6rwUAMjBhJEF0RRDACr9LijGhrtJpH7seMcXbzX8ras+Pq6xivUZsMo
	kiAfzgpYccBZ7aygAcLcOGF/0wVMmmf7BzhRu4sgE2Sjgfs9d+FSFNMNaOxVd413/K4G
	vNlA==
Received: by 10.180.84.1 with SMTP id u1mr6500198wiy.15.1346277335618;
	Wed, 29 Aug 2012 14:55:35 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.34
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:34 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 14/22] build: make some rule less dependent of exact source
	tree layout
Date: Wed, 29 Aug 2012 23:54:51 +0200
Message-Id: <2efedbe93b408c7846dbd4fd090130e5bad2fe52.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:37 -0000

This is mostly a preparatory change in view of future ones.

* man/Makefile.am (.x.1): Use '$(abs_top_builddir)/src' to access the
'src' directory in the coreutils build tree.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 3d6a963..ff1c1ab 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -168,7 +168,7 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
 	    && {						\
 		 rm -rf $t;					\
 		 mkdir $t;					\
-		 (cd $t && $(LN_S) ../../src/$(mapped_name) $*); \
+		 (cd $t && $(LN_S) $(abs_top_builddir)/src/$(mapped_name) $*); \
 		    $(PERL) -- $(srcdir)/help2man		\
 		     --source='$(PACKAGE_STRING)'		\
 		     --include=$(srcdir)/$*.x			\
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEW-0004A3-QL
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39377)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEP-0003ph-B0
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEN-0003Q4-DN
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:25 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:51229)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEN-0003PV-7s
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:23 -0400
Received: by wibhq4 with SMTP id hq4so5416240wib.12
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=Zj45veEDNpdNvfPOqekF2czOF6M0e50Y5omHH1XUzLw=;
	b=hCqU2cRJ+CEkQuakXFRKQNqAfejSe1oyfSGi9/NairZoHBamOm1GwWimo41EaYeXKS
	OwFeKmOkQEyLEy5wCoByilC/eo6eMuZ3+CqU7kfUM+Tu9vYKBD6b/iXpmH2XH13s/P9w
	vtpuYnQ8TwpulaDW/JScJZwZ4RHkWzWBv3U5Z6iESLPl7ZbPDszuM1UQhTBQzybqeCEc
	tfgH6uZSE4h9c59WgHUqz3L3TOBd1HCQCJL13SMLQSOOlaK5RfvS7I91UXh8I9R/PieA
	UYTEqZGeFLdu08siC+kOQYjRqKedb6nLRBa1NV9IVQCQjNeGSysF/ey0dTzeFGvsZeLO
	eO3g==
Received: by 10.216.41.195 with SMTP id h45mr1772316web.74.1346277322429;
	Wed, 29 Aug 2012 14:55:22 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.21
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:21 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 05/22] build: use 'check-local' to extend the 'check' target
Date: Wed, 29 Aug 2012 23:54:42 +0200
Message-Id: <bcca05ccf38d23991c1cf8c6e2d8aa58f1c85e90.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:27 -0000

* doc/Makefile.am (check-local): Here, by making this depend
on 'check-texinfo' ...
(check): ... rather than this.  While the old usage worked, it
did so for an implementation detail rather than a documented
behaviour, so relying on that was riskier a "unclean".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 doc/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 4e5150f..121c7cc 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -126,4 +126,4 @@ sc-lower-case-var:
 	$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
 	  $(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi
 
-check: check-texinfo
+check-local: check-texinfo
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEf-0004YS-M0
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39675)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEb-0004Mc-IK
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEZ-0003Z5-31
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:37 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:38623)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEY-0003Vk-Ql
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:35 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so676800wey.0
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=zPkDsfkZ6KA9JJ3q2Erq5SRQvJuXQi5oDKekr6HmXoU=;
	b=bO7pmIzss6SV41aklFcd5+1H9OaurTqrljMAG/M+e9iksscXvpJoOPd6yiluXVIZAV
	To76w8FUdm/wKJAgQJNWIsRTLwL0qTqR0smC/PFD1piIkDJl+JmT39pI2Q3z+fowL4hr
	Buznu2W5MA6q8TbsLTL8wFqGQJUdgXAeKyFoRY62egt/C4ggVNhaHf/EGiOlwIV87aey
	NbWTwH4PIYTvWxgx0EOC7vppfEIJEopyc9IAbs0P/2TpdTpyfmJTkXvpBLIR+N2kh8ly
	jEUjnXFbixFkhzOkgoMugF78Y49ToCJIWCHNLstIdSjY9L8qNlEsYHlkVm0RgBh9CAwL
	fLkA==
Received: by 10.180.90.104 with SMTP id bv8mr6009809wib.22.1346277334348;
	Wed, 29 Aug 2012 14:55:34 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.32
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:33 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 13/22] build: rely on VPATH capabilities in man/Makefile
Date: Wed, 29 Aug 2012 23:54:50 +0200
Message-Id: <9533c7422f6bc2190faf9f1c32964254ed4011f2.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:39 -0000

* man/Makefile.am: In all the 'foo.1' targets, no need to depend
explicitly on '$(srcdir)/foo.x': the '.x.1' suffix rule takes care
of that automatically.
---
 man/Makefile.am | 210 ++++++++++++++++++++++++++++----------------------------
 1 file changed, 105 insertions(+), 105 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index ff8b01e..3d6a963 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -36,113 +36,113 @@ EXTRA_DIST += \
 mandep = ../.version
 
 # Note that arch depends on uname.c
-arch.1:		$(mandep)	$(srcdir)/arch.x	../src/uname.c
-
-base64.1:	$(mandep)	$(srcdir)/base64.x	../src/base64.c
-basename.1:	$(mandep)	$(srcdir)/basename.x	../src/basename.c
-cat.1:		$(mandep)	$(srcdir)/cat.x		../src/cat.c
-chcon.1:	$(mandep)	$(srcdir)/chcon.x	../src/chcon.c
-chgrp.1:	$(mandep)	$(srcdir)/chgrp.x	../src/chgrp.c
-chmod.1:	$(mandep)	$(srcdir)/chmod.x	../src/chmod.c
-chown.1:	$(mandep)	$(srcdir)/chown.x	../src/chown.c
-chroot.1:	$(mandep)	$(srcdir)/chroot.x	../src/chroot.c
-cksum.1:	$(mandep)	$(srcdir)/cksum.x	../src/cksum.c
-comm.1:		$(mandep)	$(srcdir)/comm.x	../src/comm.c
-cp.1:		$(mandep)	$(srcdir)/cp.x		../src/cp.c
-csplit.1:	$(mandep)	$(srcdir)/csplit.x	../src/csplit.c
-cut.1:		$(mandep)	$(srcdir)/cut.x		../src/cut.c
-date.1:		$(mandep)	$(srcdir)/date.x	../src/date.c
-dd.1:		$(mandep)	$(srcdir)/dd.x		../src/dd.c
-df.1:		$(mandep)	$(srcdir)/df.x		../src/df.c
+arch.1:		$(mandep)	../src/uname.c
+
+base64.1:	$(mandep)	../src/base64.c
+basename.1:	$(mandep)	../src/basename.c
+cat.1:		$(mandep)	../src/cat.c
+chcon.1:	$(mandep)	../src/chcon.c
+chgrp.1:	$(mandep)	../src/chgrp.c
+chmod.1:	$(mandep)	../src/chmod.c
+chown.1:	$(mandep)	../src/chown.c
+chroot.1:	$(mandep)	../src/chroot.c
+cksum.1:	$(mandep)	../src/cksum.c
+comm.1:		$(mandep)	../src/comm.c
+cp.1:		$(mandep)	../src/cp.c
+csplit.1:	$(mandep)	../src/csplit.c
+cut.1:		$(mandep)	../src/cut.c
+date.1:		$(mandep)	../src/date.c
+dd.1:		$(mandep)	../src/dd.c
+df.1:		$(mandep)	../src/df.c
 
 # Note that dir depends on ls.c, since that's where its --help text is.
-dir.1:		$(mandep)	$(srcdir)/dir.x		../src/ls.c
-
-dircolors.1:	$(mandep)	$(srcdir)/dircolors.x	../src/dircolors.c
-dirname.1:	$(mandep)	$(srcdir)/dirname.x	../src/dirname.c
-du.1:		$(mandep)	$(srcdir)/du.x		../src/du.c
-echo.1:		$(mandep)	$(srcdir)/echo.x	../src/echo.c
-env.1:		$(mandep)	$(srcdir)/env.x		../src/env.c
-expand.1:	$(mandep)	$(srcdir)/expand.x	../src/expand.c
-expr.1:		$(mandep)	$(srcdir)/expr.x	../src/expr.c
-factor.1:	$(mandep)	$(srcdir)/factor.x	../src/factor.c
-false.1:	$(mandep)	$(srcdir)/false.x	../src/false.c
-fmt.1:		$(mandep)	$(srcdir)/fmt.x		../src/fmt.c
-fold.1:		$(mandep)	$(srcdir)/fold.x	../src/fold.c
-groups.1:	$(mandep)	$(srcdir)/groups.x	../src/groups.c
-head.1:		$(mandep)	$(srcdir)/head.x	../src/head.c
-hostid.1:	$(mandep)	$(srcdir)/hostid.x	../src/hostid.c
-hostname.1:	$(mandep)	$(srcdir)/hostname.x	../src/hostname.c
-id.1:		$(mandep)	$(srcdir)/id.x		../src/id.c
-install.1:	$(mandep)	$(srcdir)/install.x	../src/install.c
-join.1:		$(mandep)	$(srcdir)/join.x	../src/join.c
-kill.1:		$(mandep)	$(srcdir)/kill.x	../src/kill.c
-link.1:		$(mandep)	$(srcdir)/link.x	../src/link.c
-ln.1:		$(mandep)	$(srcdir)/ln.x		../src/ln.c
-logname.1:	$(mandep)	$(srcdir)/logname.x	../src/logname.c
-ls.1:		$(mandep)	$(srcdir)/ls.x		../src/ls.c
-md5sum.1:	$(mandep)	$(srcdir)/md5sum.x	../src/md5sum.c
-mkdir.1:	$(mandep)	$(srcdir)/mkdir.x	../src/mkdir.c
-mkfifo.1:	$(mandep)	$(srcdir)/mkfifo.x	../src/mkfifo.c
-mknod.1:	$(mandep)	$(srcdir)/mknod.x	../src/mknod.c
-mktemp.1:	$(mandep)	$(srcdir)/mktemp.x	../src/mktemp.c
-mv.1:		$(mandep)	$(srcdir)/mv.x		../src/mv.c
-nice.1:		$(mandep)	$(srcdir)/nice.x	../src/nice.c
-nl.1:		$(mandep)	$(srcdir)/nl.x		../src/nl.c
-nohup.1:	$(mandep)	$(srcdir)/nohup.x	../src/nohup.c
-nproc.1:	$(mandep)	$(srcdir)/nproc.x	../src/nproc.c
-od.1:		$(mandep)	$(srcdir)/od.x		../src/od.c
-paste.1:	$(mandep)	$(srcdir)/paste.x	../src/paste.c
-pathchk.1:	$(mandep)	$(srcdir)/pathchk.x	../src/pathchk.c
-pinky.1:	$(mandep)	$(srcdir)/pinky.x	../src/pinky.c
-pr.1:		$(mandep)	$(srcdir)/pr.x		../src/pr.c
-printenv.1:	$(mandep)	$(srcdir)/printenv.x	../src/printenv.c
-printf.1:	$(mandep)	$(srcdir)/printf.x	../src/printf.c
-ptx.1:		$(mandep)	$(srcdir)/ptx.x		../src/ptx.c
-pwd.1:		$(mandep)	$(srcdir)/pwd.x		../src/pwd.c
-readlink.1:	$(mandep)	$(srcdir)/readlink.x	../src/readlink.c
-realpath.1:	$(mandep)	$(srcdir)/realpath.x	../src/realpath.c
-rm.1:		$(mandep)	$(srcdir)/rm.x		../src/rm.c
-rmdir.1:	$(mandep)	$(srcdir)/rmdir.x	../src/rmdir.c
-runcon.1:	$(mandep)	$(srcdir)/runcon.x	../src/runcon.c
-seq.1:		$(mandep)	$(srcdir)/seq.x		../src/seq.c
-sha1sum.1:	$(mandep)	$(srcdir)/sha1sum.x	../src/md5sum.c
-sha224sum.1:	$(mandep)	$(srcdir)/sha224sum.x	../src/md5sum.c
-sha256sum.1:	$(mandep)	$(srcdir)/sha256sum.x	../src/md5sum.c
-sha384sum.1:	$(mandep)	$(srcdir)/sha384sum.x	../src/md5sum.c
-sha512sum.1:	$(mandep)	$(srcdir)/sha512sum.x	../src/md5sum.c
-shred.1:	$(mandep)	$(srcdir)/shred.x	../src/shred.c
-shuf.1:		$(mandep)	$(srcdir)/shuf.x	../src/shuf.c
-sleep.1:	$(mandep)	$(srcdir)/sleep.x	../src/sleep.c
-sort.1:		$(mandep)	$(srcdir)/sort.x	../src/sort.c
-split.1:	$(mandep)	$(srcdir)/split.x	../src/split.c
-stat.1:		$(mandep)	$(srcdir)/stat.x	../src/stat.c
-stdbuf.1:	$(mandep)	$(srcdir)/stdbuf.x	../src/stdbuf.c
-stty.1:		$(mandep)	$(srcdir)/stty.x	../src/stty.c
-sum.1:		$(mandep)	$(srcdir)/sum.x		../src/sum.c
-sync.1:		$(mandep)	$(srcdir)/sync.x	../src/sync.c
-tac.1:		$(mandep)	$(srcdir)/tac.x		../src/tac.c
-tail.1:		$(mandep)	$(srcdir)/tail.x	../src/tail.c
-tee.1:		$(mandep)	$(srcdir)/tee.x		../src/tee.c
-test.1:		$(mandep)	$(srcdir)/test.x	../src/test.c
-timeout.1:	$(mandep)	$(srcdir)/timeout.x	../src/timeout.c
-touch.1:	$(mandep)	$(srcdir)/touch.x	../src/touch.c
-tr.1:		$(mandep)	$(srcdir)/tr.x		../src/tr.c
-true.1:		$(mandep)	$(srcdir)/true.x	../src/true.c
-truncate.1:	$(mandep)	$(srcdir)/truncate.x	../src/truncate.c
-tsort.1:	$(mandep)	$(srcdir)/tsort.x	../src/tsort.c
-tty.1:		$(mandep)	$(srcdir)/tty.x		../src/tty.c
-uname.1:	$(mandep)	$(srcdir)/uname.x	../src/uname.c
-unexpand.1:	$(mandep)	$(srcdir)/unexpand.x	../src/unexpand.c
-uniq.1:		$(mandep)	$(srcdir)/uniq.x	../src/uniq.c
-unlink.1:	$(mandep)	$(srcdir)/unlink.x	../src/unlink.c
-uptime.1:	$(mandep)	$(srcdir)/uptime.x	../src/uptime.c
-users.1:	$(mandep)	$(srcdir)/users.x	../src/users.c
-vdir.1:		$(mandep)	$(srcdir)/vdir.x	../src/ls.c
-wc.1:		$(mandep)	$(srcdir)/wc.x		../src/wc.c
-who.1:		$(mandep)	$(srcdir)/who.x		../src/who.c
-whoami.1:	$(mandep)	$(srcdir)/whoami.x	../src/whoami.c
-yes.1:		$(mandep)	$(srcdir)/yes.x		../src/yes.c
+dir.1:		$(mandep)	../src/ls.c
+
+dircolors.1:	$(mandep)	../src/dircolors.c
+dirname.1:	$(mandep)	../src/dirname.c
+du.1:		$(mandep)	../src/du.c
+echo.1:		$(mandep)	../src/echo.c
+env.1:		$(mandep)	../src/env.c
+expand.1:	$(mandep)	../src/expand.c
+expr.1:		$(mandep)	../src/expr.c
+factor.1:	$(mandep)	../src/factor.c
+false.1:	$(mandep)	../src/false.c
+fmt.1:		$(mandep)	../src/fmt.c
+fold.1:		$(mandep)	../src/fold.c
+groups.1:	$(mandep)	../src/groups.c
+head.1:		$(mandep)	../src/head.c
+hostid.1:	$(mandep)	../src/hostid.c
+hostname.1:	$(mandep)	../src/hostname.c
+id.1:		$(mandep)	../src/id.c
+install.1:	$(mandep)	../src/install.c
+join.1:		$(mandep)	../src/join.c
+kill.1:		$(mandep)	../src/kill.c
+link.1:		$(mandep)	../src/link.c
+ln.1:		$(mandep)	../src/ln.c
+logname.1:	$(mandep)	../src/logname.c
+ls.1:		$(mandep)	../src/ls.c
+md5sum.1:	$(mandep)	../src/md5sum.c
+mkdir.1:	$(mandep)	../src/mkdir.c
+mkfifo.1:	$(mandep)	../src/mkfifo.c
+mknod.1:	$(mandep)	../src/mknod.c
+mktemp.1:	$(mandep)	../src/mktemp.c
+mv.1:		$(mandep)	../src/mv.c
+nice.1:		$(mandep)	../src/nice.c
+nl.1:		$(mandep)	../src/nl.c
+nohup.1:	$(mandep)	../src/nohup.c
+nproc.1:	$(mandep)	../src/nproc.c
+od.1:		$(mandep)	../src/od.c
+paste.1:	$(mandep)	../src/paste.c
+pathchk.1:	$(mandep)	../src/pathchk.c
+pinky.1:	$(mandep)	../src/pinky.c
+pr.1:		$(mandep)	../src/pr.c
+printenv.1:	$(mandep)	../src/printenv.c
+printf.1:	$(mandep)	../src/printf.c
+ptx.1:		$(mandep)	../src/ptx.c
+pwd.1:		$(mandep)	../src/pwd.c
+readlink.1:	$(mandep)	../src/readlink.c
+realpath.1:	$(mandep)	../src/realpath.c
+rm.1:		$(mandep)	../src/rm.c
+rmdir.1:	$(mandep)	../src/rmdir.c
+runcon.1:	$(mandep)	../src/runcon.c
+seq.1:		$(mandep)	../src/seq.c
+sha1sum.1:	$(mandep)	../src/md5sum.c
+sha224sum.1:	$(mandep)	../src/md5sum.c
+sha256sum.1:	$(mandep)	../src/md5sum.c
+sha384sum.1:	$(mandep)	../src/md5sum.c
+sha512sum.1:	$(mandep)	../src/md5sum.c
+shred.1:	$(mandep)	../src/shred.c
+shuf.1:		$(mandep)	../src/shuf.c
+sleep.1:	$(mandep)	../src/sleep.c
+sort.1:		$(mandep)	../src/sort.c
+split.1:	$(mandep)	../src/split.c
+stat.1:		$(mandep)	../src/stat.c
+stdbuf.1:	$(mandep)	../src/stdbuf.c
+stty.1:		$(mandep)	../src/stty.c
+sum.1:		$(mandep)	../src/sum.c
+sync.1:		$(mandep)	../src/sync.c
+tac.1:		$(mandep)	../src/tac.c
+tail.1:		$(mandep)	../src/tail.c
+tee.1:		$(mandep)	../src/tee.c
+test.1:		$(mandep)	../src/test.c
+timeout.1:	$(mandep)	../src/timeout.c
+touch.1:	$(mandep)	../src/touch.c
+tr.1:		$(mandep)	../src/tr.c
+true.1:		$(mandep)	../src/true.c
+truncate.1:	$(mandep)	../src/truncate.c
+tsort.1:	$(mandep)	../src/tsort.c
+tty.1:		$(mandep)	../src/tty.c
+uname.1:	$(mandep)	../src/uname.c
+unexpand.1:	$(mandep)	../src/unexpand.c
+uniq.1:		$(mandep)	../src/uniq.c
+unlink.1:	$(mandep)	../src/unlink.c
+uptime.1:	$(mandep)	../src/uptime.c
+users.1:	$(mandep)	../src/users.c
+vdir.1:		$(mandep)	../src/ls.c
+wc.1:		$(mandep)	../src/wc.c
+who.1:		$(mandep)	../src/who.c
+whoami.1:	$(mandep)	../src/whoami.c
+yes.1:		$(mandep)	../src/yes.c
 
 # This is required so that changes to e.g., emit_bug_reporting_address
 # provoke regeneration of all $(MAN) files.
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEf-0004Z5-Tq
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39696)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEc-0004Pf-GJ
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEb-0003aT-Hg
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:38 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:51229)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEb-0003PV-8K
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:37 -0400
Received: by mail-wi0-f171.google.com with SMTP id hq4so5416240wib.12
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=UriQa/Ks9xu4+qtpSbytxjPfq4IWVE1kGpfRg7wuOz0=;
	b=0ybmNYp6SpFHMRz1/ONwYxpzaqVfJBVljZzNGFXjNWbpwSuYRDSG4MtRp9ggwQjbHw
	9RhfcA6IaDF8i3espLUWZVfZoRRgTVyHeT2QXrJ2Xel/cGUELlfAqo5uJReGN9uB7yX7
	nTl0x9N7FgdbpJcHO55wkEBWAvLGaLr0cSTsPb7Tfperl0zmXTQ8Mi7bR+KkI5dnmhbn
	L6Uz+vF22Blbp/fQN2+WAhTjnLXr1vpP5pvu18VxjkErK1ZwNtRcWP4mfRuuggQ1kGij
	9PNzuj7ynpCP7eUHZAs4pccWHJtUqTqH4wsqDZXjQPCkTdfI7GBZlxxrhsHVZDzT2hNp
	gIDA==
Received: by 10.180.96.199 with SMTP id du7mr6472921wib.21.1346277336825;
	Wed, 29 Aug 2012 14:55:36 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.35
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:36 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 15/22] build: convenience target 'all_programs' at top-level
Date: Wed, 29 Aug 2012 23:54:52 +0200
Message-Id: <a873469a20a3a840e87cf9a3c6982b3c1f22cac1.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:39 -0000

This will be mostly useful in future changes.

* Makefile.am (all_programs): New, simply the work delegating to
the same-named target in the 'src/' subdirectory.
* cfg.mk (sc_option_desc_uppercase): Take advantage of it.
(sc_man_file_correlation): Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 Makefile.am | 4 ++++
 cfg.mk      | 6 ++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 0446e43..f80c4a6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -170,4 +170,8 @@ check-git-hook-script-sync:
 	rm -rf $$t;							\
 	test $$fail = 0
 
+.PHONY: all_programs
+all_programs:
+	@cd ./src && $(MAKE) -s $@
+
 include $(top_srcdir)/doc/local.mk
diff --git a/cfg.mk b/cfg.mk
index 9244225..e6e0828 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -171,14 +171,12 @@ sc_long_lines:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
 # but that would miss descriptions not on the same line as the -option.
 ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
-sc_option_desc_uppercase:
-	@$(MAKE) -s -C src all_programs
+sc_option_desc_uppercase: all_programs
 	@$(MAKE) -s -C man $@
 
 # Ensure all man/*.[1x] files are present
 ALL_RECURSIVE_TARGETS += sc_man_file_correlation
-sc_man_file_correlation:
-	@$(MAKE) -s -C src all_programs
+sc_man_file_correlation: all_programs
 	@$(MAKE) -s -C man $@
 
 # Ensure that the end of each release's section is marked by two empty lines.
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEh-0004cu-6i
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39731)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEe-0004U7-76
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEc-0003bU-Ps
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:40 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:51229)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEc-0003PV-JL
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:38 -0400
Received: by mail-wi0-f171.google.com with SMTP id hq4so5416240wib.12
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=8Tffdv5ZWhEGR+KNMAZDn+HJK0YSicL+DG9ZQ4uCtw0=;
	b=Bw0QxK/LhREP9yumUiSkB+NRFQKtXBMVjDZEcTEywdOBsJ0RFm3qNKaJTfTD728QuI
	sCaERXalZZ3jvz4PDtQLrVl+uZgFd8mAVDc7lR/so4LlCYOAmczz5eNLQHyZ13ZU+eMT
	jVnEGI3CRcrakK6Ele6ZxdbExl+NamsNxmuBcqTFpsIV1U0U1QqRcU4RFkmDS4EUTHtf
	hNQUWbfLZeByLg+bj+jx3xJRdn/e5DF+iIJAzDY0BFq80mQ12decRxsrnVfqGLAtFK0q
	KvbZdwfv2lqEHrrdlxM/AoSfL9NfZasHMNwDYXgYDY9ohpAY1SUuMLCkXAWgPaxRGk1E
	GJSQ==
Received: by 10.216.138.92 with SMTP id z70mr1630749wei.68.1346277338103;
	Wed, 29 Aug 2012 14:55:38 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.36
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:37 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 16/22] build: rework some recipes in main/Makefile.am,
	for future changes
Date: Wed, 29 Aug 2012 23:54:53 +0200
Message-Id: <671609845869d602a4b209921291a03b6a8ca847.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:41 -0000

This change is merely required to make future changes easier.

In particular, since we are going to merge the contents of
'man/Makefile.am' in the top-level Makefile, we need to avoid
conflicts with the rules and variables in 'dist-check.mk', and
to prepare for changes in the value of the '$*' variable in the
recipe of the '.x -> .1' suffix rule.

* man/Makefile.am (t, mapped_name): Delete, inlining their use ...
(.1.x): ... in the recipe of this suffix rule.  Other adjustments
to prepare to changes in the value of the '$*' automatic variable.
While at it, made more resilient about unlikely but possible failure.
Adjust and reorder few comments.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 54 +++++++++++++++++++++++++++---------------------------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index ff1c1ab..f7db996 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -148,38 +148,38 @@ yes.1:		$(mandep)	../src/yes.c
 # provoke regeneration of all $(MAN) files.
 $(MAN): $(top_srcdir)/src/system.h
 
-# Ensure that help2man runs the ../src/ginstall binary as
-# 'install' when creating install.1.
-# Similarly, ensure that it uses the ../src/[ binary to create test.1.
-t = $*.td
-mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
-
-# Note the use of $t/$*, rather than just '$*' as in other packages.
-# That is necessary to avoid failures for programs that are also shell built-in
-# functions like echo, false, printf, pwd.
 .x.1:
 	$(AM_V_GEN)case '$(PERL)' in				\
 	  *"/missing "*)					\
 	    echo 'WARNING: cannot update man page $@ since perl is missing' \
 	      'or inadequate' 1>&2				\
-	    ;;							\
-	  *)							\
-	    rm -f $@ $@-t					\
-	    && {						\
-		 rm -rf $t;					\
-		 mkdir $t;					\
-		 (cd $t && $(LN_S) $(abs_top_builddir)/src/$(mapped_name) $*); \
-		    $(PERL) -- $(srcdir)/help2man		\
-		     --source='$(PACKAGE_STRING)'		\
-		     --include=$(srcdir)/$*.x			\
-		     --output=$t/$@ $t/$*;			\
-	       }						\
-	    && sed 's|$*\.td/||g' $t/$@ > $@-t			\
-	    && rm -rf $t					\
-	    && chmod -w $@-t					\
-	    && mv $@-t $@					\
-	    ;;							\
-	esac
+	    exit 0;;						\
+	esac; \
+	name=`echo $@ | sed -e 's|.*/||' -e 's|\.1$$||'` || exit 1;	\
+## Ensure that help2man runs the 'src/ginstall' binary as 'install' when
+## creating 'install.1'.  Similarly, ensure that it uses the 'src/[' binary
+## to create 'test.1'.
+	case $$name in							\
+	  install) prog='ginstall';;					\
+	     test) prog='[';;						\
+	        *) prog=$$name;;					\
+	esac;								\
+## Note the use of $$t/$*, rather than just '$*' as in other packages.
+## That is necessary to avoid failures for programs that are also shell
+## built-in functions like echo, false, printf, pwd.
+	rm -f $@ $@-t							\
+	  && t=$*.td							\
+	  && rm -rf $$t							\
+	  && mkdir $$t							\
+	  && (cd $$t && $(LN_S) $(abs_top_builddir)/src/$$prog $$name)	\
+	  && $(PERL) -- $(srcdir)/help2man				\
+		     --source='$(PACKAGE_STRING)'			\
+		     --include=$(srcdir)/$$name.x			\
+		     --output=$$t/$$name.1 $$t/$$name			\
+	  && sed 's|$*\.td/||g' $$t/$$name.1 > $@-t			\
+	  && rm -rf $$t							\
+	  && chmod -w $@-t						\
+	  && mv $@-t $@
 
 # Option descriptions should not start with a capital letter
 .PHONY: sc_option_desc_uppercase
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEm-0004kZ-G5
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:48 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39846)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEj-0004k4-SH
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEg-0003dd-Kf
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:45 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:44102)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEf-0003Kk-Qu
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:42 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so647175wgb.30
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=PPGncZXfxgFRn1/lxRd0KDVk3dUwe3c1IxFB9PWZARo=;
	b=ECAzxJvy0Z54PJBznS0NjdGw+XLiljZFGFafSIL+g0fAxsSmObceeXlZKh7EnTGZSk
	aeHIjhsMoDHzEcrJhxkYFWHJlAZBr1eqsdC+Ik5pbZZWAeFs1cEpBjV+LWCyIQwfDr8y
	NOKjMCQNW2cqgMfjR3FFghHUSvQePjx6DoG9cR82bjrdQ+5r34cdmnVB3m1KuMYK79I2
	kOOsViSmNSY3Wyhpvxf6Dy9oWQpN1GmgNGLMXTQg+Q6bqvLOGykVrT/f6tJrnbSAe5KH
	jletN3aeJJVZsPGUyV5qsKmqMMqWUMpveDskcKzt78ZdaU1cQWJDtgD7PukwVmUFdm3O
	ydgw==
Received: by 10.180.8.41 with SMTP id o9mr6564812wia.3.1346277341401;
	Wed, 29 Aug 2012 14:55:41 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.39
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:40 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 18/22] maint: move man-related syntax checks in cfg.mk
Date: Wed, 29 Aug 2012 23:54:55 +0200
Message-Id: <33d6b0ae4dad7ebcb62df6cd5e998a97c2af505b.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:47 -0000

This is more natural, now that the top-level Makefile has access to
all the variables and rules once defined only in 'man/Makefile.am'
(that was before the previous commit).

* man/local.mk (all_programs, sc_option_desc_uppercase,
sc_man_file_correlation check-x-vs-1, check-programs-vs-x): Move
from here ...
* cfg.mk: ... to here.  Adjust some comments in the process.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 cfg.mk       | 50 +++++++++++++++++++++++++++++++++++++++++++++-----
 man/local.mk | 40 ----------------------------------------
 2 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 5f7193e..9da6afa 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -166,16 +166,56 @@ sc_long_lines:
 	  sed -e "s|^|$$file:|" -e '$(FILTER_LONG_LINES)';		\
 	done | grep . && { msg="$$halt" $(_sc_say_and_exit) } || :
 
-# Option descriptions should not start with a capital letter
+# Option descriptions should not start with a capital letter.
 # One could grep source directly as follows:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
 # but that would miss descriptions not on the same line as the -option.
 ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
-sc_option_desc_uppercase: all_programs
-
-# Ensure all man/*.[1x] files are present
+.PHONY: sc_option_desc_uppercase
+sc_option_desc_uppercase:
+	@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
+	    { echo 1>&2 '$@: found initial capitals in --help';   \
+	      exit 1; } || :;
+sc_option_desc_uppercase: $(dist_man1_MANS) \
+                          $(NO_INSTALL_PROGS_DEFAULT:%=%.1) \
+                          all_programs
+
+# Ensure all man/*.[1x] files are present.
 ALL_RECURSIVE_TARGETS += sc_man_file_correlation
-sc_man_file_correlation: all_programs
+.PHONY: sc_man_file_correlation
+sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
+
+# Ensure that for each .x file in the 'man/' subdirectory, there is a
+# corresponding .1 file in the definition of $(dist_man1_MANS).
+# But since that expansion usually lacks programs like arch and hostname,
+# add them here manually.
+.PHONY: check-x-vs-1
+check-x-vs-1:
+	@PATH=./src$(PATH_SEPARATOR)$$PATH; export PATH;		\
+	t=$@-t;								\
+	(cd $(srcdir)/man && ls -1 *.x)					\
+	  | sed 's/\.x$$//' | $(ASSORT) > $$t;				\
+	(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT)		\
+	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
+	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
+	rm $$t
+
+all_programs =								\
+      (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list)		\
+       | grep -v '\['
+
+# Ensure that for each .x file in the 'man/' subdirectory, there is a
+# corresponding coreutils program.
+.PHONY: check-programs-vs-x
+check-programs-vs-x: all_programs
+	@status=0;					\
+	for p in dummy `$(all_programs)`; do		\
+	  test $$p = dummy && continue;			\
+	  test $$p = ginstall && p=install || : ;	\
+	  test -f $(srcdir)/man/$$p.x			\
+	    || { echo missing $$p.x 1>&2; status=1; };	\
+	done;						\
+	exit $$status
 
 # Ensure that the end of each release's section is marked by two empty lines.
 sc_NEWS_two_empty_lines:
diff --git a/man/local.mk b/man/local.mk
index 7ce4bff..25385eb 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -181,43 +181,3 @@ $(MAN): $(top_srcdir)/src/system.h
 	  && rm -rf $$t							\
 	  && chmod -w $@-t						\
 	  && mv $@-t $@
-
-# Option descriptions should not start with a capital letter
-.PHONY: sc_option_desc_uppercase
-sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
-	@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
-	    { echo 1>&2 '$@: found initial capitals in --help';   \
-	      exit 1; } || :;
-
-.PHONY: sc_man_file_correlation
-sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
-
-# Ensure that for each .x file in this directory, there is a
-# corresponding .1 file in the definition of $(dist_man1_MANS) above.
-# But since that expansion usually lacks programs like arch and hostname,
-# add them here manually.
-.PHONY: check-x-vs-1
-check-x-vs-1:
-	@PATH=./src$(PATH_SEPARATOR)$$PATH; export PATH;		\
-	t=$@-t;								\
-	(cd $(srcdir)/man && ls -1 *.x)					\
-	  | sed 's/\.x$$//' | $(ASSORT) > $$t;				\
-	(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT)		\
-	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
-	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
-	rm $$t
-
-all_programs =								\
-      (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list)		\
-       | grep -v '\['
-
-.PHONY: check-programs-vs-x
-check-programs-vs-x:
-	@status=0;					\
-	for p in dummy `$(all_programs)`; do		\
-	  test $$p = dummy && continue;			\
-	  test $$p = ginstall && p=install || : ;	\
-	  test -f $(srcdir)/man/$$p.x			\
-	    || { echo missing $$p.x 1>&2; status=1; };	\
-	done;						\
-	exit $$status
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEm-0004kn-JE
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:48 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39863)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEk-0004k5-9t
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEj-0003fe-6J
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:46 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:41983)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEi-0003LP-Mu
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:45 -0400
Received: by mail-wi0-f177.google.com with SMTP id hn17so972505wib.12
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=mkx4atzPFyrEKiXs+UO6Nq20zxVvAM4EJrUF9Rwkvfk=;
	b=r7NvGhuDiBC37bWIxp4JT0nQg+O7D31Bc9M4zS15DhPuBDtfVgyb9B8oBgNA2yD81u
	TfyuYmcfJl+QWd3QbrzjFkAhgUVmOCI59OdxW7QoJoLb0umH8WfulNWzCUqcYuyiJ+2I
	yybjxQwZL/wQtHl5l1n/t0HWLT79N7xj54kbAK8ProJv8GJnX89eDKdtjTkOk1WVo2r5
	uN6qFMjtRoupVUpOzcKKlwDJxOjoiZgBJH7UuizAvORBIqv+C+8n5C2Q+JruvNdNzoqF
	0QyiN8XhMwO5WmunykRPYRQYtvd+L4bq5KgE81ZmCMwHqkbUZwHjbg4VeJwYFboVioRe
	S+JA==
Received: by 10.217.2.146 with SMTP id p18mr1678237wes.198.1346277344226;
	Wed, 29 Aug 2012 14:55:44 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.42
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:43 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 20/22] maint: adjust syntax check 'sc_option_desc_uppercase'
Date: Wed, 29 Aug 2012 23:54:57 +0200
Message-Id: <cffcf95516a5c5586369bff4824243ee1b6d333e.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:47 -0000

* cfg.mk (sc_option_desc_uppercase): Here, by grafting the 'man/'
prefix to the manpages obtained from the $(NO_INSTALL_PROGS_DEFAULT)
and listed as prerequisites for this rule.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 cfg.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cfg.mk b/cfg.mk
index 5b0f1fc..50fb13e 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -177,7 +177,7 @@ sc_option_desc_uppercase:
 	    { echo 1>&2 '$@: found initial capitals in --help';   \
 	      exit 1; } || :;
 sc_option_desc_uppercase: $(dist_man1_MANS) \
-                          $(NO_INSTALL_PROGS_DEFAULT:%=%.1) \
+                          $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT)) \
                           all_programs
 
 # Ensure all man/*.[1x] files are present.
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEX-0004BP-9J
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39451)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qER-0003xf-Tv
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEP-0003S3-Gf
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:27 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:44102)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEP-0003Kk-Bn
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:25 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so647175wgb.30
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=Pe7kBXBYgtmAPdfjx+2RXvmHYct5CRWLNBJE0Up7fik=;
	b=sfwB1MbE8PTievftzHbB2MJFVuYEOAhbg3YQ2tcIzGHVd5j6NX5qI24TUXOHgNDsuF
	tI3KD3I+ExITApFMovQMKqwtsaWW3e5/y0ez8pXHVITMxfHAx8saQ5lCFLgr36UiUdbZ
	2kCAcGvbdYheMMGkXnDXDw3i4VGsHBR/M19FV1xHkiKcE2amb7nz2AJa1dfClBuWAClG
	LWyhMp9s22OH/gStst69/RnakZF0d1bweT/RQldxi5y2oDqSHu5tgzb4JYYoNMv6Meg4
	BINlBla/QrtSK6EasgvqzHL2MW0RLLCRBwylM0te57S4HljVxqkeqNcw9T2Kje0ot/pj
	z4IA==
Received: by 10.180.82.39 with SMTP id f7mr6562817wiy.2.1346277324944;
	Wed, 29 Aug 2012 14:55:24 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.23
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:24 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 07/22] build: don't define $(SUFFIXES) explicitly
Date: Wed, 29 Aug 2012 23:54:44 +0200
Message-Id: <8f93a5748273eaf790845a33628278b0a57f973e.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:28 -0000

* man/Makefile.am (SUFFIXES): Remove definition: Automake is smart
enough to extract the list of suffixes from the '.x.1' suffix rule
automatically.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 2 --
 1 file changed, 2 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index cc93a42..8e9df08 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -139,8 +139,6 @@ yes.1:		$(common_dep)	$(srcdir)/yes.x		../src/yes.c
 # provoke regeneration of all $(MAN) files.
 $(MAN): $(top_srcdir)/src/system.h
 
-SUFFIXES = .x .1
-
 # Ensure that help2man runs the ../src/ginstall binary as
 # 'install' when creating install.1.
 # Similarly, ensure that it uses the ../src/[ binary to create test.1.
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:51 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEp-0004uf-Ny
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:51 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39805)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEi-0004g1-9F
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEe-0003cW-Cp
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:44 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:41983)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEe-0003LP-3v
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:40 -0400
Received: by mail-wi0-f177.google.com with SMTP id hn17so972505wib.12
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=lbZQxXOpUhNPCLI0esJ6UdnFYjEHBQZvujaupM35OYU=;
	b=Za9F3gTj4ank8RJDdbYFv1oG/ho40G2EwawOHhlxtmvXSvkziZl2VDrkIAqbpueRtW
	UQrcLnPGfFPlw1BLE/cKzOT6Q/UO0z2kEWqbCb+Xs020B9Oi7BT3WvwK8B7tJ1QAm/nC
	VStS+q2RLzHJF5vSoJ2d1vTuBDIo97Si+nOcOZIKkoHrmux3nWHyANvHsh2Z7cDmk0KO
	8zrjuSWdSQcEMGklSIidJVg+lvhsp0MdAh0M1sZ2g2byLaCEvQ74CjGyGWm+OP/Thily
	GeFNhOrFKGw68Br376WIcloX8sPajITI/LdOw6So2VO68Y1qp4teMHaRaa7t+30liefB
	k1Xg==
Received: by 10.180.20.204 with SMTP id p12mr6545278wie.7.1346277339659;
	Wed, 29 Aug 2012 14:55:39 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.38
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:39 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 17/22] build: don't use recursive make to build the 'man'
	subdirectory
Date: Wed, 29 Aug 2012 23:54:54 +0200
Message-Id: <ec274882846f00f6bab6a3f376ec5298bcfece3f.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:49 -0000

* Makefile.am: Include 'man/local.mk'.
(SUBDIRS): Remove 'man'.
* configure.ac ($MAN): Adjust to have a leading 'man/' component.
(AC_CONFIG_FILES): Remove 'man/Makefile'.
* man/Makefile.am: Rename ...
* man/local.mk: ... like this.  With further adjustments: each 'foo.1'
target renamed like 'man/foo.1', each '../src/foo.c' dependency as
'src/foo.c', and each '$(srcdir)' usage as '$(srcdir)/man'.  Also ...
(mandep): Adjust, removing the leading '../' component.
Several whitespace adjustments wile at it.
(ASSORT): Remove, it's already defined in the top-level Makefile.am.
* cfg.mk (sc_option_desc_uppercase, sc_man_file_correlation): Remove
the associated recipes, they are now directly available from the
included 'man/local.mk'.  Actually, the other changes in this commit
have made these recipes instable and not completely correct, bu that
will be fixed in later changes.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 Makefile.am                   |   3 +-
 cfg.mk                        |   2 -
 configure.ac                  |   3 +-
 man/{Makefile.am => local.mk} | 243 +++++++++++++++++++++---------------------
 4 files changed, 123 insertions(+), 128 deletions(-)
 rename man/{Makefile.am => local.mk} (43%)

diff --git a/Makefile.am b/Makefile.am
index f80c4a6..d14bf88 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@
 
 ALL_RECURSIVE_TARGETS =
 
-SUBDIRS = lib src man po tests gnulib-tests
+SUBDIRS = lib src po tests gnulib-tests
 
 changelog_etc =				\
   ChangeLog-2005			\
@@ -175,3 +175,4 @@ all_programs:
 	@cd ./src && $(MAKE) -s $@
 
 include $(top_srcdir)/doc/local.mk
+include $(top_srcdir)/man/local.mk
diff --git a/cfg.mk b/cfg.mk
index e6e0828..5f7193e 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -172,12 +172,10 @@ sc_long_lines:
 # but that would miss descriptions not on the same line as the -option.
 ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
 sc_option_desc_uppercase: all_programs
-	@$(MAKE) -s -C man $@
 
 # Ensure all man/*.[1x] files are present
 ALL_RECURSIVE_TARGETS += sc_man_file_correlation
 sc_man_file_correlation: all_programs
-	@$(MAKE) -s -C man $@
 
 # Ensure that the end of each release's section is marked by two empty lines.
 sc_NEWS_two_empty_lines:
diff --git a/configure.ac b/configure.ac
index bc7520d..ce8ebc9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -465,7 +465,7 @@ MAN=`
     dnl Use the autoconf-provided quadrigraph to represent "[",
     dnl otherwise we will incur in dreadful quoting issues.
     test x$p = x'@<:@' && continue
-    echo "$p.1"
+    echo "man/$p.1"
   done`
 # Normalize whitespace.
 MAN=`echo $MAN`
@@ -496,7 +496,6 @@ gt_LOCALE_FR
 AC_CONFIG_FILES(
   Makefile
   lib/Makefile
-  man/Makefile
   po/Makefile.in
   src/Makefile
   tests/Makefile
diff --git a/man/Makefile.am b/man/local.mk
similarity index 43%
rename from man/Makefile.am
rename to man/local.mk
index f7db996..7ce4bff 100644
--- a/man/Makefile.am
+++ b/man/local.mk
@@ -1,4 +1,5 @@
 # Make coreutils man pages.				-*-Makefile-*-
+# This is included by the top-level Makefile.am.
 
 # Copyright (C) 2002-2012 Free Software Foundation, Inc.
 
@@ -19,130 +20,130 @@ dist_man1_MANS = $(MAN)
 
 man_aux = $(dist_man1_MANS:.1=.x)
 
-EXTRA_DIST = $(man_aux) help2man
-MAINTAINERCLEANFILES = $(dist_man1_MANS)
+EXTRA_DIST += $(man_aux) man/help2man
+MAINTAINERCLEANFILES += $(dist_man1_MANS)
 
-# The "$(VAR:%=%.x)" idiom is not portable according to POSIX, but in
+# The "$(VAR:%=dir/%.x)" idiom is not portable according to POSIX, but in
 # practice it works with several make implementation (GNU, BSD, CCS make
 # from Solaris 10, Sun distributed make).  In addition, since only
 # maintainers are expected to build release tarballs (and they should
 # use GNU make when doing so), it's not big deal if this won't work with
 # some dumber make implementation.
 EXTRA_DIST += \
-  $(NO_INSTALL_PROGS_DEFAULT:%=%.x) \
-  $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
+  $(NO_INSTALL_PROGS_DEFAULT:%=dir/%.x) \
+  $(NO_INSTALL_PROGS_DEFAULT:%=dir/%.1)
 
-# Depend on ../.version to get version number changes.
-mandep = ../.version
+# Depend on this to get version number changes.
+mandep = .version
 
 # Note that arch depends on uname.c
-arch.1:		$(mandep)	../src/uname.c
-
-base64.1:	$(mandep)	../src/base64.c
-basename.1:	$(mandep)	../src/basename.c
-cat.1:		$(mandep)	../src/cat.c
-chcon.1:	$(mandep)	../src/chcon.c
-chgrp.1:	$(mandep)	../src/chgrp.c
-chmod.1:	$(mandep)	../src/chmod.c
-chown.1:	$(mandep)	../src/chown.c
-chroot.1:	$(mandep)	../src/chroot.c
-cksum.1:	$(mandep)	../src/cksum.c
-comm.1:		$(mandep)	../src/comm.c
-cp.1:		$(mandep)	../src/cp.c
-csplit.1:	$(mandep)	../src/csplit.c
-cut.1:		$(mandep)	../src/cut.c
-date.1:		$(mandep)	../src/date.c
-dd.1:		$(mandep)	../src/dd.c
-df.1:		$(mandep)	../src/df.c
+man/arch.1:      $(mandep)  src/uname.c
+
+man/base64.1:    $(mandep)  src/base64.c
+man/basename.1:  $(mandep)  src/basename.c
+man/cat.1:       $(mandep)  src/cat.c
+man/chcon.1:     $(mandep)  src/chcon.c
+man/chgrp.1:     $(mandep)  src/chgrp.c
+man/chmod.1:     $(mandep)  src/chmod.c
+man/chown.1:     $(mandep)  src/chown.c
+man/chroot.1:    $(mandep)  src/chroot.c
+man/cksum.1:     $(mandep)  src/cksum.c
+man/comm.1:      $(mandep)  src/comm.c
+man/cp.1:        $(mandep)  src/cp.c
+man/csplit.1:    $(mandep)  src/csplit.c
+man/cut.1:       $(mandep)  src/cut.c
+man/date.1:      $(mandep)  src/date.c
+man/dd.1:        $(mandep)  src/dd.c
+man/df.1:        $(mandep)  src/df.c
 
 # Note that dir depends on ls.c, since that's where its --help text is.
-dir.1:		$(mandep)	../src/ls.c
-
-dircolors.1:	$(mandep)	../src/dircolors.c
-dirname.1:	$(mandep)	../src/dirname.c
-du.1:		$(mandep)	../src/du.c
-echo.1:		$(mandep)	../src/echo.c
-env.1:		$(mandep)	../src/env.c
-expand.1:	$(mandep)	../src/expand.c
-expr.1:		$(mandep)	../src/expr.c
-factor.1:	$(mandep)	../src/factor.c
-false.1:	$(mandep)	../src/false.c
-fmt.1:		$(mandep)	../src/fmt.c
-fold.1:		$(mandep)	../src/fold.c
-groups.1:	$(mandep)	../src/groups.c
-head.1:		$(mandep)	../src/head.c
-hostid.1:	$(mandep)	../src/hostid.c
-hostname.1:	$(mandep)	../src/hostname.c
-id.1:		$(mandep)	../src/id.c
-install.1:	$(mandep)	../src/install.c
-join.1:		$(mandep)	../src/join.c
-kill.1:		$(mandep)	../src/kill.c
-link.1:		$(mandep)	../src/link.c
-ln.1:		$(mandep)	../src/ln.c
-logname.1:	$(mandep)	../src/logname.c
-ls.1:		$(mandep)	../src/ls.c
-md5sum.1:	$(mandep)	../src/md5sum.c
-mkdir.1:	$(mandep)	../src/mkdir.c
-mkfifo.1:	$(mandep)	../src/mkfifo.c
-mknod.1:	$(mandep)	../src/mknod.c
-mktemp.1:	$(mandep)	../src/mktemp.c
-mv.1:		$(mandep)	../src/mv.c
-nice.1:		$(mandep)	../src/nice.c
-nl.1:		$(mandep)	../src/nl.c
-nohup.1:	$(mandep)	../src/nohup.c
-nproc.1:	$(mandep)	../src/nproc.c
-od.1:		$(mandep)	../src/od.c
-paste.1:	$(mandep)	../src/paste.c
-pathchk.1:	$(mandep)	../src/pathchk.c
-pinky.1:	$(mandep)	../src/pinky.c
-pr.1:		$(mandep)	../src/pr.c
-printenv.1:	$(mandep)	../src/printenv.c
-printf.1:	$(mandep)	../src/printf.c
-ptx.1:		$(mandep)	../src/ptx.c
-pwd.1:		$(mandep)	../src/pwd.c
-readlink.1:	$(mandep)	../src/readlink.c
-realpath.1:	$(mandep)	../src/realpath.c
-rm.1:		$(mandep)	../src/rm.c
-rmdir.1:	$(mandep)	../src/rmdir.c
-runcon.1:	$(mandep)	../src/runcon.c
-seq.1:		$(mandep)	../src/seq.c
-sha1sum.1:	$(mandep)	../src/md5sum.c
-sha224sum.1:	$(mandep)	../src/md5sum.c
-sha256sum.1:	$(mandep)	../src/md5sum.c
-sha384sum.1:	$(mandep)	../src/md5sum.c
-sha512sum.1:	$(mandep)	../src/md5sum.c
-shred.1:	$(mandep)	../src/shred.c
-shuf.1:		$(mandep)	../src/shuf.c
-sleep.1:	$(mandep)	../src/sleep.c
-sort.1:		$(mandep)	../src/sort.c
-split.1:	$(mandep)	../src/split.c
-stat.1:		$(mandep)	../src/stat.c
-stdbuf.1:	$(mandep)	../src/stdbuf.c
-stty.1:		$(mandep)	../src/stty.c
-sum.1:		$(mandep)	../src/sum.c
-sync.1:		$(mandep)	../src/sync.c
-tac.1:		$(mandep)	../src/tac.c
-tail.1:		$(mandep)	../src/tail.c
-tee.1:		$(mandep)	../src/tee.c
-test.1:		$(mandep)	../src/test.c
-timeout.1:	$(mandep)	../src/timeout.c
-touch.1:	$(mandep)	../src/touch.c
-tr.1:		$(mandep)	../src/tr.c
-true.1:		$(mandep)	../src/true.c
-truncate.1:	$(mandep)	../src/truncate.c
-tsort.1:	$(mandep)	../src/tsort.c
-tty.1:		$(mandep)	../src/tty.c
-uname.1:	$(mandep)	../src/uname.c
-unexpand.1:	$(mandep)	../src/unexpand.c
-uniq.1:		$(mandep)	../src/uniq.c
-unlink.1:	$(mandep)	../src/unlink.c
-uptime.1:	$(mandep)	../src/uptime.c
-users.1:	$(mandep)	../src/users.c
-vdir.1:		$(mandep)	../src/ls.c
-wc.1:		$(mandep)	../src/wc.c
-who.1:		$(mandep)	../src/who.c
-whoami.1:	$(mandep)	../src/whoami.c
-yes.1:		$(mandep)	../src/yes.c
+man/dir.1:       $(mandep)  src/ls.c
+
+man/dircolors.1: $(mandep)  src/dircolors.c
+man/dirname.1:   $(mandep)  src/dirname.c
+man/du.1:        $(mandep)  src/du.c
+man/echo.1:      $(mandep)  src/echo.c
+man/env.1:       $(mandep)  src/env.c
+man/expand.1:    $(mandep)  src/expand.c
+man/expr.1:      $(mandep)  src/expr.c
+man/factor.1:    $(mandep)  src/factor.c
+man/false.1:     $(mandep)  src/false.c
+man/fmt.1:       $(mandep)  src/fmt.c
+man/fold.1:      $(mandep)  src/fold.c
+man/groups.1:    $(mandep)  src/groups.c
+man/head.1:      $(mandep)  src/head.c
+man/hostid.1:    $(mandep)  src/hostid.c
+man/hostname.1:  $(mandep)  src/hostname.c
+man/id.1:        $(mandep)  src/id.c
+man/install.1:   $(mandep)  src/install.c
+man/join.1:      $(mandep)  src/join.c
+man/kill.1:      $(mandep)  src/kill.c
+man/link.1:      $(mandep)  src/link.c
+man/ln.1:        $(mandep)  src/ln.c
+man/logname.1:   $(mandep)  src/logname.c
+man/ls.1:        $(mandep)  src/ls.c
+man/md5sum.1:    $(mandep)  src/md5sum.c
+man/mkdir.1:     $(mandep)  src/mkdir.c
+man/mkfifo.1:    $(mandep)  src/mkfifo.c
+man/mknod.1:     $(mandep)  src/mknod.c
+man/mktemp.1:    $(mandep)  src/mktemp.c
+man/mv.1:        $(mandep)  src/mv.c
+man/nice.1:      $(mandep)  src/nice.c
+man/nl.1:        $(mandep)  src/nl.c
+man/nohup.1:     $(mandep)  src/nohup.c
+man/nproc.1:     $(mandep)  src/nproc.c
+man/od.1:        $(mandep)  src/od.c
+man/paste.1:     $(mandep)  src/paste.c
+man/pathchk.1:   $(mandep)  src/pathchk.c
+man/pinky.1:     $(mandep)  src/pinky.c
+man/pr.1:        $(mandep)  src/pr.c
+man/printenv.1:  $(mandep)  src/printenv.c
+man/printf.1:    $(mandep)  src/printf.c
+man/ptx.1:       $(mandep)  src/ptx.c
+man/pwd.1:       $(mandep)  src/pwd.c
+man/readlink.1:  $(mandep)  src/readlink.c
+man/realpath.1:  $(mandep)  src/realpath.c
+man/rm.1:        $(mandep)  src/rm.c
+man/rmdir.1:     $(mandep)  src/rmdir.c
+man/runcon.1:    $(mandep)  src/runcon.c
+man/seq.1:       $(mandep)  src/seq.c
+man/sha1sum.1:   $(mandep)  src/md5sum.c
+man/sha224sum.1: $(mandep)  src/md5sum.c
+man/sha256sum.1: $(mandep)  src/md5sum.c
+man/sha384sum.1: $(mandep)  src/md5sum.c
+man/sha512sum.1: $(mandep)  src/md5sum.c
+man/shred.1:     $(mandep)  src/shred.c
+man/shuf.1:      $(mandep)  src/shuf.c
+man/sleep.1:     $(mandep)  src/sleep.c
+man/sort.1:      $(mandep)  src/sort.c
+man/split.1:     $(mandep)  src/split.c
+man/stat.1:      $(mandep)  src/stat.c
+man/stdbuf.1:    $(mandep)  src/stdbuf.c
+man/stty.1:      $(mandep)  src/stty.c
+man/sum.1:       $(mandep)  src/sum.c
+man/sync.1:      $(mandep)  src/sync.c
+man/tac.1:       $(mandep)  src/tac.c
+man/tail.1:      $(mandep)  src/tail.c
+man/tee.1:       $(mandep)  src/tee.c
+man/test.1:      $(mandep)  src/test.c
+man/timeout.1:   $(mandep)  src/timeout.c
+man/touch.1:     $(mandep)  src/touch.c
+man/tr.1:        $(mandep)  src/tr.c
+man/true.1:      $(mandep)  src/true.c
+man/truncate.1:  $(mandep)  src/truncate.c
+man/tsort.1:     $(mandep)  src/tsort.c
+man/tty.1:       $(mandep)  src/tty.c
+man/uname.1:     $(mandep)  src/uname.c
+man/unexpand.1:  $(mandep)  src/unexpand.c
+man/uniq.1:      $(mandep)  src/uniq.c
+man/unlink.1:    $(mandep)  src/unlink.c
+man/uptime.1:    $(mandep)  src/uptime.c
+man/users.1:     $(mandep)  src/users.c
+man/vdir.1:      $(mandep)  src/ls.c
+man/wc.1:        $(mandep)  src/wc.c
+man/who.1:       $(mandep)  src/who.c
+man/whoami.1:    $(mandep)  src/whoami.c
+man/yes.1:       $(mandep)  src/yes.c
 
 # This is required so that changes to e.g., emit_bug_reporting_address
 # provoke regeneration of all $(MAN) files.
@@ -172,9 +173,9 @@ $(MAN): $(top_srcdir)/src/system.h
 	  && rm -rf $$t							\
 	  && mkdir $$t							\
 	  && (cd $$t && $(LN_S) $(abs_top_builddir)/src/$$prog $$name)	\
-	  && $(PERL) -- $(srcdir)/help2man				\
+	  && $(PERL) -- $(srcdir)/man/help2man				\
 		     --source='$(PACKAGE_STRING)'			\
-		     --include=$(srcdir)/$$name.x			\
+		     --include=$(srcdir)/man/$$name.x			\
 		     --output=$$t/$$name.1 $$t/$$name			\
 	  && sed 's|$*\.td/||g' $$t/$$name.1 > $@-t			\
 	  && rm -rf $$t							\
@@ -191,27 +192,23 @@ sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
 .PHONY: sc_man_file_correlation
 sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
 
-# Sort in traditional ASCII order, regardless of the current locale;
-# otherwise we may get into trouble with distinct strings that the
-# current locale considers to be equal.
-ASSORT = LC_ALL=C sort
-
 # Ensure that for each .x file in this directory, there is a
 # corresponding .1 file in the definition of $(dist_man1_MANS) above.
 # But since that expansion usually lacks programs like arch and hostname,
 # add them here manually.
 .PHONY: check-x-vs-1
 check-x-vs-1:
-	@PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH;		\
+	@PATH=./src$(PATH_SEPARATOR)$$PATH; export PATH;		\
 	t=$@-t;								\
-	(cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
+	(cd $(srcdir)/man && ls -1 *.x)					\
+	  | sed 's/\.x$$//' | $(ASSORT) > $$t;				\
 	(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT)		\
 	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
 	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
 	rm $$t
 
 all_programs =								\
-      (cd ../src && MAKEFLAGS= $(MAKE) -s all_programs.list)		\
+      (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list)		\
        | grep -v '\['
 
 .PHONY: check-programs-vs-x
@@ -220,7 +217,7 @@ check-programs-vs-x:
 	for p in dummy `$(all_programs)`; do		\
 	  test $$p = dummy && continue;			\
 	  test $$p = ginstall && p=install || : ;	\
-	  test -f $(srcdir)/$$p.x			\
+	  test -f $(srcdir)/man/$$p.x			\
 	    || { echo missing $$p.x 1>&2; status=1; };	\
 	done;						\
 	exit $$status
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEq-0004vX-64
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39908)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEn-0004mH-3O
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEl-0003h9-Vs
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:48 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:38623)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEl-0003Vk-As
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:47 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so676800wey.0
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=W94lWStEqrZWHBF6J7TjYidYvdaD83psj1hfaeZtISg=;
	b=Xo2rPL2me8MfFQaRPfG8xZsDUWszz/e7ReOqDpuUSA5yCkZQ2Lld5KrpW5Zms0DLz+
	JTymvxteRJ4PgqU4z+ZzV5+FZn4sRXkucue1tFFLDT/gHK0XH1wswXBLt8/xErbXm4jB
	/QEaPt3H2maovbROdWrLqGNzYfEUSRMzOYeu/w52CUnh1s4evtGYEgT52wUQEZQFMcMP
	IRoy1FyB/jZNKSaHbjnL3imkWVHz+5f+5KcqCaaCBvTtnLUEreeVceuNrUgWmfNp8VmC
	XWkfpgjtoAG+9oeLrpqJjsCYMn6cPiEcybL7yEAI6AS7Hrdx6YeAgW56WYI59WQw2Stp
	uibw==
Received: by 10.216.132.76 with SMTP id n54mr1632654wei.135.1346277346906;
	Wed, 29 Aug 2012 14:55:46 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.45
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:46 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 22/22] maint: update gitignore entries
Date: Wed, 29 Aug 2012 23:54:59 +0200
Message-Id: <628bcf429121168f502237b56dd3fce4a5e09bcc.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:50 -0000

* doc/.gitinore: Here, adding the '.dirstamp' file generated by
the Texinfo rules.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 doc/.gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/.gitignore b/doc/.gitignore
index ef55efd..e63c202 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -20,3 +20,4 @@
 /parse-datetime.texi
 /stamp-vti
 /version.texi
+/.dirstamp
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEt-00055H-4x
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39930)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEo-0004qs-Ij
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEk-0003gl-MC
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:50 -0400
Received: from mail-wg0-f41.google.com ([74.125.82.41]:64737)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEk-0003gP-Fi
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:46 -0400
Received: by wgbds1 with SMTP id ds1so3890651wgb.0
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=orGCzKFF/JqJSotKAYv9qjKo9hVFAPvmfCj8zRPeQEU=;
	b=ty36Ox9jLSUePgpifI8nlgm6GfX/LD7oBEQNqqlGrq3U553U03QYOYJyV8cI7BoaRc
	jna8dBo5Q8ag19Bh52SYhoB47csZQNw+irRHK05ibAgpr2cQpV6iX+0Bo3CxWnDIKeWz
	Bus9DPYsc3MWyB7gI4lQCAoIZ8rqdnU76L35Pu4pHfMUzYiv1m85kIsRybBbwCf++5if
	V38ecMvdiS2LYBHzYBn9Tf3K3RLbzFgBPjnE/pdw8nDpg+CQEXIC9lCW4pdgQeHkLfSb
	nsdgcGXsg2kManHT9F31cY9JsO3xLTMcDnJ2tM3tdI11Hlv6uPl8075k4WhCtSsDalPu
	cw5A==
Received: by 10.180.82.230 with SMTP id l6mr43087644wiy.21.1346277345645;
	Wed, 29 Aug 2012 14:55:45 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.44
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:45 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 21/22] build: remove redundant indirection with variable
	'$(doc_srcdir)'
Date: Wed, 29 Aug 2012 23:54:58 +0200
Message-Id: <dcbe7c177d129f362485c3fea4d7e4b5ef92950f.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.41
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:53 -0000

It's clearer and better to just inline the '$(srcdir)/doc' expansion.

* doc/local.mk (doc_srcdir): Delete.
All usages adjusted.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 doc/local.mk | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/doc/local.mk b/doc/local.mk
index 665dd21..190db85 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -24,8 +24,6 @@ doc_coreutils_TEXINFOS = \
   doc/constants.texi \
   doc/fdl.texi
 
-doc_srcdir = $(top_srcdir)/doc
-
 # The following is necessary if the package name is 8 characters or longer.
 # If the info documentation would be split into 10 or more separate files,
 # then this is necessary even if the package name is 7 characters long.
@@ -67,21 +65,21 @@ syntax_checks =		\
 # List words/regexps here that should not appear in the texinfo documentation.
 check-texinfo: $(syntax_checks)
 	$(AM_V_GEN)fail=0;						\
-	grep '@url{' $(doc_srcdir)/*.texi && fail=1;			\
-	grep '\$$@"' $(doc_srcdir)/*.texi && fail=1;			\
-	grep -n '[^[:punct:]]@footnote' $(doc_srcdir)/*.texi && fail=1;	\
-	grep -n filename $(doc_srcdir)/*.texi				\
+	grep '@url{' $(srcdir)/doc/*.texi && fail=1;			\
+	grep '\$$@"' $(srcdir)/doc/*.texi && fail=1;			\
+	grep -n '[^[:punct:]]@footnote' $(srcdir)/doc/*.texi && fail=1;	\
+	grep -n filename $(srcdir)/doc/*.texi				\
 	    | $(EGREP) -v 'setfilename|[{]filename[}]'			\
 	  && fail=1;							\
 	exit $$fail
 
 sc-avoid-builtin:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(doc_srcdir)/*.texi \
+	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/doc/*.texi \
 	  && exit 1 || :
 
 sc-avoid-path:
 	$(AM_V_GEN)fail=0;						\
-	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(doc_srcdir)/*.texi	\
+	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/doc/*.texi	\
 	  | $(EGREP) -v							\
 	  'PATH=|path search|search path|@vindex PATH$$|@env[{]PATH[}]'	\
 	  && fail=1;							\
@@ -89,28 +87,28 @@ sc-avoid-path:
 
 # Use "time zone", not "timezone".
 sc-avoid-timezone:
-	$(AM_V_GEN)$(EGREP) timezone $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) timezone $(srcdir)/doc/*.texi && exit 1 || :
 
 # Check for insufficient exponent grouping, e.g.,
 # @math{2^64} should be @math{2^{64}}.
 sc-exponent-grouping:
-	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(srcdir)/doc/*.texi && exit 1 || :
 
 # E.g., use @sc{nul}, not NUL.
 sc-use-small-caps-NUL:
-	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/doc/*.texi && exit 1 || :
 
 # Say I/O, not IO.
 sc-avoid-io:
-	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(srcdir)/doc/*.texi && exit 1 || :
 
 # I prefer nonzero over non-zero.
 sc-avoid-non-zero:
-	$(AM_V_GEN)$(EGREP) non-zero $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) non-zero $(srcdir)/doc/*.texi && exit 1 || :
 
 # Use "zeros", not "zeroes" (nothing wrong with "zeroes"; just be consistent).
 sc-avoid-zeroes:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(doc_srcdir)/*.texi \
+	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/doc/*.texi \
 	  && exit 1 || :
 
 # The quantity inside @var{...} should not contain upper case letters.
@@ -126,6 +124,6 @@ find_upper_case_var =		\
    END {$$m and (warn "$@: do not use upper case in \@var{...}\n"), exit 1}'
 sc-lower-case-var:
 	$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
-	  $(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi
+	  $(PERL) -lne $(find_upper_case_var) $(srcdir)/doc/*.texi
 
 check-local: check-texinfo
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEm-0004kO-C5
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:48 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39829)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEj-0004j4-8N
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEh-0003eW-Gq
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:44 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:38623)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEh-0003Vk-7C
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:43 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so676800wey.0
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=ANAG37I3q+9iykgLfGR+IsNd2RCH5rH7t0QsgtP4YSQ=;
	b=RA8m7/olk5hn5DjuEDo5PbftVys2dXu+a8Mezq1PPz+0TEkw20sp58ITrSOMHdIcYX
	uKgXh6AsT5By5s+h8QUYGpaJFbyoPY0rdwta+I/IcTJMADMY860cQ6px3ITcaMZOPwRo
	k7QCwJiY7wUI17icag8QVPLQgtfYATUuYqFBW7dtIpisythEQzHK/8+wV1d49PtOAPDd
	yD5qjS0bsx3Vc7j2HQl7TUwwR7HYqFwUYT7g8lvBqYPy1RXOY6IS0ZDXPPcy9Jf0CVvw
	WSXTi+kN8LkGsmoqDK/GReWvfrBeGv3PcNVrMJ1aIrNpy0G5QVX3shD91pca5Mc9Yl+x
	wGNg==
Received: by 10.216.136.230 with SMTP id w80mr1738637wei.199.1346277342796;
	Wed, 29 Aug 2012 14:55:42 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.41
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:42 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 19/22] maint: adjust syntax check 'check-x-vs-1'
Date: Wed, 29 Aug 2012 23:54:56 +0200
Message-Id: <623bcd0611c04f0362470ce7eb7fdcd2e60c5b2c.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:46 -0000

* cfg.mk (check-x-vs-1): Here, by stripping 'man/' prefix from
$(dist_man1_MANS) entries before comparing them with the list of
expected programs.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 cfg.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cfg.mk b/cfg.mk
index 9da6afa..5b0f1fc 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -195,7 +195,8 @@ check-x-vs-1:
 	t=$@-t;								\
 	(cd $(srcdir)/man && ls -1 *.x)					\
 	  | sed 's/\.x$$//' | $(ASSORT) > $$t;				\
-	(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT)		\
+	(echo $(patsubst man/%,%,$(dist_man1_MANS))			\
+	      $(NO_INSTALL_PROGS_DEFAULT)				\
 	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
 	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
 	rm $$t
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 17:55:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qEX-0004CD-Hg
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 17:55:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39466)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qES-0003xk-F8
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEQ-0003T2-Sl
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:28 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:41983)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qEQ-0003LP-MZ
	for coreutils@gnu.org; Wed, 29 Aug 2012 17:55:26 -0400
Received: by mail-wi0-f177.google.com with SMTP id hn17so972505wib.12
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 14:55:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=ZnxBixPiHjLBHT/bDVYFD9grcMDGdMXj2TFDCcM1ojc=;
	b=tvd891JG2WygALl9vLKAypTKIGsnSPpCicTi1ZAdpGAisLDX2VNO2duAccaYsu3lL8
	GRlMIe1njGH+y4b7CYATxss/ca6xFCqGEFXAE7CaZ5SUPk91XUvhWlP2QeMpEoS23YAn
	Ltj8Dq7Mp3NSIU4hn2403MSbeItKiJn44z3KE78ZtbX5dTcLmkigWoItGJloxtjmsWS7
	SGriinP7F+FUJ3mxduAGv84CekkKeWpd7i/Zi4/Rjl/0rMYgFxfYaLVDJjRIKsLStngx
	KjjynYxS4Amv2CfAkmsA5E88w0IHE2gqMM0QUwLc8jwcVE7yGcfmkuZ7ZQWnP/EH2xRh
	GDpA==
Received: by 10.180.82.164 with SMTP id j4mr6483675wiy.18.1346277326233;
	Wed, 29 Aug 2012 14:55:26 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fr4sm18616664wib.8.2012.08.29.14.55.24
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 14:55:25 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 08/22] maint: simplify definition of $MAN in configure.ac
Date: Wed, 29 Aug 2012 23:54:45 +0200
Message-Id: <8bb13fd183b0b99f63eb2d6e5bc6bd9db22f0a37.1346276889.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com>
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 21:55:30 -0000

* configure.ac: Here, by making less use of 'sed' and 'tr' munging,
and relying on a smarter and simpler shell loop instead.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 configure.ac | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 52918ca..bc7520d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -456,16 +456,19 @@ case " $optional_bin_progs " in
   *' stdbuf '*) gl_ADD_PROG([optional_pkglib_progs], [libstdbuf.so]) ;;
 esac
 
-MAN=`echo "$optional_bin_progs "|sed 's/ /.1 /g;s/ $//'|tr -d '\\015\\012'`
-
-# Change "ginstall.1" to "install.1" in $MAN.
-MAN=`for m in $MAN; do test $m = ginstall.1 && m=install.1; echo $m; done \
-  | tr '\015\012' '  '; echo`
-
-# Remove [.1, since writing a portable rule for it in man/Makefile.am
-# is not practical.  The sed LHS below uses the autoconf quadrigraph
-# representing '['.
-MAN=`echo "$MAN"|sed 's/\@<:@\.1//'`
+MAN=`
+  for p in $optional_bin_progs; do
+    # Change "ginstall.1" to "install.1" in $MAN.
+    test $p = ginstall && p=install
+    # Ignore the "[" program, since writing a portable make rule to
+    # generate its manpage is not practical.
+    dnl Use the autoconf-provided quadrigraph to represent "[",
+    dnl otherwise we will incur in dreadful quoting issues.
+    test x$p = x'@<:@' && continue
+    echo "$p.1"
+  done`
+# Normalize whitespace.
+MAN=`echo $MAN`
 
 OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
 AC_SUBST([OPTIONAL_BIN_PROGS])
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 18:27:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qjq-0005PP-KC
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 18:27:54 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37961)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nick.alcock@oracle.com>) id 1T6qLe-0006te-TT
	for coreutils@gnu.org; Wed, 29 Aug 2012 18:02:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <nick.alcock@oracle.com>) id 1T6qLd-0006Kk-MD
	for coreutils@gnu.org; Wed, 29 Aug 2012 18:02:54 -0400
Received: from acsinet15.oracle.com ([141.146.126.227]:50607)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nick.alcock@oracle.com>) id 1T6qLd-0006KZ-Fr
	for coreutils@gnu.org; Wed, 29 Aug 2012 18:02:53 -0400
Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93])
	by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with
	ESMTP id q7TM2nCa026000
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 22:02:50 GMT
Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158])
	by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id
	q7TM2mEw024125
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 22:02:49 GMT
Received: from abhmt105.oracle.com (abhmt105.oracle.com [141.146.116.57])
	by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id
	q7TM2mqn005154
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 17:02:48 -0500
Received: from spindle.srvr.nix (/81.187.191.129)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Wed, 29 Aug 2012 15:02:48 -0700
From: Nick Alcock <nick.alcock@oracle.com>
To: coreutils@gnu.org
Subject: [PATCH] tests: misc/sort-exit-early: do not run as root.
Emacs: a compelling argument for pencil and paper.
Date: Wed, 29 Aug 2012 23:02:46 +0100
Message-ID: <874nnluzjt.fsf@spindle.srvr.nix>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Source-IP: ucsinet21.oracle.com [156.151.31.93]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1)
X-Received-From: 141.146.126.227
X-Mailman-Approved-At: Wed, 29 Aug 2012 18:27:52 -0400
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, 29 Aug 2012 22:02:55 -0000

This test requires an unwritable input and an unreadable output,
so will fail if the testsuite is being run as root, and should
not be run in this case.
---
 tests/misc/sort-exit-early | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/misc/sort-exit-early b/tests/misc/sort-exit-early
index 7470aad..b83a489 100755
--- a/tests/misc/sort-exit-early
+++ b/tests/misc/sort-exit-early
@@ -19,6 +19,8 @@
 . "${srcdir=.}/init.sh"; path_prepend_ ../src
 print_ver_ sort
 
+skip_if_root_
+
 # Check output is writable before starting to sort
 touch input
 chmod a-w input
-- 
1.7.11.2.155.g5ceeb62


From MAILER-DAEMON Wed Aug 29 18:35:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qrJ-0006lX-Pn
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 18:35:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58926)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qrH-0006ir-IV
	for coreutils@gnu.org; Wed, 29 Aug 2012 18:35:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qrG-00023K-HM
	for coreutils@gnu.org; Wed, 29 Aug 2012 18:35:35 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:39064)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6qrG-00022Y-Bg
	for coreutils@gnu.org; Wed, 29 Aug 2012 18:35:34 -0400
Received: by wgbdt14 with SMTP id dt14so665773wgb.30
	for <coreutils@gnu.org>; Wed, 29 Aug 2012 15:35:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer;
	bh=QnP6cS5lzZwO11/RQ6JS/yEmQlsHKO5GfiuGc5RmPvk=;
	b=ncjySWM/LwcNlUHFn80Hj6q5Y/du7b7RgJF/25U9KvZqwxFMKQy/koi9xphAjlcadw
	4/7B2CunI2cf5qvE4GuRW5zQ1+ymuWim0uHdfhlJ6FW/Z81e95DfoU5JfumF1dpT3UAh
	StuA64IFvURIsgCvBr1QOBhbZOexQM7yH8QPbs27f8cUu3r9v+aC6xRN85r2bz090YkO
	VvrMfYGUnFBwx61BJO+6vDru0D91dyN5owluZPANAPlWqwqOKUu4F1ZJbXMF/7hXMdm1
	0z23OYyRAZvLXGZLxZ0wyI2QNewQkwEnmX5Eyx287Sa5vxu/Q7aMzaoz5TWBm9R7SJLQ
	7J1A==
Received: by 10.180.105.130 with SMTP id gm2mr43407329wib.6.1346279733403;
	Wed, 29 Aug 2012 15:35:33 -0700 (PDT)
Received: from localhost.localdomain
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id fb20sm18898970wid.1.2012.08.29.15.35.32
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Aug 2012 15:35:32 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH] tests: remove useless defn of REPLACE_GETCWD from
	TESTS_ENVIRONMENT
Date: Thu, 30 Aug 2012 00:35:20 +0200
Message-Id: <38d0861307cf1a137dfda655ffc21fd57c78b360.1346279688.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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, 29 Aug 2012 22:35:36 -0000

It's last use had been removed in commit v8.12-3-g3ed91fc of 2011-04-28,
"tests: remove useless test: misc/pwd-unreadable-parent".

* tests/check.mk (TESTS_ENVIRONMENT): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 tests/check.mk | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/check.mk b/tests/check.mk
index cb67b9d..be3641f 100644
--- a/tests/check.mk
+++ b/tests/check.mk
@@ -87,7 +87,6 @@ TESTS_ENVIRONMENT =				\
   PACKAGE_VERSION=$(PACKAGE_VERSION)		\
   PERL='$(PERL)'				\
   PREFERABLY_POSIX_SHELL='$(PREFERABLY_POSIX_SHELL)' \
-  REPLACE_GETCWD=$(REPLACE_GETCWD)		\
   ; test -d /usr/xpg4/bin && PATH='/usr/xpg4/bin$(PATH_SEPARATOR)'"$$PATH"; \
   PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
   ; 9>&2
-- 
1.7.12



From MAILER-DAEMON Wed Aug 29 19:14:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6rSz-00023K-M1
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 19:14:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46273)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T6rSx-00022s-97
	for coreutils@gnu.org; Wed, 29 Aug 2012 19:14:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T6rSv-0005SQ-4g
	for coreutils@gnu.org; Wed, 29 Aug 2012 19:14:31 -0400
Received: from mx.meyering.net ([88.168.87.75]:60004)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T6rSu-0005Rs-Tl
	for coreutils@gnu.org; Wed, 29 Aug 2012 19:14:29 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id A473260237;
	Thu, 30 Aug 2012 01:14:26 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
In-Reply-To: <cover.1346276889.git.stefano.lattarini@gmail.com> (Stefano
	Lattarini's message of "Wed, 29 Aug 2012 23:54:37 +0200")
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
Date: Thu, 30 Aug 2012 01:14:26 +0200
Message-ID: <87ehmp47fx.fsf@rho.meyering.net>
Lines: 52
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Wed, 29 Aug 2012 23:14:32 -0000

Stefano Lattarini wrote:
> [NOTE: I'm sending this to the main coreutils for lack of a dedicated
>        "coreutils-patch" list; I hope it's OK!]
>
> OK, these are the easy pieces actually, but we have to start somewhere.
> This series consists of:
>
>   - some preparatory refactorings;
>   - the merging of the "sub build systems" for 'doc/' and 'man/' in
>     the top-level one;
>   - some follow-up cleanings and fixlets;
>   - few independent, "while-we-are-at-it" fixlets and improvements.
>
> It's worth noting that the above steps are mostly intermixed, i.e.,
> the preparatory refactoring for the 'man/' merge comes after the
> actual 'doc/' merge.
>
> While this series is not perfect, it seems clear and clean enough,
> and I think it's ready for inclusion (but any further testing would
> be appreciated).
>
> Thoughts, opinions, ACK, NAK?
>
> -*-*-*-
>
> Stefano Lattarini (22):
>   build: don't abuse Automake internals (with its 'check-am' rule)
>   maint: slightly improve .gitignore
>   build: add extra *.texi files to coreutils_TEXINFOS, not EXTRA_DIST
>   build: prefer '$(top_srcdir)/doc' over '$(srcdir)' in doc Makefile
>   build: use 'check-local' to extend the 'check' target
>   build: don't use recursive make to build the 'doc' subdirectory
>   build: don't define $(SUFFIXES) explicitly
>   maint: simplify definition of $MAN in configure.ac
>   build: add an explicative comment
>   build: fix a stray usage of uninitialized $(ME)
>   build: rename common_dep -> mandep in man/Makefile
>   maint: typofix: s/it's/its/
>   build: rely on VPATH capabilities in man/Makefile
>   build: make some rule less dependent of exact source tree layout
>   build: convenience target 'all_programs' at top-level
>   build: rework some recipes in main/Makefile.am, for future changes
>   build: don't use recursive make to build the 'man' subdirectory
>   maint: move man-related syntax checks in cfg.mk
>   maint: adjust syntax check 'check-x-vs-1'
>   maint: adjust syntax check 'sc_option_desc_uppercase'
>   build: remove redundant indirection with variable '$(doc_srcdir)'
>   maint: update gitignore entries

Thanks for all the work.
Would you please mail to me (or to the list) the concatenation of those
patches or point me to a repository from which I can pull them?


From MAILER-DAEMON Wed Aug 29 21:44:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6tnt-0007Uw-2N
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 21:44:17 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33190)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T6tnq-0007Un-Nv
	for coreutils@gnu.org; Wed, 29 Aug 2012 21:44:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T6tnp-00019x-J0
	for coreutils@gnu.org; Wed, 29 Aug 2012 21:44:14 -0400
Received: from mx1.redhat.com ([209.132.183.28]:31557)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T6tnp-00019l-B2
	for coreutils@gnu.org; Wed, 29 Aug 2012 21:44:13 -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 q7U1i86D013849
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 29 Aug 2012 21:44:08 -0400
Received: from [10.36.116.17] (ovpn-116-17.ams2.redhat.com [10.36.116.17])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7U1i52s025731
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Wed, 29 Aug 2012 21:44:07 -0400
Message-ID: <503EC565.1090900@draigBrady.com>
Date: Thu, 30 Aug 2012 02:44:05 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Assaf Gordon <assafgordon@gmail.com>
Subject: Re: sort: new feature: use environment variable to set buffer size
References: <503E8078.9090009@gmail.com>
In-Reply-To: <503E8078.9090009@gmail.com>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
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
	q7U1i86D013849
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 30 Aug 2012 01:44:16 -0000

On 08/29/2012 09:50 PM, Assaf Gordon wrote:
> Hello,
>=20
> I'd like to suggest a new feature to sort: the ability to set the buffe=
r size (-S/--buffer-size X) using an environment variable.
>=20
> In summary:
>  $ export SORT_BUFFER_SIZE=3D20G=20
>  $ someprogram | sort -k1,1 > output.txt
>  # sort will use 20G of RAM, as if "--buffer-size 20G" was specified.
>=20
>=20
> The rational:
> recent commits improved the guessed buffer size when sort is given an i=
nput file,
> but these don't apply if sort is used as part of a pipe line, with a pi=
pe as input, e.g.
>   some | program | sort | other | programs > file=20
>=20
> (Tested with v8.19 on linux 2.6.32, sort consumes few MBs of RAM, even =
though many GBs are available).
> This results in many small temporary files being created.
>=20
> The script (which uses sort) is not under my direct control, but even i=
f it was,
> I don't want to hard-code the amount of memory used, to keep it portabl=
e to different servers.
>=20
> AFAIK, there are four aspects of sort the affect performance:
> 1. number of threads:
> changeable with "--parallel=3DX" and with environment variable OMP_NUM_=
THREADS.
>=20
> 2. temporary files location:
> changeable with "--temporary-directory=3DDIR" and with environment vari=
able TMPDIR.
>=20
> 3. memory usage:
> changeable with "--buffer-size=3DSIZE" but not with environment variabl=
e.
>=20
> 4. compression program:
> changeable with "--compression-program=3DPROG" but not with environment=
 variable.
> (but at the moment, I do not address this aspect).
>=20
>=20
> With the attached patch, sort will read an environment variable named "=
SORT_BUFFER_SIZE", and will treat it as if "--buffer-size" was specified =
(but only if "--buffer-size" wasn't used on the command line).
>=20
> If this is conceptually acceptable, I'll prepare a proper patch (with N=
EWS, help, docs, etc.).
>=20
> Regards,
>  -gordon

Thanks for the detailed rationale, however
the existing env variables are significant to more utils than sort(1).
I.E. they're generally system level settings, rather than command level.
Also sort -S is very portable, even though not standardised.
solaris' sort(1) has -S and GNU sort is used on most other platforms,
which has -S available since TEXTUTILS-2_0_10-58-gbf86c62

Note also this thread on the selection of a default buffer size for pipes=
:
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/878/focus=3D887

So currently I'd be 70:30 against adding such a variable.

cheers,
P=E1draig.


From MAILER-DAEMON Wed Aug 29 21:51:05 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6tuT-00081O-5j
	for mharc-coreutils@gnu.org; Wed, 29 Aug 2012 21:51:05 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50978)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T6tuQ-00081H-4K
	for coreutils@gnu.org; Wed, 29 Aug 2012 21:51:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T6tuO-0003WO-9u
	for coreutils@gnu.org; Wed, 29 Aug 2012 21:51:02 -0400
Received: from mx1.redhat.com ([209.132.183.28]:49802)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T6tuO-0003WI-1h
	for coreutils@gnu.org; Wed, 29 Aug 2012 21:51:00 -0400
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 q7U1ox0H015584
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 29 Aug 2012 21:50:59 -0400
Received: from [10.36.116.17] (ovpn-116-17.ams2.redhat.com [10.36.116.17])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q7U1ovOB009377
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 29 Aug 2012 21:50:58 -0400
Message-ID: <503EC700.4040501@draigBrady.com>
Date: Thu, 30 Aug 2012 02:50:56 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Nick Alcock <nick.alcock@oracle.com>
Subject: Re: [PATCH] tests: misc/sort-exit-early: do not run as root.
References: <874nnluzjt.fsf@spindle.srvr.nix>
In-Reply-To: <874nnluzjt.fsf@spindle.srvr.nix>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
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
	q7U1ox0H015584
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 30 Aug 2012 01:51:03 -0000

On 08/29/2012 11:02 PM, Nick Alcock wrote:
> This test requires an unwritable input and an unreadable output,
> so will fail if the testsuite is being run as root, and should
> not be run in this case.
> ---
>  tests/misc/sort-exit-early | 2 ++
>  1 file changed, 2 insertions(+)
>=20
> diff --git a/tests/misc/sort-exit-early b/tests/misc/sort-exit-early
> index 7470aad..b83a489 100755
> --- a/tests/misc/sort-exit-early
> +++ b/tests/misc/sort-exit-early
> @@ -19,6 +19,8 @@
>  . "${srcdir=3D.}/init.sh"; path_prepend_ ../src
>  print_ver_ sort
> =20
> +skip_if_root_
> +
>  # Check output is writable before starting to sort
>  touch input
>  chmod a-w input

Pushed.

thanks,
P=E1draig.




From MAILER-DAEMON Thu Aug 30 03:02:11 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6ylX-0007by-9n
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 03:02:11 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38207)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6ylR-0007aD-2d
	for coreutils@gnu.org; Thu, 30 Aug 2012 03:02:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6ylK-0002L0-P2
	for coreutils@gnu.org; Thu, 30 Aug 2012 03:02:05 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:33671)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6ylK-0002JY-Ig
	for coreutils@gnu.org; Thu, 30 Aug 2012 03:01:58 -0400
Received: by bkcjc3 with SMTP id jc3so635780bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 00:01:57 -0700 (PDT)
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=zO1cU2/0hWN0cEmhQ6y98JCsD+pwJqSZebFvJ69VmMQ=;
	b=c7/t0vGQgK60bPb6s2nFyn3GCpVCs+1pufIHYDP0njlaQX3jszSNsczIfiF+m9FDU4
	kxC5Y0MmtWfZL55hji3OKRKu/WJkh/mIwyhxQ9K3Z7tONskbM6g92yY0pjBAvVJGsfHF
	kODgqqqYxJmK0Z7pGl+W23yYYK6X40K5Ay8GG+nZe37PkqBRE4c04QGoPsnjsC78Hecy
	1AGMtyG7DW5R+g7pyYCefTTkKhOYcrIWBwvF/+Wh18r/pffLVpQxZoVt/KgHLPF/T8xN
	2k+VshCuniy29cl3n1xXhRf6iwhQc7SFDmEUsU4ysSJuQzhvaenazssjWOrFyfW2+abp
	xFAA==
Received: by 10.204.129.23 with SMTP id m23mr2212347bks.28.1346310117620;
	Thu, 30 Aug 2012 00:01:57 -0700 (PDT)
Received: from [192.168.178.21]
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id t23sm336638bks.4.2012.08.30.00.01.55
	(version=SSLv3 cipher=OTHER); Thu, 30 Aug 2012 00:01:56 -0700 (PDT)
Message-ID: <503F0FDB.2020501@gmail.com>
Date: Thu, 30 Aug 2012 09:01:47 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net>
In-Reply-To: <87ehmp47fx.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 30 Aug 2012 07:02:09 -0000

Hi Jim.

On 08/30/2012 01:14 AM, Jim Meyering wrote:
> 
> Thanks for all the work.
>
> Would you please mail to me (or to the list) the concatenation of those
> patches
>
Sorry to be dense, but: what does "concatenation" mean in this conext
exactly?

> or point me to a repository from which I can pull them?
>
They are only in my private, local repository so far.  Should I create a
new repo on GitHub for you to pull from?

Regards,
  Stefano


From MAILER-DAEMON Thu Aug 30 03:06:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6yph-000087-MY
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 03:06:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51526)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T6ypf-000080-Ji
	for coreutils@gnu.org; Thu, 30 Aug 2012 03:06:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T6ypb-0003on-NF
	for coreutils@gnu.org; Thu, 30 Aug 2012 03:06:27 -0400
Received: from mx.meyering.net ([88.168.87.75]:32932)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T6ypb-0003oh-GY
	for coreutils@gnu.org; Thu, 30 Aug 2012 03:06:23 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id D9A22600B3;
	Thu, 30 Aug 2012 09:06:22 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
In-Reply-To: <503F0FDB.2020501@gmail.com> (Stefano Lattarini's message of
	"Thu, 30 Aug 2012 09:01:47 +0200")
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net> <503F0FDB.2020501@gmail.com>
Date: Thu, 30 Aug 2012 09:06:22 +0200
Message-ID: <87obls3lld.fsf@rho.meyering.net>
Lines: 19
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 30 Aug 2012 07:06:29 -0000

Stefano Lattarini wrote:
> On 08/30/2012 01:14 AM, Jim Meyering wrote:
>>
>> Thanks for all the work.
>>
>> Would you please mail to me (or to the list) the concatenation of those
>> patches
>>
> Sorry to be dense, but: what does "concatenation" mean in this conext
> exactly?

The output of git format-patch -22 --stdout would be fine.

>> or point me to a repository from which I can pull them?
>>
> They are only in my private, local repository so far.  Should I create a
> new repo on GitHub for you to pull from?

No need for that.


From MAILER-DAEMON Thu Aug 30 03:10:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6ytD-0001E5-Bq
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 03:10:07 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36097)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6yt5-0001Ad-Oj
	for coreutils@gnu.org; Thu, 30 Aug 2012 03:10:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6yt1-0004RM-DC
	for coreutils@gnu.org; Thu, 30 Aug 2012 03:09:59 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:52939)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6yt1-0004RF-6G
	for coreutils@gnu.org; Thu, 30 Aug 2012 03:09:55 -0400
Received: by bkcjc3 with SMTP id jc3so639020bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 00:09:54 -0700 (PDT)
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=02im191kXfosIdXITlvugBRAFOOCfw/JRZV96V79GFk=;
	b=a8s4xXNDL7Iu45ZNDCUq5NFIjCM+RRdVPq73ulHlRCBcEGkc+5skrqyskDdgT3CUGH
	N0luITNtF+Nzj536SaBQgTAFK4rLB41UzN8wifVWlu3fOVosooUZOZ4f22k2ADQ5aoZg
	pZUBdsxCO9n573UGMg3exWvuB6MJkgBwUfxOBV4zTCPEdGWGOMdda9dFnEQEdkjslisw
	GF/4cU2rXE/aW6lOSFgNZUa5LtpX1qH4bZeqg/NBHA42IjhmJwMtwrT8ycbRtWxMnbXL
	1sI4TMhLebMNKx+GsflLmwbKZiWfO+f0fmNyouad+zMZ0G4j6NOuneP/b2qGfn0j3LGj
	oByQ==
Received: by 10.204.130.25 with SMTP id q25mr2207501bks.119.1346310594305;
	Thu, 30 Aug 2012 00:09:54 -0700 (PDT)
Received: from [192.168.178.21]
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id 14sm341447bkq.12.2012.08.30.00.09.52
	(version=SSLv3 cipher=OTHER); Thu, 30 Aug 2012 00:09:53 -0700 (PDT)
Message-ID: <503F11BF.2080404@gmail.com>
Date: Thu, 30 Aug 2012 09:09:51 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net>
In-Reply-To: <87ehmp47fx.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 30 Aug 2012 07:10:05 -0000

An BTW, now that I notice ...
>>
>> Stefano Lattarini (22):
>>   build: don't abuse Automake internals (with its 'check-am' rule)
>>   maint: slightly improve .gitignore
>>   build: add extra *.texi files to coreutils_TEXINFOS, not EXTRA_DIST
>>   build: prefer '$(top_srcdir)/doc' over '$(srcdir)' in doc Makefile
>>   build: use 'check-local' to extend the 'check' target
>>   build: don't use recursive make to build the 'doc' subdirectory
>>   build: don't define $(SUFFIXES) explicitly
>>   maint: simplify definition of $MAN in configure.ac
>>   build: add an explicative comment
>>   build: fix a stray usage of uninitialized $(ME)
>>   build: rename common_dep -> mandep in man/Makefile
>>   maint: typofix: s/it's/its/
>>   build: rely on VPATH capabilities in man/Makefile
>>   build: make some rule less dependent of exact source tree layout
>
... this should read "on exact source tree layout" ...

>>   build: convenience target 'all_programs' at top-level
>>   build: rework some recipes in main/Makefile.am, for future changes
>>
... and this "man/Makefile.am".

>>   build: don't use recursive make to build the 'man' subdirectory
>>   maint: move man-related syntax checks in cfg.mk
>>   maint: adjust syntax check 'check-x-vs-1'
>>   maint: adjust syntax check 'sc_option_desc_uppercase'
>>   build: remove redundant indirection with variable '$(doc_srcdir)'
>>   maint: update gitignore entries
> 

I've fixed those typos locally FTM.

Regards,
  Stefano


From MAILER-DAEMON Thu Aug 30 03:17:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6z08-000238-1s
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 03:17:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52675)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6yzx-00022o-1L
	for coreutils@gnu.org; Thu, 30 Aug 2012 03:17:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6yzm-0007sM-Lf
	for coreutils@gnu.org; Thu, 30 Aug 2012 03:17:04 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:50531)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T6yzm-0007sI-1a
	for coreutils@gnu.org; Thu, 30 Aug 2012 03:16:54 -0400
Received: by bkcjc3 with SMTP id jc3so641805bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 00:16:53 -0700 (PDT)
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=NDZxs5Z5xs3C60PBkXSg8fseNv+PS7YKQK86ut68FM8=;
	b=X0OeIXJl8Ko3X91+6eqYO1yDmzPom7c2NIAIk3+NhBCkII00j3B1ljWHYGRYZzxpcK
	XzuHvY/Eq5t1WwPQdAFrBpipLbzkIVabDlgegNGOEQ8pFgbXLnymv9XrBCC6fvse6Hvp
	+kjtLJRQ4agpXK9axogyLMtmDDcbXuqy5NRFT9YvAC3I950wKupPiN110ZzHYwfTkLtz
	MXwaJdKVV/Na+IhOtAmH9Y/or6+yiCO0SOC8HIhfI/NIA/l8VoMolC7X1wM9WNJit7EF
	WjEnR8ANXaN5WoPC9KgT0e6A3BXHwxPD5X4+Y5PpNnfbD12LBfvHsOMhQHeokZYcbWfx
	2/mA==
Received: by 10.204.15.199 with SMTP id l7mr2248677bka.51.1346311013075;
	Thu, 30 Aug 2012 00:16:53 -0700 (PDT)
Received: from [192.168.178.21]
	(host42-97-dynamic.2-87-r.retail.telecomitalia.it. [87.2.97.42])
	by mx.google.com with ESMTPS id j9sm361571bkv.0.2012.08.30.00.16.49
	(version=SSLv3 cipher=OTHER); Thu, 30 Aug 2012 00:16:52 -0700 (PDT)
Message-ID: <503F1360.1060608@gmail.com>
Date: Thu, 30 Aug 2012 09:16:48 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net> <503F0FDB.2020501@gmail.com>
	<87obls3lld.fsf@rho.meyering.net>
In-Reply-To: <87obls3lld.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 30 Aug 2012 07:17:14 -0000

On 08/30/2012 09:06 AM, Jim Meyering wrote:
> Stefano Lattarini wrote:
>> On 08/30/2012 01:14 AM, Jim Meyering wrote:
>>>
>>> Thanks for all the work.
>>>
>>> Would you please mail to me (or to the list) the concatenation of those
>>> patches
>>>
>> Sorry to be dense, but: what does "concatenation" mean in this conext
>> exactly?
> 
> The output of git format-patch -22 --stdout would be fine.
>
Ah, OK, so "concatenation" literally meant concatenation :-)

Here it is:

---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---

>From 374bbe3bdc3db361631c352fbbab3bf8d43721f9 Mon Sep 17 00:00:00 2001
Message-Id: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 12:35:43 +0200
Subject: [PATCH 01/22] build: don't abuse Automake internals (with its
 'check-am' rule)

* tests/check.mk (check-am): Remove; obtain the same effect by moving
its dependency '.built-programs' ...
(check_DATA): ... to this variable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 tests/check.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/check.mk b/tests/check.mk
index cb67b9d..7ced678 100644
--- a/tests/check.mk
+++ b/tests/check.mk
@@ -38,7 +38,7 @@ check: vc_exe_in_TESTS

 CLEANFILES =
 CLEANFILES += .built-programs
-check-am: .built-programs
+check_DATA = .built-programs
 .built-programs: $(top_srcdir)/src/Makefile.am
 	$(AM_V_GEN)(cd $(top_builddir)/src				\
             && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
-- 
1.7.12


>From 1028d2186d7ef62820f85286467354149dfe6578 Mon Sep 17 00:00:00 2001
Message-Id: <1028d2186d7ef62820f85286467354149dfe6578.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 13:03:27 +0200
Subject: [PATCH 02/22] maint: slightly improve .gitignore

* .gitignore: Ignore '.deps' only when it's a directory.
Ignore '*.trs' only if they are in a subdirectory of the
'tests/' directory.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 .gitignore | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 383361b..aad59bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,8 +2,7 @@
 *.[EIOX]
 *.bak
 *.o
-*.trs
-*/.deps
+*/.deps/
 *~
 ._bootmp
 .gdb-history
@@ -155,6 +154,7 @@
 /src/version.h
 /stamp-h1
 /tests/*/*.log
+/tests/*/*.trs
 /tests/.built-programs
 /tests/t?
 /tests/test-suite.log
-- 
1.7.12


>From 0c6cbef4a79ecf62012c4d776babddb0f503f876 Mon Sep 17 00:00:00 2001
Message-Id: <0c6cbef4a79ecf62012c4d776babddb0f503f876.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 13:55:49 +0200
Subject: [PATCH 03/22] build: add extra *.texi files to coreutils_TEXINFOS,
 not EXTRA_DIST

* doc/Makefile.am (coreutils_TEXINFO): List them here, instead of ...
(EXTRA_DIST): ... listing them here.  This ensure the rebuild rules
will be more faithful.
($(DVIS), $(INFO_DEPS)): No need to depend on $(EXTRA_DIST) now.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 doc/Makefile.am | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index dea2756..9a50714 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -17,7 +17,7 @@

 info_TEXINFOS = coreutils.texi

-EXTRA_DIST = perm.texi parse-datetime.texi constants.texi fdl.texi
+coreutils_TEXINFOS = perm.texi parse-datetime.texi constants.texi fdl.texi

 # The following is necessary if the package name is 8 characters or longer.
 # If the info documentation would be split into 10 or more separate files,
@@ -40,9 +40,6 @@ constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c

 MAINTAINERCLEANFILES = constants.texi

-$(DVIS): $(EXTRA_DIST)
-$(INFO_DEPS): $(EXTRA_DIST)
-
 # Extended regular expressions to match word starts and ends.
 _W = (^|[^A-Za-z0-9_])
 W_ = ([^A-Za-z0-9_]|$$)
-- 
1.7.12


>From e6f0937345e70fadec71d814a07fb98c3b520ab3 Mon Sep 17 00:00:00 2001
Message-Id: <e6f0937345e70fadec71d814a07fb98c3b520ab3.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 14:01:12 +0200
Subject: [PATCH 04/22] build: prefer '$(top_srcdir)/doc' over '$(srcdir)' in
 doc Makefile

This is just a preparatory refactoring that will become useful in
a future change (where the doc/Makefile.am makefile will be merged
with the top-level one).

* doc/Makefile.am (doc_srcdir): New, defined to '$(top_srcdir)/doc'.
Use it throughout instead of "bare" '$(srcdir)'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 doc/Makefile.am | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 9a50714..4e5150f 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -19,6 +19,8 @@ info_TEXINFOS = coreutils.texi

 coreutils_TEXINFOS = perm.texi parse-datetime.texi constants.texi fdl.texi

+doc_srcdir = $(top_srcdir)/doc
+
 # The following is necessary if the package name is 8 characters or longer.
 # If the info documentation would be split into 10 or more separate files,
 # then this is necessary even if the package name is 7 characters long.
@@ -60,21 +62,21 @@ syntax_checks =		\
 # List words/regexps here that should not appear in the texinfo documentation.
 check-texinfo: $(syntax_checks)
 	$(AM_V_GEN)fail=0;						\
-	grep '@url{' $(srcdir)/*.texi && fail=1;			\
-	grep '\$$@"' $(srcdir)/*.texi && fail=1;			\
-	grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1;	\
-	grep -n filename $(srcdir)/*.texi				\
+	grep '@url{' $(doc_srcdir)/*.texi && fail=1;			\
+	grep '\$$@"' $(doc_srcdir)/*.texi && fail=1;			\
+	grep -n '[^[:punct:]]@footnote' $(doc_srcdir)/*.texi && fail=1;	\
+	grep -n filename $(doc_srcdir)/*.texi				\
 	    | $(EGREP) -v 'setfilename|[{]filename[}]'			\
 	  && fail=1;							\
 	exit $$fail

 sc-avoid-builtin:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi	\
+	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(doc_srcdir)/*.texi \
 	  && exit 1 || :

 sc-avoid-path:
 	$(AM_V_GEN)fail=0;						\
-	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi		\
+	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(doc_srcdir)/*.texi	\
 	  | $(EGREP) -v							\
 	  'PATH=|path search|search path|@vindex PATH$$|@env[{]PATH[}]'	\
 	  && fail=1;							\
@@ -82,28 +84,28 @@ sc-avoid-path:

 # Use "time zone", not "timezone".
 sc-avoid-timezone:
-	$(AM_V_GEN)$(EGREP) timezone $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) timezone $(doc_srcdir)/*.texi && exit 1 || :

 # Check for insufficient exponent grouping, e.g.,
 # @math{2^64} should be @math{2^{64}}.
 sc-exponent-grouping:
-	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(doc_srcdir)/*.texi && exit 1 || :

 # E.g., use @sc{nul}, not NUL.
 sc-use-small-caps-NUL:
-	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(doc_srcdir)/*.texi && exit 1 || :

 # Say I/O, not IO.
 sc-avoid-io:
-	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(doc_srcdir)/*.texi && exit 1 || :

 # I prefer nonzero over non-zero.
 sc-avoid-non-zero:
-	$(AM_V_GEN)$(EGREP) non-zero $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) non-zero $(doc_srcdir)/*.texi && exit 1 || :

 # Use "zeros", not "zeroes" (nothing wrong with "zeroes"; just be consistent).
 sc-avoid-zeroes:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi \
+	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(doc_srcdir)/*.texi \
 	  && exit 1 || :

 # ME = $(subdir)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
@@ -122,6 +124,6 @@ find_upper_case_var =		\
    END {$$m and (warn "$(ME): do not use upper case in \@var{...}\n"), exit 1}'
 sc-lower-case-var:
 	$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
-	  $(PERL) -lne $(find_upper_case_var) $(srcdir)/*.texi
+	  $(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi

 check: check-texinfo
-- 
1.7.12


>From bcca05ccf38d23991c1cf8c6e2d8aa58f1c85e90 Mon Sep 17 00:00:00 2001
Message-Id: <bcca05ccf38d23991c1cf8c6e2d8aa58f1c85e90.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 14:15:42 +0200
Subject: [PATCH 05/22] build: use 'check-local' to extend the 'check' target

* doc/Makefile.am (check-local): Here, by making this depend
on 'check-texinfo' ...
(check): ... rather than this.  While the old usage worked, it
did so for an implementation detail rather than a documented
behaviour, so relying on that was riskier a "unclean".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 doc/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 4e5150f..121c7cc 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -126,4 +126,4 @@ sc-lower-case-var:
 	$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
 	  $(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi

-check: check-texinfo
+check-local: check-texinfo
-- 
1.7.12


>From 99f015ef31ba8c09a35c65e1b280f46fa6177c5e Mon Sep 17 00:00:00 2001
Message-Id: <99f015ef31ba8c09a35c65e1b280f46fa6177c5e.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 14:22:47 +0200
Subject: [PATCH 06/22] build: don't use recursive make to build the 'doc'
 subdirectory

* doc/Makefile.am: Rename ...
* doc/local.mk: ... like this.  With further adjustments ...
(info_TEXINFOS): Prepend 'doc/' to all '*.texi' files listed in
here.
(coreutils_TEXINFOS): Likewise, and rename ...
(doc_coreutils_TEXINFOS): ... like this.
(constants.texi): Rename ...
(doc/constants.texi): ... like this.  Adjust the recipe to avoid
spurious errors.
(MAINTAINERCLEANFILES): Adjust, and extend with '+=' rather than
setting it with '='.
(ME): Delete.
(find_upper_case_var): Use '$@', not '$(ME)', in error messages.
* Makefile.am: Include 'doc/local.mk'.
(SUBDIRS): Remove 'doc'.
* configure.ac (AC_CONFIG_FILES): Remove 'doc/Makefile'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 Makefile.am                   |  4 +++-
 configure.ac                  |  1 -
 doc/{Makefile.am => local.mk} | 22 ++++++++++++----------
 3 files changed, 15 insertions(+), 12 deletions(-)
 rename doc/{Makefile.am => local.mk} (90%)

diff --git a/Makefile.am b/Makefile.am
index 72d93d5..0446e43 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@

 ALL_RECURSIVE_TARGETS =

-SUBDIRS = lib src doc man po tests gnulib-tests
+SUBDIRS = lib src man po tests gnulib-tests

 changelog_etc =				\
   ChangeLog-2005			\
@@ -169,3 +169,5 @@ check-git-hook-script-sync:
 	     done;							\
 	rm -rf $$t;							\
 	test $$fail = 0
+
+include $(top_srcdir)/doc/local.mk
diff --git a/configure.ac b/configure.ac
index 5651fd1..52918ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -492,7 +492,6 @@ gt_LOCALE_FR

 AC_CONFIG_FILES(
   Makefile
-  doc/Makefile
   lib/Makefile
   man/Makefile
   po/Makefile.in
diff --git a/doc/Makefile.am b/doc/local.mk
similarity index 90%
rename from doc/Makefile.am
rename to doc/local.mk
index 121c7cc..665dd21 100644
--- a/doc/Makefile.am
+++ b/doc/local.mk
@@ -1,4 +1,5 @@
 # Make coreutils documentation.				-*-Makefile-*-
+# This is included by the top-level Makefile.am.

 # Copyright (C) 1995-2012 Free Software Foundation, Inc.

@@ -15,9 +16,13 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

-info_TEXINFOS = coreutils.texi
+info_TEXINFOS = doc/coreutils.texi

-coreutils_TEXINFOS = perm.texi parse-datetime.texi constants.texi fdl.texi
+doc_coreutils_TEXINFOS = \
+  doc/perm.texi \
+  doc/parse-datetime.texi \
+  doc/constants.texi \
+  doc/fdl.texi

 doc_srcdir = $(top_srcdir)/doc

@@ -31,16 +36,16 @@ doc_srcdir = $(top_srcdir)/doc
 # old systems.
 AM_MAKEINFOFLAGS = --no-split

-constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
+doc/constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
 	$(AM_V_GEN)LC_ALL=C; export LC_ALL; \
 	{ sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
 	    $(top_srcdir)/src/tail.c && \
 	  sed -n -e \
 	      's/.*\(DEFAULT_PASSES\)[ =]* \([0-9]*\).*/@set SHRED_\1 \2/p'\
-	    $(top_srcdir)/src/shred.c; } > t-$@ \
-	  && mv t-$@ $@
+	    $(top_srcdir)/src/shred.c; } > $@-t \
+	  && mv $@-t $@

-MAINTAINERCLEANFILES = constants.texi
+MAINTAINERCLEANFILES += doc/constants.texi

 # Extended regular expressions to match word starts and ends.
 _W = (^|[^A-Za-z0-9_])
@@ -108,9 +113,6 @@ sc-avoid-zeroes:
 	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(doc_srcdir)/*.texi \
 	  && exit 1 || :

-# ME = $(subdir)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
-ME = doc/Makefile
-
 # The quantity inside @var{...} should not contain upper case letters.
 # The leading backslash exemption is to permit in-macro uses like
 # @var{\varName\} where the upper case letter is part of a parameter name.
@@ -121,7 +123,7 @@ find_upper_case_var =		\
        $$v = $$1;		\
        $$v =~ /[A-Z]/ && $$v !~ /^\\/ and (print "$$ARGV:$$.:$$_"), $$m = 1 \
      }				\
-   END {$$m and (warn "$(ME): do not use upper case in \@var{...}\n"), exit 1}'
+   END {$$m and (warn "$@: do not use upper case in \@var{...}\n"), exit 1}'
 sc-lower-case-var:
 	$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
 	  $(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi
-- 
1.7.12


>From 8f93a5748273eaf790845a33628278b0a57f973e Mon Sep 17 00:00:00 2001
Message-Id: <8f93a5748273eaf790845a33628278b0a57f973e.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 15:02:19 +0200
Subject: [PATCH 07/22] build: don't define $(SUFFIXES) explicitly

* man/Makefile.am (SUFFIXES): Remove definition: Automake is smart
enough to extract the list of suffixes from the '.x.1' suffix rule
automatically.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 2 --
 1 file changed, 2 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index cc93a42..8e9df08 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -139,8 +139,6 @@ yes.1:		$(common_dep)	$(srcdir)/yes.x		../src/yes.c
 # provoke regeneration of all $(MAN) files.
 $(MAN): $(top_srcdir)/src/system.h

-SUFFIXES = .x .1
-
 # Ensure that help2man runs the ../src/ginstall binary as
 # 'install' when creating install.1.
 # Similarly, ensure that it uses the ../src/[ binary to create test.1.
-- 
1.7.12


>From 8bb13fd183b0b99f63eb2d6e5bc6bd9db22f0a37 Mon Sep 17 00:00:00 2001
Message-Id: <8bb13fd183b0b99f63eb2d6e5bc6bd9db22f0a37.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 15:18:08 +0200
Subject: [PATCH 08/22] maint: simplify definition of $MAN in configure.ac

* configure.ac: Here, by making less use of 'sed' and 'tr' munging,
and relying on a smarter and simpler shell loop instead.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 configure.ac | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 52918ca..bc7520d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -456,16 +456,19 @@ case " $optional_bin_progs " in
   *' stdbuf '*) gl_ADD_PROG([optional_pkglib_progs], [libstdbuf.so]) ;;
 esac

-MAN=`echo "$optional_bin_progs "|sed 's/ /.1 /g;s/ $//'|tr -d '\\015\\012'`
-
-# Change "ginstall.1" to "install.1" in $MAN.
-MAN=`for m in $MAN; do test $m = ginstall.1 && m=install.1; echo $m; done \
-  | tr '\015\012' '  '; echo`
-
-# Remove [.1, since writing a portable rule for it in man/Makefile.am
-# is not practical.  The sed LHS below uses the autoconf quadrigraph
-# representing '['.
-MAN=`echo "$MAN"|sed 's/\@<:@\.1//'`
+MAN=`
+  for p in $optional_bin_progs; do
+    # Change "ginstall.1" to "install.1" in $MAN.
+    test $p = ginstall && p=install
+    # Ignore the "[" program, since writing a portable make rule to
+    # generate its manpage is not practical.
+    dnl Use the autoconf-provided quadrigraph to represent "[",
+    dnl otherwise we will incur in dreadful quoting issues.
+    test x$p = x'@<:@' && continue
+    echo "$p.1"
+  done`
+# Normalize whitespace.
+MAN=`echo $MAN`

 OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
 AC_SUBST([OPTIONAL_BIN_PROGS])
-- 
1.7.12


>From 19222838acc5ea7769f80c39dc92a8c746321de7 Mon Sep 17 00:00:00 2001
Message-Id: <19222838acc5ea7769f80c39dc92a8c746321de7.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 15:44:05 +0200
Subject: [PATCH 09/22] build: add an explicative comment

* man/Makefile.am (EXTRA_DIST): Here, portability issues of the
employed idiom.  Reformat the definition a little while at it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 8e9df08..44eb310 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -19,10 +19,19 @@ dist_man1_MANS = $(MAN)

 man_aux = $(dist_man1_MANS:.1=.x)

-EXTRA_DIST = $(man_aux) $(NO_INSTALL_PROGS_DEFAULT:%=%.x) help2man \
-	$(NO_INSTALL_PROGS_DEFAULT:%=%.1)
+EXTRA_DIST = $(man_aux) help2man
 MAINTAINERCLEANFILES = $(dist_man1_MANS)

+# The "$(VAR:%=%.x)" idiom is not portable according to POSIX, but in
+# practice it works with several make implementation (GNU, BSD, CCS make
+# from Solaris 10, Sun distributed make).  In addition, since only
+# maintainers are expected to build release tarballs (and they should
+# use GNU make when doing so), it's not big deal if this won't work with
+# some dumber make implementation.
+EXTRA_DIST += \
+  $(NO_INSTALL_PROGS_DEFAULT:%=%.x) \
+  $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
+
 # Depend on ../.version to get version number changes.
 common_dep = ../.version

-- 
1.7.12


>From 30552c5693c2e33989f76952c157c41946760bfc Mon Sep 17 00:00:00 2001
Message-Id: <30552c5693c2e33989f76952c157c41946760bfc.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 15:55:54 +0200
Subject: [PATCH 10/22] build: fix a stray usage of uninitialized $(ME)

* man/Makefile.am (sc_option_desc_uppercase): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 44eb310..84b585f 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -185,7 +185,7 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
 .PHONY: sc_option_desc_uppercase
 sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
 	@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
-	    { echo 1>&2 '$(ME): found initial capitals in --help';   \
+	    { echo 1>&2 '$@: found initial capitals in --help';   \
 	      exit 1; } || :;

 .PHONY: sc_man_file_correlation
-- 
1.7.12


>From 5861c47c9bebfbef390e790301d33bee2861955f Mon Sep 17 00:00:00 2001
Message-Id: <5861c47c9bebfbef390e790301d33bee2861955f.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 15:56:47 +0200
Subject: [PATCH 11/22] build: rename common_dep -> mandep in man/Makefile

This is mostly a preparatory refactoring in view of future changes.

* man/Makefile.am (common_dep): Rename ...
(mandep): ... like this.
All usages adjusted.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 212 ++++++++++++++++++++++++++++----------------------------
 1 file changed, 106 insertions(+), 106 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 84b585f..ef0fbd9 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -33,116 +33,116 @@ EXTRA_DIST += \
   $(NO_INSTALL_PROGS_DEFAULT:%=%.1)

 # Depend on ../.version to get version number changes.
-common_dep = ../.version
+mandep = ../.version

 # Note that arch depends on uname.c
-arch.1:		$(common_dep)	$(srcdir)/arch.x	../src/uname.c
-
-base64.1:	$(common_dep)	$(srcdir)/base64.x	../src/base64.c
-basename.1:	$(common_dep)	$(srcdir)/basename.x	../src/basename.c
-cat.1:		$(common_dep)	$(srcdir)/cat.x		../src/cat.c
-chcon.1:	$(common_dep)	$(srcdir)/chcon.x	../src/chcon.c
-chgrp.1:	$(common_dep)	$(srcdir)/chgrp.x	../src/chgrp.c
-chmod.1:	$(common_dep)	$(srcdir)/chmod.x	../src/chmod.c
-chown.1:	$(common_dep)	$(srcdir)/chown.x	../src/chown.c
-chroot.1:	$(common_dep)	$(srcdir)/chroot.x	../src/chroot.c
-cksum.1:	$(common_dep)	$(srcdir)/cksum.x	../src/cksum.c
-comm.1:		$(common_dep)	$(srcdir)/comm.x	../src/comm.c
-cp.1:		$(common_dep)	$(srcdir)/cp.x		../src/cp.c
-csplit.1:	$(common_dep)	$(srcdir)/csplit.x	../src/csplit.c
-cut.1:		$(common_dep)	$(srcdir)/cut.x		../src/cut.c
-date.1:		$(common_dep)	$(srcdir)/date.x	../src/date.c
-dd.1:		$(common_dep)	$(srcdir)/dd.x		../src/dd.c
-df.1:		$(common_dep)	$(srcdir)/df.x		../src/df.c
+arch.1:		$(mandep)	$(srcdir)/arch.x	../src/uname.c
+
+base64.1:	$(mandep)	$(srcdir)/base64.x	../src/base64.c
+basename.1:	$(mandep)	$(srcdir)/basename.x	../src/basename.c
+cat.1:		$(mandep)	$(srcdir)/cat.x		../src/cat.c
+chcon.1:	$(mandep)	$(srcdir)/chcon.x	../src/chcon.c
+chgrp.1:	$(mandep)	$(srcdir)/chgrp.x	../src/chgrp.c
+chmod.1:	$(mandep)	$(srcdir)/chmod.x	../src/chmod.c
+chown.1:	$(mandep)	$(srcdir)/chown.x	../src/chown.c
+chroot.1:	$(mandep)	$(srcdir)/chroot.x	../src/chroot.c
+cksum.1:	$(mandep)	$(srcdir)/cksum.x	../src/cksum.c
+comm.1:		$(mandep)	$(srcdir)/comm.x	../src/comm.c
+cp.1:		$(mandep)	$(srcdir)/cp.x		../src/cp.c
+csplit.1:	$(mandep)	$(srcdir)/csplit.x	../src/csplit.c
+cut.1:		$(mandep)	$(srcdir)/cut.x		../src/cut.c
+date.1:		$(mandep)	$(srcdir)/date.x	../src/date.c
+dd.1:		$(mandep)	$(srcdir)/dd.x		../src/dd.c
+df.1:		$(mandep)	$(srcdir)/df.x		../src/df.c

 # Note that dir depends on ls.c, since that's where it's --help text is.
-dir.1:		$(common_dep)	$(srcdir)/dir.x		../src/ls.c
-
-dircolors.1:	$(common_dep)	$(srcdir)/dircolors.x	../src/dircolors.c
-dirname.1:	$(common_dep)	$(srcdir)/dirname.x	../src/dirname.c
-du.1:		$(common_dep)	$(srcdir)/du.x		../src/du.c
-echo.1:		$(common_dep)	$(srcdir)/echo.x	../src/echo.c
-env.1:		$(common_dep)	$(srcdir)/env.x		../src/env.c
-expand.1:	$(common_dep)	$(srcdir)/expand.x	../src/expand.c
-expr.1:		$(common_dep)	$(srcdir)/expr.x	../src/expr.c
-factor.1:	$(common_dep)	$(srcdir)/factor.x	../src/factor.c
-false.1:	$(common_dep)	$(srcdir)/false.x	../src/false.c
-fmt.1:		$(common_dep)	$(srcdir)/fmt.x		../src/fmt.c
-fold.1:		$(common_dep)	$(srcdir)/fold.x	../src/fold.c
-groups.1:	$(common_dep)	$(srcdir)/groups.x	../src/groups.c
-head.1:		$(common_dep)	$(srcdir)/head.x	../src/head.c
-hostid.1:	$(common_dep)	$(srcdir)/hostid.x	../src/hostid.c
-hostname.1:	$(common_dep)	$(srcdir)/hostname.x	../src/hostname.c
-id.1:		$(common_dep)	$(srcdir)/id.x		../src/id.c
-install.1:	$(common_dep)	$(srcdir)/install.x	../src/install.c
-join.1:		$(common_dep)	$(srcdir)/join.x	../src/join.c
-kill.1:		$(common_dep)	$(srcdir)/kill.x	../src/kill.c
-link.1:		$(common_dep)	$(srcdir)/link.x	../src/link.c
-ln.1:		$(common_dep)	$(srcdir)/ln.x		../src/ln.c
-logname.1:	$(common_dep)	$(srcdir)/logname.x	../src/logname.c
-ls.1:		$(common_dep)	$(srcdir)/ls.x		../src/ls.c
-md5sum.1:	$(common_dep)	$(srcdir)/md5sum.x	../src/md5sum.c
-mkdir.1:	$(common_dep)	$(srcdir)/mkdir.x	../src/mkdir.c
-mkfifo.1:	$(common_dep)	$(srcdir)/mkfifo.x	../src/mkfifo.c
-mknod.1:	$(common_dep)	$(srcdir)/mknod.x	../src/mknod.c
-mktemp.1:	$(common_dep)	$(srcdir)/mktemp.x	../src/mktemp.c
-mv.1:		$(common_dep)	$(srcdir)/mv.x		../src/mv.c
-nice.1:		$(common_dep)	$(srcdir)/nice.x	../src/nice.c
-nl.1:		$(common_dep)	$(srcdir)/nl.x		../src/nl.c
-nohup.1:	$(common_dep)	$(srcdir)/nohup.x	../src/nohup.c
-nproc.1:	$(common_dep)	$(srcdir)/nproc.x	../src/nproc.c
-od.1:		$(common_dep)	$(srcdir)/od.x		../src/od.c
-paste.1:	$(common_dep)	$(srcdir)/paste.x	../src/paste.c
-pathchk.1:	$(common_dep)	$(srcdir)/pathchk.x	../src/pathchk.c
-pinky.1:	$(common_dep)	$(srcdir)/pinky.x	../src/pinky.c
-pr.1:		$(common_dep)	$(srcdir)/pr.x		../src/pr.c
-printenv.1:	$(common_dep)	$(srcdir)/printenv.x	../src/printenv.c
-printf.1:	$(common_dep)	$(srcdir)/printf.x	../src/printf.c
-ptx.1:		$(common_dep)	$(srcdir)/ptx.x		../src/ptx.c
-pwd.1:		$(common_dep)	$(srcdir)/pwd.x		../src/pwd.c
-readlink.1:	$(common_dep)	$(srcdir)/readlink.x	../src/readlink.c
-realpath.1:	$(common_dep)	$(srcdir)/realpath.x	../src/realpath.c
-rm.1:		$(common_dep)	$(srcdir)/rm.x		../src/rm.c
-rmdir.1:	$(common_dep)	$(srcdir)/rmdir.x	../src/rmdir.c
-runcon.1:	$(common_dep)	$(srcdir)/runcon.x	../src/runcon.c
-seq.1:		$(common_dep)	$(srcdir)/seq.x		../src/seq.c
-sha1sum.1:	$(common_dep)	$(srcdir)/sha1sum.x	../src/md5sum.c
-sha224sum.1:	$(common_dep)	$(srcdir)/sha224sum.x	../src/md5sum.c
-sha256sum.1:	$(common_dep)	$(srcdir)/sha256sum.x	../src/md5sum.c
-sha384sum.1:	$(common_dep)	$(srcdir)/sha384sum.x	../src/md5sum.c
-sha512sum.1:	$(common_dep)	$(srcdir)/sha512sum.x	../src/md5sum.c
-shred.1:	$(common_dep)	$(srcdir)/shred.x	../src/shred.c
-shuf.1:		$(common_dep)	$(srcdir)/shuf.x	../src/shuf.c
-sleep.1:	$(common_dep)	$(srcdir)/sleep.x	../src/sleep.c
-sort.1:		$(common_dep)	$(srcdir)/sort.x	../src/sort.c
-split.1:	$(common_dep)	$(srcdir)/split.x	../src/split.c
-stat.1:		$(common_dep)	$(srcdir)/stat.x	../src/stat.c
-stdbuf.1:	$(common_dep)	$(srcdir)/stdbuf.x	../src/stdbuf.c
-stty.1:		$(common_dep)	$(srcdir)/stty.x	../src/stty.c
-sum.1:		$(common_dep)	$(srcdir)/sum.x		../src/sum.c
-sync.1:		$(common_dep)	$(srcdir)/sync.x	../src/sync.c
-tac.1:		$(common_dep)	$(srcdir)/tac.x		../src/tac.c
-tail.1:		$(common_dep)	$(srcdir)/tail.x	../src/tail.c
-tee.1:		$(common_dep)	$(srcdir)/tee.x		../src/tee.c
-test.1:		$(common_dep)	$(srcdir)/test.x	../src/test.c
-timeout.1:	$(common_dep)	$(srcdir)/timeout.x	../src/timeout.c
-touch.1:	$(common_dep)	$(srcdir)/touch.x	../src/touch.c
-tr.1:		$(common_dep)	$(srcdir)/tr.x		../src/tr.c
-true.1:		$(common_dep)	$(srcdir)/true.x	../src/true.c
-truncate.1:	$(common_dep)	$(srcdir)/truncate.x	../src/truncate.c
-tsort.1:	$(common_dep)	$(srcdir)/tsort.x	../src/tsort.c
-tty.1:		$(common_dep)	$(srcdir)/tty.x		../src/tty.c
-uname.1:	$(common_dep)	$(srcdir)/uname.x	../src/uname.c
-unexpand.1:	$(common_dep)	$(srcdir)/unexpand.x	../src/unexpand.c
-uniq.1:		$(common_dep)	$(srcdir)/uniq.x	../src/uniq.c
-unlink.1:	$(common_dep)	$(srcdir)/unlink.x	../src/unlink.c
-uptime.1:	$(common_dep)	$(srcdir)/uptime.x	../src/uptime.c
-users.1:	$(common_dep)	$(srcdir)/users.x	../src/users.c
-vdir.1:		$(common_dep)	$(srcdir)/vdir.x	../src/ls.c
-wc.1:		$(common_dep)	$(srcdir)/wc.x		../src/wc.c
-who.1:		$(common_dep)	$(srcdir)/who.x		../src/who.c
-whoami.1:	$(common_dep)	$(srcdir)/whoami.x	../src/whoami.c
-yes.1:		$(common_dep)	$(srcdir)/yes.x		../src/yes.c
+dir.1:		$(mandep)	$(srcdir)/dir.x		../src/ls.c
+
+dircolors.1:	$(mandep)	$(srcdir)/dircolors.x	../src/dircolors.c
+dirname.1:	$(mandep)	$(srcdir)/dirname.x	../src/dirname.c
+du.1:		$(mandep)	$(srcdir)/du.x		../src/du.c
+echo.1:		$(mandep)	$(srcdir)/echo.x	../src/echo.c
+env.1:		$(mandep)	$(srcdir)/env.x		../src/env.c
+expand.1:	$(mandep)	$(srcdir)/expand.x	../src/expand.c
+expr.1:		$(mandep)	$(srcdir)/expr.x	../src/expr.c
+factor.1:	$(mandep)	$(srcdir)/factor.x	../src/factor.c
+false.1:	$(mandep)	$(srcdir)/false.x	../src/false.c
+fmt.1:		$(mandep)	$(srcdir)/fmt.x		../src/fmt.c
+fold.1:		$(mandep)	$(srcdir)/fold.x	../src/fold.c
+groups.1:	$(mandep)	$(srcdir)/groups.x	../src/groups.c
+head.1:		$(mandep)	$(srcdir)/head.x	../src/head.c
+hostid.1:	$(mandep)	$(srcdir)/hostid.x	../src/hostid.c
+hostname.1:	$(mandep)	$(srcdir)/hostname.x	../src/hostname.c
+id.1:		$(mandep)	$(srcdir)/id.x		../src/id.c
+install.1:	$(mandep)	$(srcdir)/install.x	../src/install.c
+join.1:		$(mandep)	$(srcdir)/join.x	../src/join.c
+kill.1:		$(mandep)	$(srcdir)/kill.x	../src/kill.c
+link.1:		$(mandep)	$(srcdir)/link.x	../src/link.c
+ln.1:		$(mandep)	$(srcdir)/ln.x		../src/ln.c
+logname.1:	$(mandep)	$(srcdir)/logname.x	../src/logname.c
+ls.1:		$(mandep)	$(srcdir)/ls.x		../src/ls.c
+md5sum.1:	$(mandep)	$(srcdir)/md5sum.x	../src/md5sum.c
+mkdir.1:	$(mandep)	$(srcdir)/mkdir.x	../src/mkdir.c
+mkfifo.1:	$(mandep)	$(srcdir)/mkfifo.x	../src/mkfifo.c
+mknod.1:	$(mandep)	$(srcdir)/mknod.x	../src/mknod.c
+mktemp.1:	$(mandep)	$(srcdir)/mktemp.x	../src/mktemp.c
+mv.1:		$(mandep)	$(srcdir)/mv.x		../src/mv.c
+nice.1:		$(mandep)	$(srcdir)/nice.x	../src/nice.c
+nl.1:		$(mandep)	$(srcdir)/nl.x		../src/nl.c
+nohup.1:	$(mandep)	$(srcdir)/nohup.x	../src/nohup.c
+nproc.1:	$(mandep)	$(srcdir)/nproc.x	../src/nproc.c
+od.1:		$(mandep)	$(srcdir)/od.x		../src/od.c
+paste.1:	$(mandep)	$(srcdir)/paste.x	../src/paste.c
+pathchk.1:	$(mandep)	$(srcdir)/pathchk.x	../src/pathchk.c
+pinky.1:	$(mandep)	$(srcdir)/pinky.x	../src/pinky.c
+pr.1:		$(mandep)	$(srcdir)/pr.x		../src/pr.c
+printenv.1:	$(mandep)	$(srcdir)/printenv.x	../src/printenv.c
+printf.1:	$(mandep)	$(srcdir)/printf.x	../src/printf.c
+ptx.1:		$(mandep)	$(srcdir)/ptx.x		../src/ptx.c
+pwd.1:		$(mandep)	$(srcdir)/pwd.x		../src/pwd.c
+readlink.1:	$(mandep)	$(srcdir)/readlink.x	../src/readlink.c
+realpath.1:	$(mandep)	$(srcdir)/realpath.x	../src/realpath.c
+rm.1:		$(mandep)	$(srcdir)/rm.x		../src/rm.c
+rmdir.1:	$(mandep)	$(srcdir)/rmdir.x	../src/rmdir.c
+runcon.1:	$(mandep)	$(srcdir)/runcon.x	../src/runcon.c
+seq.1:		$(mandep)	$(srcdir)/seq.x		../src/seq.c
+sha1sum.1:	$(mandep)	$(srcdir)/sha1sum.x	../src/md5sum.c
+sha224sum.1:	$(mandep)	$(srcdir)/sha224sum.x	../src/md5sum.c
+sha256sum.1:	$(mandep)	$(srcdir)/sha256sum.x	../src/md5sum.c
+sha384sum.1:	$(mandep)	$(srcdir)/sha384sum.x	../src/md5sum.c
+sha512sum.1:	$(mandep)	$(srcdir)/sha512sum.x	../src/md5sum.c
+shred.1:	$(mandep)	$(srcdir)/shred.x	../src/shred.c
+shuf.1:		$(mandep)	$(srcdir)/shuf.x	../src/shuf.c
+sleep.1:	$(mandep)	$(srcdir)/sleep.x	../src/sleep.c
+sort.1:		$(mandep)	$(srcdir)/sort.x	../src/sort.c
+split.1:	$(mandep)	$(srcdir)/split.x	../src/split.c
+stat.1:		$(mandep)	$(srcdir)/stat.x	../src/stat.c
+stdbuf.1:	$(mandep)	$(srcdir)/stdbuf.x	../src/stdbuf.c
+stty.1:		$(mandep)	$(srcdir)/stty.x	../src/stty.c
+sum.1:		$(mandep)	$(srcdir)/sum.x		../src/sum.c
+sync.1:		$(mandep)	$(srcdir)/sync.x	../src/sync.c
+tac.1:		$(mandep)	$(srcdir)/tac.x		../src/tac.c
+tail.1:		$(mandep)	$(srcdir)/tail.x	../src/tail.c
+tee.1:		$(mandep)	$(srcdir)/tee.x		../src/tee.c
+test.1:		$(mandep)	$(srcdir)/test.x	../src/test.c
+timeout.1:	$(mandep)	$(srcdir)/timeout.x	../src/timeout.c
+touch.1:	$(mandep)	$(srcdir)/touch.x	../src/touch.c
+tr.1:		$(mandep)	$(srcdir)/tr.x		../src/tr.c
+true.1:		$(mandep)	$(srcdir)/true.x	../src/true.c
+truncate.1:	$(mandep)	$(srcdir)/truncate.x	../src/truncate.c
+tsort.1:	$(mandep)	$(srcdir)/tsort.x	../src/tsort.c
+tty.1:		$(mandep)	$(srcdir)/tty.x		../src/tty.c
+uname.1:	$(mandep)	$(srcdir)/uname.x	../src/uname.c
+unexpand.1:	$(mandep)	$(srcdir)/unexpand.x	../src/unexpand.c
+uniq.1:		$(mandep)	$(srcdir)/uniq.x	../src/uniq.c
+unlink.1:	$(mandep)	$(srcdir)/unlink.x	../src/unlink.c
+uptime.1:	$(mandep)	$(srcdir)/uptime.x	../src/uptime.c
+users.1:	$(mandep)	$(srcdir)/users.x	../src/users.c
+vdir.1:		$(mandep)	$(srcdir)/vdir.x	../src/ls.c
+wc.1:		$(mandep)	$(srcdir)/wc.x		../src/wc.c
+who.1:		$(mandep)	$(srcdir)/who.x		../src/who.c
+whoami.1:	$(mandep)	$(srcdir)/whoami.x	../src/whoami.c
+yes.1:		$(mandep)	$(srcdir)/yes.x		../src/yes.c

 # This is required so that changes to e.g., emit_bug_reporting_address
 # provoke regeneration of all $(MAN) files.
-- 
1.7.12


>From 9d69f618d7a3fca68599d5b5d09cf42beea4abd8 Mon Sep 17 00:00:00 2001
Message-Id: <9d69f618d7a3fca68599d5b5d09cf42beea4abd8.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 15:57:22 +0200
Subject: [PATCH 12/22] maint: typofix: s/it's/its/

* man/Makefile.am: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index ef0fbd9..ff8b01e 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -55,7 +55,7 @@ date.1:		$(mandep)	$(srcdir)/date.x	../src/date.c
 dd.1:		$(mandep)	$(srcdir)/dd.x		../src/dd.c
 df.1:		$(mandep)	$(srcdir)/df.x		../src/df.c

-# Note that dir depends on ls.c, since that's where it's --help text is.
+# Note that dir depends on ls.c, since that's where its --help text is.
 dir.1:		$(mandep)	$(srcdir)/dir.x		../src/ls.c

 dircolors.1:	$(mandep)	$(srcdir)/dircolors.x	../src/dircolors.c
-- 
1.7.12


>From 9533c7422f6bc2190faf9f1c32964254ed4011f2 Mon Sep 17 00:00:00 2001
Message-Id: <9533c7422f6bc2190faf9f1c32964254ed4011f2.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 16:13:35 +0200
Subject: [PATCH 13/22] build: rely on VPATH capabilities in man/Makefile

* man/Makefile.am: In all the 'foo.1' targets, no need to depend
explicitly on '$(srcdir)/foo.x': the '.x.1' suffix rule takes care
of that automatically.
---
 man/Makefile.am | 210 ++++++++++++++++++++++++++++----------------------------
 1 file changed, 105 insertions(+), 105 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index ff8b01e..3d6a963 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -36,113 +36,113 @@ EXTRA_DIST += \
 mandep = ../.version

 # Note that arch depends on uname.c
-arch.1:		$(mandep)	$(srcdir)/arch.x	../src/uname.c
-
-base64.1:	$(mandep)	$(srcdir)/base64.x	../src/base64.c
-basename.1:	$(mandep)	$(srcdir)/basename.x	../src/basename.c
-cat.1:		$(mandep)	$(srcdir)/cat.x		../src/cat.c
-chcon.1:	$(mandep)	$(srcdir)/chcon.x	../src/chcon.c
-chgrp.1:	$(mandep)	$(srcdir)/chgrp.x	../src/chgrp.c
-chmod.1:	$(mandep)	$(srcdir)/chmod.x	../src/chmod.c
-chown.1:	$(mandep)	$(srcdir)/chown.x	../src/chown.c
-chroot.1:	$(mandep)	$(srcdir)/chroot.x	../src/chroot.c
-cksum.1:	$(mandep)	$(srcdir)/cksum.x	../src/cksum.c
-comm.1:		$(mandep)	$(srcdir)/comm.x	../src/comm.c
-cp.1:		$(mandep)	$(srcdir)/cp.x		../src/cp.c
-csplit.1:	$(mandep)	$(srcdir)/csplit.x	../src/csplit.c
-cut.1:		$(mandep)	$(srcdir)/cut.x		../src/cut.c
-date.1:		$(mandep)	$(srcdir)/date.x	../src/date.c
-dd.1:		$(mandep)	$(srcdir)/dd.x		../src/dd.c
-df.1:		$(mandep)	$(srcdir)/df.x		../src/df.c
+arch.1:		$(mandep)	../src/uname.c
+
+base64.1:	$(mandep)	../src/base64.c
+basename.1:	$(mandep)	../src/basename.c
+cat.1:		$(mandep)	../src/cat.c
+chcon.1:	$(mandep)	../src/chcon.c
+chgrp.1:	$(mandep)	../src/chgrp.c
+chmod.1:	$(mandep)	../src/chmod.c
+chown.1:	$(mandep)	../src/chown.c
+chroot.1:	$(mandep)	../src/chroot.c
+cksum.1:	$(mandep)	../src/cksum.c
+comm.1:		$(mandep)	../src/comm.c
+cp.1:		$(mandep)	../src/cp.c
+csplit.1:	$(mandep)	../src/csplit.c
+cut.1:		$(mandep)	../src/cut.c
+date.1:		$(mandep)	../src/date.c
+dd.1:		$(mandep)	../src/dd.c
+df.1:		$(mandep)	../src/df.c

 # Note that dir depends on ls.c, since that's where its --help text is.
-dir.1:		$(mandep)	$(srcdir)/dir.x		../src/ls.c
-
-dircolors.1:	$(mandep)	$(srcdir)/dircolors.x	../src/dircolors.c
-dirname.1:	$(mandep)	$(srcdir)/dirname.x	../src/dirname.c
-du.1:		$(mandep)	$(srcdir)/du.x		../src/du.c
-echo.1:		$(mandep)	$(srcdir)/echo.x	../src/echo.c
-env.1:		$(mandep)	$(srcdir)/env.x		../src/env.c
-expand.1:	$(mandep)	$(srcdir)/expand.x	../src/expand.c
-expr.1:		$(mandep)	$(srcdir)/expr.x	../src/expr.c
-factor.1:	$(mandep)	$(srcdir)/factor.x	../src/factor.c
-false.1:	$(mandep)	$(srcdir)/false.x	../src/false.c
-fmt.1:		$(mandep)	$(srcdir)/fmt.x		../src/fmt.c
-fold.1:		$(mandep)	$(srcdir)/fold.x	../src/fold.c
-groups.1:	$(mandep)	$(srcdir)/groups.x	../src/groups.c
-head.1:		$(mandep)	$(srcdir)/head.x	../src/head.c
-hostid.1:	$(mandep)	$(srcdir)/hostid.x	../src/hostid.c
-hostname.1:	$(mandep)	$(srcdir)/hostname.x	../src/hostname.c
-id.1:		$(mandep)	$(srcdir)/id.x		../src/id.c
-install.1:	$(mandep)	$(srcdir)/install.x	../src/install.c
-join.1:		$(mandep)	$(srcdir)/join.x	../src/join.c
-kill.1:		$(mandep)	$(srcdir)/kill.x	../src/kill.c
-link.1:		$(mandep)	$(srcdir)/link.x	../src/link.c
-ln.1:		$(mandep)	$(srcdir)/ln.x		../src/ln.c
-logname.1:	$(mandep)	$(srcdir)/logname.x	../src/logname.c
-ls.1:		$(mandep)	$(srcdir)/ls.x		../src/ls.c
-md5sum.1:	$(mandep)	$(srcdir)/md5sum.x	../src/md5sum.c
-mkdir.1:	$(mandep)	$(srcdir)/mkdir.x	../src/mkdir.c
-mkfifo.1:	$(mandep)	$(srcdir)/mkfifo.x	../src/mkfifo.c
-mknod.1:	$(mandep)	$(srcdir)/mknod.x	../src/mknod.c
-mktemp.1:	$(mandep)	$(srcdir)/mktemp.x	../src/mktemp.c
-mv.1:		$(mandep)	$(srcdir)/mv.x		../src/mv.c
-nice.1:		$(mandep)	$(srcdir)/nice.x	../src/nice.c
-nl.1:		$(mandep)	$(srcdir)/nl.x		../src/nl.c
-nohup.1:	$(mandep)	$(srcdir)/nohup.x	../src/nohup.c
-nproc.1:	$(mandep)	$(srcdir)/nproc.x	../src/nproc.c
-od.1:		$(mandep)	$(srcdir)/od.x		../src/od.c
-paste.1:	$(mandep)	$(srcdir)/paste.x	../src/paste.c
-pathchk.1:	$(mandep)	$(srcdir)/pathchk.x	../src/pathchk.c
-pinky.1:	$(mandep)	$(srcdir)/pinky.x	../src/pinky.c
-pr.1:		$(mandep)	$(srcdir)/pr.x		../src/pr.c
-printenv.1:	$(mandep)	$(srcdir)/printenv.x	../src/printenv.c
-printf.1:	$(mandep)	$(srcdir)/printf.x	../src/printf.c
-ptx.1:		$(mandep)	$(srcdir)/ptx.x		../src/ptx.c
-pwd.1:		$(mandep)	$(srcdir)/pwd.x		../src/pwd.c
-readlink.1:	$(mandep)	$(srcdir)/readlink.x	../src/readlink.c
-realpath.1:	$(mandep)	$(srcdir)/realpath.x	../src/realpath.c
-rm.1:		$(mandep)	$(srcdir)/rm.x		../src/rm.c
-rmdir.1:	$(mandep)	$(srcdir)/rmdir.x	../src/rmdir.c
-runcon.1:	$(mandep)	$(srcdir)/runcon.x	../src/runcon.c
-seq.1:		$(mandep)	$(srcdir)/seq.x		../src/seq.c
-sha1sum.1:	$(mandep)	$(srcdir)/sha1sum.x	../src/md5sum.c
-sha224sum.1:	$(mandep)	$(srcdir)/sha224sum.x	../src/md5sum.c
-sha256sum.1:	$(mandep)	$(srcdir)/sha256sum.x	../src/md5sum.c
-sha384sum.1:	$(mandep)	$(srcdir)/sha384sum.x	../src/md5sum.c
-sha512sum.1:	$(mandep)	$(srcdir)/sha512sum.x	../src/md5sum.c
-shred.1:	$(mandep)	$(srcdir)/shred.x	../src/shred.c
-shuf.1:		$(mandep)	$(srcdir)/shuf.x	../src/shuf.c
-sleep.1:	$(mandep)	$(srcdir)/sleep.x	../src/sleep.c
-sort.1:		$(mandep)	$(srcdir)/sort.x	../src/sort.c
-split.1:	$(mandep)	$(srcdir)/split.x	../src/split.c
-stat.1:		$(mandep)	$(srcdir)/stat.x	../src/stat.c
-stdbuf.1:	$(mandep)	$(srcdir)/stdbuf.x	../src/stdbuf.c
-stty.1:		$(mandep)	$(srcdir)/stty.x	../src/stty.c
-sum.1:		$(mandep)	$(srcdir)/sum.x		../src/sum.c
-sync.1:		$(mandep)	$(srcdir)/sync.x	../src/sync.c
-tac.1:		$(mandep)	$(srcdir)/tac.x		../src/tac.c
-tail.1:		$(mandep)	$(srcdir)/tail.x	../src/tail.c
-tee.1:		$(mandep)	$(srcdir)/tee.x		../src/tee.c
-test.1:		$(mandep)	$(srcdir)/test.x	../src/test.c
-timeout.1:	$(mandep)	$(srcdir)/timeout.x	../src/timeout.c
-touch.1:	$(mandep)	$(srcdir)/touch.x	../src/touch.c
-tr.1:		$(mandep)	$(srcdir)/tr.x		../src/tr.c
-true.1:		$(mandep)	$(srcdir)/true.x	../src/true.c
-truncate.1:	$(mandep)	$(srcdir)/truncate.x	../src/truncate.c
-tsort.1:	$(mandep)	$(srcdir)/tsort.x	../src/tsort.c
-tty.1:		$(mandep)	$(srcdir)/tty.x		../src/tty.c
-uname.1:	$(mandep)	$(srcdir)/uname.x	../src/uname.c
-unexpand.1:	$(mandep)	$(srcdir)/unexpand.x	../src/unexpand.c
-uniq.1:		$(mandep)	$(srcdir)/uniq.x	../src/uniq.c
-unlink.1:	$(mandep)	$(srcdir)/unlink.x	../src/unlink.c
-uptime.1:	$(mandep)	$(srcdir)/uptime.x	../src/uptime.c
-users.1:	$(mandep)	$(srcdir)/users.x	../src/users.c
-vdir.1:		$(mandep)	$(srcdir)/vdir.x	../src/ls.c
-wc.1:		$(mandep)	$(srcdir)/wc.x		../src/wc.c
-who.1:		$(mandep)	$(srcdir)/who.x		../src/who.c
-whoami.1:	$(mandep)	$(srcdir)/whoami.x	../src/whoami.c
-yes.1:		$(mandep)	$(srcdir)/yes.x		../src/yes.c
+dir.1:		$(mandep)	../src/ls.c
+
+dircolors.1:	$(mandep)	../src/dircolors.c
+dirname.1:	$(mandep)	../src/dirname.c
+du.1:		$(mandep)	../src/du.c
+echo.1:		$(mandep)	../src/echo.c
+env.1:		$(mandep)	../src/env.c
+expand.1:	$(mandep)	../src/expand.c
+expr.1:		$(mandep)	../src/expr.c
+factor.1:	$(mandep)	../src/factor.c
+false.1:	$(mandep)	../src/false.c
+fmt.1:		$(mandep)	../src/fmt.c
+fold.1:		$(mandep)	../src/fold.c
+groups.1:	$(mandep)	../src/groups.c
+head.1:		$(mandep)	../src/head.c
+hostid.1:	$(mandep)	../src/hostid.c
+hostname.1:	$(mandep)	../src/hostname.c
+id.1:		$(mandep)	../src/id.c
+install.1:	$(mandep)	../src/install.c
+join.1:		$(mandep)	../src/join.c
+kill.1:		$(mandep)	../src/kill.c
+link.1:		$(mandep)	../src/link.c
+ln.1:		$(mandep)	../src/ln.c
+logname.1:	$(mandep)	../src/logname.c
+ls.1:		$(mandep)	../src/ls.c
+md5sum.1:	$(mandep)	../src/md5sum.c
+mkdir.1:	$(mandep)	../src/mkdir.c
+mkfifo.1:	$(mandep)	../src/mkfifo.c
+mknod.1:	$(mandep)	../src/mknod.c
+mktemp.1:	$(mandep)	../src/mktemp.c
+mv.1:		$(mandep)	../src/mv.c
+nice.1:		$(mandep)	../src/nice.c
+nl.1:		$(mandep)	../src/nl.c
+nohup.1:	$(mandep)	../src/nohup.c
+nproc.1:	$(mandep)	../src/nproc.c
+od.1:		$(mandep)	../src/od.c
+paste.1:	$(mandep)	../src/paste.c
+pathchk.1:	$(mandep)	../src/pathchk.c
+pinky.1:	$(mandep)	../src/pinky.c
+pr.1:		$(mandep)	../src/pr.c
+printenv.1:	$(mandep)	../src/printenv.c
+printf.1:	$(mandep)	../src/printf.c
+ptx.1:		$(mandep)	../src/ptx.c
+pwd.1:		$(mandep)	../src/pwd.c
+readlink.1:	$(mandep)	../src/readlink.c
+realpath.1:	$(mandep)	../src/realpath.c
+rm.1:		$(mandep)	../src/rm.c
+rmdir.1:	$(mandep)	../src/rmdir.c
+runcon.1:	$(mandep)	../src/runcon.c
+seq.1:		$(mandep)	../src/seq.c
+sha1sum.1:	$(mandep)	../src/md5sum.c
+sha224sum.1:	$(mandep)	../src/md5sum.c
+sha256sum.1:	$(mandep)	../src/md5sum.c
+sha384sum.1:	$(mandep)	../src/md5sum.c
+sha512sum.1:	$(mandep)	../src/md5sum.c
+shred.1:	$(mandep)	../src/shred.c
+shuf.1:		$(mandep)	../src/shuf.c
+sleep.1:	$(mandep)	../src/sleep.c
+sort.1:		$(mandep)	../src/sort.c
+split.1:	$(mandep)	../src/split.c
+stat.1:		$(mandep)	../src/stat.c
+stdbuf.1:	$(mandep)	../src/stdbuf.c
+stty.1:		$(mandep)	../src/stty.c
+sum.1:		$(mandep)	../src/sum.c
+sync.1:		$(mandep)	../src/sync.c
+tac.1:		$(mandep)	../src/tac.c
+tail.1:		$(mandep)	../src/tail.c
+tee.1:		$(mandep)	../src/tee.c
+test.1:		$(mandep)	../src/test.c
+timeout.1:	$(mandep)	../src/timeout.c
+touch.1:	$(mandep)	../src/touch.c
+tr.1:		$(mandep)	../src/tr.c
+true.1:		$(mandep)	../src/true.c
+truncate.1:	$(mandep)	../src/truncate.c
+tsort.1:	$(mandep)	../src/tsort.c
+tty.1:		$(mandep)	../src/tty.c
+uname.1:	$(mandep)	../src/uname.c
+unexpand.1:	$(mandep)	../src/unexpand.c
+uniq.1:		$(mandep)	../src/uniq.c
+unlink.1:	$(mandep)	../src/unlink.c
+uptime.1:	$(mandep)	../src/uptime.c
+users.1:	$(mandep)	../src/users.c
+vdir.1:		$(mandep)	../src/ls.c
+wc.1:		$(mandep)	../src/wc.c
+who.1:		$(mandep)	../src/who.c
+whoami.1:	$(mandep)	../src/whoami.c
+yes.1:		$(mandep)	../src/yes.c

 # This is required so that changes to e.g., emit_bug_reporting_address
 # provoke regeneration of all $(MAN) files.
-- 
1.7.12


>From 5dfdba7e3397793dd631755055df0c6e99753c54 Mon Sep 17 00:00:00 2001
Message-Id: <5dfdba7e3397793dd631755055df0c6e99753c54.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 16:22:38 +0200
Subject: [PATCH 14/22] build: make some rule less dependent on exact source
 tree layout

This is mostly a preparatory change in view of future ones.

* man/Makefile.am (.x.1): Use '$(abs_top_builddir)/src' to access the
'src' directory in the coreutils build tree.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 3d6a963..ff1c1ab 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -168,7 +168,7 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
 	    && {						\
 		 rm -rf $t;					\
 		 mkdir $t;					\
-		 (cd $t && $(LN_S) ../../src/$(mapped_name) $*); \
+		 (cd $t && $(LN_S) $(abs_top_builddir)/src/$(mapped_name) $*); \
 		    $(PERL) -- $(srcdir)/help2man		\
 		     --source='$(PACKAGE_STRING)'		\
 		     --include=$(srcdir)/$*.x			\
-- 
1.7.12


>From 0d7f263a4dfdbf199722be9b57e7d9efff56b8e1 Mon Sep 17 00:00:00 2001
Message-Id: <0d7f263a4dfdbf199722be9b57e7d9efff56b8e1.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 16:57:41 +0200
Subject: [PATCH 15/22] build: convenience target 'all_programs' at top-level

This will be mostly useful in future changes.

* Makefile.am (all_programs): New, simply the work delegating to
the same-named target in the 'src/' subdirectory.
* cfg.mk (sc_option_desc_uppercase): Take advantage of it.
(sc_man_file_correlation): Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 Makefile.am | 4 ++++
 cfg.mk      | 6 ++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 0446e43..f80c4a6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -170,4 +170,8 @@ check-git-hook-script-sync:
 	rm -rf $$t;							\
 	test $$fail = 0

+.PHONY: all_programs
+all_programs:
+	@cd ./src && $(MAKE) -s $@
+
 include $(top_srcdir)/doc/local.mk
diff --git a/cfg.mk b/cfg.mk
index 9244225..e6e0828 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -171,14 +171,12 @@ sc_long_lines:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
 # but that would miss descriptions not on the same line as the -option.
 ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
-sc_option_desc_uppercase:
-	@$(MAKE) -s -C src all_programs
+sc_option_desc_uppercase: all_programs
 	@$(MAKE) -s -C man $@

 # Ensure all man/*.[1x] files are present
 ALL_RECURSIVE_TARGETS += sc_man_file_correlation
-sc_man_file_correlation:
-	@$(MAKE) -s -C src all_programs
+sc_man_file_correlation: all_programs
 	@$(MAKE) -s -C man $@

 # Ensure that the end of each release's section is marked by two empty lines.
-- 
1.7.12


>From 2df00b536c5f71921760e85ab1a5d86df60da064 Mon Sep 17 00:00:00 2001
Message-Id: <2df00b536c5f71921760e85ab1a5d86df60da064.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 21:31:57 +0200
Subject: [PATCH 16/22] build: rework some recipes in man/Makefile.am, for
 future changes

This change is merely required to make future changes easier.

In particular, since we are going to merge the contents of
'man/Makefile.am' in the top-level Makefile, we need to avoid
conflicts with the rules and variables in 'dist-check.mk', and
to prepare for changes in the value of the '$*' variable in the
recipe of the '.x -> .1' suffix rule.

* man/Makefile.am (t, mapped_name): Delete, inlining their use ...
(.1.x): ... in the recipe of this suffix rule.  Other adjustments
to prepare to changes in the value of the '$*' automatic variable.
While at it, made more resilient about unlikely but possible failure.
Adjust and reorder few comments.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/Makefile.am | 54 +++++++++++++++++++++++++++---------------------------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index ff1c1ab..f7db996 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -148,38 +148,38 @@ yes.1:		$(mandep)	../src/yes.c
 # provoke regeneration of all $(MAN) files.
 $(MAN): $(top_srcdir)/src/system.h

-# Ensure that help2man runs the ../src/ginstall binary as
-# 'install' when creating install.1.
-# Similarly, ensure that it uses the ../src/[ binary to create test.1.
-t = $*.td
-mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
-
-# Note the use of $t/$*, rather than just '$*' as in other packages.
-# That is necessary to avoid failures for programs that are also shell built-in
-# functions like echo, false, printf, pwd.
 .x.1:
 	$(AM_V_GEN)case '$(PERL)' in				\
 	  *"/missing "*)					\
 	    echo 'WARNING: cannot update man page $@ since perl is missing' \
 	      'or inadequate' 1>&2				\
-	    ;;							\
-	  *)							\
-	    rm -f $@ $@-t					\
-	    && {						\
-		 rm -rf $t;					\
-		 mkdir $t;					\
-		 (cd $t && $(LN_S) $(abs_top_builddir)/src/$(mapped_name) $*); \
-		    $(PERL) -- $(srcdir)/help2man		\
-		     --source='$(PACKAGE_STRING)'		\
-		     --include=$(srcdir)/$*.x			\
-		     --output=$t/$@ $t/$*;			\
-	       }						\
-	    && sed 's|$*\.td/||g' $t/$@ > $@-t			\
-	    && rm -rf $t					\
-	    && chmod -w $@-t					\
-	    && mv $@-t $@					\
-	    ;;							\
-	esac
+	    exit 0;;						\
+	esac; \
+	name=`echo $@ | sed -e 's|.*/||' -e 's|\.1$$||'` || exit 1;	\
+## Ensure that help2man runs the 'src/ginstall' binary as 'install' when
+## creating 'install.1'.  Similarly, ensure that it uses the 'src/[' binary
+## to create 'test.1'.
+	case $$name in							\
+	  install) prog='ginstall';;					\
+	     test) prog='[';;						\
+	        *) prog=$$name;;					\
+	esac;								\
+## Note the use of $$t/$*, rather than just '$*' as in other packages.
+## That is necessary to avoid failures for programs that are also shell
+## built-in functions like echo, false, printf, pwd.
+	rm -f $@ $@-t							\
+	  && t=$*.td							\
+	  && rm -rf $$t							\
+	  && mkdir $$t							\
+	  && (cd $$t && $(LN_S) $(abs_top_builddir)/src/$$prog $$name)	\
+	  && $(PERL) -- $(srcdir)/help2man				\
+		     --source='$(PACKAGE_STRING)'			\
+		     --include=$(srcdir)/$$name.x			\
+		     --output=$$t/$$name.1 $$t/$$name			\
+	  && sed 's|$*\.td/||g' $$t/$$name.1 > $@-t			\
+	  && rm -rf $$t							\
+	  && chmod -w $@-t						\
+	  && mv $@-t $@

 # Option descriptions should not start with a capital letter
 .PHONY: sc_option_desc_uppercase
-- 
1.7.12


>From 45e09141b0e22ea41e7a2e06ae3529c4a4fca849 Mon Sep 17 00:00:00 2001
Message-Id: <45e09141b0e22ea41e7a2e06ae3529c4a4fca849.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 16:37:24 +0200
Subject: [PATCH 17/22] build: don't use recursive make to build the 'man'
 subdirectory

* Makefile.am: Include 'man/local.mk'.
(SUBDIRS): Remove 'man'.
* configure.ac ($MAN): Adjust to have a leading 'man/' component.
(AC_CONFIG_FILES): Remove 'man/Makefile'.
* man/Makefile.am: Rename ...
* man/local.mk: ... like this.  With further adjustments: each 'foo.1'
target renamed like 'man/foo.1', each '../src/foo.c' dependency as
'src/foo.c', and each '$(srcdir)' usage as '$(srcdir)/man'.  Also ...
(mandep): Adjust, removing the leading '../' component.
Several whitespace adjustments wile at it.
(ASSORT): Remove, it's already defined in the top-level Makefile.am.
* cfg.mk (sc_option_desc_uppercase, sc_man_file_correlation): Remove
the associated recipes, they are now directly available from the
included 'man/local.mk'.  Actually, the other changes in this commit
have made these recipes instable and not completely correct, bu that
will be fixed in later changes.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 Makefile.am                   |   3 +-
 cfg.mk                        |   2 -
 configure.ac                  |   3 +-
 man/{Makefile.am => local.mk} | 243 +++++++++++++++++++++---------------------
 4 files changed, 123 insertions(+), 128 deletions(-)
 rename man/{Makefile.am => local.mk} (43%)

diff --git a/Makefile.am b/Makefile.am
index f80c4a6..d14bf88 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@

 ALL_RECURSIVE_TARGETS =

-SUBDIRS = lib src man po tests gnulib-tests
+SUBDIRS = lib src po tests gnulib-tests

 changelog_etc =				\
   ChangeLog-2005			\
@@ -175,3 +175,4 @@ all_programs:
 	@cd ./src && $(MAKE) -s $@

 include $(top_srcdir)/doc/local.mk
+include $(top_srcdir)/man/local.mk
diff --git a/cfg.mk b/cfg.mk
index e6e0828..5f7193e 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -172,12 +172,10 @@ sc_long_lines:
 # but that would miss descriptions not on the same line as the -option.
 ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
 sc_option_desc_uppercase: all_programs
-	@$(MAKE) -s -C man $@

 # Ensure all man/*.[1x] files are present
 ALL_RECURSIVE_TARGETS += sc_man_file_correlation
 sc_man_file_correlation: all_programs
-	@$(MAKE) -s -C man $@

 # Ensure that the end of each release's section is marked by two empty lines.
 sc_NEWS_two_empty_lines:
diff --git a/configure.ac b/configure.ac
index bc7520d..ce8ebc9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -465,7 +465,7 @@ MAN=`
     dnl Use the autoconf-provided quadrigraph to represent "[",
     dnl otherwise we will incur in dreadful quoting issues.
     test x$p = x'@<:@' && continue
-    echo "$p.1"
+    echo "man/$p.1"
   done`
 # Normalize whitespace.
 MAN=`echo $MAN`
@@ -496,7 +496,6 @@ gt_LOCALE_FR
 AC_CONFIG_FILES(
   Makefile
   lib/Makefile
-  man/Makefile
   po/Makefile.in
   src/Makefile
   tests/Makefile
diff --git a/man/Makefile.am b/man/local.mk
similarity index 43%
rename from man/Makefile.am
rename to man/local.mk
index f7db996..7ce4bff 100644
--- a/man/Makefile.am
+++ b/man/local.mk
@@ -1,4 +1,5 @@
 # Make coreutils man pages.				-*-Makefile-*-
+# This is included by the top-level Makefile.am.

 # Copyright (C) 2002-2012 Free Software Foundation, Inc.

@@ -19,130 +20,130 @@ dist_man1_MANS = $(MAN)

 man_aux = $(dist_man1_MANS:.1=.x)

-EXTRA_DIST = $(man_aux) help2man
-MAINTAINERCLEANFILES = $(dist_man1_MANS)
+EXTRA_DIST += $(man_aux) man/help2man
+MAINTAINERCLEANFILES += $(dist_man1_MANS)

-# The "$(VAR:%=%.x)" idiom is not portable according to POSIX, but in
+# The "$(VAR:%=dir/%.x)" idiom is not portable according to POSIX, but in
 # practice it works with several make implementation (GNU, BSD, CCS make
 # from Solaris 10, Sun distributed make).  In addition, since only
 # maintainers are expected to build release tarballs (and they should
 # use GNU make when doing so), it's not big deal if this won't work with
 # some dumber make implementation.
 EXTRA_DIST += \
-  $(NO_INSTALL_PROGS_DEFAULT:%=%.x) \
-  $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
+  $(NO_INSTALL_PROGS_DEFAULT:%=dir/%.x) \
+  $(NO_INSTALL_PROGS_DEFAULT:%=dir/%.1)

-# Depend on ../.version to get version number changes.
-mandep = ../.version
+# Depend on this to get version number changes.
+mandep = .version

 # Note that arch depends on uname.c
-arch.1:		$(mandep)	../src/uname.c
-
-base64.1:	$(mandep)	../src/base64.c
-basename.1:	$(mandep)	../src/basename.c
-cat.1:		$(mandep)	../src/cat.c
-chcon.1:	$(mandep)	../src/chcon.c
-chgrp.1:	$(mandep)	../src/chgrp.c
-chmod.1:	$(mandep)	../src/chmod.c
-chown.1:	$(mandep)	../src/chown.c
-chroot.1:	$(mandep)	../src/chroot.c
-cksum.1:	$(mandep)	../src/cksum.c
-comm.1:		$(mandep)	../src/comm.c
-cp.1:		$(mandep)	../src/cp.c
-csplit.1:	$(mandep)	../src/csplit.c
-cut.1:		$(mandep)	../src/cut.c
-date.1:		$(mandep)	../src/date.c
-dd.1:		$(mandep)	../src/dd.c
-df.1:		$(mandep)	../src/df.c
+man/arch.1:      $(mandep)  src/uname.c
+
+man/base64.1:    $(mandep)  src/base64.c
+man/basename.1:  $(mandep)  src/basename.c
+man/cat.1:       $(mandep)  src/cat.c
+man/chcon.1:     $(mandep)  src/chcon.c
+man/chgrp.1:     $(mandep)  src/chgrp.c
+man/chmod.1:     $(mandep)  src/chmod.c
+man/chown.1:     $(mandep)  src/chown.c
+man/chroot.1:    $(mandep)  src/chroot.c
+man/cksum.1:     $(mandep)  src/cksum.c
+man/comm.1:      $(mandep)  src/comm.c
+man/cp.1:        $(mandep)  src/cp.c
+man/csplit.1:    $(mandep)  src/csplit.c
+man/cut.1:       $(mandep)  src/cut.c
+man/date.1:      $(mandep)  src/date.c
+man/dd.1:        $(mandep)  src/dd.c
+man/df.1:        $(mandep)  src/df.c

 # Note that dir depends on ls.c, since that's where its --help text is.
-dir.1:		$(mandep)	../src/ls.c
-
-dircolors.1:	$(mandep)	../src/dircolors.c
-dirname.1:	$(mandep)	../src/dirname.c
-du.1:		$(mandep)	../src/du.c
-echo.1:		$(mandep)	../src/echo.c
-env.1:		$(mandep)	../src/env.c
-expand.1:	$(mandep)	../src/expand.c
-expr.1:		$(mandep)	../src/expr.c
-factor.1:	$(mandep)	../src/factor.c
-false.1:	$(mandep)	../src/false.c
-fmt.1:		$(mandep)	../src/fmt.c
-fold.1:		$(mandep)	../src/fold.c
-groups.1:	$(mandep)	../src/groups.c
-head.1:		$(mandep)	../src/head.c
-hostid.1:	$(mandep)	../src/hostid.c
-hostname.1:	$(mandep)	../src/hostname.c
-id.1:		$(mandep)	../src/id.c
-install.1:	$(mandep)	../src/install.c
-join.1:		$(mandep)	../src/join.c
-kill.1:		$(mandep)	../src/kill.c
-link.1:		$(mandep)	../src/link.c
-ln.1:		$(mandep)	../src/ln.c
-logname.1:	$(mandep)	../src/logname.c
-ls.1:		$(mandep)	../src/ls.c
-md5sum.1:	$(mandep)	../src/md5sum.c
-mkdir.1:	$(mandep)	../src/mkdir.c
-mkfifo.1:	$(mandep)	../src/mkfifo.c
-mknod.1:	$(mandep)	../src/mknod.c
-mktemp.1:	$(mandep)	../src/mktemp.c
-mv.1:		$(mandep)	../src/mv.c
-nice.1:		$(mandep)	../src/nice.c
-nl.1:		$(mandep)	../src/nl.c
-nohup.1:	$(mandep)	../src/nohup.c
-nproc.1:	$(mandep)	../src/nproc.c
-od.1:		$(mandep)	../src/od.c
-paste.1:	$(mandep)	../src/paste.c
-pathchk.1:	$(mandep)	../src/pathchk.c
-pinky.1:	$(mandep)	../src/pinky.c
-pr.1:		$(mandep)	../src/pr.c
-printenv.1:	$(mandep)	../src/printenv.c
-printf.1:	$(mandep)	../src/printf.c
-ptx.1:		$(mandep)	../src/ptx.c
-pwd.1:		$(mandep)	../src/pwd.c
-readlink.1:	$(mandep)	../src/readlink.c
-realpath.1:	$(mandep)	../src/realpath.c
-rm.1:		$(mandep)	../src/rm.c
-rmdir.1:	$(mandep)	../src/rmdir.c
-runcon.1:	$(mandep)	../src/runcon.c
-seq.1:		$(mandep)	../src/seq.c
-sha1sum.1:	$(mandep)	../src/md5sum.c
-sha224sum.1:	$(mandep)	../src/md5sum.c
-sha256sum.1:	$(mandep)	../src/md5sum.c
-sha384sum.1:	$(mandep)	../src/md5sum.c
-sha512sum.1:	$(mandep)	../src/md5sum.c
-shred.1:	$(mandep)	../src/shred.c
-shuf.1:		$(mandep)	../src/shuf.c
-sleep.1:	$(mandep)	../src/sleep.c
-sort.1:		$(mandep)	../src/sort.c
-split.1:	$(mandep)	../src/split.c
-stat.1:		$(mandep)	../src/stat.c
-stdbuf.1:	$(mandep)	../src/stdbuf.c
-stty.1:		$(mandep)	../src/stty.c
-sum.1:		$(mandep)	../src/sum.c
-sync.1:		$(mandep)	../src/sync.c
-tac.1:		$(mandep)	../src/tac.c
-tail.1:		$(mandep)	../src/tail.c
-tee.1:		$(mandep)	../src/tee.c
-test.1:		$(mandep)	../src/test.c
-timeout.1:	$(mandep)	../src/timeout.c
-touch.1:	$(mandep)	../src/touch.c
-tr.1:		$(mandep)	../src/tr.c
-true.1:		$(mandep)	../src/true.c
-truncate.1:	$(mandep)	../src/truncate.c
-tsort.1:	$(mandep)	../src/tsort.c
-tty.1:		$(mandep)	../src/tty.c
-uname.1:	$(mandep)	../src/uname.c
-unexpand.1:	$(mandep)	../src/unexpand.c
-uniq.1:		$(mandep)	../src/uniq.c
-unlink.1:	$(mandep)	../src/unlink.c
-uptime.1:	$(mandep)	../src/uptime.c
-users.1:	$(mandep)	../src/users.c
-vdir.1:		$(mandep)	../src/ls.c
-wc.1:		$(mandep)	../src/wc.c
-who.1:		$(mandep)	../src/who.c
-whoami.1:	$(mandep)	../src/whoami.c
-yes.1:		$(mandep)	../src/yes.c
+man/dir.1:       $(mandep)  src/ls.c
+
+man/dircolors.1: $(mandep)  src/dircolors.c
+man/dirname.1:   $(mandep)  src/dirname.c
+man/du.1:        $(mandep)  src/du.c
+man/echo.1:      $(mandep)  src/echo.c
+man/env.1:       $(mandep)  src/env.c
+man/expand.1:    $(mandep)  src/expand.c
+man/expr.1:      $(mandep)  src/expr.c
+man/factor.1:    $(mandep)  src/factor.c
+man/false.1:     $(mandep)  src/false.c
+man/fmt.1:       $(mandep)  src/fmt.c
+man/fold.1:      $(mandep)  src/fold.c
+man/groups.1:    $(mandep)  src/groups.c
+man/head.1:      $(mandep)  src/head.c
+man/hostid.1:    $(mandep)  src/hostid.c
+man/hostname.1:  $(mandep)  src/hostname.c
+man/id.1:        $(mandep)  src/id.c
+man/install.1:   $(mandep)  src/install.c
+man/join.1:      $(mandep)  src/join.c
+man/kill.1:      $(mandep)  src/kill.c
+man/link.1:      $(mandep)  src/link.c
+man/ln.1:        $(mandep)  src/ln.c
+man/logname.1:   $(mandep)  src/logname.c
+man/ls.1:        $(mandep)  src/ls.c
+man/md5sum.1:    $(mandep)  src/md5sum.c
+man/mkdir.1:     $(mandep)  src/mkdir.c
+man/mkfifo.1:    $(mandep)  src/mkfifo.c
+man/mknod.1:     $(mandep)  src/mknod.c
+man/mktemp.1:    $(mandep)  src/mktemp.c
+man/mv.1:        $(mandep)  src/mv.c
+man/nice.1:      $(mandep)  src/nice.c
+man/nl.1:        $(mandep)  src/nl.c
+man/nohup.1:     $(mandep)  src/nohup.c
+man/nproc.1:     $(mandep)  src/nproc.c
+man/od.1:        $(mandep)  src/od.c
+man/paste.1:     $(mandep)  src/paste.c
+man/pathchk.1:   $(mandep)  src/pathchk.c
+man/pinky.1:     $(mandep)  src/pinky.c
+man/pr.1:        $(mandep)  src/pr.c
+man/printenv.1:  $(mandep)  src/printenv.c
+man/printf.1:    $(mandep)  src/printf.c
+man/ptx.1:       $(mandep)  src/ptx.c
+man/pwd.1:       $(mandep)  src/pwd.c
+man/readlink.1:  $(mandep)  src/readlink.c
+man/realpath.1:  $(mandep)  src/realpath.c
+man/rm.1:        $(mandep)  src/rm.c
+man/rmdir.1:     $(mandep)  src/rmdir.c
+man/runcon.1:    $(mandep)  src/runcon.c
+man/seq.1:       $(mandep)  src/seq.c
+man/sha1sum.1:   $(mandep)  src/md5sum.c
+man/sha224sum.1: $(mandep)  src/md5sum.c
+man/sha256sum.1: $(mandep)  src/md5sum.c
+man/sha384sum.1: $(mandep)  src/md5sum.c
+man/sha512sum.1: $(mandep)  src/md5sum.c
+man/shred.1:     $(mandep)  src/shred.c
+man/shuf.1:      $(mandep)  src/shuf.c
+man/sleep.1:     $(mandep)  src/sleep.c
+man/sort.1:      $(mandep)  src/sort.c
+man/split.1:     $(mandep)  src/split.c
+man/stat.1:      $(mandep)  src/stat.c
+man/stdbuf.1:    $(mandep)  src/stdbuf.c
+man/stty.1:      $(mandep)  src/stty.c
+man/sum.1:       $(mandep)  src/sum.c
+man/sync.1:      $(mandep)  src/sync.c
+man/tac.1:       $(mandep)  src/tac.c
+man/tail.1:      $(mandep)  src/tail.c
+man/tee.1:       $(mandep)  src/tee.c
+man/test.1:      $(mandep)  src/test.c
+man/timeout.1:   $(mandep)  src/timeout.c
+man/touch.1:     $(mandep)  src/touch.c
+man/tr.1:        $(mandep)  src/tr.c
+man/true.1:      $(mandep)  src/true.c
+man/truncate.1:  $(mandep)  src/truncate.c
+man/tsort.1:     $(mandep)  src/tsort.c
+man/tty.1:       $(mandep)  src/tty.c
+man/uname.1:     $(mandep)  src/uname.c
+man/unexpand.1:  $(mandep)  src/unexpand.c
+man/uniq.1:      $(mandep)  src/uniq.c
+man/unlink.1:    $(mandep)  src/unlink.c
+man/uptime.1:    $(mandep)  src/uptime.c
+man/users.1:     $(mandep)  src/users.c
+man/vdir.1:      $(mandep)  src/ls.c
+man/wc.1:        $(mandep)  src/wc.c
+man/who.1:       $(mandep)  src/who.c
+man/whoami.1:    $(mandep)  src/whoami.c
+man/yes.1:       $(mandep)  src/yes.c

 # This is required so that changes to e.g., emit_bug_reporting_address
 # provoke regeneration of all $(MAN) files.
@@ -172,9 +173,9 @@ $(MAN): $(top_srcdir)/src/system.h
 	  && rm -rf $$t							\
 	  && mkdir $$t							\
 	  && (cd $$t && $(LN_S) $(abs_top_builddir)/src/$$prog $$name)	\
-	  && $(PERL) -- $(srcdir)/help2man				\
+	  && $(PERL) -- $(srcdir)/man/help2man				\
 		     --source='$(PACKAGE_STRING)'			\
-		     --include=$(srcdir)/$$name.x			\
+		     --include=$(srcdir)/man/$$name.x			\
 		     --output=$$t/$$name.1 $$t/$$name			\
 	  && sed 's|$*\.td/||g' $$t/$$name.1 > $@-t			\
 	  && rm -rf $$t							\
@@ -191,27 +192,23 @@ sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
 .PHONY: sc_man_file_correlation
 sc_man_file_correlation: check-x-vs-1 check-programs-vs-x

-# Sort in traditional ASCII order, regardless of the current locale;
-# otherwise we may get into trouble with distinct strings that the
-# current locale considers to be equal.
-ASSORT = LC_ALL=C sort
-
 # Ensure that for each .x file in this directory, there is a
 # corresponding .1 file in the definition of $(dist_man1_MANS) above.
 # But since that expansion usually lacks programs like arch and hostname,
 # add them here manually.
 .PHONY: check-x-vs-1
 check-x-vs-1:
-	@PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH;		\
+	@PATH=./src$(PATH_SEPARATOR)$$PATH; export PATH;		\
 	t=$@-t;								\
-	(cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
+	(cd $(srcdir)/man && ls -1 *.x)					\
+	  | sed 's/\.x$$//' | $(ASSORT) > $$t;				\
 	(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT)		\
 	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
 	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
 	rm $$t

 all_programs =								\
-      (cd ../src && MAKEFLAGS= $(MAKE) -s all_programs.list)		\
+      (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list)		\
        | grep -v '\['

 .PHONY: check-programs-vs-x
@@ -220,7 +217,7 @@ check-programs-vs-x:
 	for p in dummy `$(all_programs)`; do		\
 	  test $$p = dummy && continue;			\
 	  test $$p = ginstall && p=install || : ;	\
-	  test -f $(srcdir)/$$p.x			\
+	  test -f $(srcdir)/man/$$p.x			\
 	    || { echo missing $$p.x 1>&2; status=1; };	\
 	done;						\
 	exit $$status
-- 
1.7.12


>From 5f7f9838e24b2f19e8e79d98331c9ec5f5e70cc2 Mon Sep 17 00:00:00 2001
Message-Id: <5f7f9838e24b2f19e8e79d98331c9ec5f5e70cc2.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 17:37:35 +0200
Subject: [PATCH 18/22] maint: move man-related syntax checks in cfg.mk

This is more natural, now that the top-level Makefile has access to
all the variables and rules once defined only in 'man/Makefile.am'
(that was before the previous commit).

* man/local.mk (all_programs, sc_option_desc_uppercase,
sc_man_file_correlation check-x-vs-1, check-programs-vs-x): Move
from here ...
* cfg.mk: ... to here.  Adjust some comments in the process.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 cfg.mk       | 50 +++++++++++++++++++++++++++++++++++++++++++++-----
 man/local.mk | 40 ----------------------------------------
 2 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 5f7193e..9da6afa 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -166,16 +166,56 @@ sc_long_lines:
 	  sed -e "s|^|$$file:|" -e '$(FILTER_LONG_LINES)';		\
 	done | grep . && { msg="$$halt" $(_sc_say_and_exit) } || :

-# Option descriptions should not start with a capital letter
+# Option descriptions should not start with a capital letter.
 # One could grep source directly as follows:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
 # but that would miss descriptions not on the same line as the -option.
 ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
-sc_option_desc_uppercase: all_programs
-
-# Ensure all man/*.[1x] files are present
+.PHONY: sc_option_desc_uppercase
+sc_option_desc_uppercase:
+	@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
+	    { echo 1>&2 '$@: found initial capitals in --help';   \
+	      exit 1; } || :;
+sc_option_desc_uppercase: $(dist_man1_MANS) \
+                          $(NO_INSTALL_PROGS_DEFAULT:%=%.1) \
+                          all_programs
+
+# Ensure all man/*.[1x] files are present.
 ALL_RECURSIVE_TARGETS += sc_man_file_correlation
-sc_man_file_correlation: all_programs
+.PHONY: sc_man_file_correlation
+sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
+
+# Ensure that for each .x file in the 'man/' subdirectory, there is a
+# corresponding .1 file in the definition of $(dist_man1_MANS).
+# But since that expansion usually lacks programs like arch and hostname,
+# add them here manually.
+.PHONY: check-x-vs-1
+check-x-vs-1:
+	@PATH=./src$(PATH_SEPARATOR)$$PATH; export PATH;		\
+	t=$@-t;								\
+	(cd $(srcdir)/man && ls -1 *.x)					\
+	  | sed 's/\.x$$//' | $(ASSORT) > $$t;				\
+	(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT)		\
+	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
+	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
+	rm $$t
+
+all_programs =								\
+      (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list)		\
+       | grep -v '\['
+
+# Ensure that for each .x file in the 'man/' subdirectory, there is a
+# corresponding coreutils program.
+.PHONY: check-programs-vs-x
+check-programs-vs-x: all_programs
+	@status=0;					\
+	for p in dummy `$(all_programs)`; do		\
+	  test $$p = dummy && continue;			\
+	  test $$p = ginstall && p=install || : ;	\
+	  test -f $(srcdir)/man/$$p.x			\
+	    || { echo missing $$p.x 1>&2; status=1; };	\
+	done;						\
+	exit $$status

 # Ensure that the end of each release's section is marked by two empty lines.
 sc_NEWS_two_empty_lines:
diff --git a/man/local.mk b/man/local.mk
index 7ce4bff..25385eb 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -181,43 +181,3 @@ $(MAN): $(top_srcdir)/src/system.h
 	  && rm -rf $$t							\
 	  && chmod -w $@-t						\
 	  && mv $@-t $@
-
-# Option descriptions should not start with a capital letter
-.PHONY: sc_option_desc_uppercase
-sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
-	@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
-	    { echo 1>&2 '$@: found initial capitals in --help';   \
-	      exit 1; } || :;
-
-.PHONY: sc_man_file_correlation
-sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
-
-# Ensure that for each .x file in this directory, there is a
-# corresponding .1 file in the definition of $(dist_man1_MANS) above.
-# But since that expansion usually lacks programs like arch and hostname,
-# add them here manually.
-.PHONY: check-x-vs-1
-check-x-vs-1:
-	@PATH=./src$(PATH_SEPARATOR)$$PATH; export PATH;		\
-	t=$@-t;								\
-	(cd $(srcdir)/man && ls -1 *.x)					\
-	  | sed 's/\.x$$//' | $(ASSORT) > $$t;				\
-	(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT)		\
-	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
-	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
-	rm $$t
-
-all_programs =								\
-      (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list)		\
-       | grep -v '\['
-
-.PHONY: check-programs-vs-x
-check-programs-vs-x:
-	@status=0;					\
-	for p in dummy `$(all_programs)`; do		\
-	  test $$p = dummy && continue;			\
-	  test $$p = ginstall && p=install || : ;	\
-	  test -f $(srcdir)/man/$$p.x			\
-	    || { echo missing $$p.x 1>&2; status=1; };	\
-	done;						\
-	exit $$status
-- 
1.7.12


>From b3a20e739b92bf0d7b5e768cd8b187402e80af22 Mon Sep 17 00:00:00 2001
Message-Id: <b3a20e739b92bf0d7b5e768cd8b187402e80af22.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 17:50:34 +0200
Subject: [PATCH 19/22] maint: adjust syntax check 'check-x-vs-1'

* cfg.mk (check-x-vs-1): Here, by stripping 'man/' prefix from
$(dist_man1_MANS) entries before comparing them with the list of
expected programs.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 cfg.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cfg.mk b/cfg.mk
index 9da6afa..5b0f1fc 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -195,7 +195,8 @@ check-x-vs-1:
 	t=$@-t;								\
 	(cd $(srcdir)/man && ls -1 *.x)					\
 	  | sed 's/\.x$$//' | $(ASSORT) > $$t;				\
-	(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT)		\
+	(echo $(patsubst man/%,%,$(dist_man1_MANS))			\
+	      $(NO_INSTALL_PROGS_DEFAULT)				\
 	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
 	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
 	rm $$t
-- 
1.7.12


>From cc3cadaa57b16db416aac1e4eeef7697ae522a6a Mon Sep 17 00:00:00 2001
Message-Id: <cc3cadaa57b16db416aac1e4eeef7697ae522a6a.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 17:57:45 +0200
Subject: [PATCH 20/22] maint: adjust syntax check 'sc_option_desc_uppercase'

* cfg.mk (sc_option_desc_uppercase): Here, by grafting the 'man/'
prefix to the manpages obtained from the $(NO_INSTALL_PROGS_DEFAULT)
and listed as prerequisites for this rule.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 cfg.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cfg.mk b/cfg.mk
index 5b0f1fc..50fb13e 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -177,7 +177,7 @@ sc_option_desc_uppercase:
 	    { echo 1>&2 '$@: found initial capitals in --help';   \
 	      exit 1; } || :;
 sc_option_desc_uppercase: $(dist_man1_MANS) \
-                          $(NO_INSTALL_PROGS_DEFAULT:%=%.1) \
+                          $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT)) \
                           all_programs

 # Ensure all man/*.[1x] files are present.
-- 
1.7.12


>From 245b9c094b72a9fc5b3e2b3fd98bb8be5649a93b Mon Sep 17 00:00:00 2001
Message-Id: <245b9c094b72a9fc5b3e2b3fd98bb8be5649a93b.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 17:59:48 +0200
Subject: [PATCH 21/22] build: remove redundant indirection with variable
 '$(doc_srcdir)'

It's clearer and better to just inline the '$(srcdir)/doc' expansion.

* doc/local.mk (doc_srcdir): Delete.
All usages adjusted.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 doc/local.mk | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/doc/local.mk b/doc/local.mk
index 665dd21..190db85 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -24,8 +24,6 @@ doc_coreutils_TEXINFOS = \
   doc/constants.texi \
   doc/fdl.texi

-doc_srcdir = $(top_srcdir)/doc
-
 # The following is necessary if the package name is 8 characters or longer.
 # If the info documentation would be split into 10 or more separate files,
 # then this is necessary even if the package name is 7 characters long.
@@ -67,21 +65,21 @@ syntax_checks =		\
 # List words/regexps here that should not appear in the texinfo documentation.
 check-texinfo: $(syntax_checks)
 	$(AM_V_GEN)fail=0;						\
-	grep '@url{' $(doc_srcdir)/*.texi && fail=1;			\
-	grep '\$$@"' $(doc_srcdir)/*.texi && fail=1;			\
-	grep -n '[^[:punct:]]@footnote' $(doc_srcdir)/*.texi && fail=1;	\
-	grep -n filename $(doc_srcdir)/*.texi				\
+	grep '@url{' $(srcdir)/doc/*.texi && fail=1;			\
+	grep '\$$@"' $(srcdir)/doc/*.texi && fail=1;			\
+	grep -n '[^[:punct:]]@footnote' $(srcdir)/doc/*.texi && fail=1;	\
+	grep -n filename $(srcdir)/doc/*.texi				\
 	    | $(EGREP) -v 'setfilename|[{]filename[}]'			\
 	  && fail=1;							\
 	exit $$fail

 sc-avoid-builtin:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(doc_srcdir)/*.texi \
+	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/doc/*.texi \
 	  && exit 1 || :

 sc-avoid-path:
 	$(AM_V_GEN)fail=0;						\
-	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(doc_srcdir)/*.texi	\
+	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/doc/*.texi	\
 	  | $(EGREP) -v							\
 	  'PATH=|path search|search path|@vindex PATH$$|@env[{]PATH[}]'	\
 	  && fail=1;							\
@@ -89,28 +87,28 @@ sc-avoid-path:

 # Use "time zone", not "timezone".
 sc-avoid-timezone:
-	$(AM_V_GEN)$(EGREP) timezone $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) timezone $(srcdir)/doc/*.texi && exit 1 || :

 # Check for insufficient exponent grouping, e.g.,
 # @math{2^64} should be @math{2^{64}}.
 sc-exponent-grouping:
-	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(srcdir)/doc/*.texi && exit 1 || :

 # E.g., use @sc{nul}, not NUL.
 sc-use-small-caps-NUL:
-	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/doc/*.texi && exit 1 || :

 # Say I/O, not IO.
 sc-avoid-io:
-	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(srcdir)/doc/*.texi && exit 1 || :

 # I prefer nonzero over non-zero.
 sc-avoid-non-zero:
-	$(AM_V_GEN)$(EGREP) non-zero $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) non-zero $(srcdir)/doc/*.texi && exit 1 || :

 # Use "zeros", not "zeroes" (nothing wrong with "zeroes"; just be consistent).
 sc-avoid-zeroes:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(doc_srcdir)/*.texi \
+	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/doc/*.texi \
 	  && exit 1 || :

 # The quantity inside @var{...} should not contain upper case letters.
@@ -126,6 +124,6 @@ find_upper_case_var =		\
    END {$$m and (warn "$@: do not use upper case in \@var{...}\n"), exit 1}'
 sc-lower-case-var:
 	$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
-	  $(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi
+	  $(PERL) -lne $(find_upper_case_var) $(srcdir)/doc/*.texi

 check-local: check-texinfo
-- 
1.7.12


>From e35f93f6f1f83cb4281491421e675edb16dda1ec Mon Sep 17 00:00:00 2001
Message-Id: <e35f93f6f1f83cb4281491421e675edb16dda1ec.1346310896.git.stefano.lattarini@gmail.com>
In-Reply-To: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
References: <374bbe3bdc3db361631c352fbbab3bf8d43721f9.1346310896.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 18:01:02 +0200
Subject: [PATCH 22/22] maint: update gitignore entries

* doc/.gitinore: Here, adding the '.dirstamp' file generated by
the Texinfo rules.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 doc/.gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/.gitignore b/doc/.gitignore
index ef55efd..e63c202 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -20,3 +20,4 @@
 /parse-datetime.texi
 /stamp-vti
 /version.texi
+/.dirstamp
-- 
1.7.12


From MAILER-DAEMON Thu Aug 30 05:03:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T70eZ-0000Bh-7j
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 05:03:07 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42376)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T70eT-00009V-QP
	for coreutils@gnu.org; Thu, 30 Aug 2012 05:03:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T70eO-0002Jy-Sj
	for coreutils@gnu.org; Thu, 30 Aug 2012 05:03:01 -0400
Received: from mx.meyering.net ([88.168.87.75]:33222)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T70eO-0002Jp-LV
	for coreutils@gnu.org; Thu, 30 Aug 2012 05:02:56 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id B6E4B602A6;
	Thu, 30 Aug 2012 11:02:54 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: =?iso-8859-1?Q?P=E1draig?= Brady <P@draigBrady.com>
Subject: Re: sort: new feature: use environment variable to set buffer size
In-Reply-To: <503EC565.1090900@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?=
	=?iso-8859-1?Q?g?= Brady"'s message of
	"Thu, 30 Aug 2012 02:44:05 +0100")
References: <503E8078.9090009@gmail.com> <503EC565.1090900@draigBrady.com>
Date: Thu, 30 Aug 2012 11:02:54 +0200
Message-ID: <87ipc03g75.fsf@rho.meyering.net>
Lines: 27
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: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: Assaf Gordon <assafgordon@gmail.com>, 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, 30 Aug 2012 09:03:05 -0000

P=E1draig Brady wrote:
> Thanks for the detailed rationale, however
> the existing env variables are significant to more utils than sort(1).
> I.E. they're generally system level settings, rather than command level.
> Also sort -S is very portable, even though not standardised.
> solaris' sort(1) has -S and GNU sort is used on most other platforms,
> which has -S available since TEXTUTILS-2_0_10-58-gbf86c62
>
> Note also this thread on the selection of a default buffer size for pipes:
> http://thread.gmane.org/gmane.comp.gnu.coreutils.general/878/focus=3D887
>
> So currently I'd be 70:30 against adding such a variable.

Thanks for replying, P=E1draig.  Those are good points.
Another is that we have a strong aversion to adding
support for new environment variables in coreutils programs
because it makes formerly-robust usage prone to malfunction or abuse.

Imagine a script that worked fine before, but when someone
ends up running sort with some unusual or extreme envvar
setting that now makes that shell script's use of sort fail.

With a new envvar as proposed, every sort-using script would
have to be retrofitted with code to keep an erroneous or malicious
envvar setting from impacting sort.

Just say "No!" to new envvars ;-)


From MAILER-DAEMON Thu Aug 30 05:16:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T70r5-0004B2-Vd
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 05:16:03 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53386)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T70r3-0004Au-JU
	for coreutils@gnu.org; Thu, 30 Aug 2012 05:16:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T70r2-0006il-5s
	for coreutils@gnu.org; Thu, 30 Aug 2012 05:16:01 -0400
Received: from mx.meyering.net ([88.168.87.75]:33260)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T70r1-0006if-Uq
	for coreutils@gnu.org; Thu, 30 Aug 2012 05:16:00 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 3140E604E2;
	Thu, 30 Aug 2012 11:15:59 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Nick Alcock <nick.alcock@oracle.com>
Subject: Re: [PATCH] tests: misc/sort-exit-early: do not run as root.
In-Reply-To: <874nnluzjt.fsf@spindle.srvr.nix> (Nick Alcock's message of "Wed, 
	29 Aug 2012 23:02:46 +0100")
References: <874nnluzjt.fsf@spindle.srvr.nix>
Date: Thu, 30 Aug 2012 11:15:59 +0200
Message-ID: <87d3283flc.fsf@rho.meyering.net>
Lines: 50
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 30 Aug 2012 09:16:03 -0000

Nick Alcock wrote:
> This test requires an unwritable input and an unreadable output,
> so will fail if the testsuite is being run as root, and should
> not be run in this case.
> ---
>  tests/misc/sort-exit-early | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/misc/sort-exit-early b/tests/misc/sort-exit-early
> index 7470aad..b83a489 100755
> --- a/tests/misc/sort-exit-early
> +++ b/tests/misc/sort-exit-early
> @@ -19,6 +19,8 @@
>  . "${srcdir=.}/init.sh"; path_prepend_ ../src
>  print_ver_ sort
>
> +skip_if_root_

Thanks for the testing and especially for the fix.

A word of caution:

There have been exploitable flaws (albeit rare) in these tests over
the years, and if you had regularly run all of them as root on a shared
system, it might have been easy to exploit.  The root-only tests are
more carefully audited, precisely because we regularly run them as root.

I recommend to run only the designated "root-only" tests as root:
(from README)

    Running tests as root:
    ----------------------

    If you run the tests as root, note that a few of them create files
    and/or run programs as a non-root user, 'nobody' by default.
    If you want to use some other non-root username, specify it via
    the NON_ROOT_USERNAME environment variable.  Depending on the
    permissions with which the working directories have been created,
    using 'nobody' may fail, because that user won't have the required
    read and write access to the build and test directories.
    I find that it is best to unpack and build as a non-privileged
    user, and then to run the following command as that user in order
    to run the privilege-requiring tests:

      sudo env PATH="$PATH" NON_ROOT_USERNAME=$USER make -k check-root

    If you can run the tests as root, please do so and report any
    problems.  We get much less test coverage in that mode, and it's
    arguably more important that these tools work well when run by
    root than when run by less privileged users.


From MAILER-DAEMON Thu Aug 30 06:10:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T71i9-0000VK-E0
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 06:10:53 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40560)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T71i1-0000Tr-Qp
	for coreutils@gnu.org; Thu, 30 Aug 2012 06:10:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T71hw-0007wI-Q5
	for coreutils@gnu.org; Thu, 30 Aug 2012 06:10:45 -0400
Received: from mx.meyering.net ([88.168.87.75]:33389)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T71hw-0007wD-Ee
	for coreutils@gnu.org; Thu, 30 Aug 2012 06:10:40 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 93A9560103;
	Thu, 30 Aug 2012 12:10:38 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
In-Reply-To: <503F0FDB.2020501@gmail.com> (Stefano Lattarini's message of
	"Thu, 30 Aug 2012 09:01:47 +0200")
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net> <503F0FDB.2020501@gmail.com>
Date: Thu, 30 Aug 2012 12:10:38 +0200
Message-ID: <871uio3d29.fsf@rho.meyering.net>
Lines: 132
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 30 Aug 2012 10:10:51 -0000

Stefano Lattarini wrote:
> On 08/30/2012 01:14 AM, Jim Meyering wrote:
>> Thanks for all the work.
>>
>> Would you please mail to me (or to the list) the concatenation of those
>> patches

Thanks again.  I've begun looking at these changes, so here's
some preliminary feedback.

As expected, the build now seems faster.
I haven't yet measured it.

I've had to make a few changes:

    - "make distcheck" failed due to a typo in man/local.mk.
    I fixed that by s,dir/,man/, below.

    - "make syntax-check" failed due to a long line and to a TAB
    followed by 8 spaces.  To address the long line, rather than
    splitting the just-lengthened line, I preferred to factor out
    this definition:

      texi_files = $(srcdir)/doc/*.texi


diff --git a/doc/local.mk b/doc/local.mk
index 190db85..585faf0 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -60,26 +60,28 @@ syntax_checks =		\
   sc-lower-case-var	\
   sc-use-small-caps-NUL

+texi_files = $(srcdir)/doc/*.texi
+
 .PHONY: $(syntax_checks) check-texinfo

 # List words/regexps here that should not appear in the texinfo documentation.
 check-texinfo: $(syntax_checks)
 	$(AM_V_GEN)fail=0;						\
-	grep '@url{' $(srcdir)/doc/*.texi && fail=1;			\
-	grep '\$$@"' $(srcdir)/doc/*.texi && fail=1;			\
-	grep -n '[^[:punct:]]@footnote' $(srcdir)/doc/*.texi && fail=1;	\
-	grep -n filename $(srcdir)/doc/*.texi				\
+	grep '@url{' $(texi_files) && fail=1;				\
+	grep '\$$@"' $(texi_files) && fail=1;				\
+	grep -n '[^[:punct:]]@footnote' $(texi_files) && fail=1;	\
+	grep -n filename $(texi_files)					\
 	    | $(EGREP) -v 'setfilename|[{]filename[}]'			\
 	  && fail=1;							\
 	exit $$fail

 sc-avoid-builtin:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/doc/*.texi \
+	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(texi_files)	\
 	  && exit 1 || :

 sc-avoid-path:
 	$(AM_V_GEN)fail=0;						\
-	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/doc/*.texi	\
+	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(texi_files)		\
 	  | $(EGREP) -v							\
 	  'PATH=|path search|search path|@vindex PATH$$|@env[{]PATH[}]'	\
 	  && fail=1;							\
@@ -87,28 +89,28 @@ sc-avoid-path:

 # Use "time zone", not "timezone".
 sc-avoid-timezone:
-	$(AM_V_GEN)$(EGREP) timezone $(srcdir)/doc/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) timezone $(texi_files) && exit 1 || :

 # Check for insufficient exponent grouping, e.g.,
 # @math{2^64} should be @math{2^{64}}.
 sc-exponent-grouping:
-	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(srcdir)/doc/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(texi_files) && exit 1 || :

 # E.g., use @sc{nul}, not NUL.
 sc-use-small-caps-NUL:
-	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/doc/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(texi_files) && exit 1 || :

 # Say I/O, not IO.
 sc-avoid-io:
-	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(srcdir)/doc/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(texi_files) && exit 1 || :

 # I prefer nonzero over non-zero.
 sc-avoid-non-zero:
-	$(AM_V_GEN)$(EGREP) non-zero $(srcdir)/doc/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) non-zero $(texi_files) && exit 1 || :

 # Use "zeros", not "zeroes" (nothing wrong with "zeroes"; just be consistent).
 sc-avoid-zeroes:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/doc/*.texi \
+	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(texi_files)	\
 	  && exit 1 || :

 # The quantity inside @var{...} should not contain upper case letters.
@@ -124,6 +126,6 @@ find_upper_case_var =		\
    END {$$m and (warn "$@: do not use upper case in \@var{...}\n"), exit 1}'
 sc-lower-case-var:
 	$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
-	  $(PERL) -lne $(find_upper_case_var) $(srcdir)/doc/*.texi
+	  $(PERL) -lne $(find_upper_case_var) $(texi_files)

 check-local: check-texinfo
diff --git a/man/local.mk b/man/local.mk
index 25385eb..d42c982 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -30,8 +30,8 @@ MAINTAINERCLEANFILES += $(dist_man1_MANS)
 # use GNU make when doing so), it's not big deal if this won't work with
 # some dumber make implementation.
 EXTRA_DIST += \
-  $(NO_INSTALL_PROGS_DEFAULT:%=dir/%.x) \
-  $(NO_INSTALL_PROGS_DEFAULT:%=dir/%.1)
+  $(NO_INSTALL_PROGS_DEFAULT:%=man/%.x) \
+  $(NO_INSTALL_PROGS_DEFAULT:%=man/%.1)

 # Depend on this to get version number changes.
 mandep = .version
@@ -163,7 +163,7 @@ $(MAN): $(top_srcdir)/src/system.h
 	case $$name in							\
 	  install) prog='ginstall';;					\
 	     test) prog='[';;						\
-	        *) prog=$$name;;					\
+		*) prog=$$name;;					\
 	esac;								\
 ## Note the use of $$t/$*, rather than just '$*' as in other packages.
 ## That is necessary to avoid failures for programs that are also shell


From MAILER-DAEMON Thu Aug 30 06:27:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T71yD-0003R8-Kx
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 06:27:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58687)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T71yB-0003QE-WB
	for coreutils@gnu.org; Thu, 30 Aug 2012 06:27:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T71y5-0005Ra-Gz
	for coreutils@gnu.org; Thu, 30 Aug 2012 06:27:27 -0400
Received: from mx.meyering.net ([88.168.87.75]:33435)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T71y5-0005RB-AF
	for coreutils@gnu.org; Thu, 30 Aug 2012 06:27:21 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 294FB6011C;
	Thu, 30 Aug 2012 12:27:20 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] tests: remove useless defn of REPLACE_GETCWD from
	TESTS_ENVIRONMENT
In-Reply-To: <38d0861307cf1a137dfda655ffc21fd57c78b360.1346279688.git.stefano.lattarini@gmail.com>
	(Stefano Lattarini's message of "Thu, 30 Aug 2012 00:35:20 +0200")
References: <38d0861307cf1a137dfda655ffc21fd57c78b360.1346279688.git.stefano.lattarini@gmail.com>
Date: Thu, 30 Aug 2012 12:27:20 +0200
Message-ID: <87txvk1xpz.fsf@rho.meyering.net>
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 30 Aug 2012 10:27:28 -0000

Stefano Lattarini wrote:
> It's last use had been removed in commit v8.12-3-g3ed91fc of 2011-04-28,
> "tests: remove useless test: misc/pwd-unreadable-parent".
>
> * tests/check.mk (TESTS_ENVIRONMENT): Adjust.
>
> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
> ---
>  tests/check.mk | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/tests/check.mk b/tests/check.mk
> index cb67b9d..be3641f 100644
> --- a/tests/check.mk
> +++ b/tests/check.mk
> @@ -87,7 +87,6 @@ TESTS_ENVIRONMENT =				\
>    PACKAGE_VERSION=$(PACKAGE_VERSION)		\
>    PERL='$(PERL)'				\
>    PREFERABLY_POSIX_SHELL='$(PREFERABLY_POSIX_SHELL)' \
> -  REPLACE_GETCWD=$(REPLACE_GETCWD)		\

Thanks.  Pushed.


From MAILER-DAEMON Thu Aug 30 06:38:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T729B-0005Wh-TF
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 06:38:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51874)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7295-0005W1-4c
	for coreutils@gnu.org; Thu, 30 Aug 2012 06:38:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T728x-0001rQ-CV
	for coreutils@gnu.org; Thu, 30 Aug 2012 06:38:43 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:50366)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T728x-0001rC-5n
	for coreutils@gnu.org; Thu, 30 Aug 2012 06:38:35 -0400
Received: by bkcjc3 with SMTP id jc3so730645bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 03:38:34 -0700 (PDT)
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=JdL54PSOCLmA+cCfXA9lqadjL7BmdDdcMDQ1x7vfOg8=;
	b=drbR9x+dCrK3KesAbbrylIreSeA3mKgk9CZLtlSbxTkT1KPuLvltk6NIbr6HfzLs3P
	Q9ivV14aYOoJkB8bXBhR/MeJIEXr+UAOcahcNqizkg5GW38/FlNMBBF92EBNlW7R2F8q
	MhuAmap7HBHqKkU6Cr1qSqkojfZure8gZfu7R2BNaNk+wk9DdAjMoVg11H2AxipT3Gcx
	YxIW/wNnPxCQanpewLqSF2qmoGjnhh3gERqlRer+DPLPsNVwLPV1Uq9uMVaEYqLGwHKK
	9bsVMvGWvQleOvXfLGuWiYqVTRRhOOvhUhPPmTUrXVFjHRbyQZW0Y/Uo6ny2lrUEcGBI
	zapQ==
Received: by 10.204.143.138 with SMTP id v10mr2443938bku.114.1346323114142;
	Thu, 30 Aug 2012 03:38:34 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id ht18sm866071bkc.16.2012.08.30.03.38.31
	(version=SSLv3 cipher=OTHER); Thu, 30 Aug 2012 03:38:32 -0700 (PDT)
Message-ID: <503F429F.9070409@gmail.com>
Date: Thu, 30 Aug 2012 12:38:23 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net> <503F0FDB.2020501@gmail.com>
	<871uio3d29.fsf@rho.meyering.net>
In-Reply-To: <871uio3d29.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 30 Aug 2012 10:38:48 -0000

On 08/30/2012 12:10 PM, Jim Meyering wrote:
> Stefano Lattarini wrote:
>> On 08/30/2012 01:14 AM, Jim Meyering wrote:
>>> Thanks for all the work.
>>>
>>> Would you please mail to me (or to the list) the concatenation of those
>>> patches
> 
> Thanks again.  I've begun looking at these changes, so here's
> some preliminary feedback.
> 
> As expected, the build now seems faster.
> I haven't yet measured it.
>
IMHO, a proper measurement will be appropriate only once 'src/' has been
merged into the top-level as well.

> I've had to make a few changes:
> 
>     - "make distcheck" failed due to a typo in man/local.mk.
>     I fixed that by s,dir/,man/, below.
>
Oops.  I should have run a "make dist" at least ("make distcheck" fails
for me even on the master branch, so I didn't run it, although I tried
a VPATH build).

>     - "make syntax-check" failed due to a long line and to a TAB
>     followed by 8 spaces.  To address the long line, rather than
>     splitting the just-lengthened line, I preferred to factor out
>     this definition:
> 
>       texi_files = $(srcdir)/doc/*.texi
>
OTOH, I had seen this, and I thought I had fixed it.  I must have lost
the patch in the reshuffling and rebasing ...  Sorry for the confusion.

Thanks,
  Stefano


From MAILER-DAEMON Thu Aug 30 07:10:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T72dx-0001cm-Rc
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 07:10:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39340)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T72dq-0001cZ-Aw
	for coreutils@gnu.org; Thu, 30 Aug 2012 07:10:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T72dj-0004pJ-DD
	for coreutils@gnu.org; Thu, 30 Aug 2012 07:10:30 -0400
Received: from mx.meyering.net ([88.168.87.75]:33531)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T72dj-0004nx-3j
	for coreutils@gnu.org; Thu, 30 Aug 2012 07:10:23 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 29331604D2
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 13:10:22 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH] scripts: git commit message hook: prohibit use of
	"Signed-off-by:"
Date: Thu, 30 Aug 2012 13:10:22 +0200
Message-ID: <87obls1vq9.fsf@rho.meyering.net>
Lines: 31
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Thu, 30 Aug 2012 11:10:36 -0000

I noticed a lot of Signed-off-by: lines in Stefano's series.
This makes our no-S-o-b policy more apparent:

>From 4f76f9b42ad71df40f1f714f2ecfb1e4b6cd7078 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Thu, 30 Aug 2012 13:07:10 +0200
Subject: [PATCH] scripts: git commit message hook: prohibit use of
 "Signed-off-by:"

* scripts/git-hooks/commit-msg: Reject a commit log message that
contains "Signed-off-by:".
---
 scripts/git-hooks/commit-msg | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg
index a5e4090..f867331 100755
--- a/scripts/git-hooks/commit-msg
+++ b/scripts/git-hooks/commit-msg
@@ -125,6 +125,9 @@ sub check_msg($$)
   $buf =~ m!https?://debbugs\.gnu\.org/(?:cgi/bugreport\.cgi\?bug=)?(\d+)!s
     and return "use shorter http://bugs.gnu.org/$1";

+  $buf =~ /^ *Signed-off-by:/i
+    and return q(do not use "Signed-off-by:");
+
   return '';
 }

--
1.7.12.146.g16d26b1


From MAILER-DAEMON Thu Aug 30 08:16:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T73g4-00088R-4H
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 08:16:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43498)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T73fq-00087E-92
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:16:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T73fa-0001Z8-Ug
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:16:38 -0400
Received: from mx.meyering.net ([88.168.87.75]:33692)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T73fY-0001YN-St
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:16:22 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id CA79A600FC;
	Thu, 30 Aug 2012 14:16:19 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
In-Reply-To: <503F429F.9070409@gmail.com> (Stefano Lattarini's message of
	"Thu, 30 Aug 2012 12:38:23 +0200")
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net> <503F0FDB.2020501@gmail.com>
	<871uio3d29.fsf@rho.meyering.net> <503F429F.9070409@gmail.com>
Date: Thu, 30 Aug 2012 14:16:19 +0200
Message-ID: <87ipc01soc.fsf@rho.meyering.net>
Lines: 2138
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 30 Aug 2012 12:16:50 -0000

Stefano Lattarini wrote:

> On 08/30/2012 12:10 PM, Jim Meyering wrote:
>> Stefano Lattarini wrote:
>>> On 08/30/2012 01:14 AM, Jim Meyering wrote:
>>>> Thanks for all the work.
>>>>
>>>> Would you please mail to me (or to the list) the concatenation of those
>>>> patches
>>
>> Thanks again.  I've begun looking at these changes, so here's
>> some preliminary feedback.
>>
>> As expected, the build now seems faster.
>> I haven't yet measured it.
>>
> IMHO, a proper measurement will be appropriate only once 'src/' has been
> merged into the top-level as well.
>
>> I've had to make a few changes:
>>
>>     - "make distcheck" failed due to a typo in man/local.mk.
>>     I fixed that by s,dir/,man/, below.
>>
> Oops.  I should have run a "make dist" at least ("make distcheck" fails
> for me even on the master branch, so I didn't run it, although I tried
> a VPATH build).
>
>>     - "make syntax-check" failed due to a long line and to a TAB
>>     followed by 8 spaces.  To address the long line, rather than
>>     splitting the just-lengthened line, I preferred to factor out
>>     this definition:
>>
>>       texi_files = $(srcdir)/doc/*.texi
>>
> OTOH, I had seen this, and I thought I had fixed it.  I must have lost
> the patch in the reshuffling and rebasing ...  Sorry for the confusion.

I've merged those into the appropriate change sets, removed all
Signed-off-by: lines and made a few minor wording changes.
Please review the differences.  If you're happy with the result,
I'll push the lot.

>From 276b67f7bf307f38778e102cf843d6666b808602 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 12:35:43 +0200
Subject: [PATCH 01/22] build: don't abuse Automake internals (with its
 'check-am' rule)

* tests/check.mk (check-am): Remove; obtain the same effect by moving
its dependency '.built-programs' ...
(check_DATA): ... to this variable.
---
 tests/check.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/check.mk b/tests/check.mk
index be3641f..0e08f6d 100644
--- a/tests/check.mk
+++ b/tests/check.mk
@@ -38,7 +38,7 @@ check: vc_exe_in_TESTS

 CLEANFILES =
 CLEANFILES += .built-programs
-check-am: .built-programs
+check_DATA = .built-programs
 .built-programs: $(top_srcdir)/src/Makefile.am
 	$(AM_V_GEN)(cd $(top_builddir)/src				\
             && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
--
1.7.12


>From 2e9335609e5e6648ce690ac8cb69df9a7bfda024 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 13:03:27 +0200
Subject: [PATCH 02/22] maint: slightly improve .gitignore

* .gitignore: Ignore '.deps' only when it's a directory.
Ignore '*.trs' only if they are in a subdirectory of the
'tests/' directory.
---
 .gitignore | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 383361b..aad59bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,8 +2,7 @@
 *.[EIOX]
 *.bak
 *.o
-*.trs
-*/.deps
+*/.deps/
 *~
 ._bootmp
 .gdb-history
@@ -155,6 +154,7 @@
 /src/version.h
 /stamp-h1
 /tests/*/*.log
+/tests/*/*.trs
 /tests/.built-programs
 /tests/t?
 /tests/test-suite.log
--
1.7.12


>From a5af26936f26bcde91c45d99c499d648ecc37af4 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 13:55:49 +0200
Subject: [PATCH 03/22] build: add extra *.texi files to coreutils_TEXINFOS,
 not EXTRA_DIST

* doc/Makefile.am (coreutils_TEXINFO): List them here, instead of ...
(EXTRA_DIST): ... listing them here.  This ensure the rebuild rules
will be more faithful.
($(DVIS), $(INFO_DEPS)): No need to depend on $(EXTRA_DIST) now.
---
 doc/Makefile.am | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index dea2756..9a50714 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -17,7 +17,7 @@

 info_TEXINFOS = coreutils.texi

-EXTRA_DIST = perm.texi parse-datetime.texi constants.texi fdl.texi
+coreutils_TEXINFOS = perm.texi parse-datetime.texi constants.texi fdl.texi

 # The following is necessary if the package name is 8 characters or longer.
 # If the info documentation would be split into 10 or more separate files,
@@ -40,9 +40,6 @@ constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c

 MAINTAINERCLEANFILES = constants.texi

-$(DVIS): $(EXTRA_DIST)
-$(INFO_DEPS): $(EXTRA_DIST)
-
 # Extended regular expressions to match word starts and ends.
 _W = (^|[^A-Za-z0-9_])
 W_ = ([^A-Za-z0-9_]|$$)
--
1.7.12


>From 78f9df627616976bf27777d5751d60f0fe841cac Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 14:01:12 +0200
Subject: [PATCH 04/22] build: prefer '$(top_srcdir)/doc' over '$(srcdir)' in
 doc Makefile

This is just a preparatory refactoring that will become useful in
a future change (where the doc/Makefile.am makefile will be merged
with the top-level one).

* doc/Makefile.am (doc_srcdir): New, defined to '$(top_srcdir)/doc'.
Use it throughout instead of "bare" '$(srcdir)'.
---
 doc/Makefile.am | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 9a50714..4e5150f 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -19,6 +19,8 @@ info_TEXINFOS = coreutils.texi

 coreutils_TEXINFOS = perm.texi parse-datetime.texi constants.texi fdl.texi

+doc_srcdir = $(top_srcdir)/doc
+
 # The following is necessary if the package name is 8 characters or longer.
 # If the info documentation would be split into 10 or more separate files,
 # then this is necessary even if the package name is 7 characters long.
@@ -60,21 +62,21 @@ syntax_checks =		\
 # List words/regexps here that should not appear in the texinfo documentation.
 check-texinfo: $(syntax_checks)
 	$(AM_V_GEN)fail=0;						\
-	grep '@url{' $(srcdir)/*.texi && fail=1;			\
-	grep '\$$@"' $(srcdir)/*.texi && fail=1;			\
-	grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1;	\
-	grep -n filename $(srcdir)/*.texi				\
+	grep '@url{' $(doc_srcdir)/*.texi && fail=1;			\
+	grep '\$$@"' $(doc_srcdir)/*.texi && fail=1;			\
+	grep -n '[^[:punct:]]@footnote' $(doc_srcdir)/*.texi && fail=1;	\
+	grep -n filename $(doc_srcdir)/*.texi				\
 	    | $(EGREP) -v 'setfilename|[{]filename[}]'			\
 	  && fail=1;							\
 	exit $$fail

 sc-avoid-builtin:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi	\
+	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(doc_srcdir)/*.texi \
 	  && exit 1 || :

 sc-avoid-path:
 	$(AM_V_GEN)fail=0;						\
-	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi		\
+	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(doc_srcdir)/*.texi	\
 	  | $(EGREP) -v							\
 	  'PATH=|path search|search path|@vindex PATH$$|@env[{]PATH[}]'	\
 	  && fail=1;							\
@@ -82,28 +84,28 @@ sc-avoid-path:

 # Use "time zone", not "timezone".
 sc-avoid-timezone:
-	$(AM_V_GEN)$(EGREP) timezone $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) timezone $(doc_srcdir)/*.texi && exit 1 || :

 # Check for insufficient exponent grouping, e.g.,
 # @math{2^64} should be @math{2^{64}}.
 sc-exponent-grouping:
-	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(doc_srcdir)/*.texi && exit 1 || :

 # E.g., use @sc{nul}, not NUL.
 sc-use-small-caps-NUL:
-	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(doc_srcdir)/*.texi && exit 1 || :

 # Say I/O, not IO.
 sc-avoid-io:
-	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(doc_srcdir)/*.texi && exit 1 || :

 # I prefer nonzero over non-zero.
 sc-avoid-non-zero:
-	$(AM_V_GEN)$(EGREP) non-zero $(srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) non-zero $(doc_srcdir)/*.texi && exit 1 || :

 # Use "zeros", not "zeroes" (nothing wrong with "zeroes"; just be consistent).
 sc-avoid-zeroes:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi \
+	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(doc_srcdir)/*.texi \
 	  && exit 1 || :

 # ME = $(subdir)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
@@ -122,6 +124,6 @@ find_upper_case_var =		\
    END {$$m and (warn "$(ME): do not use upper case in \@var{...}\n"), exit 1}'
 sc-lower-case-var:
 	$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
-	  $(PERL) -lne $(find_upper_case_var) $(srcdir)/*.texi
+	  $(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi

 check: check-texinfo
--
1.7.12


>From a050c0bcfa833e697f849015e84a2bd31a010963 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 14:15:42 +0200
Subject: [PATCH 05/22] build: use 'check-local' to extend the 'check' target

* doc/Makefile.am (check-local): Here, by making this depend
on 'check-texinfo' ...
(check): ... rather than this.  While the old usage worked, it
did so for an implementation detail rather than a documented
behaviour, so relying on that was riskier a "unclean".
---
 doc/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 4e5150f..121c7cc 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -126,4 +126,4 @@ sc-lower-case-var:
 	$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
 	  $(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi

-check: check-texinfo
+check-local: check-texinfo
--
1.7.12


>From 975a78c51c2936b5d061c33acd297fcd627a7663 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 14:22:47 +0200
Subject: [PATCH 06/22] build: don't use recursive make to build the 'doc'
 subdirectory

* doc/Makefile.am: Rename ...
* doc/local.mk: ... like this.  With further adjustments ...
(info_TEXINFOS): Prepend 'doc/' to all '*.texi' files listed in
here.
(coreutils_TEXINFOS): Likewise, and rename ...
(doc_coreutils_TEXINFOS): ... like this.
(constants.texi): Rename ...
(doc/constants.texi): ... like this.  Adjust the recipe to avoid
spurious errors.
(MAINTAINERCLEANFILES): Adjust, and extend with '+=' rather than
setting it with '='.
(ME): Delete.
(find_upper_case_var): Use '$@', not '$(ME)', in error messages.
* Makefile.am: Include 'doc/local.mk'.
(SUBDIRS): Remove 'doc'.
* configure.ac (AC_CONFIG_FILES): Remove 'doc/Makefile'.
---
 Makefile.am                   |  4 +++-
 configure.ac                  |  1 -
 doc/{Makefile.am => local.mk} | 22 ++++++++++++----------
 3 files changed, 15 insertions(+), 12 deletions(-)
 rename doc/{Makefile.am => local.mk} (90%)

diff --git a/Makefile.am b/Makefile.am
index 72d93d5..0446e43 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@

 ALL_RECURSIVE_TARGETS =

-SUBDIRS = lib src doc man po tests gnulib-tests
+SUBDIRS = lib src man po tests gnulib-tests

 changelog_etc =				\
   ChangeLog-2005			\
@@ -169,3 +169,5 @@ check-git-hook-script-sync:
 	     done;							\
 	rm -rf $$t;							\
 	test $$fail = 0
+
+include $(top_srcdir)/doc/local.mk
diff --git a/configure.ac b/configure.ac
index 5651fd1..52918ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -492,7 +492,6 @@ gt_LOCALE_FR

 AC_CONFIG_FILES(
   Makefile
-  doc/Makefile
   lib/Makefile
   man/Makefile
   po/Makefile.in
diff --git a/doc/Makefile.am b/doc/local.mk
similarity index 90%
rename from doc/Makefile.am
rename to doc/local.mk
index 121c7cc..665dd21 100644
--- a/doc/Makefile.am
+++ b/doc/local.mk
@@ -1,4 +1,5 @@
 # Make coreutils documentation.				-*-Makefile-*-
+# This is included by the top-level Makefile.am.

 # Copyright (C) 1995-2012 Free Software Foundation, Inc.

@@ -15,9 +16,13 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

-info_TEXINFOS = coreutils.texi
+info_TEXINFOS = doc/coreutils.texi

-coreutils_TEXINFOS = perm.texi parse-datetime.texi constants.texi fdl.texi
+doc_coreutils_TEXINFOS = \
+  doc/perm.texi \
+  doc/parse-datetime.texi \
+  doc/constants.texi \
+  doc/fdl.texi

 doc_srcdir = $(top_srcdir)/doc

@@ -31,16 +36,16 @@ doc_srcdir = $(top_srcdir)/doc
 # old systems.
 AM_MAKEINFOFLAGS = --no-split

-constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
+doc/constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
 	$(AM_V_GEN)LC_ALL=C; export LC_ALL; \
 	{ sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
 	    $(top_srcdir)/src/tail.c && \
 	  sed -n -e \
 	      's/.*\(DEFAULT_PASSES\)[ =]* \([0-9]*\).*/@set SHRED_\1 \2/p'\
-	    $(top_srcdir)/src/shred.c; } > t-$@ \
-	  && mv t-$@ $@
+	    $(top_srcdir)/src/shred.c; } > $@-t \
+	  && mv $@-t $@

-MAINTAINERCLEANFILES = constants.texi
+MAINTAINERCLEANFILES += doc/constants.texi

 # Extended regular expressions to match word starts and ends.
 _W = (^|[^A-Za-z0-9_])
@@ -108,9 +113,6 @@ sc-avoid-zeroes:
 	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(doc_srcdir)/*.texi \
 	  && exit 1 || :

-# ME = $(subdir)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
-ME = doc/Makefile
-
 # The quantity inside @var{...} should not contain upper case letters.
 # The leading backslash exemption is to permit in-macro uses like
 # @var{\varName\} where the upper case letter is part of a parameter name.
@@ -121,7 +123,7 @@ find_upper_case_var =		\
        $$v = $$1;		\
        $$v =~ /[A-Z]/ && $$v !~ /^\\/ and (print "$$ARGV:$$.:$$_"), $$m = 1 \
      }				\
-   END {$$m and (warn "$(ME): do not use upper case in \@var{...}\n"), exit 1}'
+   END {$$m and (warn "$@: do not use upper case in \@var{...}\n"), exit 1}'
 sc-lower-case-var:
 	$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
 	  $(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi
--
1.7.12


>From 1d317cea7ed0de55664652e1b4b8bd4fde1cb23f Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 15:02:19 +0200
Subject: [PATCH 07/22] build: don't define $(SUFFIXES) explicitly

* man/Makefile.am (SUFFIXES): Remove definition: Automake is smart
enough to extract the list of suffixes from the '.x.1' suffix rule
automatically.
---
 man/Makefile.am | 2 --
 1 file changed, 2 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index cc93a42..8e9df08 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -139,8 +139,6 @@ yes.1:		$(common_dep)	$(srcdir)/yes.x		../src/yes.c
 # provoke regeneration of all $(MAN) files.
 $(MAN): $(top_srcdir)/src/system.h

-SUFFIXES = .x .1
-
 # Ensure that help2man runs the ../src/ginstall binary as
 # 'install' when creating install.1.
 # Similarly, ensure that it uses the ../src/[ binary to create test.1.
--
1.7.12


>From 817ab71b93a8288da90db6b78a96218e796d9de4 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 15:18:08 +0200
Subject: [PATCH 08/22] maint: simplify definition of $MAN in configure.ac

* configure.ac: Here, by making less use of 'sed' and 'tr' munging,
and relying on a smarter and simpler shell loop instead.
---
 configure.ac | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 52918ca..bc7520d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -456,16 +456,19 @@ case " $optional_bin_progs " in
   *' stdbuf '*) gl_ADD_PROG([optional_pkglib_progs], [libstdbuf.so]) ;;
 esac

-MAN=`echo "$optional_bin_progs "|sed 's/ /.1 /g;s/ $//'|tr -d '\\015\\012'`
-
-# Change "ginstall.1" to "install.1" in $MAN.
-MAN=`for m in $MAN; do test $m = ginstall.1 && m=install.1; echo $m; done \
-  | tr '\015\012' '  '; echo`
-
-# Remove [.1, since writing a portable rule for it in man/Makefile.am
-# is not practical.  The sed LHS below uses the autoconf quadrigraph
-# representing '['.
-MAN=`echo "$MAN"|sed 's/\@<:@\.1//'`
+MAN=`
+  for p in $optional_bin_progs; do
+    # Change "ginstall.1" to "install.1" in $MAN.
+    test $p = ginstall && p=install
+    # Ignore the "[" program, since writing a portable make rule to
+    # generate its manpage is not practical.
+    dnl Use the autoconf-provided quadrigraph to represent "[",
+    dnl otherwise we will incur in dreadful quoting issues.
+    test x$p = x'@<:@' && continue
+    echo "$p.1"
+  done`
+# Normalize whitespace.
+MAN=`echo $MAN`

 OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
 AC_SUBST([OPTIONAL_BIN_PROGS])
--
1.7.12


>From 9955bd9fd4d1c3df7325869eb3dd4475936f6aa6 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 15:44:05 +0200
Subject: [PATCH 09/22] build: add an explanatory comment

* man/Makefile.am (EXTRA_DIST): Describe portability issues of the
idiom we now use.  Reformat the definition a little while at it.
---
 man/Makefile.am | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 8e9df08..44eb310 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -19,10 +19,19 @@ dist_man1_MANS = $(MAN)

 man_aux = $(dist_man1_MANS:.1=.x)

-EXTRA_DIST = $(man_aux) $(NO_INSTALL_PROGS_DEFAULT:%=%.x) help2man \
-	$(NO_INSTALL_PROGS_DEFAULT:%=%.1)
+EXTRA_DIST = $(man_aux) help2man
 MAINTAINERCLEANFILES = $(dist_man1_MANS)

+# The "$(VAR:%=%.x)" idiom is not portable according to POSIX, but in
+# practice it works with several make implementation (GNU, BSD, CCS make
+# from Solaris 10, Sun distributed make).  In addition, since only
+# maintainers are expected to build release tarballs (and they should
+# use GNU make when doing so), it's not big deal if this won't work with
+# some dumber make implementation.
+EXTRA_DIST += \
+  $(NO_INSTALL_PROGS_DEFAULT:%=%.x) \
+  $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
+
 # Depend on ../.version to get version number changes.
 common_dep = ../.version

--
1.7.12


>From 6537c196510670268eebcbb6bc0a4fe0bf575a61 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 15:55:54 +0200
Subject: [PATCH 10/22] build: fix a stray usage of uninitialized $(ME)

* man/Makefile.am (sc_option_desc_uppercase): Here.
---
 man/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 44eb310..84b585f 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -185,7 +185,7 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
 .PHONY: sc_option_desc_uppercase
 sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
 	@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
-	    { echo 1>&2 '$(ME): found initial capitals in --help';   \
+	    { echo 1>&2 '$@: found initial capitals in --help';   \
 	      exit 1; } || :;

 .PHONY: sc_man_file_correlation
--
1.7.12


>From 01ee6c536827acf8804c5ae4fbfa9a5d57ef5e3c Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 15:56:47 +0200
Subject: [PATCH 11/22] build: rename common_dep -> mandep in man/Makefile

This is mostly a preparatory refactoring in view of future changes.

* man/Makefile.am (common_dep): Rename ...
(mandep): ... like this.
All usages adjusted.
---
 man/Makefile.am | 212 ++++++++++++++++++++++++++++----------------------------
 1 file changed, 106 insertions(+), 106 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 84b585f..ef0fbd9 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -33,116 +33,116 @@ EXTRA_DIST += \
   $(NO_INSTALL_PROGS_DEFAULT:%=%.1)

 # Depend on ../.version to get version number changes.
-common_dep = ../.version
+mandep = ../.version

 # Note that arch depends on uname.c
-arch.1:		$(common_dep)	$(srcdir)/arch.x	../src/uname.c
-
-base64.1:	$(common_dep)	$(srcdir)/base64.x	../src/base64.c
-basename.1:	$(common_dep)	$(srcdir)/basename.x	../src/basename.c
-cat.1:		$(common_dep)	$(srcdir)/cat.x		../src/cat.c
-chcon.1:	$(common_dep)	$(srcdir)/chcon.x	../src/chcon.c
-chgrp.1:	$(common_dep)	$(srcdir)/chgrp.x	../src/chgrp.c
-chmod.1:	$(common_dep)	$(srcdir)/chmod.x	../src/chmod.c
-chown.1:	$(common_dep)	$(srcdir)/chown.x	../src/chown.c
-chroot.1:	$(common_dep)	$(srcdir)/chroot.x	../src/chroot.c
-cksum.1:	$(common_dep)	$(srcdir)/cksum.x	../src/cksum.c
-comm.1:		$(common_dep)	$(srcdir)/comm.x	../src/comm.c
-cp.1:		$(common_dep)	$(srcdir)/cp.x		../src/cp.c
-csplit.1:	$(common_dep)	$(srcdir)/csplit.x	../src/csplit.c
-cut.1:		$(common_dep)	$(srcdir)/cut.x		../src/cut.c
-date.1:		$(common_dep)	$(srcdir)/date.x	../src/date.c
-dd.1:		$(common_dep)	$(srcdir)/dd.x		../src/dd.c
-df.1:		$(common_dep)	$(srcdir)/df.x		../src/df.c
+arch.1:		$(mandep)	$(srcdir)/arch.x	../src/uname.c
+
+base64.1:	$(mandep)	$(srcdir)/base64.x	../src/base64.c
+basename.1:	$(mandep)	$(srcdir)/basename.x	../src/basename.c
+cat.1:		$(mandep)	$(srcdir)/cat.x		../src/cat.c
+chcon.1:	$(mandep)	$(srcdir)/chcon.x	../src/chcon.c
+chgrp.1:	$(mandep)	$(srcdir)/chgrp.x	../src/chgrp.c
+chmod.1:	$(mandep)	$(srcdir)/chmod.x	../src/chmod.c
+chown.1:	$(mandep)	$(srcdir)/chown.x	../src/chown.c
+chroot.1:	$(mandep)	$(srcdir)/chroot.x	../src/chroot.c
+cksum.1:	$(mandep)	$(srcdir)/cksum.x	../src/cksum.c
+comm.1:		$(mandep)	$(srcdir)/comm.x	../src/comm.c
+cp.1:		$(mandep)	$(srcdir)/cp.x		../src/cp.c
+csplit.1:	$(mandep)	$(srcdir)/csplit.x	../src/csplit.c
+cut.1:		$(mandep)	$(srcdir)/cut.x		../src/cut.c
+date.1:		$(mandep)	$(srcdir)/date.x	../src/date.c
+dd.1:		$(mandep)	$(srcdir)/dd.x		../src/dd.c
+df.1:		$(mandep)	$(srcdir)/df.x		../src/df.c

 # Note that dir depends on ls.c, since that's where it's --help text is.
-dir.1:		$(common_dep)	$(srcdir)/dir.x		../src/ls.c
-
-dircolors.1:	$(common_dep)	$(srcdir)/dircolors.x	../src/dircolors.c
-dirname.1:	$(common_dep)	$(srcdir)/dirname.x	../src/dirname.c
-du.1:		$(common_dep)	$(srcdir)/du.x		../src/du.c
-echo.1:		$(common_dep)	$(srcdir)/echo.x	../src/echo.c
-env.1:		$(common_dep)	$(srcdir)/env.x		../src/env.c
-expand.1:	$(common_dep)	$(srcdir)/expand.x	../src/expand.c
-expr.1:		$(common_dep)	$(srcdir)/expr.x	../src/expr.c
-factor.1:	$(common_dep)	$(srcdir)/factor.x	../src/factor.c
-false.1:	$(common_dep)	$(srcdir)/false.x	../src/false.c
-fmt.1:		$(common_dep)	$(srcdir)/fmt.x		../src/fmt.c
-fold.1:		$(common_dep)	$(srcdir)/fold.x	../src/fold.c
-groups.1:	$(common_dep)	$(srcdir)/groups.x	../src/groups.c
-head.1:		$(common_dep)	$(srcdir)/head.x	../src/head.c
-hostid.1:	$(common_dep)	$(srcdir)/hostid.x	../src/hostid.c
-hostname.1:	$(common_dep)	$(srcdir)/hostname.x	../src/hostname.c
-id.1:		$(common_dep)	$(srcdir)/id.x		../src/id.c
-install.1:	$(common_dep)	$(srcdir)/install.x	../src/install.c
-join.1:		$(common_dep)	$(srcdir)/join.x	../src/join.c
-kill.1:		$(common_dep)	$(srcdir)/kill.x	../src/kill.c
-link.1:		$(common_dep)	$(srcdir)/link.x	../src/link.c
-ln.1:		$(common_dep)	$(srcdir)/ln.x		../src/ln.c
-logname.1:	$(common_dep)	$(srcdir)/logname.x	../src/logname.c
-ls.1:		$(common_dep)	$(srcdir)/ls.x		../src/ls.c
-md5sum.1:	$(common_dep)	$(srcdir)/md5sum.x	../src/md5sum.c
-mkdir.1:	$(common_dep)	$(srcdir)/mkdir.x	../src/mkdir.c
-mkfifo.1:	$(common_dep)	$(srcdir)/mkfifo.x	../src/mkfifo.c
-mknod.1:	$(common_dep)	$(srcdir)/mknod.x	../src/mknod.c
-mktemp.1:	$(common_dep)	$(srcdir)/mktemp.x	../src/mktemp.c
-mv.1:		$(common_dep)	$(srcdir)/mv.x		../src/mv.c
-nice.1:		$(common_dep)	$(srcdir)/nice.x	../src/nice.c
-nl.1:		$(common_dep)	$(srcdir)/nl.x		../src/nl.c
-nohup.1:	$(common_dep)	$(srcdir)/nohup.x	../src/nohup.c
-nproc.1:	$(common_dep)	$(srcdir)/nproc.x	../src/nproc.c
-od.1:		$(common_dep)	$(srcdir)/od.x		../src/od.c
-paste.1:	$(common_dep)	$(srcdir)/paste.x	../src/paste.c
-pathchk.1:	$(common_dep)	$(srcdir)/pathchk.x	../src/pathchk.c
-pinky.1:	$(common_dep)	$(srcdir)/pinky.x	../src/pinky.c
-pr.1:		$(common_dep)	$(srcdir)/pr.x		../src/pr.c
-printenv.1:	$(common_dep)	$(srcdir)/printenv.x	../src/printenv.c
-printf.1:	$(common_dep)	$(srcdir)/printf.x	../src/printf.c
-ptx.1:		$(common_dep)	$(srcdir)/ptx.x		../src/ptx.c
-pwd.1:		$(common_dep)	$(srcdir)/pwd.x		../src/pwd.c
-readlink.1:	$(common_dep)	$(srcdir)/readlink.x	../src/readlink.c
-realpath.1:	$(common_dep)	$(srcdir)/realpath.x	../src/realpath.c
-rm.1:		$(common_dep)	$(srcdir)/rm.x		../src/rm.c
-rmdir.1:	$(common_dep)	$(srcdir)/rmdir.x	../src/rmdir.c
-runcon.1:	$(common_dep)	$(srcdir)/runcon.x	../src/runcon.c
-seq.1:		$(common_dep)	$(srcdir)/seq.x		../src/seq.c
-sha1sum.1:	$(common_dep)	$(srcdir)/sha1sum.x	../src/md5sum.c
-sha224sum.1:	$(common_dep)	$(srcdir)/sha224sum.x	../src/md5sum.c
-sha256sum.1:	$(common_dep)	$(srcdir)/sha256sum.x	../src/md5sum.c
-sha384sum.1:	$(common_dep)	$(srcdir)/sha384sum.x	../src/md5sum.c
-sha512sum.1:	$(common_dep)	$(srcdir)/sha512sum.x	../src/md5sum.c
-shred.1:	$(common_dep)	$(srcdir)/shred.x	../src/shred.c
-shuf.1:		$(common_dep)	$(srcdir)/shuf.x	../src/shuf.c
-sleep.1:	$(common_dep)	$(srcdir)/sleep.x	../src/sleep.c
-sort.1:		$(common_dep)	$(srcdir)/sort.x	../src/sort.c
-split.1:	$(common_dep)	$(srcdir)/split.x	../src/split.c
-stat.1:		$(common_dep)	$(srcdir)/stat.x	../src/stat.c
-stdbuf.1:	$(common_dep)	$(srcdir)/stdbuf.x	../src/stdbuf.c
-stty.1:		$(common_dep)	$(srcdir)/stty.x	../src/stty.c
-sum.1:		$(common_dep)	$(srcdir)/sum.x		../src/sum.c
-sync.1:		$(common_dep)	$(srcdir)/sync.x	../src/sync.c
-tac.1:		$(common_dep)	$(srcdir)/tac.x		../src/tac.c
-tail.1:		$(common_dep)	$(srcdir)/tail.x	../src/tail.c
-tee.1:		$(common_dep)	$(srcdir)/tee.x		../src/tee.c
-test.1:		$(common_dep)	$(srcdir)/test.x	../src/test.c
-timeout.1:	$(common_dep)	$(srcdir)/timeout.x	../src/timeout.c
-touch.1:	$(common_dep)	$(srcdir)/touch.x	../src/touch.c
-tr.1:		$(common_dep)	$(srcdir)/tr.x		../src/tr.c
-true.1:		$(common_dep)	$(srcdir)/true.x	../src/true.c
-truncate.1:	$(common_dep)	$(srcdir)/truncate.x	../src/truncate.c
-tsort.1:	$(common_dep)	$(srcdir)/tsort.x	../src/tsort.c
-tty.1:		$(common_dep)	$(srcdir)/tty.x		../src/tty.c
-uname.1:	$(common_dep)	$(srcdir)/uname.x	../src/uname.c
-unexpand.1:	$(common_dep)	$(srcdir)/unexpand.x	../src/unexpand.c
-uniq.1:		$(common_dep)	$(srcdir)/uniq.x	../src/uniq.c
-unlink.1:	$(common_dep)	$(srcdir)/unlink.x	../src/unlink.c
-uptime.1:	$(common_dep)	$(srcdir)/uptime.x	../src/uptime.c
-users.1:	$(common_dep)	$(srcdir)/users.x	../src/users.c
-vdir.1:		$(common_dep)	$(srcdir)/vdir.x	../src/ls.c
-wc.1:		$(common_dep)	$(srcdir)/wc.x		../src/wc.c
-who.1:		$(common_dep)	$(srcdir)/who.x		../src/who.c
-whoami.1:	$(common_dep)	$(srcdir)/whoami.x	../src/whoami.c
-yes.1:		$(common_dep)	$(srcdir)/yes.x		../src/yes.c
+dir.1:		$(mandep)	$(srcdir)/dir.x		../src/ls.c
+
+dircolors.1:	$(mandep)	$(srcdir)/dircolors.x	../src/dircolors.c
+dirname.1:	$(mandep)	$(srcdir)/dirname.x	../src/dirname.c
+du.1:		$(mandep)	$(srcdir)/du.x		../src/du.c
+echo.1:		$(mandep)	$(srcdir)/echo.x	../src/echo.c
+env.1:		$(mandep)	$(srcdir)/env.x		../src/env.c
+expand.1:	$(mandep)	$(srcdir)/expand.x	../src/expand.c
+expr.1:		$(mandep)	$(srcdir)/expr.x	../src/expr.c
+factor.1:	$(mandep)	$(srcdir)/factor.x	../src/factor.c
+false.1:	$(mandep)	$(srcdir)/false.x	../src/false.c
+fmt.1:		$(mandep)	$(srcdir)/fmt.x		../src/fmt.c
+fold.1:		$(mandep)	$(srcdir)/fold.x	../src/fold.c
+groups.1:	$(mandep)	$(srcdir)/groups.x	../src/groups.c
+head.1:		$(mandep)	$(srcdir)/head.x	../src/head.c
+hostid.1:	$(mandep)	$(srcdir)/hostid.x	../src/hostid.c
+hostname.1:	$(mandep)	$(srcdir)/hostname.x	../src/hostname.c
+id.1:		$(mandep)	$(srcdir)/id.x		../src/id.c
+install.1:	$(mandep)	$(srcdir)/install.x	../src/install.c
+join.1:		$(mandep)	$(srcdir)/join.x	../src/join.c
+kill.1:		$(mandep)	$(srcdir)/kill.x	../src/kill.c
+link.1:		$(mandep)	$(srcdir)/link.x	../src/link.c
+ln.1:		$(mandep)	$(srcdir)/ln.x		../src/ln.c
+logname.1:	$(mandep)	$(srcdir)/logname.x	../src/logname.c
+ls.1:		$(mandep)	$(srcdir)/ls.x		../src/ls.c
+md5sum.1:	$(mandep)	$(srcdir)/md5sum.x	../src/md5sum.c
+mkdir.1:	$(mandep)	$(srcdir)/mkdir.x	../src/mkdir.c
+mkfifo.1:	$(mandep)	$(srcdir)/mkfifo.x	../src/mkfifo.c
+mknod.1:	$(mandep)	$(srcdir)/mknod.x	../src/mknod.c
+mktemp.1:	$(mandep)	$(srcdir)/mktemp.x	../src/mktemp.c
+mv.1:		$(mandep)	$(srcdir)/mv.x		../src/mv.c
+nice.1:		$(mandep)	$(srcdir)/nice.x	../src/nice.c
+nl.1:		$(mandep)	$(srcdir)/nl.x		../src/nl.c
+nohup.1:	$(mandep)	$(srcdir)/nohup.x	../src/nohup.c
+nproc.1:	$(mandep)	$(srcdir)/nproc.x	../src/nproc.c
+od.1:		$(mandep)	$(srcdir)/od.x		../src/od.c
+paste.1:	$(mandep)	$(srcdir)/paste.x	../src/paste.c
+pathchk.1:	$(mandep)	$(srcdir)/pathchk.x	../src/pathchk.c
+pinky.1:	$(mandep)	$(srcdir)/pinky.x	../src/pinky.c
+pr.1:		$(mandep)	$(srcdir)/pr.x		../src/pr.c
+printenv.1:	$(mandep)	$(srcdir)/printenv.x	../src/printenv.c
+printf.1:	$(mandep)	$(srcdir)/printf.x	../src/printf.c
+ptx.1:		$(mandep)	$(srcdir)/ptx.x		../src/ptx.c
+pwd.1:		$(mandep)	$(srcdir)/pwd.x		../src/pwd.c
+readlink.1:	$(mandep)	$(srcdir)/readlink.x	../src/readlink.c
+realpath.1:	$(mandep)	$(srcdir)/realpath.x	../src/realpath.c
+rm.1:		$(mandep)	$(srcdir)/rm.x		../src/rm.c
+rmdir.1:	$(mandep)	$(srcdir)/rmdir.x	../src/rmdir.c
+runcon.1:	$(mandep)	$(srcdir)/runcon.x	../src/runcon.c
+seq.1:		$(mandep)	$(srcdir)/seq.x		../src/seq.c
+sha1sum.1:	$(mandep)	$(srcdir)/sha1sum.x	../src/md5sum.c
+sha224sum.1:	$(mandep)	$(srcdir)/sha224sum.x	../src/md5sum.c
+sha256sum.1:	$(mandep)	$(srcdir)/sha256sum.x	../src/md5sum.c
+sha384sum.1:	$(mandep)	$(srcdir)/sha384sum.x	../src/md5sum.c
+sha512sum.1:	$(mandep)	$(srcdir)/sha512sum.x	../src/md5sum.c
+shred.1:	$(mandep)	$(srcdir)/shred.x	../src/shred.c
+shuf.1:		$(mandep)	$(srcdir)/shuf.x	../src/shuf.c
+sleep.1:	$(mandep)	$(srcdir)/sleep.x	../src/sleep.c
+sort.1:		$(mandep)	$(srcdir)/sort.x	../src/sort.c
+split.1:	$(mandep)	$(srcdir)/split.x	../src/split.c
+stat.1:		$(mandep)	$(srcdir)/stat.x	../src/stat.c
+stdbuf.1:	$(mandep)	$(srcdir)/stdbuf.x	../src/stdbuf.c
+stty.1:		$(mandep)	$(srcdir)/stty.x	../src/stty.c
+sum.1:		$(mandep)	$(srcdir)/sum.x		../src/sum.c
+sync.1:		$(mandep)	$(srcdir)/sync.x	../src/sync.c
+tac.1:		$(mandep)	$(srcdir)/tac.x		../src/tac.c
+tail.1:		$(mandep)	$(srcdir)/tail.x	../src/tail.c
+tee.1:		$(mandep)	$(srcdir)/tee.x		../src/tee.c
+test.1:		$(mandep)	$(srcdir)/test.x	../src/test.c
+timeout.1:	$(mandep)	$(srcdir)/timeout.x	../src/timeout.c
+touch.1:	$(mandep)	$(srcdir)/touch.x	../src/touch.c
+tr.1:		$(mandep)	$(srcdir)/tr.x		../src/tr.c
+true.1:		$(mandep)	$(srcdir)/true.x	../src/true.c
+truncate.1:	$(mandep)	$(srcdir)/truncate.x	../src/truncate.c
+tsort.1:	$(mandep)	$(srcdir)/tsort.x	../src/tsort.c
+tty.1:		$(mandep)	$(srcdir)/tty.x		../src/tty.c
+uname.1:	$(mandep)	$(srcdir)/uname.x	../src/uname.c
+unexpand.1:	$(mandep)	$(srcdir)/unexpand.x	../src/unexpand.c
+uniq.1:		$(mandep)	$(srcdir)/uniq.x	../src/uniq.c
+unlink.1:	$(mandep)	$(srcdir)/unlink.x	../src/unlink.c
+uptime.1:	$(mandep)	$(srcdir)/uptime.x	../src/uptime.c
+users.1:	$(mandep)	$(srcdir)/users.x	../src/users.c
+vdir.1:		$(mandep)	$(srcdir)/vdir.x	../src/ls.c
+wc.1:		$(mandep)	$(srcdir)/wc.x		../src/wc.c
+who.1:		$(mandep)	$(srcdir)/who.x		../src/who.c
+whoami.1:	$(mandep)	$(srcdir)/whoami.x	../src/whoami.c
+yes.1:		$(mandep)	$(srcdir)/yes.x		../src/yes.c

 # This is required so that changes to e.g., emit_bug_reporting_address
 # provoke regeneration of all $(MAN) files.
--
1.7.12


>From 60e298e85ed0369035c0b4a4af63ae5622d082f8 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 15:57:22 +0200
Subject: [PATCH 12/22] maint: typofix: s/it's/its/

* man/Makefile.am: Here.
---
 man/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index ef0fbd9..ff8b01e 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -55,7 +55,7 @@ date.1:		$(mandep)	$(srcdir)/date.x	../src/date.c
 dd.1:		$(mandep)	$(srcdir)/dd.x		../src/dd.c
 df.1:		$(mandep)	$(srcdir)/df.x		../src/df.c

-# Note that dir depends on ls.c, since that's where it's --help text is.
+# Note that dir depends on ls.c, since that's where its --help text is.
 dir.1:		$(mandep)	$(srcdir)/dir.x		../src/ls.c

 dircolors.1:	$(mandep)	$(srcdir)/dircolors.x	../src/dircolors.c
--
1.7.12


>From 9d8e0181458196781b6d4396c1e9649b97322ff8 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 16:13:35 +0200
Subject: [PATCH 13/22] build: rely on VPATH capabilities in man/Makefile

* man/Makefile.am: In all the 'foo.1' targets, no need to depend
explicitly on '$(srcdir)/foo.x': the '.x.1' suffix rule takes care
of that automatically.
---
 man/Makefile.am | 210 ++++++++++++++++++++++++++++----------------------------
 1 file changed, 105 insertions(+), 105 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index ff8b01e..3d6a963 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -36,113 +36,113 @@ EXTRA_DIST += \
 mandep = ../.version

 # Note that arch depends on uname.c
-arch.1:		$(mandep)	$(srcdir)/arch.x	../src/uname.c
-
-base64.1:	$(mandep)	$(srcdir)/base64.x	../src/base64.c
-basename.1:	$(mandep)	$(srcdir)/basename.x	../src/basename.c
-cat.1:		$(mandep)	$(srcdir)/cat.x		../src/cat.c
-chcon.1:	$(mandep)	$(srcdir)/chcon.x	../src/chcon.c
-chgrp.1:	$(mandep)	$(srcdir)/chgrp.x	../src/chgrp.c
-chmod.1:	$(mandep)	$(srcdir)/chmod.x	../src/chmod.c
-chown.1:	$(mandep)	$(srcdir)/chown.x	../src/chown.c
-chroot.1:	$(mandep)	$(srcdir)/chroot.x	../src/chroot.c
-cksum.1:	$(mandep)	$(srcdir)/cksum.x	../src/cksum.c
-comm.1:		$(mandep)	$(srcdir)/comm.x	../src/comm.c
-cp.1:		$(mandep)	$(srcdir)/cp.x		../src/cp.c
-csplit.1:	$(mandep)	$(srcdir)/csplit.x	../src/csplit.c
-cut.1:		$(mandep)	$(srcdir)/cut.x		../src/cut.c
-date.1:		$(mandep)	$(srcdir)/date.x	../src/date.c
-dd.1:		$(mandep)	$(srcdir)/dd.x		../src/dd.c
-df.1:		$(mandep)	$(srcdir)/df.x		../src/df.c
+arch.1:		$(mandep)	../src/uname.c
+
+base64.1:	$(mandep)	../src/base64.c
+basename.1:	$(mandep)	../src/basename.c
+cat.1:		$(mandep)	../src/cat.c
+chcon.1:	$(mandep)	../src/chcon.c
+chgrp.1:	$(mandep)	../src/chgrp.c
+chmod.1:	$(mandep)	../src/chmod.c
+chown.1:	$(mandep)	../src/chown.c
+chroot.1:	$(mandep)	../src/chroot.c
+cksum.1:	$(mandep)	../src/cksum.c
+comm.1:		$(mandep)	../src/comm.c
+cp.1:		$(mandep)	../src/cp.c
+csplit.1:	$(mandep)	../src/csplit.c
+cut.1:		$(mandep)	../src/cut.c
+date.1:		$(mandep)	../src/date.c
+dd.1:		$(mandep)	../src/dd.c
+df.1:		$(mandep)	../src/df.c

 # Note that dir depends on ls.c, since that's where its --help text is.
-dir.1:		$(mandep)	$(srcdir)/dir.x		../src/ls.c
-
-dircolors.1:	$(mandep)	$(srcdir)/dircolors.x	../src/dircolors.c
-dirname.1:	$(mandep)	$(srcdir)/dirname.x	../src/dirname.c
-du.1:		$(mandep)	$(srcdir)/du.x		../src/du.c
-echo.1:		$(mandep)	$(srcdir)/echo.x	../src/echo.c
-env.1:		$(mandep)	$(srcdir)/env.x		../src/env.c
-expand.1:	$(mandep)	$(srcdir)/expand.x	../src/expand.c
-expr.1:		$(mandep)	$(srcdir)/expr.x	../src/expr.c
-factor.1:	$(mandep)	$(srcdir)/factor.x	../src/factor.c
-false.1:	$(mandep)	$(srcdir)/false.x	../src/false.c
-fmt.1:		$(mandep)	$(srcdir)/fmt.x		../src/fmt.c
-fold.1:		$(mandep)	$(srcdir)/fold.x	../src/fold.c
-groups.1:	$(mandep)	$(srcdir)/groups.x	../src/groups.c
-head.1:		$(mandep)	$(srcdir)/head.x	../src/head.c
-hostid.1:	$(mandep)	$(srcdir)/hostid.x	../src/hostid.c
-hostname.1:	$(mandep)	$(srcdir)/hostname.x	../src/hostname.c
-id.1:		$(mandep)	$(srcdir)/id.x		../src/id.c
-install.1:	$(mandep)	$(srcdir)/install.x	../src/install.c
-join.1:		$(mandep)	$(srcdir)/join.x	../src/join.c
-kill.1:		$(mandep)	$(srcdir)/kill.x	../src/kill.c
-link.1:		$(mandep)	$(srcdir)/link.x	../src/link.c
-ln.1:		$(mandep)	$(srcdir)/ln.x		../src/ln.c
-logname.1:	$(mandep)	$(srcdir)/logname.x	../src/logname.c
-ls.1:		$(mandep)	$(srcdir)/ls.x		../src/ls.c
-md5sum.1:	$(mandep)	$(srcdir)/md5sum.x	../src/md5sum.c
-mkdir.1:	$(mandep)	$(srcdir)/mkdir.x	../src/mkdir.c
-mkfifo.1:	$(mandep)	$(srcdir)/mkfifo.x	../src/mkfifo.c
-mknod.1:	$(mandep)	$(srcdir)/mknod.x	../src/mknod.c
-mktemp.1:	$(mandep)	$(srcdir)/mktemp.x	../src/mktemp.c
-mv.1:		$(mandep)	$(srcdir)/mv.x		../src/mv.c
-nice.1:		$(mandep)	$(srcdir)/nice.x	../src/nice.c
-nl.1:		$(mandep)	$(srcdir)/nl.x		../src/nl.c
-nohup.1:	$(mandep)	$(srcdir)/nohup.x	../src/nohup.c
-nproc.1:	$(mandep)	$(srcdir)/nproc.x	../src/nproc.c
-od.1:		$(mandep)	$(srcdir)/od.x		../src/od.c
-paste.1:	$(mandep)	$(srcdir)/paste.x	../src/paste.c
-pathchk.1:	$(mandep)	$(srcdir)/pathchk.x	../src/pathchk.c
-pinky.1:	$(mandep)	$(srcdir)/pinky.x	../src/pinky.c
-pr.1:		$(mandep)	$(srcdir)/pr.x		../src/pr.c
-printenv.1:	$(mandep)	$(srcdir)/printenv.x	../src/printenv.c
-printf.1:	$(mandep)	$(srcdir)/printf.x	../src/printf.c
-ptx.1:		$(mandep)	$(srcdir)/ptx.x		../src/ptx.c
-pwd.1:		$(mandep)	$(srcdir)/pwd.x		../src/pwd.c
-readlink.1:	$(mandep)	$(srcdir)/readlink.x	../src/readlink.c
-realpath.1:	$(mandep)	$(srcdir)/realpath.x	../src/realpath.c
-rm.1:		$(mandep)	$(srcdir)/rm.x		../src/rm.c
-rmdir.1:	$(mandep)	$(srcdir)/rmdir.x	../src/rmdir.c
-runcon.1:	$(mandep)	$(srcdir)/runcon.x	../src/runcon.c
-seq.1:		$(mandep)	$(srcdir)/seq.x		../src/seq.c
-sha1sum.1:	$(mandep)	$(srcdir)/sha1sum.x	../src/md5sum.c
-sha224sum.1:	$(mandep)	$(srcdir)/sha224sum.x	../src/md5sum.c
-sha256sum.1:	$(mandep)	$(srcdir)/sha256sum.x	../src/md5sum.c
-sha384sum.1:	$(mandep)	$(srcdir)/sha384sum.x	../src/md5sum.c
-sha512sum.1:	$(mandep)	$(srcdir)/sha512sum.x	../src/md5sum.c
-shred.1:	$(mandep)	$(srcdir)/shred.x	../src/shred.c
-shuf.1:		$(mandep)	$(srcdir)/shuf.x	../src/shuf.c
-sleep.1:	$(mandep)	$(srcdir)/sleep.x	../src/sleep.c
-sort.1:		$(mandep)	$(srcdir)/sort.x	../src/sort.c
-split.1:	$(mandep)	$(srcdir)/split.x	../src/split.c
-stat.1:		$(mandep)	$(srcdir)/stat.x	../src/stat.c
-stdbuf.1:	$(mandep)	$(srcdir)/stdbuf.x	../src/stdbuf.c
-stty.1:		$(mandep)	$(srcdir)/stty.x	../src/stty.c
-sum.1:		$(mandep)	$(srcdir)/sum.x		../src/sum.c
-sync.1:		$(mandep)	$(srcdir)/sync.x	../src/sync.c
-tac.1:		$(mandep)	$(srcdir)/tac.x		../src/tac.c
-tail.1:		$(mandep)	$(srcdir)/tail.x	../src/tail.c
-tee.1:		$(mandep)	$(srcdir)/tee.x		../src/tee.c
-test.1:		$(mandep)	$(srcdir)/test.x	../src/test.c
-timeout.1:	$(mandep)	$(srcdir)/timeout.x	../src/timeout.c
-touch.1:	$(mandep)	$(srcdir)/touch.x	../src/touch.c
-tr.1:		$(mandep)	$(srcdir)/tr.x		../src/tr.c
-true.1:		$(mandep)	$(srcdir)/true.x	../src/true.c
-truncate.1:	$(mandep)	$(srcdir)/truncate.x	../src/truncate.c
-tsort.1:	$(mandep)	$(srcdir)/tsort.x	../src/tsort.c
-tty.1:		$(mandep)	$(srcdir)/tty.x		../src/tty.c
-uname.1:	$(mandep)	$(srcdir)/uname.x	../src/uname.c
-unexpand.1:	$(mandep)	$(srcdir)/unexpand.x	../src/unexpand.c
-uniq.1:		$(mandep)	$(srcdir)/uniq.x	../src/uniq.c
-unlink.1:	$(mandep)	$(srcdir)/unlink.x	../src/unlink.c
-uptime.1:	$(mandep)	$(srcdir)/uptime.x	../src/uptime.c
-users.1:	$(mandep)	$(srcdir)/users.x	../src/users.c
-vdir.1:		$(mandep)	$(srcdir)/vdir.x	../src/ls.c
-wc.1:		$(mandep)	$(srcdir)/wc.x		../src/wc.c
-who.1:		$(mandep)	$(srcdir)/who.x		../src/who.c
-whoami.1:	$(mandep)	$(srcdir)/whoami.x	../src/whoami.c
-yes.1:		$(mandep)	$(srcdir)/yes.x		../src/yes.c
+dir.1:		$(mandep)	../src/ls.c
+
+dircolors.1:	$(mandep)	../src/dircolors.c
+dirname.1:	$(mandep)	../src/dirname.c
+du.1:		$(mandep)	../src/du.c
+echo.1:		$(mandep)	../src/echo.c
+env.1:		$(mandep)	../src/env.c
+expand.1:	$(mandep)	../src/expand.c
+expr.1:		$(mandep)	../src/expr.c
+factor.1:	$(mandep)	../src/factor.c
+false.1:	$(mandep)	../src/false.c
+fmt.1:		$(mandep)	../src/fmt.c
+fold.1:		$(mandep)	../src/fold.c
+groups.1:	$(mandep)	../src/groups.c
+head.1:		$(mandep)	../src/head.c
+hostid.1:	$(mandep)	../src/hostid.c
+hostname.1:	$(mandep)	../src/hostname.c
+id.1:		$(mandep)	../src/id.c
+install.1:	$(mandep)	../src/install.c
+join.1:		$(mandep)	../src/join.c
+kill.1:		$(mandep)	../src/kill.c
+link.1:		$(mandep)	../src/link.c
+ln.1:		$(mandep)	../src/ln.c
+logname.1:	$(mandep)	../src/logname.c
+ls.1:		$(mandep)	../src/ls.c
+md5sum.1:	$(mandep)	../src/md5sum.c
+mkdir.1:	$(mandep)	../src/mkdir.c
+mkfifo.1:	$(mandep)	../src/mkfifo.c
+mknod.1:	$(mandep)	../src/mknod.c
+mktemp.1:	$(mandep)	../src/mktemp.c
+mv.1:		$(mandep)	../src/mv.c
+nice.1:		$(mandep)	../src/nice.c
+nl.1:		$(mandep)	../src/nl.c
+nohup.1:	$(mandep)	../src/nohup.c
+nproc.1:	$(mandep)	../src/nproc.c
+od.1:		$(mandep)	../src/od.c
+paste.1:	$(mandep)	../src/paste.c
+pathchk.1:	$(mandep)	../src/pathchk.c
+pinky.1:	$(mandep)	../src/pinky.c
+pr.1:		$(mandep)	../src/pr.c
+printenv.1:	$(mandep)	../src/printenv.c
+printf.1:	$(mandep)	../src/printf.c
+ptx.1:		$(mandep)	../src/ptx.c
+pwd.1:		$(mandep)	../src/pwd.c
+readlink.1:	$(mandep)	../src/readlink.c
+realpath.1:	$(mandep)	../src/realpath.c
+rm.1:		$(mandep)	../src/rm.c
+rmdir.1:	$(mandep)	../src/rmdir.c
+runcon.1:	$(mandep)	../src/runcon.c
+seq.1:		$(mandep)	../src/seq.c
+sha1sum.1:	$(mandep)	../src/md5sum.c
+sha224sum.1:	$(mandep)	../src/md5sum.c
+sha256sum.1:	$(mandep)	../src/md5sum.c
+sha384sum.1:	$(mandep)	../src/md5sum.c
+sha512sum.1:	$(mandep)	../src/md5sum.c
+shred.1:	$(mandep)	../src/shred.c
+shuf.1:		$(mandep)	../src/shuf.c
+sleep.1:	$(mandep)	../src/sleep.c
+sort.1:		$(mandep)	../src/sort.c
+split.1:	$(mandep)	../src/split.c
+stat.1:		$(mandep)	../src/stat.c
+stdbuf.1:	$(mandep)	../src/stdbuf.c
+stty.1:		$(mandep)	../src/stty.c
+sum.1:		$(mandep)	../src/sum.c
+sync.1:		$(mandep)	../src/sync.c
+tac.1:		$(mandep)	../src/tac.c
+tail.1:		$(mandep)	../src/tail.c
+tee.1:		$(mandep)	../src/tee.c
+test.1:		$(mandep)	../src/test.c
+timeout.1:	$(mandep)	../src/timeout.c
+touch.1:	$(mandep)	../src/touch.c
+tr.1:		$(mandep)	../src/tr.c
+true.1:		$(mandep)	../src/true.c
+truncate.1:	$(mandep)	../src/truncate.c
+tsort.1:	$(mandep)	../src/tsort.c
+tty.1:		$(mandep)	../src/tty.c
+uname.1:	$(mandep)	../src/uname.c
+unexpand.1:	$(mandep)	../src/unexpand.c
+uniq.1:		$(mandep)	../src/uniq.c
+unlink.1:	$(mandep)	../src/unlink.c
+uptime.1:	$(mandep)	../src/uptime.c
+users.1:	$(mandep)	../src/users.c
+vdir.1:		$(mandep)	../src/ls.c
+wc.1:		$(mandep)	../src/wc.c
+who.1:		$(mandep)	../src/who.c
+whoami.1:	$(mandep)	../src/whoami.c
+yes.1:		$(mandep)	../src/yes.c

 # This is required so that changes to e.g., emit_bug_reporting_address
 # provoke regeneration of all $(MAN) files.
--
1.7.12


>From b3c7490bd4b69f6907b440586016f40a49c8ab8d Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 16:22:38 +0200
Subject: [PATCH 14/22] build: make a rule less dependent on exact source tree
 layout

This is mostly a preparatory change in view of future ones.

* man/Makefile.am (.x.1): Use '$(abs_top_builddir)/src' to access
the 'src' directory.
---
 man/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 3d6a963..ff1c1ab 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -168,7 +168,7 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
 	    && {						\
 		 rm -rf $t;					\
 		 mkdir $t;					\
-		 (cd $t && $(LN_S) ../../src/$(mapped_name) $*); \
+		 (cd $t && $(LN_S) $(abs_top_builddir)/src/$(mapped_name) $*); \
 		    $(PERL) -- $(srcdir)/help2man		\
 		     --source='$(PACKAGE_STRING)'		\
 		     --include=$(srcdir)/$*.x			\
--
1.7.12


>From 88efe23e17882a42c167b9524858bb0883e18e70 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 16:57:41 +0200
Subject: [PATCH 15/22] build: provide convenience target 'all_programs' also
 at top-level

This will be mostly useful in future changes.

* Makefile.am (all_programs): New, simply the work delegating to
the same-named target in the 'src/' subdirectory.
* cfg.mk (sc_option_desc_uppercase): Take advantage of it.
(sc_man_file_correlation): Likewise.
---
 Makefile.am | 4 ++++
 cfg.mk      | 6 ++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 0446e43..f80c4a6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -170,4 +170,8 @@ check-git-hook-script-sync:
 	rm -rf $$t;							\
 	test $$fail = 0

+.PHONY: all_programs
+all_programs:
+	@cd ./src && $(MAKE) -s $@
+
 include $(top_srcdir)/doc/local.mk
diff --git a/cfg.mk b/cfg.mk
index 9244225..e6e0828 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -171,14 +171,12 @@ sc_long_lines:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
 # but that would miss descriptions not on the same line as the -option.
 ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
-sc_option_desc_uppercase:
-	@$(MAKE) -s -C src all_programs
+sc_option_desc_uppercase: all_programs
 	@$(MAKE) -s -C man $@

 # Ensure all man/*.[1x] files are present
 ALL_RECURSIVE_TARGETS += sc_man_file_correlation
-sc_man_file_correlation:
-	@$(MAKE) -s -C src all_programs
+sc_man_file_correlation: all_programs
 	@$(MAKE) -s -C man $@

 # Ensure that the end of each release's section is marked by two empty lines.
--
1.7.12


>From 56a914537bd732b6c38ea64ec25c7e0477fbb890 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 21:31:57 +0200
Subject: [PATCH 16/22] build: rework some recipes in man/Makefile.am, for
 future changes

This change is merely required to make future changes easier.

In particular, since we are going to merge the contents of
'man/Makefile.am' in the top-level Makefile, we need to avoid
conflicts with the rules and variables in 'dist-check.mk', and
to prepare for changes in the value of the '$*' variable in the
recipe of the '.x -> .1' suffix rule.

* man/Makefile.am (t, mapped_name): Delete, inlining their use ...
(.1.x): ... in the recipe of this suffix rule.  Other adjustments
to prepare to changes in the value of the '$*' automatic variable.
While at it, made more resilient about unlikely but possible failure.
Adjust and reorder few comments.
---
 man/Makefile.am | 54 +++++++++++++++++++++++++++---------------------------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index ff1c1ab..f7db996 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -148,38 +148,38 @@ yes.1:		$(mandep)	../src/yes.c
 # provoke regeneration of all $(MAN) files.
 $(MAN): $(top_srcdir)/src/system.h

-# Ensure that help2man runs the ../src/ginstall binary as
-# 'install' when creating install.1.
-# Similarly, ensure that it uses the ../src/[ binary to create test.1.
-t = $*.td
-mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
-
-# Note the use of $t/$*, rather than just '$*' as in other packages.
-# That is necessary to avoid failures for programs that are also shell built-in
-# functions like echo, false, printf, pwd.
 .x.1:
 	$(AM_V_GEN)case '$(PERL)' in				\
 	  *"/missing "*)					\
 	    echo 'WARNING: cannot update man page $@ since perl is missing' \
 	      'or inadequate' 1>&2				\
-	    ;;							\
-	  *)							\
-	    rm -f $@ $@-t					\
-	    && {						\
-		 rm -rf $t;					\
-		 mkdir $t;					\
-		 (cd $t && $(LN_S) $(abs_top_builddir)/src/$(mapped_name) $*); \
-		    $(PERL) -- $(srcdir)/help2man		\
-		     --source='$(PACKAGE_STRING)'		\
-		     --include=$(srcdir)/$*.x			\
-		     --output=$t/$@ $t/$*;			\
-	       }						\
-	    && sed 's|$*\.td/||g' $t/$@ > $@-t			\
-	    && rm -rf $t					\
-	    && chmod -w $@-t					\
-	    && mv $@-t $@					\
-	    ;;							\
-	esac
+	    exit 0;;						\
+	esac; \
+	name=`echo $@ | sed -e 's|.*/||' -e 's|\.1$$||'` || exit 1;	\
+## Ensure that help2man runs the 'src/ginstall' binary as 'install' when
+## creating 'install.1'.  Similarly, ensure that it uses the 'src/[' binary
+## to create 'test.1'.
+	case $$name in							\
+	  install) prog='ginstall';;					\
+	     test) prog='[';;						\
+	        *) prog=$$name;;					\
+	esac;								\
+## Note the use of $$t/$*, rather than just '$*' as in other packages.
+## That is necessary to avoid failures for programs that are also shell
+## built-in functions like echo, false, printf, pwd.
+	rm -f $@ $@-t							\
+	  && t=$*.td							\
+	  && rm -rf $$t							\
+	  && mkdir $$t							\
+	  && (cd $$t && $(LN_S) $(abs_top_builddir)/src/$$prog $$name)	\
+	  && $(PERL) -- $(srcdir)/help2man				\
+		     --source='$(PACKAGE_STRING)'			\
+		     --include=$(srcdir)/$$name.x			\
+		     --output=$$t/$$name.1 $$t/$$name			\
+	  && sed 's|$*\.td/||g' $$t/$$name.1 > $@-t			\
+	  && rm -rf $$t							\
+	  && chmod -w $@-t						\
+	  && mv $@-t $@

 # Option descriptions should not start with a capital letter
 .PHONY: sc_option_desc_uppercase
--
1.7.12


>From f6696dd246d96ce3449119c4d2f2365bac156de1 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 16:37:24 +0200
Subject: [PATCH 17/22] build: don't use recursive make to build the 'man'
 subdirectory

* Makefile.am: Include 'man/local.mk'.
(SUBDIRS): Remove 'man'.
* configure.ac ($MAN): Adjust to have a leading 'man/' component.
(AC_CONFIG_FILES): Remove 'man/Makefile'.
* man/Makefile.am: Rename ...
* man/local.mk: ... like this.  With further adjustments: each 'foo.1'
target renamed like 'man/foo.1', each '../src/foo.c' dependency as
'src/foo.c', and each '$(srcdir)' usage as '$(srcdir)/man'.  Also ...
(mandep): Adjust, removing the leading '../' component.
Several whitespace adjustments wile at it.
(ASSORT): Remove, it's already defined in the top-level Makefile.am.
* cfg.mk (sc_option_desc_uppercase, sc_man_file_correlation): Remove
the associated recipes, they are now directly available from the
included 'man/local.mk'.  Actually, the other changes in this commit
have made these recipes instable and not completely correct, bu that
will be fixed in later changes.
---
 Makefile.am     |   3 +-
 cfg.mk          |   2 -
 configure.ac    |   3 +-
 man/Makefile.am | 226 --------------------------------------------------------
 man/local.mk    | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 226 insertions(+), 231 deletions(-)
 delete mode 100644 man/Makefile.am
 create mode 100644 man/local.mk

diff --git a/Makefile.am b/Makefile.am
index f80c4a6..d14bf88 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@

 ALL_RECURSIVE_TARGETS =

-SUBDIRS = lib src man po tests gnulib-tests
+SUBDIRS = lib src po tests gnulib-tests

 changelog_etc =				\
   ChangeLog-2005			\
@@ -175,3 +175,4 @@ all_programs:
 	@cd ./src && $(MAKE) -s $@

 include $(top_srcdir)/doc/local.mk
+include $(top_srcdir)/man/local.mk
diff --git a/cfg.mk b/cfg.mk
index e6e0828..5f7193e 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -172,12 +172,10 @@ sc_long_lines:
 # but that would miss descriptions not on the same line as the -option.
 ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
 sc_option_desc_uppercase: all_programs
-	@$(MAKE) -s -C man $@

 # Ensure all man/*.[1x] files are present
 ALL_RECURSIVE_TARGETS += sc_man_file_correlation
 sc_man_file_correlation: all_programs
-	@$(MAKE) -s -C man $@

 # Ensure that the end of each release's section is marked by two empty lines.
 sc_NEWS_two_empty_lines:
diff --git a/configure.ac b/configure.ac
index bc7520d..ce8ebc9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -465,7 +465,7 @@ MAN=`
     dnl Use the autoconf-provided quadrigraph to represent "[",
     dnl otherwise we will incur in dreadful quoting issues.
     test x$p = x'@<:@' && continue
-    echo "$p.1"
+    echo "man/$p.1"
   done`
 # Normalize whitespace.
 MAN=`echo $MAN`
@@ -496,7 +496,6 @@ gt_LOCALE_FR
 AC_CONFIG_FILES(
   Makefile
   lib/Makefile
-  man/Makefile
   po/Makefile.in
   src/Makefile
   tests/Makefile
diff --git a/man/Makefile.am b/man/Makefile.am
deleted file mode 100644
index f7db996..0000000
--- a/man/Makefile.am
+++ /dev/null
@@ -1,226 +0,0 @@
-# Make coreutils man pages.				-*-Makefile-*-
-
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-dist_man1_MANS = $(MAN)
-
-man_aux = $(dist_man1_MANS:.1=.x)
-
-EXTRA_DIST = $(man_aux) help2man
-MAINTAINERCLEANFILES = $(dist_man1_MANS)
-
-# The "$(VAR:%=%.x)" idiom is not portable according to POSIX, but in
-# practice it works with several make implementation (GNU, BSD, CCS make
-# from Solaris 10, Sun distributed make).  In addition, since only
-# maintainers are expected to build release tarballs (and they should
-# use GNU make when doing so), it's not big deal if this won't work with
-# some dumber make implementation.
-EXTRA_DIST += \
-  $(NO_INSTALL_PROGS_DEFAULT:%=%.x) \
-  $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
-
-# Depend on ../.version to get version number changes.
-mandep = ../.version
-
-# Note that arch depends on uname.c
-arch.1:		$(mandep)	../src/uname.c
-
-base64.1:	$(mandep)	../src/base64.c
-basename.1:	$(mandep)	../src/basename.c
-cat.1:		$(mandep)	../src/cat.c
-chcon.1:	$(mandep)	../src/chcon.c
-chgrp.1:	$(mandep)	../src/chgrp.c
-chmod.1:	$(mandep)	../src/chmod.c
-chown.1:	$(mandep)	../src/chown.c
-chroot.1:	$(mandep)	../src/chroot.c
-cksum.1:	$(mandep)	../src/cksum.c
-comm.1:		$(mandep)	../src/comm.c
-cp.1:		$(mandep)	../src/cp.c
-csplit.1:	$(mandep)	../src/csplit.c
-cut.1:		$(mandep)	../src/cut.c
-date.1:		$(mandep)	../src/date.c
-dd.1:		$(mandep)	../src/dd.c
-df.1:		$(mandep)	../src/df.c
-
-# Note that dir depends on ls.c, since that's where its --help text is.
-dir.1:		$(mandep)	../src/ls.c
-
-dircolors.1:	$(mandep)	../src/dircolors.c
-dirname.1:	$(mandep)	../src/dirname.c
-du.1:		$(mandep)	../src/du.c
-echo.1:		$(mandep)	../src/echo.c
-env.1:		$(mandep)	../src/env.c
-expand.1:	$(mandep)	../src/expand.c
-expr.1:		$(mandep)	../src/expr.c
-factor.1:	$(mandep)	../src/factor.c
-false.1:	$(mandep)	../src/false.c
-fmt.1:		$(mandep)	../src/fmt.c
-fold.1:		$(mandep)	../src/fold.c
-groups.1:	$(mandep)	../src/groups.c
-head.1:		$(mandep)	../src/head.c
-hostid.1:	$(mandep)	../src/hostid.c
-hostname.1:	$(mandep)	../src/hostname.c
-id.1:		$(mandep)	../src/id.c
-install.1:	$(mandep)	../src/install.c
-join.1:		$(mandep)	../src/join.c
-kill.1:		$(mandep)	../src/kill.c
-link.1:		$(mandep)	../src/link.c
-ln.1:		$(mandep)	../src/ln.c
-logname.1:	$(mandep)	../src/logname.c
-ls.1:		$(mandep)	../src/ls.c
-md5sum.1:	$(mandep)	../src/md5sum.c
-mkdir.1:	$(mandep)	../src/mkdir.c
-mkfifo.1:	$(mandep)	../src/mkfifo.c
-mknod.1:	$(mandep)	../src/mknod.c
-mktemp.1:	$(mandep)	../src/mktemp.c
-mv.1:		$(mandep)	../src/mv.c
-nice.1:		$(mandep)	../src/nice.c
-nl.1:		$(mandep)	../src/nl.c
-nohup.1:	$(mandep)	../src/nohup.c
-nproc.1:	$(mandep)	../src/nproc.c
-od.1:		$(mandep)	../src/od.c
-paste.1:	$(mandep)	../src/paste.c
-pathchk.1:	$(mandep)	../src/pathchk.c
-pinky.1:	$(mandep)	../src/pinky.c
-pr.1:		$(mandep)	../src/pr.c
-printenv.1:	$(mandep)	../src/printenv.c
-printf.1:	$(mandep)	../src/printf.c
-ptx.1:		$(mandep)	../src/ptx.c
-pwd.1:		$(mandep)	../src/pwd.c
-readlink.1:	$(mandep)	../src/readlink.c
-realpath.1:	$(mandep)	../src/realpath.c
-rm.1:		$(mandep)	../src/rm.c
-rmdir.1:	$(mandep)	../src/rmdir.c
-runcon.1:	$(mandep)	../src/runcon.c
-seq.1:		$(mandep)	../src/seq.c
-sha1sum.1:	$(mandep)	../src/md5sum.c
-sha224sum.1:	$(mandep)	../src/md5sum.c
-sha256sum.1:	$(mandep)	../src/md5sum.c
-sha384sum.1:	$(mandep)	../src/md5sum.c
-sha512sum.1:	$(mandep)	../src/md5sum.c
-shred.1:	$(mandep)	../src/shred.c
-shuf.1:		$(mandep)	../src/shuf.c
-sleep.1:	$(mandep)	../src/sleep.c
-sort.1:		$(mandep)	../src/sort.c
-split.1:	$(mandep)	../src/split.c
-stat.1:		$(mandep)	../src/stat.c
-stdbuf.1:	$(mandep)	../src/stdbuf.c
-stty.1:		$(mandep)	../src/stty.c
-sum.1:		$(mandep)	../src/sum.c
-sync.1:		$(mandep)	../src/sync.c
-tac.1:		$(mandep)	../src/tac.c
-tail.1:		$(mandep)	../src/tail.c
-tee.1:		$(mandep)	../src/tee.c
-test.1:		$(mandep)	../src/test.c
-timeout.1:	$(mandep)	../src/timeout.c
-touch.1:	$(mandep)	../src/touch.c
-tr.1:		$(mandep)	../src/tr.c
-true.1:		$(mandep)	../src/true.c
-truncate.1:	$(mandep)	../src/truncate.c
-tsort.1:	$(mandep)	../src/tsort.c
-tty.1:		$(mandep)	../src/tty.c
-uname.1:	$(mandep)	../src/uname.c
-unexpand.1:	$(mandep)	../src/unexpand.c
-uniq.1:		$(mandep)	../src/uniq.c
-unlink.1:	$(mandep)	../src/unlink.c
-uptime.1:	$(mandep)	../src/uptime.c
-users.1:	$(mandep)	../src/users.c
-vdir.1:		$(mandep)	../src/ls.c
-wc.1:		$(mandep)	../src/wc.c
-who.1:		$(mandep)	../src/who.c
-whoami.1:	$(mandep)	../src/whoami.c
-yes.1:		$(mandep)	../src/yes.c
-
-# This is required so that changes to e.g., emit_bug_reporting_address
-# provoke regeneration of all $(MAN) files.
-$(MAN): $(top_srcdir)/src/system.h
-
-.x.1:
-	$(AM_V_GEN)case '$(PERL)' in				\
-	  *"/missing "*)					\
-	    echo 'WARNING: cannot update man page $@ since perl is missing' \
-	      'or inadequate' 1>&2				\
-	    exit 0;;						\
-	esac; \
-	name=`echo $@ | sed -e 's|.*/||' -e 's|\.1$$||'` || exit 1;	\
-## Ensure that help2man runs the 'src/ginstall' binary as 'install' when
-## creating 'install.1'.  Similarly, ensure that it uses the 'src/[' binary
-## to create 'test.1'.
-	case $$name in							\
-	  install) prog='ginstall';;					\
-	     test) prog='[';;						\
-	        *) prog=$$name;;					\
-	esac;								\
-## Note the use of $$t/$*, rather than just '$*' as in other packages.
-## That is necessary to avoid failures for programs that are also shell
-## built-in functions like echo, false, printf, pwd.
-	rm -f $@ $@-t							\
-	  && t=$*.td							\
-	  && rm -rf $$t							\
-	  && mkdir $$t							\
-	  && (cd $$t && $(LN_S) $(abs_top_builddir)/src/$$prog $$name)	\
-	  && $(PERL) -- $(srcdir)/help2man				\
-		     --source='$(PACKAGE_STRING)'			\
-		     --include=$(srcdir)/$$name.x			\
-		     --output=$$t/$$name.1 $$t/$$name			\
-	  && sed 's|$*\.td/||g' $$t/$$name.1 > $@-t			\
-	  && rm -rf $$t							\
-	  && chmod -w $@-t						\
-	  && mv $@-t $@
-
-# Option descriptions should not start with a capital letter
-.PHONY: sc_option_desc_uppercase
-sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
-	@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
-	    { echo 1>&2 '$@: found initial capitals in --help';   \
-	      exit 1; } || :;
-
-.PHONY: sc_man_file_correlation
-sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
-
-# Sort in traditional ASCII order, regardless of the current locale;
-# otherwise we may get into trouble with distinct strings that the
-# current locale considers to be equal.
-ASSORT = LC_ALL=C sort
-
-# Ensure that for each .x file in this directory, there is a
-# corresponding .1 file in the definition of $(dist_man1_MANS) above.
-# But since that expansion usually lacks programs like arch and hostname,
-# add them here manually.
-.PHONY: check-x-vs-1
-check-x-vs-1:
-	@PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH;		\
-	t=$@-t;								\
-	(cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
-	(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT)		\
-	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
-	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
-	rm $$t
-
-all_programs =								\
-      (cd ../src && MAKEFLAGS= $(MAKE) -s all_programs.list)		\
-       | grep -v '\['
-
-.PHONY: check-programs-vs-x
-check-programs-vs-x:
-	@status=0;					\
-	for p in dummy `$(all_programs)`; do		\
-	  test $$p = dummy && continue;			\
-	  test $$p = ginstall && p=install || : ;	\
-	  test -f $(srcdir)/$$p.x			\
-	    || { echo missing $$p.x 1>&2; status=1; };	\
-	done;						\
-	exit $$status
diff --git a/man/local.mk b/man/local.mk
new file mode 100644
index 0000000..20bdeb6
--- /dev/null
+++ b/man/local.mk
@@ -0,0 +1,223 @@
+# Make coreutils man pages.				-*-Makefile-*-
+# This is included by the top-level Makefile.am.
+
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+dist_man1_MANS = $(MAN)
+
+man_aux = $(dist_man1_MANS:.1=.x)
+
+EXTRA_DIST += $(man_aux) man/help2man
+MAINTAINERCLEANFILES += $(dist_man1_MANS)
+
+# The "$(VAR:%=dir/%.x)" idiom is not portable according to POSIX, but in
+# practice it works with several make implementation (GNU, BSD, CCS make
+# from Solaris 10, Sun distributed make).  In addition, since only
+# maintainers are expected to build release tarballs (and they should
+# use GNU make when doing so), it's not big deal if this won't work with
+# some dumber make implementation.
+EXTRA_DIST += \
+  $(NO_INSTALL_PROGS_DEFAULT:%=man/%.x) \
+  $(NO_INSTALL_PROGS_DEFAULT:%=man/%.1)
+
+# Depend on this to get version number changes.
+mandep = .version
+
+# Note that arch depends on uname.c
+man/arch.1:      $(mandep)  src/uname.c
+
+man/base64.1:    $(mandep)  src/base64.c
+man/basename.1:  $(mandep)  src/basename.c
+man/cat.1:       $(mandep)  src/cat.c
+man/chcon.1:     $(mandep)  src/chcon.c
+man/chgrp.1:     $(mandep)  src/chgrp.c
+man/chmod.1:     $(mandep)  src/chmod.c
+man/chown.1:     $(mandep)  src/chown.c
+man/chroot.1:    $(mandep)  src/chroot.c
+man/cksum.1:     $(mandep)  src/cksum.c
+man/comm.1:      $(mandep)  src/comm.c
+man/cp.1:        $(mandep)  src/cp.c
+man/csplit.1:    $(mandep)  src/csplit.c
+man/cut.1:       $(mandep)  src/cut.c
+man/date.1:      $(mandep)  src/date.c
+man/dd.1:        $(mandep)  src/dd.c
+man/df.1:        $(mandep)  src/df.c
+
+# Note that dir depends on ls.c, since that's where its --help text is.
+man/dir.1:       $(mandep)  src/ls.c
+
+man/dircolors.1: $(mandep)  src/dircolors.c
+man/dirname.1:   $(mandep)  src/dirname.c
+man/du.1:        $(mandep)  src/du.c
+man/echo.1:      $(mandep)  src/echo.c
+man/env.1:       $(mandep)  src/env.c
+man/expand.1:    $(mandep)  src/expand.c
+man/expr.1:      $(mandep)  src/expr.c
+man/factor.1:    $(mandep)  src/factor.c
+man/false.1:     $(mandep)  src/false.c
+man/fmt.1:       $(mandep)  src/fmt.c
+man/fold.1:      $(mandep)  src/fold.c
+man/groups.1:    $(mandep)  src/groups.c
+man/head.1:      $(mandep)  src/head.c
+man/hostid.1:    $(mandep)  src/hostid.c
+man/hostname.1:  $(mandep)  src/hostname.c
+man/id.1:        $(mandep)  src/id.c
+man/install.1:   $(mandep)  src/install.c
+man/join.1:      $(mandep)  src/join.c
+man/kill.1:      $(mandep)  src/kill.c
+man/link.1:      $(mandep)  src/link.c
+man/ln.1:        $(mandep)  src/ln.c
+man/logname.1:   $(mandep)  src/logname.c
+man/ls.1:        $(mandep)  src/ls.c
+man/md5sum.1:    $(mandep)  src/md5sum.c
+man/mkdir.1:     $(mandep)  src/mkdir.c
+man/mkfifo.1:    $(mandep)  src/mkfifo.c
+man/mknod.1:     $(mandep)  src/mknod.c
+man/mktemp.1:    $(mandep)  src/mktemp.c
+man/mv.1:        $(mandep)  src/mv.c
+man/nice.1:      $(mandep)  src/nice.c
+man/nl.1:        $(mandep)  src/nl.c
+man/nohup.1:     $(mandep)  src/nohup.c
+man/nproc.1:     $(mandep)  src/nproc.c
+man/od.1:        $(mandep)  src/od.c
+man/paste.1:     $(mandep)  src/paste.c
+man/pathchk.1:   $(mandep)  src/pathchk.c
+man/pinky.1:     $(mandep)  src/pinky.c
+man/pr.1:        $(mandep)  src/pr.c
+man/printenv.1:  $(mandep)  src/printenv.c
+man/printf.1:    $(mandep)  src/printf.c
+man/ptx.1:       $(mandep)  src/ptx.c
+man/pwd.1:       $(mandep)  src/pwd.c
+man/readlink.1:  $(mandep)  src/readlink.c
+man/realpath.1:  $(mandep)  src/realpath.c
+man/rm.1:        $(mandep)  src/rm.c
+man/rmdir.1:     $(mandep)  src/rmdir.c
+man/runcon.1:    $(mandep)  src/runcon.c
+man/seq.1:       $(mandep)  src/seq.c
+man/sha1sum.1:   $(mandep)  src/md5sum.c
+man/sha224sum.1: $(mandep)  src/md5sum.c
+man/sha256sum.1: $(mandep)  src/md5sum.c
+man/sha384sum.1: $(mandep)  src/md5sum.c
+man/sha512sum.1: $(mandep)  src/md5sum.c
+man/shred.1:     $(mandep)  src/shred.c
+man/shuf.1:      $(mandep)  src/shuf.c
+man/sleep.1:     $(mandep)  src/sleep.c
+man/sort.1:      $(mandep)  src/sort.c
+man/split.1:     $(mandep)  src/split.c
+man/stat.1:      $(mandep)  src/stat.c
+man/stdbuf.1:    $(mandep)  src/stdbuf.c
+man/stty.1:      $(mandep)  src/stty.c
+man/sum.1:       $(mandep)  src/sum.c
+man/sync.1:      $(mandep)  src/sync.c
+man/tac.1:       $(mandep)  src/tac.c
+man/tail.1:      $(mandep)  src/tail.c
+man/tee.1:       $(mandep)  src/tee.c
+man/test.1:      $(mandep)  src/test.c
+man/timeout.1:   $(mandep)  src/timeout.c
+man/touch.1:     $(mandep)  src/touch.c
+man/tr.1:        $(mandep)  src/tr.c
+man/true.1:      $(mandep)  src/true.c
+man/truncate.1:  $(mandep)  src/truncate.c
+man/tsort.1:     $(mandep)  src/tsort.c
+man/tty.1:       $(mandep)  src/tty.c
+man/uname.1:     $(mandep)  src/uname.c
+man/unexpand.1:  $(mandep)  src/unexpand.c
+man/uniq.1:      $(mandep)  src/uniq.c
+man/unlink.1:    $(mandep)  src/unlink.c
+man/uptime.1:    $(mandep)  src/uptime.c
+man/users.1:     $(mandep)  src/users.c
+man/vdir.1:      $(mandep)  src/ls.c
+man/wc.1:        $(mandep)  src/wc.c
+man/who.1:       $(mandep)  src/who.c
+man/whoami.1:    $(mandep)  src/whoami.c
+man/yes.1:       $(mandep)  src/yes.c
+
+# This is required so that changes to e.g., emit_bug_reporting_address
+# provoke regeneration of all $(MAN) files.
+$(MAN): $(top_srcdir)/src/system.h
+
+.x.1:
+	$(AM_V_GEN)case '$(PERL)' in				\
+	  *"/missing "*)					\
+	    echo 'WARNING: cannot update man page $@ since perl is missing' \
+	      'or inadequate' 1>&2				\
+	    exit 0;;						\
+	esac; \
+	name=`echo $@ | sed -e 's|.*/||' -e 's|\.1$$||'` || exit 1;	\
+## Ensure that help2man runs the 'src/ginstall' binary as 'install' when
+## creating 'install.1'.  Similarly, ensure that it uses the 'src/[' binary
+## to create 'test.1'.
+	case $$name in							\
+	  install) prog='ginstall';;					\
+	     test) prog='[';;						\
+		*) prog=$$name;;					\
+	esac;								\
+## Note the use of $$t/$*, rather than just '$*' as in other packages.
+## That is necessary to avoid failures for programs that are also shell
+## built-in functions like echo, false, printf, pwd.
+	rm -f $@ $@-t							\
+	  && t=$*.td							\
+	  && rm -rf $$t							\
+	  && mkdir $$t							\
+	  && (cd $$t && $(LN_S) $(abs_top_builddir)/src/$$prog $$name)	\
+	  && $(PERL) -- $(srcdir)/man/help2man				\
+		     --source='$(PACKAGE_STRING)'			\
+		     --include=$(srcdir)/man/$$name.x			\
+		     --output=$$t/$$name.1 $$t/$$name			\
+	  && sed 's|$*\.td/||g' $$t/$$name.1 > $@-t			\
+	  && rm -rf $$t							\
+	  && chmod -w $@-t						\
+	  && mv $@-t $@
+
+# Option descriptions should not start with a capital letter
+.PHONY: sc_option_desc_uppercase
+sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
+	@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
+	    { echo 1>&2 '$@: found initial capitals in --help';   \
+	      exit 1; } || :;
+
+.PHONY: sc_man_file_correlation
+sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
+
+# Ensure that for each .x file in this directory, there is a
+# corresponding .1 file in the definition of $(dist_man1_MANS) above.
+# But since that expansion usually lacks programs like arch and hostname,
+# add them here manually.
+.PHONY: check-x-vs-1
+check-x-vs-1:
+	@PATH=./src$(PATH_SEPARATOR)$$PATH; export PATH;		\
+	t=$@-t;								\
+	(cd $(srcdir)/man && ls -1 *.x)					\
+	  | sed 's/\.x$$//' | $(ASSORT) > $$t;				\
+	(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT)		\
+	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
+	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
+	rm $$t
+
+all_programs =								\
+      (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list)		\
+       | grep -v '\['
+
+.PHONY: check-programs-vs-x
+check-programs-vs-x:
+	@status=0;					\
+	for p in dummy `$(all_programs)`; do		\
+	  test $$p = dummy && continue;			\
+	  test $$p = ginstall && p=install || : ;	\
+	  test -f $(srcdir)/man/$$p.x			\
+	    || { echo missing $$p.x 1>&2; status=1; };	\
+	done;						\
+	exit $$status
--
1.7.12


>From aaa9d080a4d0d60a6d5498cb01204115c8fc9b7d Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 17:37:35 +0200
Subject: [PATCH 18/22] maint: move man-related syntax checks in cfg.mk

This is more natural, now that the top-level Makefile has access to
all the variables and rules once defined only in 'man/Makefile.am'
(that was before the previous commit).

* man/local.mk (all_programs, sc_option_desc_uppercase,
sc_man_file_correlation check-x-vs-1, check-programs-vs-x): Move
from here ...
* cfg.mk: ... to here.  Adjust some comments in the process.
---
 cfg.mk       | 50 +++++++++++++++++++++++++++++++++++++++++++++-----
 man/local.mk | 40 ----------------------------------------
 2 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 5f7193e..9da6afa 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -166,16 +166,56 @@ sc_long_lines:
 	  sed -e "s|^|$$file:|" -e '$(FILTER_LONG_LINES)';		\
 	done | grep . && { msg="$$halt" $(_sc_say_and_exit) } || :

-# Option descriptions should not start with a capital letter
+# Option descriptions should not start with a capital letter.
 # One could grep source directly as follows:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
 # but that would miss descriptions not on the same line as the -option.
 ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
-sc_option_desc_uppercase: all_programs
-
-# Ensure all man/*.[1x] files are present
+.PHONY: sc_option_desc_uppercase
+sc_option_desc_uppercase:
+	@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
+	    { echo 1>&2 '$@: found initial capitals in --help';   \
+	      exit 1; } || :;
+sc_option_desc_uppercase: $(dist_man1_MANS) \
+                          $(NO_INSTALL_PROGS_DEFAULT:%=%.1) \
+                          all_programs
+
+# Ensure all man/*.[1x] files are present.
 ALL_RECURSIVE_TARGETS += sc_man_file_correlation
-sc_man_file_correlation: all_programs
+.PHONY: sc_man_file_correlation
+sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
+
+# Ensure that for each .x file in the 'man/' subdirectory, there is a
+# corresponding .1 file in the definition of $(dist_man1_MANS).
+# But since that expansion usually lacks programs like arch and hostname,
+# add them here manually.
+.PHONY: check-x-vs-1
+check-x-vs-1:
+	@PATH=./src$(PATH_SEPARATOR)$$PATH; export PATH;		\
+	t=$@-t;								\
+	(cd $(srcdir)/man && ls -1 *.x)					\
+	  | sed 's/\.x$$//' | $(ASSORT) > $$t;				\
+	(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT)		\
+	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
+	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
+	rm $$t
+
+all_programs =								\
+      (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list)		\
+       | grep -v '\['
+
+# Ensure that for each .x file in the 'man/' subdirectory, there is a
+# corresponding coreutils program.
+.PHONY: check-programs-vs-x
+check-programs-vs-x: all_programs
+	@status=0;					\
+	for p in dummy `$(all_programs)`; do		\
+	  test $$p = dummy && continue;			\
+	  test $$p = ginstall && p=install || : ;	\
+	  test -f $(srcdir)/man/$$p.x			\
+	    || { echo missing $$p.x 1>&2; status=1; };	\
+	done;						\
+	exit $$status

 # Ensure that the end of each release's section is marked by two empty lines.
 sc_NEWS_two_empty_lines:
diff --git a/man/local.mk b/man/local.mk
index 20bdeb6..d42c982 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -181,43 +181,3 @@ $(MAN): $(top_srcdir)/src/system.h
 	  && rm -rf $$t							\
 	  && chmod -w $@-t						\
 	  && mv $@-t $@
-
-# Option descriptions should not start with a capital letter
-.PHONY: sc_option_desc_uppercase
-sc_option_desc_uppercase: $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT:%=%.1)
-	@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
-	    { echo 1>&2 '$@: found initial capitals in --help';   \
-	      exit 1; } || :;
-
-.PHONY: sc_man_file_correlation
-sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
-
-# Ensure that for each .x file in this directory, there is a
-# corresponding .1 file in the definition of $(dist_man1_MANS) above.
-# But since that expansion usually lacks programs like arch and hostname,
-# add them here manually.
-.PHONY: check-x-vs-1
-check-x-vs-1:
-	@PATH=./src$(PATH_SEPARATOR)$$PATH; export PATH;		\
-	t=$@-t;								\
-	(cd $(srcdir)/man && ls -1 *.x)					\
-	  | sed 's/\.x$$//' | $(ASSORT) > $$t;				\
-	(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT)		\
-	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
-	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
-	rm $$t
-
-all_programs =								\
-      (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list)		\
-       | grep -v '\['
-
-.PHONY: check-programs-vs-x
-check-programs-vs-x:
-	@status=0;					\
-	for p in dummy `$(all_programs)`; do		\
-	  test $$p = dummy && continue;			\
-	  test $$p = ginstall && p=install || : ;	\
-	  test -f $(srcdir)/man/$$p.x			\
-	    || { echo missing $$p.x 1>&2; status=1; };	\
-	done;						\
-	exit $$status
--
1.7.12


>From 936801e29c154dc873a5ab7cfc3b859aae61bc4c Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 17:50:34 +0200
Subject: [PATCH 19/22] maint: adjust syntax check 'check-x-vs-1'

* cfg.mk (check-x-vs-1): Here, by stripping 'man/' prefix from
$(dist_man1_MANS) entries before comparing them with the list of
expected programs.
---
 cfg.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cfg.mk b/cfg.mk
index 9da6afa..5b0f1fc 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -195,7 +195,8 @@ check-x-vs-1:
 	t=$@-t;								\
 	(cd $(srcdir)/man && ls -1 *.x)					\
 	  | sed 's/\.x$$//' | $(ASSORT) > $$t;				\
-	(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT)		\
+	(echo $(patsubst man/%,%,$(dist_man1_MANS))			\
+	      $(NO_INSTALL_PROGS_DEFAULT)				\
 	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
 	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
 	rm $$t
--
1.7.12


>From 963dc11f81e569b971fda7eb73ffed91ef18a7ec Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 17:57:45 +0200
Subject: [PATCH 20/22] maint: adjust syntax check 'sc_option_desc_uppercase'

* cfg.mk (sc_option_desc_uppercase): Here, by grafting the 'man/'
prefix to the manpages obtained from the $(NO_INSTALL_PROGS_DEFAULT)
and listed as prerequisites for this rule.
---
 cfg.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cfg.mk b/cfg.mk
index 5b0f1fc..50fb13e 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -177,7 +177,7 @@ sc_option_desc_uppercase:
 	    { echo 1>&2 '$@: found initial capitals in --help';   \
 	      exit 1; } || :;
 sc_option_desc_uppercase: $(dist_man1_MANS) \
-                          $(NO_INSTALL_PROGS_DEFAULT:%=%.1) \
+                          $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT)) \
                           all_programs

 # Ensure all man/*.[1x] files are present.
--
1.7.12


>From 0aec09e9850fb107fc939c782642d33c8b91f188 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 17:59:48 +0200
Subject: [PATCH 21/22] build: factor out a little more re list of *.texi
 files

We may well want to switch from checking all *.texi to
checking only version-controlled .texi files, so encapsulate
this concept in one place.

* doc/local.mk (doc_srcdir): Delete.  Use this instead:
(texi_files): Define.  All usages adjusted.
---
 doc/local.mk | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/doc/local.mk b/doc/local.mk
index 665dd21..585faf0 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -24,8 +24,6 @@ doc_coreutils_TEXINFOS = \
   doc/constants.texi \
   doc/fdl.texi

-doc_srcdir = $(top_srcdir)/doc
-
 # The following is necessary if the package name is 8 characters or longer.
 # If the info documentation would be split into 10 or more separate files,
 # then this is necessary even if the package name is 7 characters long.
@@ -62,26 +60,28 @@ syntax_checks =		\
   sc-lower-case-var	\
   sc-use-small-caps-NUL

+texi_files = $(srcdir)/doc/*.texi
+
 .PHONY: $(syntax_checks) check-texinfo

 # List words/regexps here that should not appear in the texinfo documentation.
 check-texinfo: $(syntax_checks)
 	$(AM_V_GEN)fail=0;						\
-	grep '@url{' $(doc_srcdir)/*.texi && fail=1;			\
-	grep '\$$@"' $(doc_srcdir)/*.texi && fail=1;			\
-	grep -n '[^[:punct:]]@footnote' $(doc_srcdir)/*.texi && fail=1;	\
-	grep -n filename $(doc_srcdir)/*.texi				\
+	grep '@url{' $(texi_files) && fail=1;				\
+	grep '\$$@"' $(texi_files) && fail=1;				\
+	grep -n '[^[:punct:]]@footnote' $(texi_files) && fail=1;	\
+	grep -n filename $(texi_files)					\
 	    | $(EGREP) -v 'setfilename|[{]filename[}]'			\
 	  && fail=1;							\
 	exit $$fail

 sc-avoid-builtin:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(doc_srcdir)/*.texi \
+	$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(texi_files)	\
 	  && exit 1 || :

 sc-avoid-path:
 	$(AM_V_GEN)fail=0;						\
-	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(doc_srcdir)/*.texi	\
+	$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(texi_files)		\
 	  | $(EGREP) -v							\
 	  'PATH=|path search|search path|@vindex PATH$$|@env[{]PATH[}]'	\
 	  && fail=1;							\
@@ -89,28 +89,28 @@ sc-avoid-path:

 # Use "time zone", not "timezone".
 sc-avoid-timezone:
-	$(AM_V_GEN)$(EGREP) timezone $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) timezone $(texi_files) && exit 1 || :

 # Check for insufficient exponent grouping, e.g.,
 # @math{2^64} should be @math{2^{64}}.
 sc-exponent-grouping:
-	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(texi_files) && exit 1 || :

 # E.g., use @sc{nul}, not NUL.
 sc-use-small-caps-NUL:
-	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(texi_files) && exit 1 || :

 # Say I/O, not IO.
 sc-avoid-io:
-	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(texi_files) && exit 1 || :

 # I prefer nonzero over non-zero.
 sc-avoid-non-zero:
-	$(AM_V_GEN)$(EGREP) non-zero $(doc_srcdir)/*.texi && exit 1 || :
+	$(AM_V_GEN)$(EGREP) non-zero $(texi_files) && exit 1 || :

 # Use "zeros", not "zeroes" (nothing wrong with "zeroes"; just be consistent).
 sc-avoid-zeroes:
-	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(doc_srcdir)/*.texi \
+	$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(texi_files)	\
 	  && exit 1 || :

 # The quantity inside @var{...} should not contain upper case letters.
@@ -126,6 +126,6 @@ find_upper_case_var =		\
    END {$$m and (warn "$@: do not use upper case in \@var{...}\n"), exit 1}'
 sc-lower-case-var:
 	$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
-	  $(PERL) -lne $(find_upper_case_var) $(doc_srcdir)/*.texi
+	  $(PERL) -lne $(find_upper_case_var) $(texi_files)

 check-local: check-texinfo
--
1.7.12


>From 89983ffae9a2e22db12ed9f49b5f5c4c494fc31f Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Wed, 29 Aug 2012 18:01:02 +0200
Subject: [PATCH 22/22] maint: update gitignore entries

* doc/.gitinore: Here, adding the '.dirstamp' file generated by
the Texinfo rules.
---
 doc/.gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/.gitignore b/doc/.gitignore
index ef55efd..e63c202 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -20,3 +20,4 @@
 /parse-datetime.texi
 /stamp-vti
 /version.texi
+/.dirstamp
--
1.7.12


From MAILER-DAEMON Thu Aug 30 08:48:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74AD-0006zT-4s
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 08:48:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57163)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nick.alcock@oracle.com>) id 1T74A7-0006yZ-Gv
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:47:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <nick.alcock@oracle.com>) id 1T74A3-00050S-85
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:47:55 -0400
Received: from rcsinet15.oracle.com ([148.87.113.117]:27641)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nick.alcock@oracle.com>) id 1T74A3-00050F-1P
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:47:51 -0400
Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238])
	by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with
	ESMTP id q7UClnV9010663
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 30 Aug 2012 12:47:50 GMT
Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157])
	by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id
	q7UClmEb022283
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 30 Aug 2012 12:47:49 GMT
Received: from abhmt106.oracle.com (abhmt106.oracle.com [141.146.116.58])
	by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id
	q7UClm9U016108; Thu, 30 Aug 2012 07:47:48 -0500
Received: from spindle.srvr.nix (/81.187.191.129)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Thu, 30 Aug 2012 05:47:47 -0700
From: Nick Alcock <nick.alcock@oracle.com>
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] tests: misc/sort-exit-early: do not run as root.
References: <874nnluzjt.fsf@spindle.srvr.nix> <87d3283flc.fsf@rho.meyering.net>
Emacs: impress your (remaining) friends and neighbors.
Date: Thu, 30 Aug 2012 13:47:45 +0100
In-Reply-To: <87d3283flc.fsf@rho.meyering.net> (Jim Meyering's message of
	"Thu, 30 Aug 2012 11:15:59 +0200")
Message-ID: <87mx1ctuku.fsf@spindle.srvr.nix>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Source-IP: acsinet22.oracle.com [141.146.126.238]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1)
X-Received-From: 148.87.113.117
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, 30 Aug 2012 12:47:59 -0000

On 30 Aug 2012, Jim Meyering uttered the following:

> A word of caution:
>
> There have been exploitable flaws (albeit rare) in these tests over
> the years, and if you had regularly run all of them as root on a shared
> system, it might have been easy to exploit.  The root-only tests are
> more carefully audited, precisely because we regularly run them as root.

Yeah. The systems on which I run these tests as root are shared only
with the trusted. (My autobuilder automatically does a very-expensive
'make check' as non-root, a 'make check-root' as root, then a 'make
check' as root, every time I upgrade coreutils. I don't upgrade to every
release, but most.)

>     If you want to use some other non-root username, specify it via
>     the NON_ROOT_USERNAME environment variable.

I use the username that did the compilation, which is already trusted to
raise privileges to root to do the installation -- though not to run
'make install' as root, that is fakerooted. The compilation and testing
are also done in a freshly-created loopback-mounted filesystem that is
erased right after a successful build, so only a bug that led to things
being changed outside the test filesystem could lead to problems that
persisted past the build. I am not aware of any such ever having
happened.

I figure that I can trust the coreutils maintainers not to intentionally
insert ruinous code into the makefile or testsuite, thus I feel it is
*relatively* safe to run 'make check' as root, where it would not be for
a random package. After all, I run coreutils binaries as root all the
time.

(This is also by no means the most dangerous testsuite that gets run as
root on this machine, though the others are part of my job and I wrote
the testsuite driver so should they go wrong I'll have only myself to
blame as I put the smoking fragments of the machine back together!)

>     I find that it is best to unpack and build as a non-privileged
>     user,

Anyone who compiles as a privileged user deserves everything they get,
IMHO. I used to do it when building Perl packages with CPAN.pm, and
bizarre problems and file creations, particularly in the root directory,
were not rare. (I had a momentary frisson of fear upon upgrading
coreutils last, because hey! / has suddenly changed! But it hadn't, it
was just the relative-symlink-in-/ bug and Mike Frysinger had already
reported it.)

>                We get much less test coverage in that mode

There have been remarkably few problems. I think this is the first I've
seen in years that goes wrong only when testing as root.

-- 
NULL && (void)


From MAILER-DAEMON Thu Aug 30 09:21:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74gW-0003wO-Ef
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:21:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33332)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cr-0007Xs-MH
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cm-0000Mr-PY
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:33 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:61899)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cm-0000MY-ID
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:28 -0400
Received: by mail-bk0-f41.google.com with SMTP id jc3so774186bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 05:13:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=Ng9nescFW/FG4UNQ6ntaadmQNgJJd/ZhNpSdWCIuRas=;
	b=w3eIzZ8+Gp22y9yexXaFMEtJ5thT5pH/3u8AWNDBoQv92q1zl4qoi1+ZL3doS+DwB1
	jIeZ37euK+ZOL8RKWfLL4/7qy/J90SZSdNOUrC44ZlQtxumnojhQiA8SnkVMp1cd/lpA
	BED79e0cojav2CxCVG9yBnZE84fa/XxMpGd6Z0oFQIiJzdHo5Lw5BcofF8VC4toQHa5f
	HAjx/TDXd4MgQ7OYW9C1u6a2cJq6cRT8Jen/D83+ho0/bCFJ0wYc6x/jRYlXQy3N/fzT
	T45e9TbXU1/4FAWyGOuu3w+IJ0gavGregQ51DJml0ZfHxtblY4oH3CGYWFI4jdQAabAO
	JFjw==
Received: by 10.204.154.66 with SMTP id n2mr2575783bkw.138.1346328807922;
	Thu, 30 Aug 2012 05:13:27 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hs2sm1135892bkc.1.2012.08.30.05.13.26
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 05:13:27 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 1/7] tests: merge tests/check.mk into tests/Makefile.am
Date: Thu, 30 Aug 2012 14:13:07 +0200
Message-Id: <5f9659b1563855cff235599414abea0749d289d2.1346327497.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
X-Mailman-Approved-At: Thu, 30 Aug 2012 09:21:23 -0400
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 12:13:37 -0000

The separation has become unnecessary after all the ancient
'tests/*/Makefile.am' makefiles have been merged into the
"more-top-level" one 'tests/Makefile.am'.

* tests/check.mk: Merge ...
* tests/Makefile.am: ... in here.  Some comments tweaking while
at it.
---
 tests/Makefile.am | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 tests/check.mk    | 94 -----------------------------------------------------
 2 files changed, 95 insertions(+), 96 deletions(-)
 delete mode 100644 tests/check.mk

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 87d6cad..eed4e2e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,100 @@
 ## Process this file with automake to produce Makefile.in -*-Makefile-*-.
 
+## Copyright (C) 2007-2012 Free Software Foundation, Inc.
+
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure that all version-controlled executable files are listed in TESTS.
+# Collect test names from the line matching /^TESTS = \\$$/ to the following
+# one that does not end in '\'.
+_v = TESTS
+_w = root_tests
+vc_exe_in_TESTS: Makefile
+	$(AM_V_GEN)if test -d $(top_srcdir)/.git && test $(srcdir) = .; then \
+	 {								\
+	  for list in $(_v) $(_w); do					\
+	    sed -n "/^$$list =[	 ]*\\\\$$/,/[^\]$$/p" Makefile.am |	\
+	    sed -n 's/^  *\([^$$	 ]\{1,\}\).*/\1/p';		\
+	  done;								\
+	  for f in `cd $(top_srcdir) &&					\
+	   build-aux/vc-list-files $(subdir) | sed 's!^$(subdir)/!!'`; do \
+	    test -f "$$f" && test -x "$$f" && echo "$$f";		\
+	  done;								\
+	 } | sort | uniq -u | grep . && exit 1 ||:;			\
+	else :; fi
+
+check: vc_exe_in_TESTS
+.PHONY: vc_exe_in_TESTS
+
+CLEANFILES =
+CLEANFILES += .built-programs
+check_DATA = .built-programs
+.built-programs: $(top_srcdir)/src/Makefile.am
+	$(AM_V_GEN)(cd $(top_builddir)/src				\
+            && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
+          > $@-t && mv $@-t $@
+
+# '$f' is set by the Automake-generated test harness to the path of the
+# current test script stripped of VPATH components, and is used by the
+# shell-or-perl script to determine the name of the temporary files to be
+# used.  Note that $f is a shell variable, not a make macro, so the use of
+# '$$f' below is correct, and not a typo.
+LOG_COMPILER = \
+  $(SHELL) $(srcdir)/shell-or-perl \
+  --test-name "$$f" --srcdir '$(srcdir)' \
+  --shell '$(SHELL)' --perl '$(PERL)' --
+
+# Note that the first lines are statements.  They ensure that environment
+# variables that can perturb tests are unset or set to expected values.
+# The rest are envvar settings that propagate build-related Makefile
+# variables to test scripts.
+TESTS_ENVIRONMENT =				\
+  . $(srcdir)/lang-default;			\
+  tmp__=$${TMPDIR-/tmp};			\
+  test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.;	\
+  . $(srcdir)/envvar-check;			\
+  TMPDIR=$$tmp__; export TMPDIR;		\
+  export					\
+  VERSION='$(VERSION)'				\
+  LOCALE_FR='$(LOCALE_FR)'			\
+  LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)'		\
+  abs_top_builddir='$(abs_top_builddir)'	\
+  abs_top_srcdir='$(abs_top_srcdir)'		\
+  abs_srcdir='$(abs_srcdir)'			\
+  built_programs="`cat .built-programs`"	\
+  host_os=$(host_os)				\
+  host_triplet='$(host_triplet)'		\
+  srcdir='$(srcdir)'				\
+  top_srcdir='$(top_srcdir)'			\
+  CONFIG_HEADER='$(abs_top_builddir)/$(CONFIG_INCLUDE)' \
+  CU_TEST_NAME=`basename '$(abs_srcdir)'`,`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
+  CC='$(CC)'					\
+  AWK='$(AWK)'					\
+  EGREP='$(EGREP)'				\
+  EXEEXT='$(EXEEXT)'				\
+  MAKE=$(MAKE)					\
+  PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'	\
+  PACKAGE_VERSION=$(PACKAGE_VERSION)		\
+  PERL='$(PERL)'				\
+  PREFERABLY_POSIX_SHELL='$(PREFERABLY_POSIX_SHELL)' \
+  ; test -d /usr/xpg4/bin && PATH='/usr/xpg4/bin$(PATH_SEPARATOR)'"$$PATH"; \
+  PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
+  ; 9>&2
+
+# On failure, display the global testsuite log on stdout.
+VERBOSE = yes
+
 # Sort in traditional ASCII order, regardless of the current locale;
 # otherwise we may get into trouble with distinct strings that the
 # current locale considers to be equal.
@@ -713,5 +808,3 @@ pr_data =					\
   pr/ttb3-0FF					\
   pr/ttb3-FF					\
   pr/w72l24f-ll
-
-include $(srcdir)/check.mk
diff --git a/tests/check.mk b/tests/check.mk
deleted file mode 100644
index 0e08f6d..0000000
--- a/tests/check.mk
+++ /dev/null
@@ -1,94 +0,0 @@
-# Include this file at the end of each tests/*/Makefile.am.
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Ensure that all version-controlled executable files are listed in TESTS.
-# Collect test names from the line matching /^TESTS = \\$$/ to the following
-# one that does not end in '\'.
-_v = TESTS
-_w = root_tests
-vc_exe_in_TESTS: Makefile
-	$(AM_V_GEN)if test -d $(top_srcdir)/.git && test $(srcdir) = .; then \
-	 {								\
-	  for list in $(_v) $(_w); do					\
-	    sed -n "/^$$list =[	 ]*\\\\$$/,/[^\]$$/p" Makefile.am |	\
-	    sed -n 's/^  *\([^$$	 ]\{1,\}\).*/\1/p';		\
-	  done;								\
-	  for f in `cd $(top_srcdir) &&					\
-	   build-aux/vc-list-files $(subdir) | sed 's!^$(subdir)/!!'`; do \
-	    test -f "$$f" && test -x "$$f" && echo "$$f";		\
-	  done;								\
-	 } | sort | uniq -u | grep . && exit 1 ||:;			\
-	else :; fi
-
-check: vc_exe_in_TESTS
-.PHONY: vc_exe_in_TESTS
-
-CLEANFILES =
-CLEANFILES += .built-programs
-check_DATA = .built-programs
-.built-programs: $(top_srcdir)/src/Makefile.am
-	$(AM_V_GEN)(cd $(top_builddir)/src				\
-            && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
-          > $@-t && mv $@-t $@
-
-## '$f' is set by the Automake-generated test harness to the path of the
-## current test script stripped of VPATH components, and is used by the
-## shell-or-perl script to determine the name of the temporary files to be
-## used.  Note that $f is a shell variable, not a make macro, so the use of
-## '$$f' below is correct, and not a typo.
-LOG_COMPILER = \
-  $(SHELL) $(srcdir)/shell-or-perl \
-  --test-name "$$f" --srcdir '$(srcdir)' \
-  --shell '$(SHELL)' --perl '$(PERL)' --
-
-# Note that the first lines are statements.  They ensure that environment
-# variables that can perturb tests are unset or set to expected values.
-# The rest are envvar settings that propagate build-related Makefile
-# variables to test scripts.
-TESTS_ENVIRONMENT =				\
-  . $(srcdir)/lang-default;			\
-  tmp__=$${TMPDIR-/tmp};			\
-  test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.;	\
-  . $(srcdir)/envvar-check;			\
-  TMPDIR=$$tmp__; export TMPDIR;		\
-  export					\
-  VERSION='$(VERSION)'				\
-  LOCALE_FR='$(LOCALE_FR)'			\
-  LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)'		\
-  abs_top_builddir='$(abs_top_builddir)'	\
-  abs_top_srcdir='$(abs_top_srcdir)'		\
-  abs_srcdir='$(abs_srcdir)'			\
-  built_programs="`cat .built-programs`"	\
-  host_os=$(host_os)				\
-  host_triplet='$(host_triplet)'		\
-  srcdir='$(srcdir)'				\
-  top_srcdir='$(top_srcdir)'			\
-  CONFIG_HEADER='$(abs_top_builddir)/$(CONFIG_INCLUDE)' \
-  CU_TEST_NAME=`basename '$(abs_srcdir)'`,`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
-  CC='$(CC)'					\
-  AWK='$(AWK)'					\
-  EGREP='$(EGREP)'				\
-  EXEEXT='$(EXEEXT)'				\
-  MAKE=$(MAKE)					\
-  PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'	\
-  PACKAGE_VERSION=$(PACKAGE_VERSION)		\
-  PERL='$(PERL)'				\
-  PREFERABLY_POSIX_SHELL='$(PREFERABLY_POSIX_SHELL)' \
-  ; test -d /usr/xpg4/bin && PATH='/usr/xpg4/bin$(PATH_SEPARATOR)'"$$PATH"; \
-  PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
-  ; 9>&2
-
-VERBOSE = yes
-- 
1.7.12



From MAILER-DAEMON Thu Aug 30 09:21:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74gW-0003wv-JG
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:21:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33377)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cy-0007mi-HI
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73co-0000My-Fy
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:40 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:61899)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73co-0000MY-8r
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:30 -0400
Received: by mail-bk0-f41.google.com with SMTP id jc3so774186bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 05:13:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=+ncQL6qw10kiTq0+jYpuqE2HGUjfZN251dLD48uFp5U=;
	b=jQmJ177KWJfXZHTtWn6B/SLBR4MlE1U+qHZKFqPelcCUnCqYcEY0/5tICaSEVym33k
	B+m4a9Ja2A7rhlD5mfrZDyUl39FrQEtesumn5OG5V2ZEzF7MEyMUHlbDGGknYsF38Q3T
	9iHMAOvCYSXNRVBbvXLlQyYWiZIH7UGum2DwIazmVrK00Kr0omTadag6hsjf+3xCCc+s
	8iP/Xwcz94nIhKapQmkCMqy3E+EKP9N4JQM/KJId7cqEj8uJlEUEvs+lKd/t+mznVjCW
	i6aSgG/lDhPudyOxpzlzIcMVNb+U9yDC+y1r2dfIStOqviYl8jmGFWmdWc/qzsBKk+Ia
	rVAg==
Received: by 10.204.148.15 with SMTP id n15mr2616219bkv.47.1346328809808;
	Thu, 30 Aug 2012 05:13:29 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hs2sm1135892bkc.1.2012.08.30.05.13.28
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 05:13:28 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 2/7] tests: prefer AM_TESTS_ENVIRONMENT over TESTS_ENVIRONMENT
Date: Thu, 30 Aug 2012 14:13:08 +0200
Message-Id: <fa66079dd3406b4327c29a827dae8b848520b448.1346327497.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
X-Mailman-Approved-At: Thu, 30 Aug 2012 09:21:23 -0400
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 12:13:44 -0000

The latter should be reserved for user overrides.

* tests/Makefile.am (TESTS_ENVIRONMENT): Rename ...
(AM_TESTS_ENVIRONMENT): ... like this.
---
 tests/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index eed4e2e..9839030 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -59,7 +59,7 @@ LOG_COMPILER = \
 # variables that can perturb tests are unset or set to expected values.
 # The rest are envvar settings that propagate build-related Makefile
 # variables to test scripts.
-TESTS_ENVIRONMENT =				\
+AM_TESTS_ENVIRONMENT =				\
   . $(srcdir)/lang-default;			\
   tmp__=$${TMPDIR-/tmp};			\
   test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.;	\
-- 
1.7.12



From MAILER-DAEMON Thu Aug 30 09:21:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74gW-0003xL-O5
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:21:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33365)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cw-0007lK-I8
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cr-0000NP-9H
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:38 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:61899)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cr-0000MY-1o
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:33 -0400
Received: by mail-bk0-f41.google.com with SMTP id jc3so774186bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 05:13:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=JMTClnBk2qz3MXB1l42ZOlEWxKbq3ymvPoNL5yVwnNY=;
	b=Z4kNdbgLp9Cx/eTaBfZ/edTFKF0K/ihqpwPNDA2M+nv9Q1x1dVuADR8hCx/mA3Ps4V
	2xi6zuEoQ6dw0Js20Y9Bsllxbb6BlMTt/WsWFlU5KOuXBNnpjKAjfkDnF2OdgvnjJsl/
	R/seK7FLEp+0uDWyvuNeLXvU+oyO1pZznbVEp0nk3qFAtc00KeiYiosSYKOjnMqwCvSr
	BP/0j/pX7oro7jRYeXtxGev1Y4c37sY65LwM/ljW7DNcwDFXHuKOIfJO703C8BPOsgtn
	Y5/uXvQBZjnd9KdS3ejl2gO2sJYZ65xRFiUijw23cQsjtlPRsnbmL74iT/HA9bbtwWgW
	Izog==
Received: by 10.205.122.147 with SMTP id gg19mr2575872bkc.73.1346328812670;
	Thu, 30 Aug 2012 05:13:32 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hs2sm1135892bkc.1.2012.08.30.05.13.31
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 05:13:32 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 4/7] tests: avoid use of '-T' in shebang line to enable perl
	taint mode
Date: Thu, 30 Aug 2012 14:13:10 +0200
Message-Id: <af9e85f46fbd010c59e966808da5d89b2b217cc8.1346327498.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
X-Mailman-Approved-At: Thu, 30 Aug 2012 09:21:23 -0400
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 12:13:44 -0000

* tests/rm/fail-eperm: Rename ...
* tests/rm/fail-eperm.xpl: ... like this
* tests/Makefile.am (TESTS): Adjust.
(TEST_EXTENSIONS): New, list '.xpl'.
(XPL_TEST_LOGS): New, run a perl test in tainted mode.
* tests/shell-or-perl: Simplify this script: we no longer need to
parse the shebang line and adjust the flags in the perl invocation
accordingly.
---
 tests/Makefile.am                       | 8 +++++++-
 tests/rm/{fail-eperm => fail-eperm.xpl} | 0
 tests/shell-or-perl                     | 9 ++-------
 3 files changed, 9 insertions(+), 8 deletions(-)
 rename tests/rm/{fail-eperm => fail-eperm.xpl} (100%)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9839030..581f803 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -45,6 +45,8 @@ check_DATA = .built-programs
             && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
           > $@-t && mv $@-t $@
 
+TEST_EXTENSIONS = .xpl
+
 # '$f' is set by the Automake-generated test harness to the path of the
 # current test script stripped of VPATH components, and is used by the
 # shell-or-perl script to determine the name of the temporary files to be
@@ -55,6 +57,10 @@ LOG_COMPILER = \
   --test-name "$$f" --srcdir '$(srcdir)' \
   --shell '$(SHELL)' --perl '$(PERL)' --
 
+# Perl scripts that must be run in tainted mode.
+XPL_LOG_COMPILER = \
+  $(PERL) -wT -I$(srcdir) -MCoreutils -MCuSkip -M"CuTmpdir qw($$f)"
+
 # Note that the first lines are statements.  They ensure that environment
 # variables that can perturb tests are unset or set to expected values.
 # The rest are envvar settings that propagate build-related Makefile
@@ -207,7 +213,7 @@ TESTS =						\
   rm/empty-name					\
   rm/f-1					\
   rm/fail-eacces				\
-  rm/fail-eperm					\
+  rm/fail-eperm.xpl				\
   tail-2/assert					\
   rm/hash					\
   rm/i-1					\
diff --git a/tests/rm/fail-eperm b/tests/rm/fail-eperm.xpl
similarity index 100%
rename from tests/rm/fail-eperm
rename to tests/rm/fail-eperm.xpl
diff --git a/tests/shell-or-perl b/tests/shell-or-perl
index 58c80e3..cb80edf 100644
--- a/tests/shell-or-perl
+++ b/tests/shell-or-perl
@@ -1,7 +1,6 @@
 #! /bin/sh
 # Run a test script of the coreutils test scripts, picking up the right
-# interpreter (i.e., perl or the shell) and the right flags for it (e.g.,
-# perl '-T' flag for perl scripts that must run in tainted mode).
+# interpreter (i.e., perl or the shell) and the right flags for it.
 #
 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
 #
@@ -96,11 +95,7 @@ case $shebang_line in
 '#!/usr/bin/perl'*)
   # The test is a perl script.
   if $cu_PERL -e 'use warnings' > /dev/null 2>&1; then
-    # Perl is available, see if we must run the test with taint
-    # mode on or not.
-    case $shebang_line in *\ -T*) T_=T;; *) T_=;; esac
-    # Now run it.
-    exec $cu_PERL -w$T_ -I"$srcdir" -MCoreutils -MCuSkip \
+    exec $cu_PERL -w -I"$srcdir" -MCoreutils -MCuSkip \
                   -M"CuTmpdir qw($test_name)" \
                   -- "$test_script" ${1+"$@"}
   else
-- 
1.7.12



From MAILER-DAEMON Thu Aug 30 09:21:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74gX-0003yn-8v
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:21:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33414)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73d2-0007n6-Ov
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cz-0000Or-Jj
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:44 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:61899)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cz-0000MY-CP
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:41 -0400
Received: by mail-bk0-f41.google.com with SMTP id jc3so774186bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 05:13:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=NFEC9UZXPex9Sd0xjSgbp9jCy9v75ifF9Es25tYPvx0=;
	b=knygBxgvpwdIAfHbbrNtOgu0JwiVfvVxCrUGK/iY7oOrny/SsIkkEk0IlgWgPUfNU5
	cF5azezeBYoUM4h1iThRRB7whQC0gC97Ld9ARf0THcCb6l1BgEgcMjCr0Bdrj6MMJzl0
	pLe6jBvhO4mikjJF0hfAGCSvHHOzxvsXsLpS88h8gWvhIzKXrOmIZTW9JTVIjlsxEKDh
	rEZz2WRMNQ+NmwxCM1q5INP6wHuAhWNeA3FNVHocHx4R9xzg9u1J1z0d9km44pyFgx0v
	Ox+pj5c1bXipqbFffAYsHdnTAlNg+Ae4WJWqJX9+Q9L/oxhrDWwir8RrPYD/qo+SD09L
	/Tug==
Received: by 10.204.10.92 with SMTP id o28mr2688153bko.39.1346328820964;
	Thu, 30 Aug 2012 05:13:40 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hs2sm1135892bkc.1.2012.08.30.05.13.39
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 05:13:40 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 7/7] tests: get rid of the 'shell-or-perl' auxiliary script
Date: Thu, 30 Aug 2012 14:13:13 +0200
Message-Id: <74b446a47be662437386b36e6ae0ef4e8a99f082.1346327498.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
X-Mailman-Approved-At: Thu, 30 Aug 2012 09:21:23 -0400
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 12:13:47 -0000

It's now easier and faster to simply run the perl ans shell test
scripts directly with the appropriate interpreter and options.

* tests/shell-or-perl: Delete.
* tests/Makefile.am (EXTRA_DIST): Remove it.
(SH_LOG_COMPILER): Re-define to invoke the correct shell.
(PL_LOG_COMPILER): Re-define to invoke the correct perl
interpreter ...
(TESTSUITE_PERL_OPTIONS): ... with the correct options.
(XPL_LOG_COMPILER): Use those options instead of inlining
their expansion.
(LOG_COMPILER): Delete, no longer needed.
---
 tests/Makefile.am   |  22 +++++------
 tests/shell-or-perl | 109 ----------------------------------------------------
 2 files changed, 9 insertions(+), 122 deletions(-)
 delete mode 100644 tests/shell-or-perl

diff --git a/tests/Makefile.am b/tests/Makefile.am
index a547b11..bc3d308 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -53,22 +53,19 @@ else
 TESTSUITE_PERL = $(SHELL) $(srcdir)/no-perl
 endif
 
+# Options passed to the perl invocations running the perl test scripts.
+TESTSUITE_PERL_OPTIONS = -w -I$(srcdir) -MCoreutils -MCuSkip
 # '$f' is set by the Automake-generated test harness to the path of the
 # current test script stripped of VPATH components, and is used by the
-# shell-or-perl script to determine the name of the temporary files to be
-# used.  Note that $f is a shell variable, not a make macro, so the use of
-# '$$f' below is correct, and not a typo.
-LOG_COMPILER = \
-  $(SHELL) $(srcdir)/shell-or-perl \
-  --test-name "$$f" --srcdir '$(srcdir)' \
-  --shell '$(SHELL)' --perl '$(TESTSUITE_PERL)' --
-
-PL_LOG_COMPILER = $(LOG_COMPILER)
-SH_LOG_COMPILER = $(LOG_COMPILER)
+# CuTmpdir module to determine the name of the temporary files to be
+# used.  Note that $f is a shell variable, not a make macro, so the use
+# of '$$f' below is correct, and not a typo.
+TESTSUITE_PERL_OPTIONS += -M"CuTmpdir qw($$f)"
 
+SH_LOG_COMPILER = $(SHELL)
+PL_LOG_COMPILER = $(TESTSUITE_PERL) $(TESTSUITE_PERL_OPTIONS)
 # Perl scripts that must be run in tainted mode.
-XPL_LOG_COMPILER = \
-  $(TESTSUITE_PERL) -wT -I$(srcdir) -MCoreutils -MCuSkip -M"CuTmpdir qw($$f)"
+XPL_LOG_COMPILER = $(TESTSUITE_PERL) -T $(TESTSUITE_PERL_OPTIONS)
 
 # Note that the first lines are statements.  They ensure that environment
 # variables that can perturb tests are unset or set to expected values.
@@ -130,7 +127,6 @@ EXTRA_DIST =		\
   no-perl		\
   other-fs-tmpdir	\
   sample-test		\
-  shell-or-perl		\
   $(pr_data)
 
 root_tests =					\
diff --git a/tests/shell-or-perl b/tests/shell-or-perl
deleted file mode 100644
index 409db0e..0000000
--- a/tests/shell-or-perl
+++ /dev/null
@@ -1,109 +0,0 @@
-#! /bin/sh
-# Run a test script of the coreutils test scripts, picking up the right
-# interpreter (i.e., perl or the shell) and the right flags for it.
-#
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-# ---------------------------------- #
-#  Readonly variables and functions  #
-# ---------------------------------- #
-
-# Help to avoid typo-related bugs.
-set -u
-
-me=shell-or-perl
-
-fatal_ ()
-{
-  echo "$me: $*" >&2
-  # Exit with status '99' to inform the testsuite harness that an
-  # hard error occurred.
-  exit 99
-}
-
-print_help_ ()
-{
-  cat <<EOH
-Usage: $me [--help] [--srcdir DIR] [--shell SHELL-CMD] [--perl PERL-CMD]
-       [--test-name NAME-WITHOUT-VPATH] TEST-SCRIPT [ARGS..]
-EOH
-}
-
-# ---------------- #
-#  Option parsing  #
-# ---------------- #
-
-assign_optarg_to_var='
-  test $# -gt 1 || fatal_ "option '\''$1'\'' requires an argument"
-  eval "$var=\$2"
-  shift'
-
-srcdir=${srcdir-.}
-cu_PERL=${PERL-perl}
-cu_SHELL=/bin/sh # Getting $SHELL from the environment is dangerous.
-test_name=
-while test $# -gt 0; do
-  var=
-  case $1 in
-    --help) print_help_; exit $?;;
-    --shell) var=cu_SHELL;;
-    --perl) var=cu_PERL;;
-    --srcdir) var=srcdir;;
-    --test-name) var=test_name;;
-    --) shift; break;;
-    -*) fatal_ "unknown option '$1'";;
-    *) break;;
-  esac
-  test -z "$var" || eval "$assign_optarg_to_var"
-  shift
-done
-
-unset assign_optarg_to_var var
-
-case $# in
-  0) fatal_ "missing argument";;
-  *) test_script=$1; shift;;
-esac
-
-test -z "$test_name" && test_name=$test_script
-
-# --------------------- #
-#  Run the test script  #
-# --------------------- #
-
-test -f "$test_script" && test -r "$test_script" \
-  || fatal_ "test script '$test_script' does not exist, or isn't readable"
-
-read shebang_line < "$test_script" \
-  || fatal_ "cannot read from the test script '$test_script'"
-
-case $shebang_line in
-'#!/usr/bin/perl'*)
-  # The test is a perl script.
-  exec $cu_PERL -w -I"$srcdir" -MCoreutils -MCuSkip \
-                -M"CuTmpdir qw($test_name)" -- "$test_script" ${1+"$@"}
-  ;;
-*)
-  # Assume the test is a shell script.
-  exec $cu_SHELL "$test_script" ${1+"$@"}
-esac
-
-# ------------- #
-#  Not reached  #
-# ------------- #
-
-fatal_ "dead code reached"
-- 
1.7.12



From MAILER-DAEMON Thu Aug 30 09:21:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74gX-00041V-Th
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:21:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33372)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cx-0007mc-Oa
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cm-0000Ml-8t
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:39 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:61899)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cl-0000MY-Ls
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:28 -0400
Received: by bkcjc3 with SMTP id jc3so774186bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 05:13:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer;
	bh=VHwhlVo/lngIyiJEcskGtkI+Y5+xwufLFsXsAn4nwmg=;
	b=YvC4PEIGO4L4zehbqtVOcaELVDyVFjyqZqtwsQSURli2F51ggHRFy8XH6sNl520YSS
	X+7EPdlq1PJyLHawxCHywALCamb13/P69NDBjPS7UNSVmX+UvgUOaiUxhsssGFyh7mxU
	IcZAuz3wwm3kGTWGnb+qDyyjMgJg8BQPDvxYKlgHCP9ux/a4NEINJ/7F5naRa/KIUDdn
	s0cceIUAATtiurx+uE9hfSXILRtgUrIeB9VJBYwKCrqqj5YKu3jMGWmNjm4pMZPAbs20
	LYxXGtIrSGF78CNBg8prkNYWjz4ieCkSEaE6+u1i1ofRh8PuwMymx0zhYqvw430oKQFK
	sFgA==
Received: by 10.204.130.25 with SMTP id q25mr2670384bks.119.1346328806145;
	Thu, 30 Aug 2012 05:13:26 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hs2sm1135892bkc.1.2012.08.30.05.13.23
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 05:13:24 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 0/7] Reorganization of the coreutils test harness
Date: Thu, 30 Aug 2012 14:13:06 +0200
Message-Id: <cover.1346327497.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
X-Mailman-Approved-At: Thu, 30 Aug 2012 09:21:23 -0400
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 12:13:48 -0000

In part it is in preparation for the merging of tests/Makefile into
the too-level makefile, but mostly it's a "while at it" refactoring
(introducing, among other things, a more idiomatic usage of the
Automake parallel test harness capabilities; see patch n.6).

The series is built upon the "Towards a non-recursive build system
for coreutils?" one:

  <http://lists.gnu.org/archive/html/coreutils/2012-08/msg00140.html>

-*-*-*-

Stefano Lattarini (7):
  tests: merge tests/check.mk into tests/Makefile.am
  tests: prefer AM_TESTS_ENVIRONMENT over TESTS_ENVIRONMENT
  build: require Automake >= 1.11.6
  tests: avoid use of '-T' in shebang line to enable perl taint mode
  tests: detect missing perl at configure runtime
  tests: add .sh and .pl suffixes to shell and perl tests, respectively
  tests: get rid of the 'shell-or-perl' auxiliary script

 bootstrap.conf                                     |    2 +-
 configure.ac                                       |    9 +-
 tests/Makefile.am                                  | 1097 +++++++++++---------
 tests/check.mk                                     |   94 --
 tests/chgrp/{basic => basic.sh}                    |    0
 .../{default-no-deref => default-no-deref.sh}      |    0
 tests/chgrp/{deref => deref.sh}                    |    0
 tests/chgrp/{no-x => no-x.sh}                      |    0
 tests/chgrp/{posix-H => posix-H.sh}                |    0
 tests/chgrp/{recurse => recurse.sh}                |    0
 tests/chmod/{c-option => c-option.sh}              |    0
 tests/chmod/{equal-x => equal-x.sh}                |    0
 tests/chmod/{equals => equals.sh}                  |    0
 tests/chmod/{inaccessible => inaccessible.sh}      |    0
 tests/chmod/{no-x => no-x.sh}                      |    0
 tests/chmod/{octal => octal.sh}                    |    0
 tests/chmod/{setgid => setgid.sh}                  |    0
 tests/chmod/{silent => silent.sh}                  |    0
 tests/chmod/{thru-dangling => thru-dangling.sh}    |    0
 tests/chmod/{umask-x => umask-x.sh}                |    0
 tests/chmod/{usage => usage.sh}                    |    0
 tests/chown/{basic => basic.sh}                    |    0
 tests/chown/{deref => deref.sh}                    |    0
 tests/chown/{preserve-root => preserve-root.sh}    |    0
 tests/chown/{separator => separator.sh}            |    0
 tests/cp/{abuse => abuse.sh}                       |    0
 tests/cp/{acl => acl.sh}                           |    0
 tests/cp/{attr-existing => attr-existing.sh}       |    0
 tests/cp/{backup-1 => backup-1.sh}                 |    0
 tests/cp/{backup-dir => backup-dir.sh}             |    0
 tests/cp/{backup-is-src => backup-is-src.sh}       |    0
 tests/cp/{capability => capability.sh}             |    0
 tests/cp/{cp-HL => cp-HL.sh}                       |    0
 tests/cp/{cp-a-selinux => cp-a-selinux.sh}         |    0
 tests/cp/{cp-deref => cp-deref.sh}                 |    0
 tests/cp/{cp-i => cp-i.sh}                         |    0
 tests/cp/{cp-mv-backup => cp-mv-backup.sh}         |    0
 ...{cp-mv-enotsup-xattr => cp-mv-enotsup-xattr.sh} |    0
 tests/cp/{cp-parents => cp-parents.sh}             |    0
 tests/cp/{deref-slink => deref-slink.sh}           |    0
 tests/cp/{dir-rm-dest => dir-rm-dest.sh}           |    0
 tests/cp/{dir-slash => dir-slash.sh}               |    0
 tests/cp/{dir-vs-file => dir-vs-file.sh}           |    0
 .../cp/{existing-perm-dir => existing-perm-dir.sh} |    0
 .../{existing-perm-race => existing-perm-race.sh}  |    0
 tests/cp/{fail-perm => fail-perm.sh}               |    0
 tests/cp/{fiemap-2 => fiemap-2.sh}                 |    0
 tests/cp/{fiemap-empty => fiemap-empty.sh}         |    0
 tests/cp/{fiemap-perf => fiemap-perf.sh}           |    0
 tests/cp/{file-perm-race => file-perm-race.sh}     |    0
 tests/cp/{into-self => into-self.sh}               |    0
 tests/cp/{link-heap => link-heap.sh}               |    0
 tests/cp/{link-no-deref => link-no-deref.sh}       |    0
 tests/cp/{link-preserve => link-preserve.sh}       |    0
 tests/cp/{link-symlink => link-symlink.sh}         |    0
 tests/cp/{link => link.sh}                         |    0
 tests/cp/{nfs-removal-race => nfs-removal-race.sh} |    0
 tests/cp/{no-deref-link1 => no-deref-link1.sh}     |    0
 tests/cp/{no-deref-link2 => no-deref-link2.sh}     |    0
 tests/cp/{no-deref-link3 => no-deref-link3.sh}     |    0
 tests/cp/{parent-perm-race => parent-perm-race.sh} |    0
 tests/cp/{parent-perm => parent-perm.sh}           |    0
 tests/cp/{perm => perm.sh}                         |    0
 tests/cp/{preserve-2 => preserve-2.sh}             |    0
 tests/cp/{preserve-gid => preserve-gid.sh}         |    0
 tests/cp/{preserve-link => preserve-link.sh}       |    0
 ...{preserve-slink-time => preserve-slink-time.sh} |    0
 tests/cp/{proc-short-read => proc-short-read.sh}   |    0
 tests/cp/{proc-zero-len => proc-zero-len.sh}       |    0
 tests/cp/{r-vs-symlink => r-vs-symlink.sh}         |    0
 tests/cp/{reflink-auto => reflink-auto.sh}         |    0
 tests/cp/{reflink-perm => reflink-perm.sh}         |    0
 tests/cp/{same-file => same-file.sh}               |    0
 tests/cp/{slink-2-slink => slink-2-slink.sh}       |    0
 tests/cp/{sparse-fiemap => sparse-fiemap.sh}       |    0
 tests/cp/{sparse-to-pipe => sparse-to-pipe.sh}     |    0
 tests/cp/{sparse => sparse.sh}                     |    0
 tests/cp/{special-bits => special-bits.sh}         |    0
 tests/cp/{special-f => special-f.sh}               |    0
 tests/cp/{src-base-dot => src-base-dot.sh}         |    0
 tests/cp/{symlink-slash => symlink-slash.sh}       |    0
 tests/cp/{thru-dangling => thru-dangling.sh}       |    0
 tests/dd/{bytes => bytes.sh}                       |    0
 tests/dd/{direct => direct.sh}                     |    0
 tests/dd/{misc => misc.sh}                         |    0
 tests/dd/{nocache => nocache.sh}                   |    0
 tests/dd/{not-rewound => not-rewound.sh}           |    0
 tests/dd/{reblock => reblock.sh}                   |    0
 .../{skip-seek-past-dev => skip-seek-past-dev.sh}  |    0
 ...{skip-seek-past-file => skip-seek-past-file.sh} |    0
 tests/dd/{skip-seek => skip-seek.pl}               |    0
 tests/dd/{skip-seek2 => skip-seek2.sh}             |    0
 tests/dd/{sparse => sparse.sh}                     |    0
 tests/dd/{stderr => stderr.sh}                     |    0
 tests/dd/{unblock-sync => unblock-sync.sh}         |    0
 tests/dd/{unblock => unblock.pl}                   |    0
 tests/df/{df-P => df-P.sh}                         |    0
 tests/df/{header => header.sh}                     |    0
 tests/df/{no-mtab-status => no-mtab-status.sh}     |    0
 .../df/{problematic-chars => problematic-chars.sh} |    0
 .../df/{total-unprocessed => total-unprocessed.sh} |    0
 tests/df/{total-verify => total-verify.sh}         |    0
 tests/df/{unreadable => unreadable.sh}             |    0
 tests/du/{2g => 2g.sh}                             |    0
 tests/du/{8gb => 8gb.sh}                           |    0
 tests/du/{basic => basic.sh}                       |    0
 tests/du/{bigtime => bigtime.sh}                   |    0
 ...ind-mount-dir-cycle => bind-mount-dir-cycle.sh} |    0
 tests/du/{deref-args => deref-args.sh}             |    0
 tests/du/{deref => deref.sh}                       |    0
 tests/du/{exclude => exclude.sh}                   |    0
 tests/du/{fd-leak => fd-leak.sh}                   |    0
 tests/du/{files0-from-dir => files0-from-dir.sh}   |    0
 tests/du/{files0-from => files0-from.pl}           |    0
 tests/du/{hard-link => hard-link.sh}               |    0
 tests/du/{inacc-dest => inacc-dest.sh}             |    0
 tests/du/{inacc-dir => inacc-dir.sh}               |    0
 tests/du/{inaccessible-cwd => inaccessible-cwd.sh} |    0
 ...ong-from-unreadable => long-from-unreadable.sh} |    0
 tests/du/{long-sloop => long-sloop.sh}             |    0
 tests/du/{max-depth => max-depth.sh}               |    0
 ...ile-traversing => move-dir-while-traversing.sh} |    0
 tests/du/{no-deref => no-deref.sh}                 |    0
 tests/du/{no-x => no-x.sh}                         |    0
 tests/du/{one-file-system => one-file-system.sh}   |    0
 tests/du/{restore-wd => restore-wd.sh}             |    0
 tests/du/{slash => slash.sh}                       |    0
 tests/du/{slink => slink.sh}                       |    0
 tests/du/{trailing-slash => trailing-slash.sh}     |    0
 tests/du/{two-args => two-args.sh}                 |    0
 tests/fmt/{base => base.pl}                        |    0
 tests/fmt/{goal-option => goal-option.sh}          |    0
 tests/fmt/{long-line => long-line.sh}              |    0
 tests/id/{gnu-zero-uids => gnu-zero-uids.sh}       |    0
 tests/id/{no-context => no-context.sh}             |    0
 tests/install/{basic-1 => basic-1.sh}              |    0
 .../install/{create-leading => create-leading.sh}  |    0
 tests/install/{d-slashdot => d-slashdot.sh}        |    0
 .../install/{install-C-root => install-C-root.sh}  |    0
 .../{install-C-selinux => install-C-selinux.sh}    |    0
 tests/install/{install-C => install-C.sh}          |    0
 tests/install/{strip-program => strip-program.sh}  |    0
 tests/install/{trap => trap.sh}                    |    0
 tests/ln/{backup-1 => backup-1.sh}                 |    0
 tests/ln/{hard-backup => hard-backup.sh}           |    0
 tests/ln/{hard-to-sym => hard-to-sym.sh}           |    0
 tests/ln/{misc => misc.sh}                         |    0
 tests/ln/{relative => relative.sh}                 |    0
 tests/ln/{sf-1 => sf-1.sh}                         |    0
 ...nt-dest => slash-decorated-nonexistent-dest.sh} |    0
 tests/ln/{target-1 => target-1.sh}                 |    0
 tests/ls/{abmon-align => abmon-align.sh}           |    0
 tests/ls/{block-size => block-size.sh}             |    0
 tests/ls/{capability => capability.sh}             |    0
 .../{color-clear-to-eol => color-clear-to-eol.sh}  |    0
 tests/ls/{color-dtype-dir => color-dtype-dir.sh}   |    0
 tests/ls/{color-norm => color-norm.sh}             |    0
 tests/ls/{dangle => dangle.sh}                     |    0
 tests/ls/{dired => dired.sh}                       |    0
 tests/ls/{file-type => file-type.sh}               |    0
 tests/ls/{follow-slink => follow-slink.sh}         |    0
 tests/ls/{getxattr-speedup => getxattr-speedup.sh} |    0
 tests/ls/{infloop => infloop.sh}                   |    0
 tests/ls/{inode => inode.sh}                       |    0
 tests/ls/{m-option => m-option.sh}                 |    0
 tests/ls/{multihardlink => multihardlink.sh}       |    0
 tests/ls/{nameless-uid => nameless-uid.sh}         |    0
 tests/ls/{no-arg => no-arg.sh}                     |    0
 tests/ls/{no-cap => no-cap.sh}                     |    0
 ...c-selinux-segfault => proc-selinux-segfault.sh} |    0
 ...ountpoint-inode => readdir-mountpoint-inode.sh} |    0
 tests/ls/{recursive => recursive.sh}               |    0
 ...rel-symlink-color => root-rel-symlink-color.sh} |    0
 tests/ls/{rt-1 => rt-1.sh}                         |    0
 tests/ls/{slink-acl => slink-acl.sh}               |    0
 tests/ls/{stat-dtype => stat-dtype.sh}             |    0
 tests/ls/{stat-failed => stat-failed.sh}           |    0
 tests/ls/{stat-free-color => stat-free-color.sh}   |    0
 .../{stat-free-symlinks => stat-free-symlinks.sh}  |    0
 tests/ls/{stat-vs-dirent => stat-vs-dirent.sh}     |    0
 tests/ls/{symlink-slash => symlink-slash.sh}       |    0
 tests/ls/{time-style-diag => time-style-diag.sh}   |    0
 tests/ls/{x-option => x-option.sh}                 |    0
 tests/misc/{arch => arch.sh}                       |    0
 tests/misc/{base64 => base64.pl}                   |    0
 tests/misc/{basename => basename.pl}               |    0
 tests/misc/{cat-buf => cat-buf.sh}                 |    0
 tests/misc/{cat-proc => cat-proc.sh}               |    0
 tests/misc/{chcon-fail => chcon-fail.sh}           |    0
 tests/misc/{chcon => chcon.sh}                     |    0
 .../{chroot-credentials => chroot-credentials.sh}  |    0
 tests/misc/{chroot-fail => chroot-fail.sh}         |    0
 tests/misc/{close-stdout => close-stdout.sh}       |    0
 tests/misc/{comm => comm.pl}                       |    0
 tests/misc/{csplit-1000 => csplit-1000.sh}         |    0
 tests/misc/{csplit-heap => csplit-heap.sh}         |    0
 tests/misc/{csplit => csplit.sh}                   |    0
 tests/misc/{cut => cut.pl}                         |    0
 tests/misc/{date-next-dow => date-next-dow.pl}     |    0
 tests/misc/{date-sec => date-sec.sh}               |    0
 tests/misc/{date => date.pl}                       |    0
 tests/misc/{dircolors => dircolors.pl}             |    0
 tests/misc/{dirname => dirname.pl}                 |    0
 tests/misc/{env-null => env-null.sh}               |    0
 tests/misc/{env => env.sh}                         |    0
 tests/misc/{expand => expand.pl}                   |    0
 tests/misc/{expr => expr.pl}                       |    0
 tests/misc/{factor => factor.pl}                   |    0
 tests/misc/{false-status => false-status.sh}       |    0
 tests/misc/{fold => fold.pl}                       |    0
 tests/misc/{groups-dash => groups-dash.sh}         |    0
 tests/misc/{groups-version => groups-version.sh}   |    0
 tests/misc/{head-c => head-c.sh}                   |    0
 tests/misc/{head-elide-tail => head-elide-tail.pl} |    0
 tests/misc/{head-pos => head-pos.sh}               |    0
 tests/misc/{head => head.pl}                       |    0
 tests/misc/{help-version => help-version.sh}       |    0
 tests/misc/{id-context => id-context.sh}           |    0
 tests/misc/{id-groups => id-groups.sh}             |    0
 tests/misc/{id-setgid => id-setgid.sh}             |    0
 tests/misc/{invalid-opt => invalid-opt.pl}         |    0
 tests/misc/{join => join.pl}                       |    0
 tests/misc/{ls-misc => ls-misc.pl}                 |    0
 tests/misc/{ls-time => ls-time.sh}                 |    0
 tests/misc/{md5sum-bsd => md5sum-bsd.sh}           |    0
 tests/misc/{md5sum-newline => md5sum-newline.pl}   |    0
 tests/misc/{md5sum-parallel => md5sum-parallel.sh} |    0
 tests/misc/{md5sum => md5sum.pl}                   |    0
 tests/misc/{mknod => mknod.sh}                     |    0
 tests/misc/{mktemp => mktemp.pl}                   |    0
 tests/misc/{nice-fail => nice-fail.sh}             |    0
 tests/misc/{nice => nice.sh}                       |    0
 tests/misc/{nl => nl.sh}                           |    0
 tests/misc/{nohup => nohup.sh}                     |    0
 tests/misc/{nproc-avail => nproc-avail.sh}         |    0
 tests/misc/{nproc-positive => nproc-positive.sh}   |    0
 tests/misc/{od-N => od-N.sh}                       |    0
 tests/misc/{od-float => od-float.sh}               |    0
 tests/misc/{od-multiple-t => od-multiple-t.sh}     |    0
 tests/misc/{od-x8 => od-x8.sh}                     |    0
 tests/misc/{od => od.pl}                           |    0
 tests/misc/{paste => paste.pl}                     |    0
 tests/misc/{pathchk1 => pathchk1.sh}               |    0
 tests/misc/{pr => pr.pl}                           |    0
 tests/misc/{printenv => printenv.sh}               |    0
 tests/misc/{printf-cov => printf-cov.pl}           |    0
 tests/misc/{printf-hex => printf-hex.sh}           |    0
 tests/misc/{printf-surprise => printf-surprise.sh} |    0
 tests/misc/{printf => printf.sh}                   |    0
 tests/misc/{ptx-overrun => ptx-overrun.sh}         |    0
 tests/misc/{ptx => ptx.pl}                         |    0
 tests/misc/{pwd-long => pwd-long.sh}               |    0
 tests/misc/{pwd-option => pwd-option.sh}           |    0
 .../misc/{readlink-fp-loop => readlink-fp-loop.sh} |    0
 tests/misc/{readlink-root => readlink-root.sh}     |    0
 tests/misc/{realpath => realpath.sh}               |    0
 .../{runcon-no-reorder => runcon-no-reorder.sh}    |    0
 tests/misc/{selinux => selinux.sh}                 |    0
 tests/misc/{seq-long-double => seq-long-double.sh} |    0
 tests/misc/{seq => seq.pl}                         |    0
 tests/misc/{sha1sum-vec => sha1sum-vec.pl}         |    0
 tests/misc/{sha1sum => sha1sum.pl}                 |    0
 tests/misc/{sha224sum => sha224sum.pl}             |    0
 tests/misc/{sha256sum => sha256sum.pl}             |    0
 tests/misc/{sha384sum => sha384sum.pl}             |    0
 tests/misc/{sha512sum => sha512sum.pl}             |    0
 tests/misc/{shred-exact => shred-exact.sh}         |    0
 tests/misc/{shred-passes => shred-passes.sh}       |    0
 tests/misc/{shred-remove => shred-remove.sh}       |    0
 tests/misc/{shuf => shuf.sh}                       |    0
 .../misc/{sort-NaN-infloop => sort-NaN-infloop.sh} |    0
 ...t-benchmark-random => sort-benchmark-random.sh} |    0
 .../{sort-compress-hang => sort-compress-hang.sh}  |    0
 .../{sort-compress-proc => sort-compress-proc.sh}  |    0
 tests/misc/{sort-compress => sort-compress.sh}     |    0
 tests/misc/{sort-continue => sort-continue.sh}     |    0
 tests/misc/{sort-debug-keys => sort-debug-keys.sh} |    0
 tests/misc/{sort-debug-warn => sort-debug-warn.sh} |    0
 tests/misc/{sort-discrim => sort-discrim.sh}       |    0
 tests/misc/{sort-exit-early => sort-exit-early.sh} |    0
 .../misc/{sort-files0-from => sort-files0-from.pl} |    0
 tests/misc/{sort-float => sort-float.sh}           |    0
 .../{sort-merge-fdlimit => sort-merge-fdlimit.sh}  |    0
 tests/misc/{sort-merge => sort-merge.pl}           |    0
 tests/misc/{sort-month => sort-month.sh}           |    0
 tests/misc/{sort-rand => sort-rand.sh}             |    0
 ...{sort-spinlock-abuse => sort-spinlock-abuse.sh} |    0
 ...t-stale-thread-mem => sort-stale-thread-mem.sh} |    0
 tests/misc/{sort-u-FMR => sort-u-FMR.sh}           |    0
 .../misc/{sort-unique-segv => sort-unique-segv.sh} |    0
 tests/misc/{sort-unique => sort-unique.sh}         |    0
 tests/misc/{sort-version => sort-version.sh}       |    0
 tests/misc/{sort => sort.pl}                       |    0
 tests/misc/{stat-birthtime => stat-birthtime.sh}   |    0
 tests/misc/{stat-fmt => stat-fmt.sh}               |    0
 tests/misc/{stat-hyphen => stat-hyphen.sh}         |    0
 tests/misc/{stat-mount => stat-mount.sh}           |    0
 .../misc/{stat-nanoseconds => stat-nanoseconds.sh} |    0
 tests/misc/{stat-printf => stat-printf.pl}         |    0
 tests/misc/{stat-slash => stat-slash.sh}           |    0
 tests/misc/{stdbuf => stdbuf.sh}                   |    0
 tests/misc/{stty-invalid => stty-invalid.sh}       |    0
 tests/misc/{stty-pairs => stty-pairs.sh}           |    0
 tests/misc/{stty-row-col => stty-row-col.sh}       |    0
 tests/misc/{stty => stty.sh}                       |    0
 tests/misc/{sum-sysv => sum-sysv.sh}               |    0
 tests/misc/{sum => sum.pl}                         |    0
 .../{tac-2-nonseekable => tac-2-nonseekable.sh}    |    0
 tests/misc/{tac-continue => tac-continue.sh}       |    0
 tests/misc/{tac => tac.pl}                         |    0
 tests/misc/{tail => tail.pl}                       |    0
 tests/misc/{tee-dash => tee-dash.sh}               |    0
 tests/misc/{tee => tee.sh}                         |    0
 tests/misc/{test-diag => test-diag.pl}             |    0
 tests/misc/{test => test.pl}                       |    0
 tests/misc/{timeout-group => timeout-group.sh}     |    0
 .../{timeout-parameters => timeout-parameters.sh}  |    0
 tests/misc/{timeout => timeout.sh}                 |    0
 tests/misc/{tr-case-class => tr-case-class.sh}     |    0
 tests/misc/{tr => tr.pl}                           |    0
 ...ngling-symlink => truncate-dangling-symlink.sh} |    0
 .../{truncate-dir-fail => truncate-dir-fail.sh}    |    0
 .../{truncate-fail-diag => truncate-fail-diag.sh}  |    0
 tests/misc/{truncate-fifo => truncate-fifo.sh}     |    0
 ...reate-missing => truncate-no-create-missing.sh} |    0
 .../{truncate-overflow => truncate-overflow.sh}    |    0
 ...e-owned-by-other => truncate-owned-by-other.sh} |    0
 ...{truncate-parameters => truncate-parameters.sh} |    0
 .../{truncate-relative => truncate-relative.sh}    |    0
 tests/misc/{tsort => tsort.pl}                     |    0
 tests/misc/{tty-eof => tty-eof.pl}                 |    0
 tests/misc/{unexpand => unexpand.pl}               |    0
 tests/misc/{uniq-perf => uniq-perf.sh}             |    0
 tests/misc/{uniq => uniq.pl}                       |    0
 tests/misc/{wc-files0-from => wc-files0-from.pl}   |    0
 tests/misc/{wc-files0 => wc-files0.sh}             |    0
 tests/misc/{wc-parallel => wc-parallel.sh}         |    0
 tests/misc/{wc => wc.pl}                           |    0
 tests/misc/{xattr => xattr.sh}                     |    0
 tests/misc/{xstrtol => xstrtol.pl}                 |    0
 tests/mkdir/{p-1 => p-1.sh}                        |    0
 tests/mkdir/{p-2 => p-2.sh}                        |    0
 tests/mkdir/{p-3 => p-3.sh}                        |    0
 tests/mkdir/{p-slashdot => p-slashdot.sh}          |    0
 tests/mkdir/{p-thru-slink => p-thru-slink.sh}      |    0
 tests/mkdir/{p-v => p-v.sh}                        |    0
 tests/mkdir/{parents => parents.sh}                |    0
 tests/mkdir/{perm => perm.sh}                      |    0
 tests/mkdir/{selinux => selinux.sh}                |    0
 tests/mkdir/{special-1 => special-1.sh}            |    0
 tests/mkdir/{t-slash => t-slash.sh}                |    0
 ...e-under-readonly => writable-under-readonly.sh} |    0
 tests/mv/{acl => acl.sh}                           |    0
 tests/mv/{atomic => atomic.sh}                     |    0
 tests/mv/{atomic2 => atomic2.sh}                   |    0
 tests/mv/{backup-dir => backup-dir.sh}             |    0
 tests/mv/{backup-is-src => backup-is-src.sh}       |    0
 tests/mv/{childproof => childproof.sh}             |    0
 tests/mv/{diag => diag.sh}                         |    0
 tests/mv/{dir-file => dir-file.sh}                 |    0
 tests/mv/{dir2dir => dir2dir.sh}                   |    0
 tests/mv/{dup-source => dup-source.sh}             |    0
 tests/mv/{force => force.sh}                       |    0
 tests/mv/{hard-2 => hard-2.sh}                     |    0
 tests/mv/{hard-3 => hard-3.sh}                     |    0
 tests/mv/{hard-4 => hard-4.sh}                     |    0
 tests/mv/{hard-link-1 => hard-link-1.sh}           |    0
 tests/mv/{hard-verbose => hard-verbose.sh}         |    0
 tests/mv/{i-1 => i-1.pl}                           |    0
 tests/mv/{i-2 => i-2.sh}                           |    0
 tests/mv/{i-3 => i-3.sh}                           |    0
 tests/mv/{i-4 => i-4.sh}                           |    0
 tests/mv/{i-5 => i-5.sh}                           |    0
 tests/mv/{i-link-no => i-link-no.sh}               |    0
 tests/mv/{into-self-2 => into-self-2.sh}           |    0
 tests/mv/{into-self-3 => into-self-3.sh}           |    0
 tests/mv/{into-self-4 => into-self-4.sh}           |    0
 tests/mv/{into-self => into-self.sh}               |    0
 tests/mv/{leak-fd => leak-fd.sh}                   |    0
 tests/mv/{mv-n => mv-n.sh}                         |    0
 tests/mv/{mv-special-1 => mv-special-1.sh}         |    0
 tests/mv/{no-target-dir => no-target-dir.sh}       |    0
 tests/mv/{part-fail => part-fail.sh}               |    0
 tests/mv/{part-hardlink => part-hardlink.sh}       |    0
 tests/mv/{part-rename => part-rename.sh}           |    0
 tests/mv/{part-symlink => part-symlink.sh}         |    0
 tests/mv/{partition-perm => partition-perm.sh}     |    0
 tests/mv/{perm-1 => perm-1.sh}                     |    0
 tests/mv/{sticky-to-xpart => sticky-to-xpart.sh}   |    0
 ...nk-to-self => symlink-onto-hardlink-to-self.sh} |    0
 ...link-onto-hardlink => symlink-onto-hardlink.sh} |    0
 tests/mv/{to-symlink => to-symlink.sh}             |    0
 tests/mv/{trailing-slash => trailing-slash.sh}     |    0
 tests/mv/{update => update.sh}                     |    0
 tests/no-perl                                      |    6 +
 tests/pr/{pr-tests => pr-tests.pl}                 |    0
 tests/readlink/{can-e => can-e.sh}                 |    0
 tests/readlink/{can-f => can-f.sh}                 |    0
 tests/readlink/{can-m => can-m.sh}                 |    0
 tests/readlink/{rl-1 => rl-1.sh}                   |    0
 tests/rm/{cycle => cycle.sh}                       |    0
 tests/rm/{d-1 => d-1.sh}                           |    0
 tests/rm/{d-2 => d-2.sh}                           |    0
 tests/rm/{d-3 => d-3.sh}                           |    0
 tests/rm/{dangling-symlink => dangling-symlink.sh} |    0
 tests/rm/{deep-1 => deep-1.sh}                     |    0
 tests/rm/{deep-2 => deep-2.sh}                     |    0
 tests/rm/{dir-no-w => dir-no-w.sh}                 |    0
 tests/rm/{dir-nonrecur => dir-nonrecur.sh}         |    0
 tests/rm/{dot-rel => dot-rel.sh}                   |    0
 tests/rm/{empty-inacc => empty-inacc.sh}           |    0
 tests/rm/{empty-name => empty-name.pl}             |    0
 tests/rm/{ext3-perf => ext3-perf.sh}               |    0
 tests/rm/{f-1 => f-1.sh}                           |    0
 tests/rm/{fail-2eperm => fail-2eperm.sh}           |    0
 tests/rm/{fail-eacces => fail-eacces.sh}           |    0
 tests/rm/{fail-eperm => fail-eperm.xpl}            |    0
 tests/rm/{hash => hash.sh}                         |    0
 tests/rm/{i-1 => i-1.sh}                           |    0
 tests/rm/{i-never => i-never.sh}                   |    0
 tests/rm/{i-no-r => i-no-r.sh}                     |    0
 tests/rm/{ignorable => ignorable.sh}               |    0
 tests/rm/{inaccessible => inaccessible.sh}         |    0
 .../{interactive-always => interactive-always.sh}  |    0
 tests/rm/{interactive-once => interactive-once.sh} |    0
 tests/rm/{ir-1 => ir-1.sh}                         |    0
 tests/rm/{isatty => isatty.sh}                     |    0
 ...r-entries-vs-OOM => many-dir-entries-vs-OOM.sh} |    0
 tests/rm/{no-give-up => no-give-up.sh}             |    0
 tests/rm/{one-file-system => one-file-system.sh}   |    0
 tests/rm/{one-file-system2 => one-file-system2.sh} |    0
 tests/rm/{r-1 => r-1.sh}                           |    0
 tests/rm/{r-2 => r-2.sh}                           |    0
 tests/rm/{r-3 => r-3.sh}                           |    0
 tests/rm/{r-4 => r-4.sh}                           |    0
 tests/rm/{read-only => read-only.sh}               |    0
 tests/rm/{readdir-bug => readdir-bug.sh}           |    0
 tests/rm/{rm1 => rm1.sh}                           |    0
 tests/rm/{rm2 => rm2.sh}                           |    0
 tests/rm/{rm3 => rm3.sh}                           |    0
 tests/rm/{rm4 => rm4.sh}                           |    0
 tests/rm/{rm5 => rm5.sh}                           |    0
 tests/rm/{sunos-1 => sunos-1.sh}                   |    0
 tests/rm/{unread2 => unread2.sh}                   |    0
 tests/rm/{unread3 => unread3.sh}                   |    0
 tests/rm/{unreadable => unreadable.pl}             |    0
 tests/rm/{v-slash => v-slash.sh}                   |    0
 tests/rmdir/{fail-perm => fail-perm.sh}            |    0
 tests/rmdir/{ignore => ignore.sh}                  |    0
 tests/rmdir/{t-slash => t-slash.sh}                |    0
 tests/shell-or-perl                                |  121 ---
 .../{additional-suffix => additional-suffix.sh}    |    0
 tests/split/{b-chunk => b-chunk.sh}                |    0
 tests/split/{fail => fail.sh}                      |    0
 tests/split/{filter => filter.sh}                  |    0
 tests/split/{guard-input => guard-input.sh}        |    0
 tests/split/{l-chunk => l-chunk.sh}                |    0
 tests/split/{lines => lines.sh}                    |    0
 tests/split/{numeric => numeric.sh}                |    0
 tests/split/{r-chunk => r-chunk.sh}                |    0
 .../{suffix-auto-length => suffix-auto-length.sh}  |    0
 tests/split/{suffix-length => suffix-length.sh}    |    0
 tests/tail-2/{F-vs-missing => F-vs-missing.sh}     |    0
 tests/tail-2/{F-vs-rename => F-vs-rename.sh}       |    0
 tests/tail-2/{append-only => append-only.sh}       |    0
 tests/tail-2/{assert-2 => assert-2.sh}             |    0
 tests/tail-2/{assert => assert.sh}                 |    0
 tests/tail-2/{big-4gb => big-4gb.sh}               |    0
 tests/tail-2/{flush-initial => flush-initial.sh}   |    0
 tests/tail-2/{follow-name => follow-name.sh}       |    0
 tests/tail-2/{follow-stdin => follow-stdin.sh}     |    0
 tests/tail-2/{infloop-1 => infloop-1.sh}           |    0
 .../{inotify-hash-abuse => inotify-hash-abuse.sh}  |    0
 ...{inotify-hash-abuse2 => inotify-hash-abuse2.sh} |    0
 tests/tail-2/{inotify-race => inotify-race.sh}     |    0
 tests/tail-2/{inotify-rotate => inotify-rotate.sh} |    0
 tests/tail-2/{pid => pid.sh}                       |    0
 tests/tail-2/{pipe-f => pipe-f.sh}                 |    0
 tests/tail-2/{pipe-f2 => pipe-f2.sh}               |    0
 tests/tail-2/{proc-ksyms => proc-ksyms.sh}         |    0
 tests/tail-2/{start-middle => start-middle.sh}     |    0
 tests/tail-2/{tail-n0f => tail-n0f.sh}             |    0
 tests/tail-2/{wait => wait.sh}                     |    0
 tests/touch/{60-seconds => 60-seconds.sh}          |    0
 .../{dangling-symlink => dangling-symlink.sh}      |    0
 tests/touch/{dir-1 => dir-1.sh}                    |    0
 tests/touch/{empty-file => empty-file.sh}          |    0
 tests/touch/{fail-diag => fail-diag.sh}            |    0
 tests/touch/{fifo => fifo.sh}                      |    0
 .../{no-create-missing => no-create-missing.sh}    |    0
 tests/touch/{no-dereference => no-dereference.sh}  |    0
 tests/touch/{no-rights => no-rights.sh}            |    0
 tests/touch/{not-owner => not-owner.sh}            |    0
 .../{now-owned-by-other => now-owned-by-other.sh}  |    0
 tests/touch/{obsolescent => obsolescent.sh}        |    0
 tests/touch/{read-only => read-only.sh}            |    0
 tests/touch/{relative => relative.sh}              |    0
 tests/touch/{trailing-slash => trailing-slash.sh}  |    0
 498 files changed, 616 insertions(+), 713 deletions(-)
 delete mode 100644 tests/check.mk
 rename tests/chgrp/{basic => basic.sh} (100%)
 rename tests/chgrp/{default-no-deref => default-no-deref.sh} (100%)
 rename tests/chgrp/{deref => deref.sh} (100%)
 rename tests/chgrp/{no-x => no-x.sh} (100%)
 rename tests/chgrp/{posix-H => posix-H.sh} (100%)
 rename tests/chgrp/{recurse => recurse.sh} (100%)
 rename tests/chmod/{c-option => c-option.sh} (100%)
 rename tests/chmod/{equal-x => equal-x.sh} (100%)
 rename tests/chmod/{equals => equals.sh} (100%)
 rename tests/chmod/{inaccessible => inaccessible.sh} (100%)
 rename tests/chmod/{no-x => no-x.sh} (100%)
 rename tests/chmod/{octal => octal.sh} (100%)
 rename tests/chmod/{setgid => setgid.sh} (100%)
 rename tests/chmod/{silent => silent.sh} (100%)
 rename tests/chmod/{thru-dangling => thru-dangling.sh} (100%)
 rename tests/chmod/{umask-x => umask-x.sh} (100%)
 rename tests/chmod/{usage => usage.sh} (100%)
 rename tests/chown/{basic => basic.sh} (100%)
 rename tests/chown/{deref => deref.sh} (100%)
 rename tests/chown/{preserve-root => preserve-root.sh} (100%)
 rename tests/chown/{separator => separator.sh} (100%)
 rename tests/cp/{abuse => abuse.sh} (100%)
 rename tests/cp/{acl => acl.sh} (100%)
 rename tests/cp/{attr-existing => attr-existing.sh} (100%)
 rename tests/cp/{backup-1 => backup-1.sh} (100%)
 rename tests/cp/{backup-dir => backup-dir.sh} (100%)
 rename tests/cp/{backup-is-src => backup-is-src.sh} (100%)
 rename tests/cp/{capability => capability.sh} (100%)
 rename tests/cp/{cp-HL => cp-HL.sh} (100%)
 rename tests/cp/{cp-a-selinux => cp-a-selinux.sh} (100%)
 rename tests/cp/{cp-deref => cp-deref.sh} (100%)
 rename tests/cp/{cp-i => cp-i.sh} (100%)
 rename tests/cp/{cp-mv-backup => cp-mv-backup.sh} (100%)
 rename tests/cp/{cp-mv-enotsup-xattr => cp-mv-enotsup-xattr.sh} (100%)
 rename tests/cp/{cp-parents => cp-parents.sh} (100%)
 rename tests/cp/{deref-slink => deref-slink.sh} (100%)
 rename tests/cp/{dir-rm-dest => dir-rm-dest.sh} (100%)
 rename tests/cp/{dir-slash => dir-slash.sh} (100%)
 rename tests/cp/{dir-vs-file => dir-vs-file.sh} (100%)
 rename tests/cp/{existing-perm-dir => existing-perm-dir.sh} (100%)
 rename tests/cp/{existing-perm-race => existing-perm-race.sh} (100%)
 rename tests/cp/{fail-perm => fail-perm.sh} (100%)
 rename tests/cp/{fiemap-2 => fiemap-2.sh} (100%)
 rename tests/cp/{fiemap-empty => fiemap-empty.sh} (100%)
 rename tests/cp/{fiemap-perf => fiemap-perf.sh} (100%)
 rename tests/cp/{file-perm-race => file-perm-race.sh} (100%)
 rename tests/cp/{into-self => into-self.sh} (100%)
 rename tests/cp/{link-heap => link-heap.sh} (100%)
 rename tests/cp/{link-no-deref => link-no-deref.sh} (100%)
 rename tests/cp/{link-preserve => link-preserve.sh} (100%)
 rename tests/cp/{link-symlink => link-symlink.sh} (100%)
 rename tests/cp/{link => link.sh} (100%)
 rename tests/cp/{nfs-removal-race => nfs-removal-race.sh} (100%)
 rename tests/cp/{no-deref-link1 => no-deref-link1.sh} (100%)
 rename tests/cp/{no-deref-link2 => no-deref-link2.sh} (100%)
 rename tests/cp/{no-deref-link3 => no-deref-link3.sh} (100%)
 rename tests/cp/{parent-perm-race => parent-perm-race.sh} (100%)
 rename tests/cp/{parent-perm => parent-perm.sh} (100%)
 rename tests/cp/{perm => perm.sh} (100%)
 rename tests/cp/{preserve-2 => preserve-2.sh} (100%)
 rename tests/cp/{preserve-gid => preserve-gid.sh} (100%)
 rename tests/cp/{preserve-link => preserve-link.sh} (100%)
 rename tests/cp/{preserve-slink-time => preserve-slink-time.sh} (100%)
 rename tests/cp/{proc-short-read => proc-short-read.sh} (100%)
 rename tests/cp/{proc-zero-len => proc-zero-len.sh} (100%)
 rename tests/cp/{r-vs-symlink => r-vs-symlink.sh} (100%)
 rename tests/cp/{reflink-auto => reflink-auto.sh} (100%)
 rename tests/cp/{reflink-perm => reflink-perm.sh} (100%)
 rename tests/cp/{same-file => same-file.sh} (100%)
 rename tests/cp/{slink-2-slink => slink-2-slink.sh} (100%)
 rename tests/cp/{sparse-fiemap => sparse-fiemap.sh} (100%)
 rename tests/cp/{sparse-to-pipe => sparse-to-pipe.sh} (100%)
 rename tests/cp/{sparse => sparse.sh} (100%)
 rename tests/cp/{special-bits => special-bits.sh} (100%)
 rename tests/cp/{special-f => special-f.sh} (100%)
 rename tests/cp/{src-base-dot => src-base-dot.sh} (100%)
 rename tests/cp/{symlink-slash => symlink-slash.sh} (100%)
 rename tests/cp/{thru-dangling => thru-dangling.sh} (100%)
 rename tests/dd/{bytes => bytes.sh} (100%)
 rename tests/dd/{direct => direct.sh} (100%)
 rename tests/dd/{misc => misc.sh} (100%)
 rename tests/dd/{nocache => nocache.sh} (100%)
 rename tests/dd/{not-rewound => not-rewound.sh} (100%)
 rename tests/dd/{reblock => reblock.sh} (100%)
 rename tests/dd/{skip-seek-past-dev => skip-seek-past-dev.sh} (100%)
 rename tests/dd/{skip-seek-past-file => skip-seek-past-file.sh} (100%)
 rename tests/dd/{skip-seek => skip-seek.pl} (100%)
 rename tests/dd/{skip-seek2 => skip-seek2.sh} (100%)
 rename tests/dd/{sparse => sparse.sh} (100%)
 rename tests/dd/{stderr => stderr.sh} (100%)
 rename tests/dd/{unblock-sync => unblock-sync.sh} (100%)
 rename tests/dd/{unblock => unblock.pl} (100%)
 rename tests/df/{df-P => df-P.sh} (100%)
 rename tests/df/{header => header.sh} (100%)
 rename tests/df/{no-mtab-status => no-mtab-status.sh} (100%)
 rename tests/df/{problematic-chars => problematic-chars.sh} (100%)
 rename tests/df/{total-unprocessed => total-unprocessed.sh} (100%)
 rename tests/df/{total-verify => total-verify.sh} (100%)
 rename tests/df/{unreadable => unreadable.sh} (100%)
 rename tests/du/{2g => 2g.sh} (100%)
 rename tests/du/{8gb => 8gb.sh} (100%)
 rename tests/du/{basic => basic.sh} (100%)
 rename tests/du/{bigtime => bigtime.sh} (100%)
 rename tests/du/{bind-mount-dir-cycle => bind-mount-dir-cycle.sh} (100%)
 rename tests/du/{deref-args => deref-args.sh} (100%)
 rename tests/du/{deref => deref.sh} (100%)
 rename tests/du/{exclude => exclude.sh} (100%)
 rename tests/du/{fd-leak => fd-leak.sh} (100%)
 rename tests/du/{files0-from-dir => files0-from-dir.sh} (100%)
 rename tests/du/{files0-from => files0-from.pl} (100%)
 rename tests/du/{hard-link => hard-link.sh} (100%)
 rename tests/du/{inacc-dest => inacc-dest.sh} (100%)
 rename tests/du/{inacc-dir => inacc-dir.sh} (100%)
 rename tests/du/{inaccessible-cwd => inaccessible-cwd.sh} (100%)
 rename tests/du/{long-from-unreadable => long-from-unreadable.sh} (100%)
 rename tests/du/{long-sloop => long-sloop.sh} (100%)
 rename tests/du/{max-depth => max-depth.sh} (100%)
 rename tests/du/{move-dir-while-traversing => move-dir-while-traversing.sh} (100%)
 rename tests/du/{no-deref => no-deref.sh} (100%)
 rename tests/du/{no-x => no-x.sh} (100%)
 rename tests/du/{one-file-system => one-file-system.sh} (100%)
 rename tests/du/{restore-wd => restore-wd.sh} (100%)
 rename tests/du/{slash => slash.sh} (100%)
 rename tests/du/{slink => slink.sh} (100%)
 rename tests/du/{trailing-slash => trailing-slash.sh} (100%)
 rename tests/du/{two-args => two-args.sh} (100%)
 rename tests/fmt/{base => base.pl} (100%)
 rename tests/fmt/{goal-option => goal-option.sh} (100%)
 rename tests/fmt/{long-line => long-line.sh} (100%)
 rename tests/id/{gnu-zero-uids => gnu-zero-uids.sh} (100%)
 rename tests/id/{no-context => no-context.sh} (100%)
 rename tests/install/{basic-1 => basic-1.sh} (100%)
 rename tests/install/{create-leading => create-leading.sh} (100%)
 rename tests/install/{d-slashdot => d-slashdot.sh} (100%)
 rename tests/install/{install-C-root => install-C-root.sh} (100%)
 rename tests/install/{install-C-selinux => install-C-selinux.sh} (100%)
 rename tests/install/{install-C => install-C.sh} (100%)
 rename tests/install/{strip-program => strip-program.sh} (100%)
 rename tests/install/{trap => trap.sh} (100%)
 rename tests/ln/{backup-1 => backup-1.sh} (100%)
 rename tests/ln/{hard-backup => hard-backup.sh} (100%)
 rename tests/ln/{hard-to-sym => hard-to-sym.sh} (100%)
 rename tests/ln/{misc => misc.sh} (100%)
 rename tests/ln/{relative => relative.sh} (100%)
 rename tests/ln/{sf-1 => sf-1.sh} (100%)
 rename tests/ln/{slash-decorated-nonexistent-dest => slash-decorated-nonexistent-dest.sh} (100%)
 rename tests/ln/{target-1 => target-1.sh} (100%)
 rename tests/ls/{abmon-align => abmon-align.sh} (100%)
 rename tests/ls/{block-size => block-size.sh} (100%)
 rename tests/ls/{capability => capability.sh} (100%)
 rename tests/ls/{color-clear-to-eol => color-clear-to-eol.sh} (100%)
 rename tests/ls/{color-dtype-dir => color-dtype-dir.sh} (100%)
 rename tests/ls/{color-norm => color-norm.sh} (100%)
 rename tests/ls/{dangle => dangle.sh} (100%)
 rename tests/ls/{dired => dired.sh} (100%)
 rename tests/ls/{file-type => file-type.sh} (100%)
 rename tests/ls/{follow-slink => follow-slink.sh} (100%)
 rename tests/ls/{getxattr-speedup => getxattr-speedup.sh} (100%)
 rename tests/ls/{infloop => infloop.sh} (100%)
 rename tests/ls/{inode => inode.sh} (100%)
 rename tests/ls/{m-option => m-option.sh} (100%)
 rename tests/ls/{multihardlink => multihardlink.sh} (100%)
 rename tests/ls/{nameless-uid => nameless-uid.sh} (100%)
 rename tests/ls/{no-arg => no-arg.sh} (100%)
 rename tests/ls/{no-cap => no-cap.sh} (100%)
 rename tests/ls/{proc-selinux-segfault => proc-selinux-segfault.sh} (100%)
 rename tests/ls/{readdir-mountpoint-inode => readdir-mountpoint-inode.sh} (100%)
 rename tests/ls/{recursive => recursive.sh} (100%)
 rename tests/ls/{root-rel-symlink-color => root-rel-symlink-color.sh} (100%)
 rename tests/ls/{rt-1 => rt-1.sh} (100%)
 rename tests/ls/{slink-acl => slink-acl.sh} (100%)
 rename tests/ls/{stat-dtype => stat-dtype.sh} (100%)
 rename tests/ls/{stat-failed => stat-failed.sh} (100%)
 rename tests/ls/{stat-free-color => stat-free-color.sh} (100%)
 rename tests/ls/{stat-free-symlinks => stat-free-symlinks.sh} (100%)
 rename tests/ls/{stat-vs-dirent => stat-vs-dirent.sh} (100%)
 rename tests/ls/{symlink-slash => symlink-slash.sh} (100%)
 rename tests/ls/{time-style-diag => time-style-diag.sh} (100%)
 rename tests/ls/{x-option => x-option.sh} (100%)
 rename tests/misc/{arch => arch.sh} (100%)
 rename tests/misc/{base64 => base64.pl} (100%)
 rename tests/misc/{basename => basename.pl} (100%)
 rename tests/misc/{cat-buf => cat-buf.sh} (100%)
 rename tests/misc/{cat-proc => cat-proc.sh} (100%)
 rename tests/misc/{chcon-fail => chcon-fail.sh} (100%)
 rename tests/misc/{chcon => chcon.sh} (100%)
 rename tests/misc/{chroot-credentials => chroot-credentials.sh} (100%)
 rename tests/misc/{chroot-fail => chroot-fail.sh} (100%)
 rename tests/misc/{close-stdout => close-stdout.sh} (100%)
 rename tests/misc/{comm => comm.pl} (100%)
 rename tests/misc/{csplit-1000 => csplit-1000.sh} (100%)
 rename tests/misc/{csplit-heap => csplit-heap.sh} (100%)
 rename tests/misc/{csplit => csplit.sh} (100%)
 rename tests/misc/{cut => cut.pl} (100%)
 rename tests/misc/{date-next-dow => date-next-dow.pl} (100%)
 rename tests/misc/{date-sec => date-sec.sh} (100%)
 rename tests/misc/{date => date.pl} (100%)
 rename tests/misc/{dircolors => dircolors.pl} (100%)
 rename tests/misc/{dirname => dirname.pl} (100%)
 rename tests/misc/{env-null => env-null.sh} (100%)
 rename tests/misc/{env => env.sh} (100%)
 rename tests/misc/{expand => expand.pl} (100%)
 rename tests/misc/{expr => expr.pl} (100%)
 rename tests/misc/{factor => factor.pl} (100%)
 rename tests/misc/{false-status => false-status.sh} (100%)
 rename tests/misc/{fold => fold.pl} (100%)
 rename tests/misc/{groups-dash => groups-dash.sh} (100%)
 rename tests/misc/{groups-version => groups-version.sh} (100%)
 rename tests/misc/{head-c => head-c.sh} (100%)
 rename tests/misc/{head-elide-tail => head-elide-tail.pl} (100%)
 rename tests/misc/{head-pos => head-pos.sh} (100%)
 rename tests/misc/{head => head.pl} (100%)
 rename tests/misc/{help-version => help-version.sh} (100%)
 rename tests/misc/{id-context => id-context.sh} (100%)
 rename tests/misc/{id-groups => id-groups.sh} (100%)
 rename tests/misc/{id-setgid => id-setgid.sh} (100%)
 rename tests/misc/{invalid-opt => invalid-opt.pl} (100%)
 rename tests/misc/{join => join.pl} (100%)
 rename tests/misc/{ls-misc => ls-misc.pl} (100%)
 rename tests/misc/{ls-time => ls-time.sh} (100%)
 rename tests/misc/{md5sum-bsd => md5sum-bsd.sh} (100%)
 rename tests/misc/{md5sum-newline => md5sum-newline.pl} (100%)
 rename tests/misc/{md5sum-parallel => md5sum-parallel.sh} (100%)
 rename tests/misc/{md5sum => md5sum.pl} (100%)
 rename tests/misc/{mknod => mknod.sh} (100%)
 rename tests/misc/{mktemp => mktemp.pl} (100%)
 rename tests/misc/{nice-fail => nice-fail.sh} (100%)
 rename tests/misc/{nice => nice.sh} (100%)
 rename tests/misc/{nl => nl.sh} (100%)
 rename tests/misc/{nohup => nohup.sh} (100%)
 rename tests/misc/{nproc-avail => nproc-avail.sh} (100%)
 rename tests/misc/{nproc-positive => nproc-positive.sh} (100%)
 rename tests/misc/{od-N => od-N.sh} (100%)
 rename tests/misc/{od-float => od-float.sh} (100%)
 rename tests/misc/{od-multiple-t => od-multiple-t.sh} (100%)
 rename tests/misc/{od-x8 => od-x8.sh} (100%)
 rename tests/misc/{od => od.pl} (100%)
 rename tests/misc/{paste => paste.pl} (100%)
 rename tests/misc/{pathchk1 => pathchk1.sh} (100%)
 rename tests/misc/{pr => pr.pl} (100%)
 rename tests/misc/{printenv => printenv.sh} (100%)
 rename tests/misc/{printf-cov => printf-cov.pl} (100%)
 rename tests/misc/{printf-hex => printf-hex.sh} (100%)
 rename tests/misc/{printf-surprise => printf-surprise.sh} (100%)
 rename tests/misc/{printf => printf.sh} (100%)
 rename tests/misc/{ptx-overrun => ptx-overrun.sh} (100%)
 rename tests/misc/{ptx => ptx.pl} (100%)
 rename tests/misc/{pwd-long => pwd-long.sh} (100%)
 rename tests/misc/{pwd-option => pwd-option.sh} (100%)
 rename tests/misc/{readlink-fp-loop => readlink-fp-loop.sh} (100%)
 rename tests/misc/{readlink-root => readlink-root.sh} (100%)
 rename tests/misc/{realpath => realpath.sh} (100%)
 rename tests/misc/{runcon-no-reorder => runcon-no-reorder.sh} (100%)
 rename tests/misc/{selinux => selinux.sh} (100%)
 rename tests/misc/{seq-long-double => seq-long-double.sh} (100%)
 rename tests/misc/{seq => seq.pl} (100%)
 rename tests/misc/{sha1sum-vec => sha1sum-vec.pl} (100%)
 rename tests/misc/{sha1sum => sha1sum.pl} (100%)
 rename tests/misc/{sha224sum => sha224sum.pl} (100%)
 rename tests/misc/{sha256sum => sha256sum.pl} (100%)
 rename tests/misc/{sha384sum => sha384sum.pl} (100%)
 rename tests/misc/{sha512sum => sha512sum.pl} (100%)
 rename tests/misc/{shred-exact => shred-exact.sh} (100%)
 rename tests/misc/{shred-passes => shred-passes.sh} (100%)
 rename tests/misc/{shred-remove => shred-remove.sh} (100%)
 rename tests/misc/{shuf => shuf.sh} (100%)
 rename tests/misc/{sort-NaN-infloop => sort-NaN-infloop.sh} (100%)
 rename tests/misc/{sort-benchmark-random => sort-benchmark-random.sh} (100%)
 rename tests/misc/{sort-compress-hang => sort-compress-hang.sh} (100%)
 rename tests/misc/{sort-compress-proc => sort-compress-proc.sh} (100%)
 rename tests/misc/{sort-compress => sort-compress.sh} (100%)
 rename tests/misc/{sort-continue => sort-continue.sh} (100%)
 rename tests/misc/{sort-debug-keys => sort-debug-keys.sh} (100%)
 rename tests/misc/{sort-debug-warn => sort-debug-warn.sh} (100%)
 rename tests/misc/{sort-discrim => sort-discrim.sh} (100%)
 rename tests/misc/{sort-exit-early => sort-exit-early.sh} (100%)
 rename tests/misc/{sort-files0-from => sort-files0-from.pl} (100%)
 rename tests/misc/{sort-float => sort-float.sh} (100%)
 rename tests/misc/{sort-merge-fdlimit => sort-merge-fdlimit.sh} (100%)
 rename tests/misc/{sort-merge => sort-merge.pl} (100%)
 rename tests/misc/{sort-month => sort-month.sh} (100%)
 rename tests/misc/{sort-rand => sort-rand.sh} (100%)
 rename tests/misc/{sort-spinlock-abuse => sort-spinlock-abuse.sh} (100%)
 rename tests/misc/{sort-stale-thread-mem => sort-stale-thread-mem.sh} (100%)
 rename tests/misc/{sort-u-FMR => sort-u-FMR.sh} (100%)
 rename tests/misc/{sort-unique-segv => sort-unique-segv.sh} (100%)
 rename tests/misc/{sort-unique => sort-unique.sh} (100%)
 rename tests/misc/{sort-version => sort-version.sh} (100%)
 rename tests/misc/{sort => sort.pl} (100%)
 rename tests/misc/{stat-birthtime => stat-birthtime.sh} (100%)
 rename tests/misc/{stat-fmt => stat-fmt.sh} (100%)
 rename tests/misc/{stat-hyphen => stat-hyphen.sh} (100%)
 rename tests/misc/{stat-mount => stat-mount.sh} (100%)
 rename tests/misc/{stat-nanoseconds => stat-nanoseconds.sh} (100%)
 rename tests/misc/{stat-printf => stat-printf.pl} (100%)
 rename tests/misc/{stat-slash => stat-slash.sh} (100%)
 rename tests/misc/{stdbuf => stdbuf.sh} (100%)
 rename tests/misc/{stty-invalid => stty-invalid.sh} (100%)
 rename tests/misc/{stty-pairs => stty-pairs.sh} (100%)
 rename tests/misc/{stty-row-col => stty-row-col.sh} (100%)
 rename tests/misc/{stty => stty.sh} (100%)
 rename tests/misc/{sum-sysv => sum-sysv.sh} (100%)
 rename tests/misc/{sum => sum.pl} (100%)
 rename tests/misc/{tac-2-nonseekable => tac-2-nonseekable.sh} (100%)
 rename tests/misc/{tac-continue => tac-continue.sh} (100%)
 rename tests/misc/{tac => tac.pl} (100%)
 rename tests/misc/{tail => tail.pl} (100%)
 rename tests/misc/{tee-dash => tee-dash.sh} (100%)
 rename tests/misc/{tee => tee.sh} (100%)
 rename tests/misc/{test-diag => test-diag.pl} (100%)
 rename tests/misc/{test => test.pl} (100%)
 rename tests/misc/{timeout-group => timeout-group.sh} (100%)
 rename tests/misc/{timeout-parameters => timeout-parameters.sh} (100%)
 rename tests/misc/{timeout => timeout.sh} (100%)
 rename tests/misc/{tr-case-class => tr-case-class.sh} (100%)
 rename tests/misc/{tr => tr.pl} (100%)
 rename tests/misc/{truncate-dangling-symlink => truncate-dangling-symlink.sh} (100%)
 rename tests/misc/{truncate-dir-fail => truncate-dir-fail.sh} (100%)
 rename tests/misc/{truncate-fail-diag => truncate-fail-diag.sh} (100%)
 rename tests/misc/{truncate-fifo => truncate-fifo.sh} (100%)
 rename tests/misc/{truncate-no-create-missing => truncate-no-create-missing.sh} (100%)
 rename tests/misc/{truncate-overflow => truncate-overflow.sh} (100%)
 rename tests/misc/{truncate-owned-by-other => truncate-owned-by-other.sh} (100%)
 rename tests/misc/{truncate-parameters => truncate-parameters.sh} (100%)
 rename tests/misc/{truncate-relative => truncate-relative.sh} (100%)
 rename tests/misc/{tsort => tsort.pl} (100%)
 rename tests/misc/{tty-eof => tty-eof.pl} (100%)
 rename tests/misc/{unexpand => unexpand.pl} (100%)
 rename tests/misc/{uniq-perf => uniq-perf.sh} (100%)
 rename tests/misc/{uniq => uniq.pl} (100%)
 rename tests/misc/{wc-files0-from => wc-files0-from.pl} (100%)
 rename tests/misc/{wc-files0 => wc-files0.sh} (100%)
 rename tests/misc/{wc-parallel => wc-parallel.sh} (100%)
 rename tests/misc/{wc => wc.pl} (100%)
 rename tests/misc/{xattr => xattr.sh} (100%)
 rename tests/misc/{xstrtol => xstrtol.pl} (100%)
 rename tests/mkdir/{p-1 => p-1.sh} (100%)
 rename tests/mkdir/{p-2 => p-2.sh} (100%)
 rename tests/mkdir/{p-3 => p-3.sh} (100%)
 rename tests/mkdir/{p-slashdot => p-slashdot.sh} (100%)
 rename tests/mkdir/{p-thru-slink => p-thru-slink.sh} (100%)
 rename tests/mkdir/{p-v => p-v.sh} (100%)
 rename tests/mkdir/{parents => parents.sh} (100%)
 rename tests/mkdir/{perm => perm.sh} (100%)
 rename tests/mkdir/{selinux => selinux.sh} (100%)
 rename tests/mkdir/{special-1 => special-1.sh} (100%)
 rename tests/mkdir/{t-slash => t-slash.sh} (100%)
 rename tests/mkdir/{writable-under-readonly => writable-under-readonly.sh} (100%)
 rename tests/mv/{acl => acl.sh} (100%)
 rename tests/mv/{atomic => atomic.sh} (100%)
 rename tests/mv/{atomic2 => atomic2.sh} (100%)
 rename tests/mv/{backup-dir => backup-dir.sh} (100%)
 rename tests/mv/{backup-is-src => backup-is-src.sh} (100%)
 rename tests/mv/{childproof => childproof.sh} (100%)
 rename tests/mv/{diag => diag.sh} (100%)
 rename tests/mv/{dir-file => dir-file.sh} (100%)
 rename tests/mv/{dir2dir => dir2dir.sh} (100%)
 rename tests/mv/{dup-source => dup-source.sh} (100%)
 rename tests/mv/{force => force.sh} (100%)
 rename tests/mv/{hard-2 => hard-2.sh} (100%)
 rename tests/mv/{hard-3 => hard-3.sh} (100%)
 rename tests/mv/{hard-4 => hard-4.sh} (100%)
 rename tests/mv/{hard-link-1 => hard-link-1.sh} (100%)
 rename tests/mv/{hard-verbose => hard-verbose.sh} (100%)
 rename tests/mv/{i-1 => i-1.pl} (100%)
 rename tests/mv/{i-2 => i-2.sh} (100%)
 rename tests/mv/{i-3 => i-3.sh} (100%)
 rename tests/mv/{i-4 => i-4.sh} (100%)
 rename tests/mv/{i-5 => i-5.sh} (100%)
 rename tests/mv/{i-link-no => i-link-no.sh} (100%)
 rename tests/mv/{into-self-2 => into-self-2.sh} (100%)
 rename tests/mv/{into-self-3 => into-self-3.sh} (100%)
 rename tests/mv/{into-self-4 => into-self-4.sh} (100%)
 rename tests/mv/{into-self => into-self.sh} (100%)
 rename tests/mv/{leak-fd => leak-fd.sh} (100%)
 rename tests/mv/{mv-n => mv-n.sh} (100%)
 rename tests/mv/{mv-special-1 => mv-special-1.sh} (100%)
 rename tests/mv/{no-target-dir => no-target-dir.sh} (100%)
 rename tests/mv/{part-fail => part-fail.sh} (100%)
 rename tests/mv/{part-hardlink => part-hardlink.sh} (100%)
 rename tests/mv/{part-rename => part-rename.sh} (100%)
 rename tests/mv/{part-symlink => part-symlink.sh} (100%)
 rename tests/mv/{partition-perm => partition-perm.sh} (100%)
 rename tests/mv/{perm-1 => perm-1.sh} (100%)
 rename tests/mv/{sticky-to-xpart => sticky-to-xpart.sh} (100%)
 rename tests/mv/{symlink-onto-hardlink-to-self => symlink-onto-hardlink-to-self.sh} (100%)
 rename tests/mv/{symlink-onto-hardlink => symlink-onto-hardlink.sh} (100%)
 rename tests/mv/{to-symlink => to-symlink.sh} (100%)
 rename tests/mv/{trailing-slash => trailing-slash.sh} (100%)
 rename tests/mv/{update => update.sh} (100%)
 create mode 100644 tests/no-perl
 rename tests/pr/{pr-tests => pr-tests.pl} (100%)
 rename tests/readlink/{can-e => can-e.sh} (100%)
 rename tests/readlink/{can-f => can-f.sh} (100%)
 rename tests/readlink/{can-m => can-m.sh} (100%)
 rename tests/readlink/{rl-1 => rl-1.sh} (100%)
 rename tests/rm/{cycle => cycle.sh} (100%)
 rename tests/rm/{d-1 => d-1.sh} (100%)
 rename tests/rm/{d-2 => d-2.sh} (100%)
 rename tests/rm/{d-3 => d-3.sh} (100%)
 rename tests/rm/{dangling-symlink => dangling-symlink.sh} (100%)
 rename tests/rm/{deep-1 => deep-1.sh} (100%)
 rename tests/rm/{deep-2 => deep-2.sh} (100%)
 rename tests/rm/{dir-no-w => dir-no-w.sh} (100%)
 rename tests/rm/{dir-nonrecur => dir-nonrecur.sh} (100%)
 rename tests/rm/{dot-rel => dot-rel.sh} (100%)
 rename tests/rm/{empty-inacc => empty-inacc.sh} (100%)
 rename tests/rm/{empty-name => empty-name.pl} (100%)
 rename tests/rm/{ext3-perf => ext3-perf.sh} (100%)
 rename tests/rm/{f-1 => f-1.sh} (100%)
 rename tests/rm/{fail-2eperm => fail-2eperm.sh} (100%)
 rename tests/rm/{fail-eacces => fail-eacces.sh} (100%)
 rename tests/rm/{fail-eperm => fail-eperm.xpl} (100%)
 rename tests/rm/{hash => hash.sh} (100%)
 rename tests/rm/{i-1 => i-1.sh} (100%)
 rename tests/rm/{i-never => i-never.sh} (100%)
 rename tests/rm/{i-no-r => i-no-r.sh} (100%)
 rename tests/rm/{ignorable => ignorable.sh} (100%)
 rename tests/rm/{inaccessible => inaccessible.sh} (100%)
 rename tests/rm/{interactive-always => interactive-always.sh} (100%)
 rename tests/rm/{interactive-once => interactive-once.sh} (100%)
 rename tests/rm/{ir-1 => ir-1.sh} (100%)
 rename tests/rm/{isatty => isatty.sh} (100%)
 rename tests/rm/{many-dir-entries-vs-OOM => many-dir-entries-vs-OOM.sh} (100%)
 rename tests/rm/{no-give-up => no-give-up.sh} (100%)
 rename tests/rm/{one-file-system => one-file-system.sh} (100%)
 rename tests/rm/{one-file-system2 => one-file-system2.sh} (100%)
 rename tests/rm/{r-1 => r-1.sh} (100%)
 rename tests/rm/{r-2 => r-2.sh} (100%)
 rename tests/rm/{r-3 => r-3.sh} (100%)
 rename tests/rm/{r-4 => r-4.sh} (100%)
 rename tests/rm/{read-only => read-only.sh} (100%)
 rename tests/rm/{readdir-bug => readdir-bug.sh} (100%)
 rename tests/rm/{rm1 => rm1.sh} (100%)
 rename tests/rm/{rm2 => rm2.sh} (100%)
 rename tests/rm/{rm3 => rm3.sh} (100%)
 rename tests/rm/{rm4 => rm4.sh} (100%)
 rename tests/rm/{rm5 => rm5.sh} (100%)
 rename tests/rm/{sunos-1 => sunos-1.sh} (100%)
 rename tests/rm/{unread2 => unread2.sh} (100%)
 rename tests/rm/{unread3 => unread3.sh} (100%)
 rename tests/rm/{unreadable => unreadable.pl} (100%)
 rename tests/rm/{v-slash => v-slash.sh} (100%)
 rename tests/rmdir/{fail-perm => fail-perm.sh} (100%)
 rename tests/rmdir/{ignore => ignore.sh} (100%)
 rename tests/rmdir/{t-slash => t-slash.sh} (100%)
 delete mode 100644 tests/shell-or-perl
 rename tests/split/{additional-suffix => additional-suffix.sh} (100%)
 rename tests/split/{b-chunk => b-chunk.sh} (100%)
 rename tests/split/{fail => fail.sh} (100%)
 rename tests/split/{filter => filter.sh} (100%)
 rename tests/split/{guard-input => guard-input.sh} (100%)
 rename tests/split/{l-chunk => l-chunk.sh} (100%)
 rename tests/split/{lines => lines.sh} (100%)
 rename tests/split/{numeric => numeric.sh} (100%)
 rename tests/split/{r-chunk => r-chunk.sh} (100%)
 rename tests/split/{suffix-auto-length => suffix-auto-length.sh} (100%)
 rename tests/split/{suffix-length => suffix-length.sh} (100%)
 rename tests/tail-2/{F-vs-missing => F-vs-missing.sh} (100%)
 rename tests/tail-2/{F-vs-rename => F-vs-rename.sh} (100%)
 rename tests/tail-2/{append-only => append-only.sh} (100%)
 rename tests/tail-2/{assert-2 => assert-2.sh} (100%)
 rename tests/tail-2/{assert => assert.sh} (100%)
 rename tests/tail-2/{big-4gb => big-4gb.sh} (100%)
 rename tests/tail-2/{flush-initial => flush-initial.sh} (100%)
 rename tests/tail-2/{follow-name => follow-name.sh} (100%)
 rename tests/tail-2/{follow-stdin => follow-stdin.sh} (100%)
 rename tests/tail-2/{infloop-1 => infloop-1.sh} (100%)
 rename tests/tail-2/{inotify-hash-abuse => inotify-hash-abuse.sh} (100%)
 rename tests/tail-2/{inotify-hash-abuse2 => inotify-hash-abuse2.sh} (100%)
 rename tests/tail-2/{inotify-race => inotify-race.sh} (100%)
 rename tests/tail-2/{inotify-rotate => inotify-rotate.sh} (100%)
 rename tests/tail-2/{pid => pid.sh} (100%)
 rename tests/tail-2/{pipe-f => pipe-f.sh} (100%)
 rename tests/tail-2/{pipe-f2 => pipe-f2.sh} (100%)
 rename tests/tail-2/{proc-ksyms => proc-ksyms.sh} (100%)
 rename tests/tail-2/{start-middle => start-middle.sh} (100%)
 rename tests/tail-2/{tail-n0f => tail-n0f.sh} (100%)
 rename tests/tail-2/{wait => wait.sh} (100%)
 rename tests/touch/{60-seconds => 60-seconds.sh} (100%)
 rename tests/touch/{dangling-symlink => dangling-symlink.sh} (100%)
 rename tests/touch/{dir-1 => dir-1.sh} (100%)
 rename tests/touch/{empty-file => empty-file.sh} (100%)
 rename tests/touch/{fail-diag => fail-diag.sh} (100%)
 rename tests/touch/{fifo => fifo.sh} (100%)
 rename tests/touch/{no-create-missing => no-create-missing.sh} (100%)
 rename tests/touch/{no-dereference => no-dereference.sh} (100%)
 rename tests/touch/{no-rights => no-rights.sh} (100%)
 rename tests/touch/{not-owner => not-owner.sh} (100%)
 rename tests/touch/{now-owned-by-other => now-owned-by-other.sh} (100%)
 rename tests/touch/{obsolescent => obsolescent.sh} (100%)
 rename tests/touch/{read-only => read-only.sh} (100%)
 rename tests/touch/{relative => relative.sh} (100%)
 rename tests/touch/{trailing-slash => trailing-slash.sh} (100%)

-- 
1.7.12



From MAILER-DAEMON Thu Aug 30 09:21:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74gY-00043Z-Iv
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:21:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33374)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cx-0007md-UK
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cp-0000NC-Pp
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:39 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:61899)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cp-0000MY-JS
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:31 -0400
Received: by mail-bk0-f41.google.com with SMTP id jc3so774186bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 05:13:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=gYhhWzmKne3VaYnDf9bS8pkzzXkhrKJa88q3/e8rN1I=;
	b=ckUyA1jhpjjP3tAZrMLtETK4jx4+SYGpr113qOVR+Pc1p111G8afFJc0Z4mZZFtBQq
	LgKbJ0Ka4ys3k+X7Kr8P7/j68R//JSwxtQjTAnbmVzzEW2Yo9ymAhwuu0MUtGPe5+Hjj
	ahxok5fX/X7xFDs1lL83zwhluIM710CLCTT06NyuLvk5uROZgocdMfF+UbM3jvo2w+D2
	WiEHLPN+/r41duWwb0OC3Rjwfm+yzcacfobHL8OSF9CzSBmfgJG6sWG5rw5wW4WFgfF9
	n13vnGfK9PHMmfJhGvFYgw0BPt+aNDay5ra2cS+3CWkAM5JlDnG1T02s5w2UG4LRbzLw
	8TCA==
Received: by 10.205.127.131 with SMTP id ha3mr2671798bkc.123.1346328811217;
	Thu, 30 Aug 2012 05:13:31 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hs2sm1135892bkc.1.2012.08.30.05.13.29
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 05:13:30 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 3/7] build: require Automake >= 1.11.6
Date: Thu, 30 Aug 2012 14:13:09 +0200
Message-Id: <e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
X-Mailman-Approved-At: Thu, 30 Aug 2012 09:21:23 -0400
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 12:13:49 -0000

Now that we use AM_TESTS_ENVIRONMENT, we should require at least
Automake >= 1.11.2; but since all the Automake version until 1.11.5
are vulnerable to CVE-2012-3386:

  <https://lists.gnu.org/archive/html/automake/2012-07/msg00023.html>

it's even better to require 1.11.6.

* configure.ac (AM_INIT_AUTOMAKE): Bump version requirement to 1.11.6.
* bootstrap.conf ($buildreq): Likewise.
---
 bootstrap.conf | 2 +-
 configure.ac   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index eab6606..b5c0857 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -309,7 +309,7 @@ gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\
 # Build prerequisites
 buildreq="\
 autoconf   2.64
-automake   1.11.1
+automake   1.11.6
 autopoint  -
 bison      -
 gettext    0.17
diff --git a/configure.ac b/configure.ac
index ce8ebc9..11c84f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,7 @@ AC_CONFIG_SRCDIR([src/ls.c])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
 
-AM_INIT_AUTOMAKE([1.11.1 no-dist-gzip dist-xz color-tests parallel-tests])
+AM_INIT_AUTOMAKE([1.11.6 no-dist-gzip dist-xz color-tests parallel-tests])
 AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
 
 dnl POSIXCHECK is worthwhile for maintainers, but adds several seconds
-- 
1.7.12



From MAILER-DAEMON Thu Aug 30 09:21:27 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74gZ-00045J-2s
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:21:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33416)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73d3-0007n7-54
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73ct-0000Ni-13
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:45 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:61899)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cs-0000MY-QN
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:34 -0400
Received: by mail-bk0-f41.google.com with SMTP id jc3so774186bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 05:13:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=GjHDfIO8aUMv4AQLLsjE5juYZeBi/HfxFXpWieHHyVg=;
	b=fUU89P+TzN158myqDbmyXQx9PJGJ+sQE0YA7aMgl0sVT/cHo3aiCNs32oGKPD61m0J
	CKOTb6b50QXT+1OM5n8me6bZt8hBL2irD5XUMEJutWpzlleR0yNxW2GAWnz6r7YozRXM
	hIRqFVdISg06kGAP1yA3CDpb1QaYk6mOx0FM26v6BhSoDXRYCjWLxEf8YfNwLDyimFth
	diFHjyFihEfjCFZpRF4VOXP/NNH2C86UTqGiA2WvuwY3KsvrP0YCJhvprJpIZP7BEM7c
	wJDCBtjjOM9wUH2OjXWAjDZQQKeTO1BwLnGyLf/4IESzkgsAm6Lk74I7SapyabmSCCje
	U6UQ==
Received: by 10.205.127.131 with SMTP id ha3mr2671905bkc.123.1346328814407;
	Thu, 30 Aug 2012 05:13:34 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hs2sm1135892bkc.1.2012.08.30.05.13.32
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 05:13:33 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 5/7] tests: detect missing perl at configure runtime
Date: Thu, 30 Aug 2012 14:13:11 +0200
Message-Id: <deaf469bee203b0cfbc02b728ee2f6c87eec4e4f.1346327498.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
X-Mailman-Approved-At: Thu, 30 Aug 2012 09:21:23 -0400
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 12:13:51 -0000

* configure.ac (AM_CONDITIONAL): Se the conditional 'HAVE_PERL' to
true if the configure-time checks (as run by gl_PERL) have been able
to find a working perl.
* tests/no-perl: New script, report a diagnostic about "missing perl"
and exit with status 77.
* tests/Makefile.am (EXTRA_DIST): Distribute it.
(TESTSUITE_PERL): New, define to '$(PERL)' if a perl interpreter has
been found at configure time (i.e., if the 'HAVE_PERL' automake
conditional is true), and to '$(srcdir)/no-perl' otherwise.
(LOG_COMPILER): Use $(TESTSUITE_PERL) instead of $(PERL).
(XPL_LOG_COMPILER): Likewise.
* tests/shell-of-perl: Simplify: no need to actually check whether
perl is working.
---
 configure.ac        |  7 +++++++
 tests/Makefile.am   | 11 +++++++++--
 tests/no-perl       |  6 ++++++
 tests/shell-or-perl | 11 ++---------
 4 files changed, 24 insertions(+), 11 deletions(-)
 create mode 100644 tests/no-perl

diff --git a/configure.ac b/configure.ac
index 11c84f5..a12b4c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,13 @@ gl_EARLY
 gl_INIT
 coreutils_MACROS
 
+# The testsuite need to know if we have a working perl.
+# FIXME: this is suboptimal.  Ideally, we should be able to call gl_PERL
+# with a ACTION-IF-NOT-FOUND argument ...
+cu_have_perl=yes
+case $PERL in *"/missing ") cu_have_perl=no;; esac
+AM_CONDITIONAL([HAVE_PERL], [test $cu_have_perl = yes])
+
 AC_ARG_ENABLE([gcc-warnings],
   [AS_HELP_STRING([--enable-gcc-warnings],
                   [turn on lots of GCC warnings (for developers)])],
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 581f803..ff0af84 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -47,6 +47,12 @@ check_DATA = .built-programs
 
 TEST_EXTENSIONS = .xpl
 
+if HAVE_PERL
+TESTSUITE_PERL = $(PERL)
+else
+TESTSUITE_PERL = $(SHELL) $(srcdir)/no-perl
+endif
+
 # '$f' is set by the Automake-generated test harness to the path of the
 # current test script stripped of VPATH components, and is used by the
 # shell-or-perl script to determine the name of the temporary files to be
@@ -55,11 +61,11 @@ TEST_EXTENSIONS = .xpl
 LOG_COMPILER = \
   $(SHELL) $(srcdir)/shell-or-perl \
   --test-name "$$f" --srcdir '$(srcdir)' \
-  --shell '$(SHELL)' --perl '$(PERL)' --
+  --shell '$(SHELL)' --perl '$(TESTSUITE_PERL)' --
 
 # Perl scripts that must be run in tainted mode.
 XPL_LOG_COMPILER = \
-  $(PERL) -wT -I$(srcdir) -MCoreutils -MCuSkip -M"CuTmpdir qw($$f)"
+  $(TESTSUITE_PERL) -wT -I$(srcdir) -MCoreutils -MCuSkip -M"CuTmpdir qw($$f)"
 
 # Note that the first lines are statements.  They ensure that environment
 # variables that can perturb tests are unset or set to expected values.
@@ -118,6 +124,7 @@ EXTRA_DIST =		\
   init.cfg		\
   init.sh		\
   lang-default		\
+  no-perl		\
   other-fs-tmpdir	\
   sample-test		\
   shell-or-perl		\
diff --git a/tests/no-perl b/tests/no-perl
new file mode 100644
index 0000000..110cf51
--- /dev/null
+++ b/tests/no-perl
@@ -0,0 +1,6 @@
+#! /bin/sh
+# Perl is not available, the test should be considered skipped.
+# The FD 9 should have been opened the testsuite harness, pointing
+# to the original stderr (usually, the user's terminal).
+echo "test skipped: no usable version of Perl found" >&9
+exit 77
diff --git a/tests/shell-or-perl b/tests/shell-or-perl
index cb80edf..409db0e 100644
--- a/tests/shell-or-perl
+++ b/tests/shell-or-perl
@@ -94,15 +94,8 @@ read shebang_line < "$test_script" \
 case $shebang_line in
 '#!/usr/bin/perl'*)
   # The test is a perl script.
-  if $cu_PERL -e 'use warnings' > /dev/null 2>&1; then
-    exec $cu_PERL -w -I"$srcdir" -MCoreutils -MCuSkip \
-                  -M"CuTmpdir qw($test_name)" \
-                  -- "$test_script" ${1+"$@"}
-  else
-    # Perl is not available, skip the test.
-    echo "$test_name: skip: no usable version of Perl found"
-    exit 77
-  fi
+  exec $cu_PERL -w -I"$srcdir" -MCoreutils -MCuSkip \
+                -M"CuTmpdir qw($test_name)" -- "$test_script" ${1+"$@"}
   ;;
 *)
   # Assume the test is a shell script.
-- 
1.7.12



From MAILER-DAEMON Thu Aug 30 09:21:27 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74gZ-000473-Ly
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:21:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33579)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73dM-0007pc-25
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:14:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cy-0000Oj-OA
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:14:03 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:61899)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73cy-0000MY-3V
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:13:40 -0400
Received: by mail-bk0-f41.google.com with SMTP id jc3so774186bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 05:13:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=N3o5lv91V9rjY2Hl0my8+B8BUZdzqPhzq9GPLcxW7y8=;
	b=pt0nA0jgi7hMcT+hQNFh9Yf5OCvOzq95dz+ry90rSDWZ8mcYM9VVY56ESXABHoa8L9
	epjo3mFMVV+JpiyrpI2nr8fekkv8nXg0Kw7U6JoNPKxNEfSzsVJhlpGI1/LLD/KA110W
	TvN9Y+KXuZwAUvPtCkCGcNWbpdXNkAot/1vIXT5CRTjivvh/QxOfUG8wQlVibh0bEyhz
	Dkzwr9/9z/GEY2e0xJ/HNBln8Q/zB1dhfIBlSZgbacVE12kQp60ObrXXyI4I7ykzIOkk
	ibFC8UD2qatSFks/c7ZrtjgaufD5pz/hgyMtl0CI69+C1L73wwm7Xk+D07NkY6wPSjq7
	X9cg==
Received: by 10.204.157.146 with SMTP id b18mr2580198bkx.108.1346328819441;
	Thu, 30 Aug 2012 05:13:39 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hs2sm1135892bkc.1.2012.08.30.05.13.34
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 05:13:38 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 6/7] tests: add .sh and .pl suffixes to shell and perl tests,
	respectively
Date: Thu, 30 Aug 2012 14:13:12 +0200
Message-Id: <ec7c363f5dc68ec9005730e9ebddbe127247256c.1346327498.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346327497.git.stefano.lattarini@gmail.com>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
X-Mailman-Approved-At: Thu, 30 Aug 2012 09:21:23 -0400
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 12:14:22 -0000

Not only this shrinks the size of the generated Makefile (from > 6300
lines to ~3000), but will allow further simplifications in future
changes.

* tests/Makefile.am (TEST_EXTENSIONS): Add '.sh' and '.pl'.
(PL_LOG_COMPILER, SH_LOG_COMPILER): New, still defined simply to
$(LOG_COMPILER) for the time being.
(TESTS, root_tests): Adjust as described.
* All tests: Rename as described.
---
 tests/Makefile.am                                  | 989 +++++++++++----------
 tests/chgrp/{basic => basic.sh}                    |   0
 .../{default-no-deref => default-no-deref.sh}      |   0
 tests/chgrp/{deref => deref.sh}                    |   0
 tests/chgrp/{no-x => no-x.sh}                      |   0
 tests/chgrp/{posix-H => posix-H.sh}                |   0
 tests/chgrp/{recurse => recurse.sh}                |   0
 tests/chmod/{c-option => c-option.sh}              |   0
 tests/chmod/{equal-x => equal-x.sh}                |   0
 tests/chmod/{equals => equals.sh}                  |   0
 tests/chmod/{inaccessible => inaccessible.sh}      |   0
 tests/chmod/{no-x => no-x.sh}                      |   0
 tests/chmod/{octal => octal.sh}                    |   0
 tests/chmod/{setgid => setgid.sh}                  |   0
 tests/chmod/{silent => silent.sh}                  |   0
 tests/chmod/{thru-dangling => thru-dangling.sh}    |   0
 tests/chmod/{umask-x => umask-x.sh}                |   0
 tests/chmod/{usage => usage.sh}                    |   0
 tests/chown/{basic => basic.sh}                    |   0
 tests/chown/{deref => deref.sh}                    |   0
 tests/chown/{preserve-root => preserve-root.sh}    |   0
 tests/chown/{separator => separator.sh}            |   0
 tests/cp/{abuse => abuse.sh}                       |   0
 tests/cp/{acl => acl.sh}                           |   0
 tests/cp/{attr-existing => attr-existing.sh}       |   0
 tests/cp/{backup-1 => backup-1.sh}                 |   0
 tests/cp/{backup-dir => backup-dir.sh}             |   0
 tests/cp/{backup-is-src => backup-is-src.sh}       |   0
 tests/cp/{capability => capability.sh}             |   0
 tests/cp/{cp-HL => cp-HL.sh}                       |   0
 tests/cp/{cp-a-selinux => cp-a-selinux.sh}         |   0
 tests/cp/{cp-deref => cp-deref.sh}                 |   0
 tests/cp/{cp-i => cp-i.sh}                         |   0
 tests/cp/{cp-mv-backup => cp-mv-backup.sh}         |   0
 ...{cp-mv-enotsup-xattr => cp-mv-enotsup-xattr.sh} |   0
 tests/cp/{cp-parents => cp-parents.sh}             |   0
 tests/cp/{deref-slink => deref-slink.sh}           |   0
 tests/cp/{dir-rm-dest => dir-rm-dest.sh}           |   0
 tests/cp/{dir-slash => dir-slash.sh}               |   0
 tests/cp/{dir-vs-file => dir-vs-file.sh}           |   0
 .../cp/{existing-perm-dir => existing-perm-dir.sh} |   0
 .../{existing-perm-race => existing-perm-race.sh}  |   0
 tests/cp/{fail-perm => fail-perm.sh}               |   0
 tests/cp/{fiemap-2 => fiemap-2.sh}                 |   0
 tests/cp/{fiemap-empty => fiemap-empty.sh}         |   0
 tests/cp/{fiemap-perf => fiemap-perf.sh}           |   0
 tests/cp/{file-perm-race => file-perm-race.sh}     |   0
 tests/cp/{into-self => into-self.sh}               |   0
 tests/cp/{link-heap => link-heap.sh}               |   0
 tests/cp/{link-no-deref => link-no-deref.sh}       |   0
 tests/cp/{link-preserve => link-preserve.sh}       |   0
 tests/cp/{link-symlink => link-symlink.sh}         |   0
 tests/cp/{link => link.sh}                         |   0
 tests/cp/{nfs-removal-race => nfs-removal-race.sh} |   0
 tests/cp/{no-deref-link1 => no-deref-link1.sh}     |   0
 tests/cp/{no-deref-link2 => no-deref-link2.sh}     |   0
 tests/cp/{no-deref-link3 => no-deref-link3.sh}     |   0
 tests/cp/{parent-perm-race => parent-perm-race.sh} |   0
 tests/cp/{parent-perm => parent-perm.sh}           |   0
 tests/cp/{perm => perm.sh}                         |   0
 tests/cp/{preserve-2 => preserve-2.sh}             |   0
 tests/cp/{preserve-gid => preserve-gid.sh}         |   0
 tests/cp/{preserve-link => preserve-link.sh}       |   0
 ...{preserve-slink-time => preserve-slink-time.sh} |   0
 tests/cp/{proc-short-read => proc-short-read.sh}   |   0
 tests/cp/{proc-zero-len => proc-zero-len.sh}       |   0
 tests/cp/{r-vs-symlink => r-vs-symlink.sh}         |   0
 tests/cp/{reflink-auto => reflink-auto.sh}         |   0
 tests/cp/{reflink-perm => reflink-perm.sh}         |   0
 tests/cp/{same-file => same-file.sh}               |   0
 tests/cp/{slink-2-slink => slink-2-slink.sh}       |   0
 tests/cp/{sparse-fiemap => sparse-fiemap.sh}       |   0
 tests/cp/{sparse-to-pipe => sparse-to-pipe.sh}     |   0
 tests/cp/{sparse => sparse.sh}                     |   0
 tests/cp/{special-bits => special-bits.sh}         |   0
 tests/cp/{special-f => special-f.sh}               |   0
 tests/cp/{src-base-dot => src-base-dot.sh}         |   0
 tests/cp/{symlink-slash => symlink-slash.sh}       |   0
 tests/cp/{thru-dangling => thru-dangling.sh}       |   0
 tests/dd/{bytes => bytes.sh}                       |   0
 tests/dd/{direct => direct.sh}                     |   0
 tests/dd/{misc => misc.sh}                         |   0
 tests/dd/{nocache => nocache.sh}                   |   0
 tests/dd/{not-rewound => not-rewound.sh}           |   0
 tests/dd/{reblock => reblock.sh}                   |   0
 .../{skip-seek-past-dev => skip-seek-past-dev.sh}  |   0
 ...{skip-seek-past-file => skip-seek-past-file.sh} |   0
 tests/dd/{skip-seek => skip-seek.pl}               |   0
 tests/dd/{skip-seek2 => skip-seek2.sh}             |   0
 tests/dd/{sparse => sparse.sh}                     |   0
 tests/dd/{stderr => stderr.sh}                     |   0
 tests/dd/{unblock-sync => unblock-sync.sh}         |   0
 tests/dd/{unblock => unblock.pl}                   |   0
 tests/df/{df-P => df-P.sh}                         |   0
 tests/df/{header => header.sh}                     |   0
 tests/df/{no-mtab-status => no-mtab-status.sh}     |   0
 .../df/{problematic-chars => problematic-chars.sh} |   0
 .../df/{total-unprocessed => total-unprocessed.sh} |   0
 tests/df/{total-verify => total-verify.sh}         |   0
 tests/df/{unreadable => unreadable.sh}             |   0
 tests/du/{2g => 2g.sh}                             |   0
 tests/du/{8gb => 8gb.sh}                           |   0
 tests/du/{basic => basic.sh}                       |   0
 tests/du/{bigtime => bigtime.sh}                   |   0
 ...ind-mount-dir-cycle => bind-mount-dir-cycle.sh} |   0
 tests/du/{deref-args => deref-args.sh}             |   0
 tests/du/{deref => deref.sh}                       |   0
 tests/du/{exclude => exclude.sh}                   |   0
 tests/du/{fd-leak => fd-leak.sh}                   |   0
 tests/du/{files0-from-dir => files0-from-dir.sh}   |   0
 tests/du/{files0-from => files0-from.pl}           |   0
 tests/du/{hard-link => hard-link.sh}               |   0
 tests/du/{inacc-dest => inacc-dest.sh}             |   0
 tests/du/{inacc-dir => inacc-dir.sh}               |   0
 tests/du/{inaccessible-cwd => inaccessible-cwd.sh} |   0
 ...ong-from-unreadable => long-from-unreadable.sh} |   0
 tests/du/{long-sloop => long-sloop.sh}             |   0
 tests/du/{max-depth => max-depth.sh}               |   0
 ...ile-traversing => move-dir-while-traversing.sh} |   0
 tests/du/{no-deref => no-deref.sh}                 |   0
 tests/du/{no-x => no-x.sh}                         |   0
 tests/du/{one-file-system => one-file-system.sh}   |   0
 tests/du/{restore-wd => restore-wd.sh}             |   0
 tests/du/{slash => slash.sh}                       |   0
 tests/du/{slink => slink.sh}                       |   0
 tests/du/{trailing-slash => trailing-slash.sh}     |   0
 tests/du/{two-args => two-args.sh}                 |   0
 tests/fmt/{base => base.pl}                        |   0
 tests/fmt/{goal-option => goal-option.sh}          |   0
 tests/fmt/{long-line => long-line.sh}              |   0
 tests/id/{gnu-zero-uids => gnu-zero-uids.sh}       |   0
 tests/id/{no-context => no-context.sh}             |   0
 tests/install/{basic-1 => basic-1.sh}              |   0
 .../install/{create-leading => create-leading.sh}  |   0
 tests/install/{d-slashdot => d-slashdot.sh}        |   0
 .../install/{install-C-root => install-C-root.sh}  |   0
 .../{install-C-selinux => install-C-selinux.sh}    |   0
 tests/install/{install-C => install-C.sh}          |   0
 tests/install/{strip-program => strip-program.sh}  |   0
 tests/install/{trap => trap.sh}                    |   0
 tests/ln/{backup-1 => backup-1.sh}                 |   0
 tests/ln/{hard-backup => hard-backup.sh}           |   0
 tests/ln/{hard-to-sym => hard-to-sym.sh}           |   0
 tests/ln/{misc => misc.sh}                         |   0
 tests/ln/{relative => relative.sh}                 |   0
 tests/ln/{sf-1 => sf-1.sh}                         |   0
 ...nt-dest => slash-decorated-nonexistent-dest.sh} |   0
 tests/ln/{target-1 => target-1.sh}                 |   0
 tests/ls/{abmon-align => abmon-align.sh}           |   0
 tests/ls/{block-size => block-size.sh}             |   0
 tests/ls/{capability => capability.sh}             |   0
 .../{color-clear-to-eol => color-clear-to-eol.sh}  |   0
 tests/ls/{color-dtype-dir => color-dtype-dir.sh}   |   0
 tests/ls/{color-norm => color-norm.sh}             |   0
 tests/ls/{dangle => dangle.sh}                     |   0
 tests/ls/{dired => dired.sh}                       |   0
 tests/ls/{file-type => file-type.sh}               |   0
 tests/ls/{follow-slink => follow-slink.sh}         |   0
 tests/ls/{getxattr-speedup => getxattr-speedup.sh} |   0
 tests/ls/{infloop => infloop.sh}                   |   0
 tests/ls/{inode => inode.sh}                       |   0
 tests/ls/{m-option => m-option.sh}                 |   0
 tests/ls/{multihardlink => multihardlink.sh}       |   0
 tests/ls/{nameless-uid => nameless-uid.sh}         |   0
 tests/ls/{no-arg => no-arg.sh}                     |   0
 tests/ls/{no-cap => no-cap.sh}                     |   0
 ...c-selinux-segfault => proc-selinux-segfault.sh} |   0
 ...ountpoint-inode => readdir-mountpoint-inode.sh} |   0
 tests/ls/{recursive => recursive.sh}               |   0
 ...rel-symlink-color => root-rel-symlink-color.sh} |   0
 tests/ls/{rt-1 => rt-1.sh}                         |   0
 tests/ls/{slink-acl => slink-acl.sh}               |   0
 tests/ls/{stat-dtype => stat-dtype.sh}             |   0
 tests/ls/{stat-failed => stat-failed.sh}           |   0
 tests/ls/{stat-free-color => stat-free-color.sh}   |   0
 .../{stat-free-symlinks => stat-free-symlinks.sh}  |   0
 tests/ls/{stat-vs-dirent => stat-vs-dirent.sh}     |   0
 tests/ls/{symlink-slash => symlink-slash.sh}       |   0
 tests/ls/{time-style-diag => time-style-diag.sh}   |   0
 tests/ls/{x-option => x-option.sh}                 |   0
 tests/misc/{arch => arch.sh}                       |   0
 tests/misc/{base64 => base64.pl}                   |   0
 tests/misc/{basename => basename.pl}               |   0
 tests/misc/{cat-buf => cat-buf.sh}                 |   0
 tests/misc/{cat-proc => cat-proc.sh}               |   0
 tests/misc/{chcon-fail => chcon-fail.sh}           |   0
 tests/misc/{chcon => chcon.sh}                     |   0
 .../{chroot-credentials => chroot-credentials.sh}  |   0
 tests/misc/{chroot-fail => chroot-fail.sh}         |   0
 tests/misc/{close-stdout => close-stdout.sh}       |   0
 tests/misc/{comm => comm.pl}                       |   0
 tests/misc/{csplit-1000 => csplit-1000.sh}         |   0
 tests/misc/{csplit-heap => csplit-heap.sh}         |   0
 tests/misc/{csplit => csplit.sh}                   |   0
 tests/misc/{cut => cut.pl}                         |   0
 tests/misc/{date-next-dow => date-next-dow.pl}     |   0
 tests/misc/{date-sec => date-sec.sh}               |   0
 tests/misc/{date => date.pl}                       |   0
 tests/misc/{dircolors => dircolors.pl}             |   0
 tests/misc/{dirname => dirname.pl}                 |   0
 tests/misc/{env-null => env-null.sh}               |   0
 tests/misc/{env => env.sh}                         |   0
 tests/misc/{expand => expand.pl}                   |   0
 tests/misc/{expr => expr.pl}                       |   0
 tests/misc/{factor => factor.pl}                   |   0
 tests/misc/{false-status => false-status.sh}       |   0
 tests/misc/{fold => fold.pl}                       |   0
 tests/misc/{groups-dash => groups-dash.sh}         |   0
 tests/misc/{groups-version => groups-version.sh}   |   0
 tests/misc/{head-c => head-c.sh}                   |   0
 tests/misc/{head-elide-tail => head-elide-tail.pl} |   0
 tests/misc/{head-pos => head-pos.sh}               |   0
 tests/misc/{head => head.pl}                       |   0
 tests/misc/{help-version => help-version.sh}       |   0
 tests/misc/{id-context => id-context.sh}           |   0
 tests/misc/{id-groups => id-groups.sh}             |   0
 tests/misc/{id-setgid => id-setgid.sh}             |   0
 tests/misc/{invalid-opt => invalid-opt.pl}         |   0
 tests/misc/{join => join.pl}                       |   0
 tests/misc/{ls-misc => ls-misc.pl}                 |   0
 tests/misc/{ls-time => ls-time.sh}                 |   0
 tests/misc/{md5sum-bsd => md5sum-bsd.sh}           |   0
 tests/misc/{md5sum-newline => md5sum-newline.pl}   |   0
 tests/misc/{md5sum-parallel => md5sum-parallel.sh} |   0
 tests/misc/{md5sum => md5sum.pl}                   |   0
 tests/misc/{mknod => mknod.sh}                     |   0
 tests/misc/{mktemp => mktemp.pl}                   |   0
 tests/misc/{nice-fail => nice-fail.sh}             |   0
 tests/misc/{nice => nice.sh}                       |   0
 tests/misc/{nl => nl.sh}                           |   0
 tests/misc/{nohup => nohup.sh}                     |   0
 tests/misc/{nproc-avail => nproc-avail.sh}         |   0
 tests/misc/{nproc-positive => nproc-positive.sh}   |   0
 tests/misc/{od-N => od-N.sh}                       |   0
 tests/misc/{od-float => od-float.sh}               |   0
 tests/misc/{od-multiple-t => od-multiple-t.sh}     |   0
 tests/misc/{od-x8 => od-x8.sh}                     |   0
 tests/misc/{od => od.pl}                           |   0
 tests/misc/{paste => paste.pl}                     |   0
 tests/misc/{pathchk1 => pathchk1.sh}               |   0
 tests/misc/{pr => pr.pl}                           |   0
 tests/misc/{printenv => printenv.sh}               |   0
 tests/misc/{printf-cov => printf-cov.pl}           |   0
 tests/misc/{printf-hex => printf-hex.sh}           |   0
 tests/misc/{printf-surprise => printf-surprise.sh} |   0
 tests/misc/{printf => printf.sh}                   |   0
 tests/misc/{ptx-overrun => ptx-overrun.sh}         |   0
 tests/misc/{ptx => ptx.pl}                         |   0
 tests/misc/{pwd-long => pwd-long.sh}               |   0
 tests/misc/{pwd-option => pwd-option.sh}           |   0
 .../misc/{readlink-fp-loop => readlink-fp-loop.sh} |   0
 tests/misc/{readlink-root => readlink-root.sh}     |   0
 tests/misc/{realpath => realpath.sh}               |   0
 .../{runcon-no-reorder => runcon-no-reorder.sh}    |   0
 tests/misc/{selinux => selinux.sh}                 |   0
 tests/misc/{seq-long-double => seq-long-double.sh} |   0
 tests/misc/{seq => seq.pl}                         |   0
 tests/misc/{sha1sum-vec => sha1sum-vec.pl}         |   0
 tests/misc/{sha1sum => sha1sum.pl}                 |   0
 tests/misc/{sha224sum => sha224sum.pl}             |   0
 tests/misc/{sha256sum => sha256sum.pl}             |   0
 tests/misc/{sha384sum => sha384sum.pl}             |   0
 tests/misc/{sha512sum => sha512sum.pl}             |   0
 tests/misc/{shred-exact => shred-exact.sh}         |   0
 tests/misc/{shred-passes => shred-passes.sh}       |   0
 tests/misc/{shred-remove => shred-remove.sh}       |   0
 tests/misc/{shuf => shuf.sh}                       |   0
 .../misc/{sort-NaN-infloop => sort-NaN-infloop.sh} |   0
 ...t-benchmark-random => sort-benchmark-random.sh} |   0
 .../{sort-compress-hang => sort-compress-hang.sh}  |   0
 .../{sort-compress-proc => sort-compress-proc.sh}  |   0
 tests/misc/{sort-compress => sort-compress.sh}     |   0
 tests/misc/{sort-continue => sort-continue.sh}     |   0
 tests/misc/{sort-debug-keys => sort-debug-keys.sh} |   0
 tests/misc/{sort-debug-warn => sort-debug-warn.sh} |   0
 tests/misc/{sort-discrim => sort-discrim.sh}       |   0
 tests/misc/{sort-exit-early => sort-exit-early.sh} |   0
 .../misc/{sort-files0-from => sort-files0-from.pl} |   0
 tests/misc/{sort-float => sort-float.sh}           |   0
 .../{sort-merge-fdlimit => sort-merge-fdlimit.sh}  |   0
 tests/misc/{sort-merge => sort-merge.pl}           |   0
 tests/misc/{sort-month => sort-month.sh}           |   0
 tests/misc/{sort-rand => sort-rand.sh}             |   0
 ...{sort-spinlock-abuse => sort-spinlock-abuse.sh} |   0
 ...t-stale-thread-mem => sort-stale-thread-mem.sh} |   0
 tests/misc/{sort-u-FMR => sort-u-FMR.sh}           |   0
 .../misc/{sort-unique-segv => sort-unique-segv.sh} |   0
 tests/misc/{sort-unique => sort-unique.sh}         |   0
 tests/misc/{sort-version => sort-version.sh}       |   0
 tests/misc/{sort => sort.pl}                       |   0
 tests/misc/{stat-birthtime => stat-birthtime.sh}   |   0
 tests/misc/{stat-fmt => stat-fmt.sh}               |   0
 tests/misc/{stat-hyphen => stat-hyphen.sh}         |   0
 tests/misc/{stat-mount => stat-mount.sh}           |   0
 .../misc/{stat-nanoseconds => stat-nanoseconds.sh} |   0
 tests/misc/{stat-printf => stat-printf.pl}         |   0
 tests/misc/{stat-slash => stat-slash.sh}           |   0
 tests/misc/{stdbuf => stdbuf.sh}                   |   0
 tests/misc/{stty-invalid => stty-invalid.sh}       |   0
 tests/misc/{stty-pairs => stty-pairs.sh}           |   0
 tests/misc/{stty-row-col => stty-row-col.sh}       |   0
 tests/misc/{stty => stty.sh}                       |   0
 tests/misc/{sum-sysv => sum-sysv.sh}               |   0
 tests/misc/{sum => sum.pl}                         |   0
 .../{tac-2-nonseekable => tac-2-nonseekable.sh}    |   0
 tests/misc/{tac-continue => tac-continue.sh}       |   0
 tests/misc/{tac => tac.pl}                         |   0
 tests/misc/{tail => tail.pl}                       |   0
 tests/misc/{tee-dash => tee-dash.sh}               |   0
 tests/misc/{tee => tee.sh}                         |   0
 tests/misc/{test-diag => test-diag.pl}             |   0
 tests/misc/{test => test.pl}                       |   0
 tests/misc/{timeout-group => timeout-group.sh}     |   0
 .../{timeout-parameters => timeout-parameters.sh}  |   0
 tests/misc/{timeout => timeout.sh}                 |   0
 tests/misc/{tr-case-class => tr-case-class.sh}     |   0
 tests/misc/{tr => tr.pl}                           |   0
 ...ngling-symlink => truncate-dangling-symlink.sh} |   0
 .../{truncate-dir-fail => truncate-dir-fail.sh}    |   0
 .../{truncate-fail-diag => truncate-fail-diag.sh}  |   0
 tests/misc/{truncate-fifo => truncate-fifo.sh}     |   0
 ...reate-missing => truncate-no-create-missing.sh} |   0
 .../{truncate-overflow => truncate-overflow.sh}    |   0
 ...e-owned-by-other => truncate-owned-by-other.sh} |   0
 ...{truncate-parameters => truncate-parameters.sh} |   0
 .../{truncate-relative => truncate-relative.sh}    |   0
 tests/misc/{tsort => tsort.pl}                     |   0
 tests/misc/{tty-eof => tty-eof.pl}                 |   0
 tests/misc/{unexpand => unexpand.pl}               |   0
 tests/misc/{uniq-perf => uniq-perf.sh}             |   0
 tests/misc/{uniq => uniq.pl}                       |   0
 tests/misc/{wc-files0-from => wc-files0-from.pl}   |   0
 tests/misc/{wc-files0 => wc-files0.sh}             |   0
 tests/misc/{wc-parallel => wc-parallel.sh}         |   0
 tests/misc/{wc => wc.pl}                           |   0
 tests/misc/{xattr => xattr.sh}                     |   0
 tests/misc/{xstrtol => xstrtol.pl}                 |   0
 tests/mkdir/{p-1 => p-1.sh}                        |   0
 tests/mkdir/{p-2 => p-2.sh}                        |   0
 tests/mkdir/{p-3 => p-3.sh}                        |   0
 tests/mkdir/{p-slashdot => p-slashdot.sh}          |   0
 tests/mkdir/{p-thru-slink => p-thru-slink.sh}      |   0
 tests/mkdir/{p-v => p-v.sh}                        |   0
 tests/mkdir/{parents => parents.sh}                |   0
 tests/mkdir/{perm => perm.sh}                      |   0
 tests/mkdir/{selinux => selinux.sh}                |   0
 tests/mkdir/{special-1 => special-1.sh}            |   0
 tests/mkdir/{t-slash => t-slash.sh}                |   0
 ...e-under-readonly => writable-under-readonly.sh} |   0
 tests/mv/{acl => acl.sh}                           |   0
 tests/mv/{atomic => atomic.sh}                     |   0
 tests/mv/{atomic2 => atomic2.sh}                   |   0
 tests/mv/{backup-dir => backup-dir.sh}             |   0
 tests/mv/{backup-is-src => backup-is-src.sh}       |   0
 tests/mv/{childproof => childproof.sh}             |   0
 tests/mv/{diag => diag.sh}                         |   0
 tests/mv/{dir-file => dir-file.sh}                 |   0
 tests/mv/{dir2dir => dir2dir.sh}                   |   0
 tests/mv/{dup-source => dup-source.sh}             |   0
 tests/mv/{force => force.sh}                       |   0
 tests/mv/{hard-2 => hard-2.sh}                     |   0
 tests/mv/{hard-3 => hard-3.sh}                     |   0
 tests/mv/{hard-4 => hard-4.sh}                     |   0
 tests/mv/{hard-link-1 => hard-link-1.sh}           |   0
 tests/mv/{hard-verbose => hard-verbose.sh}         |   0
 tests/mv/{i-1 => i-1.pl}                           |   0
 tests/mv/{i-2 => i-2.sh}                           |   0
 tests/mv/{i-3 => i-3.sh}                           |   0
 tests/mv/{i-4 => i-4.sh}                           |   0
 tests/mv/{i-5 => i-5.sh}                           |   0
 tests/mv/{i-link-no => i-link-no.sh}               |   0
 tests/mv/{into-self-2 => into-self-2.sh}           |   0
 tests/mv/{into-self-3 => into-self-3.sh}           |   0
 tests/mv/{into-self-4 => into-self-4.sh}           |   0
 tests/mv/{into-self => into-self.sh}               |   0
 tests/mv/{leak-fd => leak-fd.sh}                   |   0
 tests/mv/{mv-n => mv-n.sh}                         |   0
 tests/mv/{mv-special-1 => mv-special-1.sh}         |   0
 tests/mv/{no-target-dir => no-target-dir.sh}       |   0
 tests/mv/{part-fail => part-fail.sh}               |   0
 tests/mv/{part-hardlink => part-hardlink.sh}       |   0
 tests/mv/{part-rename => part-rename.sh}           |   0
 tests/mv/{part-symlink => part-symlink.sh}         |   0
 tests/mv/{partition-perm => partition-perm.sh}     |   0
 tests/mv/{perm-1 => perm-1.sh}                     |   0
 tests/mv/{sticky-to-xpart => sticky-to-xpart.sh}   |   0
 ...nk-to-self => symlink-onto-hardlink-to-self.sh} |   0
 ...link-onto-hardlink => symlink-onto-hardlink.sh} |   0
 tests/mv/{to-symlink => to-symlink.sh}             |   0
 tests/mv/{trailing-slash => trailing-slash.sh}     |   0
 tests/mv/{update => update.sh}                     |   0
 tests/pr/{pr-tests => pr-tests.pl}                 |   0
 tests/readlink/{can-e => can-e.sh}                 |   0
 tests/readlink/{can-f => can-f.sh}                 |   0
 tests/readlink/{can-m => can-m.sh}                 |   0
 tests/readlink/{rl-1 => rl-1.sh}                   |   0
 tests/rm/{cycle => cycle.sh}                       |   0
 tests/rm/{d-1 => d-1.sh}                           |   0
 tests/rm/{d-2 => d-2.sh}                           |   0
 tests/rm/{d-3 => d-3.sh}                           |   0
 tests/rm/{dangling-symlink => dangling-symlink.sh} |   0
 tests/rm/{deep-1 => deep-1.sh}                     |   0
 tests/rm/{deep-2 => deep-2.sh}                     |   0
 tests/rm/{dir-no-w => dir-no-w.sh}                 |   0
 tests/rm/{dir-nonrecur => dir-nonrecur.sh}         |   0
 tests/rm/{dot-rel => dot-rel.sh}                   |   0
 tests/rm/{empty-inacc => empty-inacc.sh}           |   0
 tests/rm/{empty-name => empty-name.pl}             |   0
 tests/rm/{ext3-perf => ext3-perf.sh}               |   0
 tests/rm/{f-1 => f-1.sh}                           |   0
 tests/rm/{fail-2eperm => fail-2eperm.sh}           |   0
 tests/rm/{fail-eacces => fail-eacces.sh}           |   0
 tests/rm/{hash => hash.sh}                         |   0
 tests/rm/{i-1 => i-1.sh}                           |   0
 tests/rm/{i-never => i-never.sh}                   |   0
 tests/rm/{i-no-r => i-no-r.sh}                     |   0
 tests/rm/{ignorable => ignorable.sh}               |   0
 tests/rm/{inaccessible => inaccessible.sh}         |   0
 .../{interactive-always => interactive-always.sh}  |   0
 tests/rm/{interactive-once => interactive-once.sh} |   0
 tests/rm/{ir-1 => ir-1.sh}                         |   0
 tests/rm/{isatty => isatty.sh}                     |   0
 ...r-entries-vs-OOM => many-dir-entries-vs-OOM.sh} |   0
 tests/rm/{no-give-up => no-give-up.sh}             |   0
 tests/rm/{one-file-system => one-file-system.sh}   |   0
 tests/rm/{one-file-system2 => one-file-system2.sh} |   0
 tests/rm/{r-1 => r-1.sh}                           |   0
 tests/rm/{r-2 => r-2.sh}                           |   0
 tests/rm/{r-3 => r-3.sh}                           |   0
 tests/rm/{r-4 => r-4.sh}                           |   0
 tests/rm/{read-only => read-only.sh}               |   0
 tests/rm/{readdir-bug => readdir-bug.sh}           |   0
 tests/rm/{rm1 => rm1.sh}                           |   0
 tests/rm/{rm2 => rm2.sh}                           |   0
 tests/rm/{rm3 => rm3.sh}                           |   0
 tests/rm/{rm4 => rm4.sh}                           |   0
 tests/rm/{rm5 => rm5.sh}                           |   0
 tests/rm/{sunos-1 => sunos-1.sh}                   |   0
 tests/rm/{unread2 => unread2.sh}                   |   0
 tests/rm/{unread3 => unread3.sh}                   |   0
 tests/rm/{unreadable => unreadable.pl}             |   0
 tests/rm/{v-slash => v-slash.sh}                   |   0
 tests/rmdir/{fail-perm => fail-perm.sh}            |   0
 tests/rmdir/{ignore => ignore.sh}                  |   0
 tests/rmdir/{t-slash => t-slash.sh}                |   0
 .../{additional-suffix => additional-suffix.sh}    |   0
 tests/split/{b-chunk => b-chunk.sh}                |   0
 tests/split/{fail => fail.sh}                      |   0
 tests/split/{filter => filter.sh}                  |   0
 tests/split/{guard-input => guard-input.sh}        |   0
 tests/split/{l-chunk => l-chunk.sh}                |   0
 tests/split/{lines => lines.sh}                    |   0
 tests/split/{numeric => numeric.sh}                |   0
 tests/split/{r-chunk => r-chunk.sh}                |   0
 .../{suffix-auto-length => suffix-auto-length.sh}  |   0
 tests/split/{suffix-length => suffix-length.sh}    |   0
 tests/tail-2/{F-vs-missing => F-vs-missing.sh}     |   0
 tests/tail-2/{F-vs-rename => F-vs-rename.sh}       |   0
 tests/tail-2/{append-only => append-only.sh}       |   0
 tests/tail-2/{assert-2 => assert-2.sh}             |   0
 tests/tail-2/{assert => assert.sh}                 |   0
 tests/tail-2/{big-4gb => big-4gb.sh}               |   0
 tests/tail-2/{flush-initial => flush-initial.sh}   |   0
 tests/tail-2/{follow-name => follow-name.sh}       |   0
 tests/tail-2/{follow-stdin => follow-stdin.sh}     |   0
 tests/tail-2/{infloop-1 => infloop-1.sh}           |   0
 .../{inotify-hash-abuse => inotify-hash-abuse.sh}  |   0
 ...{inotify-hash-abuse2 => inotify-hash-abuse2.sh} |   0
 tests/tail-2/{inotify-race => inotify-race.sh}     |   0
 tests/tail-2/{inotify-rotate => inotify-rotate.sh} |   0
 tests/tail-2/{pid => pid.sh}                       |   0
 tests/tail-2/{pipe-f => pipe-f.sh}                 |   0
 tests/tail-2/{pipe-f2 => pipe-f2.sh}               |   0
 tests/tail-2/{proc-ksyms => proc-ksyms.sh}         |   0
 tests/tail-2/{start-middle => start-middle.sh}     |   0
 tests/tail-2/{tail-n0f => tail-n0f.sh}             |   0
 tests/tail-2/{wait => wait.sh}                     |   0
 tests/touch/{60-seconds => 60-seconds.sh}          |   0
 .../{dangling-symlink => dangling-symlink.sh}      |   0
 tests/touch/{dir-1 => dir-1.sh}                    |   0
 tests/touch/{empty-file => empty-file.sh}          |   0
 tests/touch/{fail-diag => fail-diag.sh}            |   0
 tests/touch/{fifo => fifo.sh}                      |   0
 .../{no-create-missing => no-create-missing.sh}    |   0
 tests/touch/{no-dereference => no-dereference.sh}  |   0
 tests/touch/{no-rights => no-rights.sh}            |   0
 tests/touch/{not-owner => not-owner.sh}            |   0
 .../{now-owned-by-other => now-owned-by-other.sh}  |   0
 tests/touch/{obsolescent => obsolescent.sh}        |   0
 tests/touch/{read-only => read-only.sh}            |   0
 tests/touch/{relative => relative.sh}              |   0
 tests/touch/{trailing-slash => trailing-slash.sh}  |   0
 492 files changed, 496 insertions(+), 493 deletions(-)
 rename tests/chgrp/{basic => basic.sh} (100%)
 rename tests/chgrp/{default-no-deref => default-no-deref.sh} (100%)
 rename tests/chgrp/{deref => deref.sh} (100%)
 rename tests/chgrp/{no-x => no-x.sh} (100%)
 rename tests/chgrp/{posix-H => posix-H.sh} (100%)
 rename tests/chgrp/{recurse => recurse.sh} (100%)
 rename tests/chmod/{c-option => c-option.sh} (100%)
 rename tests/chmod/{equal-x => equal-x.sh} (100%)
 rename tests/chmod/{equals => equals.sh} (100%)
 rename tests/chmod/{inaccessible => inaccessible.sh} (100%)
 rename tests/chmod/{no-x => no-x.sh} (100%)
 rename tests/chmod/{octal => octal.sh} (100%)
 rename tests/chmod/{setgid => setgid.sh} (100%)
 rename tests/chmod/{silent => silent.sh} (100%)
 rename tests/chmod/{thru-dangling => thru-dangling.sh} (100%)
 rename tests/chmod/{umask-x => umask-x.sh} (100%)
 rename tests/chmod/{usage => usage.sh} (100%)
 rename tests/chown/{basic => basic.sh} (100%)
 rename tests/chown/{deref => deref.sh} (100%)
 rename tests/chown/{preserve-root => preserve-root.sh} (100%)
 rename tests/chown/{separator => separator.sh} (100%)
 rename tests/cp/{abuse => abuse.sh} (100%)
 rename tests/cp/{acl => acl.sh} (100%)
 rename tests/cp/{attr-existing => attr-existing.sh} (100%)
 rename tests/cp/{backup-1 => backup-1.sh} (100%)
 rename tests/cp/{backup-dir => backup-dir.sh} (100%)
 rename tests/cp/{backup-is-src => backup-is-src.sh} (100%)
 rename tests/cp/{capability => capability.sh} (100%)
 rename tests/cp/{cp-HL => cp-HL.sh} (100%)
 rename tests/cp/{cp-a-selinux => cp-a-selinux.sh} (100%)
 rename tests/cp/{cp-deref => cp-deref.sh} (100%)
 rename tests/cp/{cp-i => cp-i.sh} (100%)
 rename tests/cp/{cp-mv-backup => cp-mv-backup.sh} (100%)
 rename tests/cp/{cp-mv-enotsup-xattr => cp-mv-enotsup-xattr.sh} (100%)
 rename tests/cp/{cp-parents => cp-parents.sh} (100%)
 rename tests/cp/{deref-slink => deref-slink.sh} (100%)
 rename tests/cp/{dir-rm-dest => dir-rm-dest.sh} (100%)
 rename tests/cp/{dir-slash => dir-slash.sh} (100%)
 rename tests/cp/{dir-vs-file => dir-vs-file.sh} (100%)
 rename tests/cp/{existing-perm-dir => existing-perm-dir.sh} (100%)
 rename tests/cp/{existing-perm-race => existing-perm-race.sh} (100%)
 rename tests/cp/{fail-perm => fail-perm.sh} (100%)
 rename tests/cp/{fiemap-2 => fiemap-2.sh} (100%)
 rename tests/cp/{fiemap-empty => fiemap-empty.sh} (100%)
 rename tests/cp/{fiemap-perf => fiemap-perf.sh} (100%)
 rename tests/cp/{file-perm-race => file-perm-race.sh} (100%)
 rename tests/cp/{into-self => into-self.sh} (100%)
 rename tests/cp/{link-heap => link-heap.sh} (100%)
 rename tests/cp/{link-no-deref => link-no-deref.sh} (100%)
 rename tests/cp/{link-preserve => link-preserve.sh} (100%)
 rename tests/cp/{link-symlink => link-symlink.sh} (100%)
 rename tests/cp/{link => link.sh} (100%)
 rename tests/cp/{nfs-removal-race => nfs-removal-race.sh} (100%)
 rename tests/cp/{no-deref-link1 => no-deref-link1.sh} (100%)
 rename tests/cp/{no-deref-link2 => no-deref-link2.sh} (100%)
 rename tests/cp/{no-deref-link3 => no-deref-link3.sh} (100%)
 rename tests/cp/{parent-perm-race => parent-perm-race.sh} (100%)
 rename tests/cp/{parent-perm => parent-perm.sh} (100%)
 rename tests/cp/{perm => perm.sh} (100%)
 rename tests/cp/{preserve-2 => preserve-2.sh} (100%)
 rename tests/cp/{preserve-gid => preserve-gid.sh} (100%)
 rename tests/cp/{preserve-link => preserve-link.sh} (100%)
 rename tests/cp/{preserve-slink-time => preserve-slink-time.sh} (100%)
 rename tests/cp/{proc-short-read => proc-short-read.sh} (100%)
 rename tests/cp/{proc-zero-len => proc-zero-len.sh} (100%)
 rename tests/cp/{r-vs-symlink => r-vs-symlink.sh} (100%)
 rename tests/cp/{reflink-auto => reflink-auto.sh} (100%)
 rename tests/cp/{reflink-perm => reflink-perm.sh} (100%)
 rename tests/cp/{same-file => same-file.sh} (100%)
 rename tests/cp/{slink-2-slink => slink-2-slink.sh} (100%)
 rename tests/cp/{sparse-fiemap => sparse-fiemap.sh} (100%)
 rename tests/cp/{sparse-to-pipe => sparse-to-pipe.sh} (100%)
 rename tests/cp/{sparse => sparse.sh} (100%)
 rename tests/cp/{special-bits => special-bits.sh} (100%)
 rename tests/cp/{special-f => special-f.sh} (100%)
 rename tests/cp/{src-base-dot => src-base-dot.sh} (100%)
 rename tests/cp/{symlink-slash => symlink-slash.sh} (100%)
 rename tests/cp/{thru-dangling => thru-dangling.sh} (100%)
 rename tests/dd/{bytes => bytes.sh} (100%)
 rename tests/dd/{direct => direct.sh} (100%)
 rename tests/dd/{misc => misc.sh} (100%)
 rename tests/dd/{nocache => nocache.sh} (100%)
 rename tests/dd/{not-rewound => not-rewound.sh} (100%)
 rename tests/dd/{reblock => reblock.sh} (100%)
 rename tests/dd/{skip-seek-past-dev => skip-seek-past-dev.sh} (100%)
 rename tests/dd/{skip-seek-past-file => skip-seek-past-file.sh} (100%)
 rename tests/dd/{skip-seek => skip-seek.pl} (100%)
 rename tests/dd/{skip-seek2 => skip-seek2.sh} (100%)
 rename tests/dd/{sparse => sparse.sh} (100%)
 rename tests/dd/{stderr => stderr.sh} (100%)
 rename tests/dd/{unblock-sync => unblock-sync.sh} (100%)
 rename tests/dd/{unblock => unblock.pl} (100%)
 rename tests/df/{df-P => df-P.sh} (100%)
 rename tests/df/{header => header.sh} (100%)
 rename tests/df/{no-mtab-status => no-mtab-status.sh} (100%)
 rename tests/df/{problematic-chars => problematic-chars.sh} (100%)
 rename tests/df/{total-unprocessed => total-unprocessed.sh} (100%)
 rename tests/df/{total-verify => total-verify.sh} (100%)
 rename tests/df/{unreadable => unreadable.sh} (100%)
 rename tests/du/{2g => 2g.sh} (100%)
 rename tests/du/{8gb => 8gb.sh} (100%)
 rename tests/du/{basic => basic.sh} (100%)
 rename tests/du/{bigtime => bigtime.sh} (100%)
 rename tests/du/{bind-mount-dir-cycle => bind-mount-dir-cycle.sh} (100%)
 rename tests/du/{deref-args => deref-args.sh} (100%)
 rename tests/du/{deref => deref.sh} (100%)
 rename tests/du/{exclude => exclude.sh} (100%)
 rename tests/du/{fd-leak => fd-leak.sh} (100%)
 rename tests/du/{files0-from-dir => files0-from-dir.sh} (100%)
 rename tests/du/{files0-from => files0-from.pl} (100%)
 rename tests/du/{hard-link => hard-link.sh} (100%)
 rename tests/du/{inacc-dest => inacc-dest.sh} (100%)
 rename tests/du/{inacc-dir => inacc-dir.sh} (100%)
 rename tests/du/{inaccessible-cwd => inaccessible-cwd.sh} (100%)
 rename tests/du/{long-from-unreadable => long-from-unreadable.sh} (100%)
 rename tests/du/{long-sloop => long-sloop.sh} (100%)
 rename tests/du/{max-depth => max-depth.sh} (100%)
 rename tests/du/{move-dir-while-traversing => move-dir-while-traversing.sh} (100%)
 rename tests/du/{no-deref => no-deref.sh} (100%)
 rename tests/du/{no-x => no-x.sh} (100%)
 rename tests/du/{one-file-system => one-file-system.sh} (100%)
 rename tests/du/{restore-wd => restore-wd.sh} (100%)
 rename tests/du/{slash => slash.sh} (100%)
 rename tests/du/{slink => slink.sh} (100%)
 rename tests/du/{trailing-slash => trailing-slash.sh} (100%)
 rename tests/du/{two-args => two-args.sh} (100%)
 rename tests/fmt/{base => base.pl} (100%)
 rename tests/fmt/{goal-option => goal-option.sh} (100%)
 rename tests/fmt/{long-line => long-line.sh} (100%)
 rename tests/id/{gnu-zero-uids => gnu-zero-uids.sh} (100%)
 rename tests/id/{no-context => no-context.sh} (100%)
 rename tests/install/{basic-1 => basic-1.sh} (100%)
 rename tests/install/{create-leading => create-leading.sh} (100%)
 rename tests/install/{d-slashdot => d-slashdot.sh} (100%)
 rename tests/install/{install-C-root => install-C-root.sh} (100%)
 rename tests/install/{install-C-selinux => install-C-selinux.sh} (100%)
 rename tests/install/{install-C => install-C.sh} (100%)
 rename tests/install/{strip-program => strip-program.sh} (100%)
 rename tests/install/{trap => trap.sh} (100%)
 rename tests/ln/{backup-1 => backup-1.sh} (100%)
 rename tests/ln/{hard-backup => hard-backup.sh} (100%)
 rename tests/ln/{hard-to-sym => hard-to-sym.sh} (100%)
 rename tests/ln/{misc => misc.sh} (100%)
 rename tests/ln/{relative => relative.sh} (100%)
 rename tests/ln/{sf-1 => sf-1.sh} (100%)
 rename tests/ln/{slash-decorated-nonexistent-dest => slash-decorated-nonexistent-dest.sh} (100%)
 rename tests/ln/{target-1 => target-1.sh} (100%)
 rename tests/ls/{abmon-align => abmon-align.sh} (100%)
 rename tests/ls/{block-size => block-size.sh} (100%)
 rename tests/ls/{capability => capability.sh} (100%)
 rename tests/ls/{color-clear-to-eol => color-clear-to-eol.sh} (100%)
 rename tests/ls/{color-dtype-dir => color-dtype-dir.sh} (100%)
 rename tests/ls/{color-norm => color-norm.sh} (100%)
 rename tests/ls/{dangle => dangle.sh} (100%)
 rename tests/ls/{dired => dired.sh} (100%)
 rename tests/ls/{file-type => file-type.sh} (100%)
 rename tests/ls/{follow-slink => follow-slink.sh} (100%)
 rename tests/ls/{getxattr-speedup => getxattr-speedup.sh} (100%)
 rename tests/ls/{infloop => infloop.sh} (100%)
 rename tests/ls/{inode => inode.sh} (100%)
 rename tests/ls/{m-option => m-option.sh} (100%)
 rename tests/ls/{multihardlink => multihardlink.sh} (100%)
 rename tests/ls/{nameless-uid => nameless-uid.sh} (100%)
 rename tests/ls/{no-arg => no-arg.sh} (100%)
 rename tests/ls/{no-cap => no-cap.sh} (100%)
 rename tests/ls/{proc-selinux-segfault => proc-selinux-segfault.sh} (100%)
 rename tests/ls/{readdir-mountpoint-inode => readdir-mountpoint-inode.sh} (100%)
 rename tests/ls/{recursive => recursive.sh} (100%)
 rename tests/ls/{root-rel-symlink-color => root-rel-symlink-color.sh} (100%)
 rename tests/ls/{rt-1 => rt-1.sh} (100%)
 rename tests/ls/{slink-acl => slink-acl.sh} (100%)
 rename tests/ls/{stat-dtype => stat-dtype.sh} (100%)
 rename tests/ls/{stat-failed => stat-failed.sh} (100%)
 rename tests/ls/{stat-free-color => stat-free-color.sh} (100%)
 rename tests/ls/{stat-free-symlinks => stat-free-symlinks.sh} (100%)
 rename tests/ls/{stat-vs-dirent => stat-vs-dirent.sh} (100%)
 rename tests/ls/{symlink-slash => symlink-slash.sh} (100%)
 rename tests/ls/{time-style-diag => time-style-diag.sh} (100%)
 rename tests/ls/{x-option => x-option.sh} (100%)
 rename tests/misc/{arch => arch.sh} (100%)
 rename tests/misc/{base64 => base64.pl} (100%)
 rename tests/misc/{basename => basename.pl} (100%)
 rename tests/misc/{cat-buf => cat-buf.sh} (100%)
 rename tests/misc/{cat-proc => cat-proc.sh} (100%)
 rename tests/misc/{chcon-fail => chcon-fail.sh} (100%)
 rename tests/misc/{chcon => chcon.sh} (100%)
 rename tests/misc/{chroot-credentials => chroot-credentials.sh} (100%)
 rename tests/misc/{chroot-fail => chroot-fail.sh} (100%)
 rename tests/misc/{close-stdout => close-stdout.sh} (100%)
 rename tests/misc/{comm => comm.pl} (100%)
 rename tests/misc/{csplit-1000 => csplit-1000.sh} (100%)
 rename tests/misc/{csplit-heap => csplit-heap.sh} (100%)
 rename tests/misc/{csplit => csplit.sh} (100%)
 rename tests/misc/{cut => cut.pl} (100%)
 rename tests/misc/{date-next-dow => date-next-dow.pl} (100%)
 rename tests/misc/{date-sec => date-sec.sh} (100%)
 rename tests/misc/{date => date.pl} (100%)
 rename tests/misc/{dircolors => dircolors.pl} (100%)
 rename tests/misc/{dirname => dirname.pl} (100%)
 rename tests/misc/{env-null => env-null.sh} (100%)
 rename tests/misc/{env => env.sh} (100%)
 rename tests/misc/{expand => expand.pl} (100%)
 rename tests/misc/{expr => expr.pl} (100%)
 rename tests/misc/{factor => factor.pl} (100%)
 rename tests/misc/{false-status => false-status.sh} (100%)
 rename tests/misc/{fold => fold.pl} (100%)
 rename tests/misc/{groups-dash => groups-dash.sh} (100%)
 rename tests/misc/{groups-version => groups-version.sh} (100%)
 rename tests/misc/{head-c => head-c.sh} (100%)
 rename tests/misc/{head-elide-tail => head-elide-tail.pl} (100%)
 rename tests/misc/{head-pos => head-pos.sh} (100%)
 rename tests/misc/{head => head.pl} (100%)
 rename tests/misc/{help-version => help-version.sh} (100%)
 rename tests/misc/{id-context => id-context.sh} (100%)
 rename tests/misc/{id-groups => id-groups.sh} (100%)
 rename tests/misc/{id-setgid => id-setgid.sh} (100%)
 rename tests/misc/{invalid-opt => invalid-opt.pl} (100%)
 rename tests/misc/{join => join.pl} (100%)
 rename tests/misc/{ls-misc => ls-misc.pl} (100%)
 rename tests/misc/{ls-time => ls-time.sh} (100%)
 rename tests/misc/{md5sum-bsd => md5sum-bsd.sh} (100%)
 rename tests/misc/{md5sum-newline => md5sum-newline.pl} (100%)
 rename tests/misc/{md5sum-parallel => md5sum-parallel.sh} (100%)
 rename tests/misc/{md5sum => md5sum.pl} (100%)
 rename tests/misc/{mknod => mknod.sh} (100%)
 rename tests/misc/{mktemp => mktemp.pl} (100%)
 rename tests/misc/{nice-fail => nice-fail.sh} (100%)
 rename tests/misc/{nice => nice.sh} (100%)
 rename tests/misc/{nl => nl.sh} (100%)
 rename tests/misc/{nohup => nohup.sh} (100%)
 rename tests/misc/{nproc-avail => nproc-avail.sh} (100%)
 rename tests/misc/{nproc-positive => nproc-positive.sh} (100%)
 rename tests/misc/{od-N => od-N.sh} (100%)
 rename tests/misc/{od-float => od-float.sh} (100%)
 rename tests/misc/{od-multiple-t => od-multiple-t.sh} (100%)
 rename tests/misc/{od-x8 => od-x8.sh} (100%)
 rename tests/misc/{od => od.pl} (100%)
 rename tests/misc/{paste => paste.pl} (100%)
 rename tests/misc/{pathchk1 => pathchk1.sh} (100%)
 rename tests/misc/{pr => pr.pl} (100%)
 rename tests/misc/{printenv => printenv.sh} (100%)
 rename tests/misc/{printf-cov => printf-cov.pl} (100%)
 rename tests/misc/{printf-hex => printf-hex.sh} (100%)
 rename tests/misc/{printf-surprise => printf-surprise.sh} (100%)
 rename tests/misc/{printf => printf.sh} (100%)
 rename tests/misc/{ptx-overrun => ptx-overrun.sh} (100%)
 rename tests/misc/{ptx => ptx.pl} (100%)
 rename tests/misc/{pwd-long => pwd-long.sh} (100%)
 rename tests/misc/{pwd-option => pwd-option.sh} (100%)
 rename tests/misc/{readlink-fp-loop => readlink-fp-loop.sh} (100%)
 rename tests/misc/{readlink-root => readlink-root.sh} (100%)
 rename tests/misc/{realpath => realpath.sh} (100%)
 rename tests/misc/{runcon-no-reorder => runcon-no-reorder.sh} (100%)
 rename tests/misc/{selinux => selinux.sh} (100%)
 rename tests/misc/{seq-long-double => seq-long-double.sh} (100%)
 rename tests/misc/{seq => seq.pl} (100%)
 rename tests/misc/{sha1sum-vec => sha1sum-vec.pl} (100%)
 rename tests/misc/{sha1sum => sha1sum.pl} (100%)
 rename tests/misc/{sha224sum => sha224sum.pl} (100%)
 rename tests/misc/{sha256sum => sha256sum.pl} (100%)
 rename tests/misc/{sha384sum => sha384sum.pl} (100%)
 rename tests/misc/{sha512sum => sha512sum.pl} (100%)
 rename tests/misc/{shred-exact => shred-exact.sh} (100%)
 rename tests/misc/{shred-passes => shred-passes.sh} (100%)
 rename tests/misc/{shred-remove => shred-remove.sh} (100%)
 rename tests/misc/{shuf => shuf.sh} (100%)
 rename tests/misc/{sort-NaN-infloop => sort-NaN-infloop.sh} (100%)
 rename tests/misc/{sort-benchmark-random => sort-benchmark-random.sh} (100%)
 rename tests/misc/{sort-compress-hang => sort-compress-hang.sh} (100%)
 rename tests/misc/{sort-compress-proc => sort-compress-proc.sh} (100%)
 rename tests/misc/{sort-compress => sort-compress.sh} (100%)
 rename tests/misc/{sort-continue => sort-continue.sh} (100%)
 rename tests/misc/{sort-debug-keys => sort-debug-keys.sh} (100%)
 rename tests/misc/{sort-debug-warn => sort-debug-warn.sh} (100%)
 rename tests/misc/{sort-discrim => sort-discrim.sh} (100%)
 rename tests/misc/{sort-exit-early => sort-exit-early.sh} (100%)
 rename tests/misc/{sort-files0-from => sort-files0-from.pl} (100%)
 rename tests/misc/{sort-float => sort-float.sh} (100%)
 rename tests/misc/{sort-merge-fdlimit => sort-merge-fdlimit.sh} (100%)
 rename tests/misc/{sort-merge => sort-merge.pl} (100%)
 rename tests/misc/{sort-month => sort-month.sh} (100%)
 rename tests/misc/{sort-rand => sort-rand.sh} (100%)
 rename tests/misc/{sort-spinlock-abuse => sort-spinlock-abuse.sh} (100%)
 rename tests/misc/{sort-stale-thread-mem => sort-stale-thread-mem.sh} (100%)
 rename tests/misc/{sort-u-FMR => sort-u-FMR.sh} (100%)
 rename tests/misc/{sort-unique-segv => sort-unique-segv.sh} (100%)
 rename tests/misc/{sort-unique => sort-unique.sh} (100%)
 rename tests/misc/{sort-version => sort-version.sh} (100%)
 rename tests/misc/{sort => sort.pl} (100%)
 rename tests/misc/{stat-birthtime => stat-birthtime.sh} (100%)
 rename tests/misc/{stat-fmt => stat-fmt.sh} (100%)
 rename tests/misc/{stat-hyphen => stat-hyphen.sh} (100%)
 rename tests/misc/{stat-mount => stat-mount.sh} (100%)
 rename tests/misc/{stat-nanoseconds => stat-nanoseconds.sh} (100%)
 rename tests/misc/{stat-printf => stat-printf.pl} (100%)
 rename tests/misc/{stat-slash => stat-slash.sh} (100%)
 rename tests/misc/{stdbuf => stdbuf.sh} (100%)
 rename tests/misc/{stty-invalid => stty-invalid.sh} (100%)
 rename tests/misc/{stty-pairs => stty-pairs.sh} (100%)
 rename tests/misc/{stty-row-col => stty-row-col.sh} (100%)
 rename tests/misc/{stty => stty.sh} (100%)
 rename tests/misc/{sum-sysv => sum-sysv.sh} (100%)
 rename tests/misc/{sum => sum.pl} (100%)
 rename tests/misc/{tac-2-nonseekable => tac-2-nonseekable.sh} (100%)
 rename tests/misc/{tac-continue => tac-continue.sh} (100%)
 rename tests/misc/{tac => tac.pl} (100%)
 rename tests/misc/{tail => tail.pl} (100%)
 rename tests/misc/{tee-dash => tee-dash.sh} (100%)
 rename tests/misc/{tee => tee.sh} (100%)
 rename tests/misc/{test-diag => test-diag.pl} (100%)
 rename tests/misc/{test => test.pl} (100%)
 rename tests/misc/{timeout-group => timeout-group.sh} (100%)
 rename tests/misc/{timeout-parameters => timeout-parameters.sh} (100%)
 rename tests/misc/{timeout => timeout.sh} (100%)
 rename tests/misc/{tr-case-class => tr-case-class.sh} (100%)
 rename tests/misc/{tr => tr.pl} (100%)
 rename tests/misc/{truncate-dangling-symlink => truncate-dangling-symlink.sh} (100%)
 rename tests/misc/{truncate-dir-fail => truncate-dir-fail.sh} (100%)
 rename tests/misc/{truncate-fail-diag => truncate-fail-diag.sh} (100%)
 rename tests/misc/{truncate-fifo => truncate-fifo.sh} (100%)
 rename tests/misc/{truncate-no-create-missing => truncate-no-create-missing.sh} (100%)
 rename tests/misc/{truncate-overflow => truncate-overflow.sh} (100%)
 rename tests/misc/{truncate-owned-by-other => truncate-owned-by-other.sh} (100%)
 rename tests/misc/{truncate-parameters => truncate-parameters.sh} (100%)
 rename tests/misc/{truncate-relative => truncate-relative.sh} (100%)
 rename tests/misc/{tsort => tsort.pl} (100%)
 rename tests/misc/{tty-eof => tty-eof.pl} (100%)
 rename tests/misc/{unexpand => unexpand.pl} (100%)
 rename tests/misc/{uniq-perf => uniq-perf.sh} (100%)
 rename tests/misc/{uniq => uniq.pl} (100%)
 rename tests/misc/{wc-files0-from => wc-files0-from.pl} (100%)
 rename tests/misc/{wc-files0 => wc-files0.sh} (100%)
 rename tests/misc/{wc-parallel => wc-parallel.sh} (100%)
 rename tests/misc/{wc => wc.pl} (100%)
 rename tests/misc/{xattr => xattr.sh} (100%)
 rename tests/misc/{xstrtol => xstrtol.pl} (100%)
 rename tests/mkdir/{p-1 => p-1.sh} (100%)
 rename tests/mkdir/{p-2 => p-2.sh} (100%)
 rename tests/mkdir/{p-3 => p-3.sh} (100%)
 rename tests/mkdir/{p-slashdot => p-slashdot.sh} (100%)
 rename tests/mkdir/{p-thru-slink => p-thru-slink.sh} (100%)
 rename tests/mkdir/{p-v => p-v.sh} (100%)
 rename tests/mkdir/{parents => parents.sh} (100%)
 rename tests/mkdir/{perm => perm.sh} (100%)
 rename tests/mkdir/{selinux => selinux.sh} (100%)
 rename tests/mkdir/{special-1 => special-1.sh} (100%)
 rename tests/mkdir/{t-slash => t-slash.sh} (100%)
 rename tests/mkdir/{writable-under-readonly => writable-under-readonly.sh} (100%)
 rename tests/mv/{acl => acl.sh} (100%)
 rename tests/mv/{atomic => atomic.sh} (100%)
 rename tests/mv/{atomic2 => atomic2.sh} (100%)
 rename tests/mv/{backup-dir => backup-dir.sh} (100%)
 rename tests/mv/{backup-is-src => backup-is-src.sh} (100%)
 rename tests/mv/{childproof => childproof.sh} (100%)
 rename tests/mv/{diag => diag.sh} (100%)
 rename tests/mv/{dir-file => dir-file.sh} (100%)
 rename tests/mv/{dir2dir => dir2dir.sh} (100%)
 rename tests/mv/{dup-source => dup-source.sh} (100%)
 rename tests/mv/{force => force.sh} (100%)
 rename tests/mv/{hard-2 => hard-2.sh} (100%)
 rename tests/mv/{hard-3 => hard-3.sh} (100%)
 rename tests/mv/{hard-4 => hard-4.sh} (100%)
 rename tests/mv/{hard-link-1 => hard-link-1.sh} (100%)
 rename tests/mv/{hard-verbose => hard-verbose.sh} (100%)
 rename tests/mv/{i-1 => i-1.pl} (100%)
 rename tests/mv/{i-2 => i-2.sh} (100%)
 rename tests/mv/{i-3 => i-3.sh} (100%)
 rename tests/mv/{i-4 => i-4.sh} (100%)
 rename tests/mv/{i-5 => i-5.sh} (100%)
 rename tests/mv/{i-link-no => i-link-no.sh} (100%)
 rename tests/mv/{into-self-2 => into-self-2.sh} (100%)
 rename tests/mv/{into-self-3 => into-self-3.sh} (100%)
 rename tests/mv/{into-self-4 => into-self-4.sh} (100%)
 rename tests/mv/{into-self => into-self.sh} (100%)
 rename tests/mv/{leak-fd => leak-fd.sh} (100%)
 rename tests/mv/{mv-n => mv-n.sh} (100%)
 rename tests/mv/{mv-special-1 => mv-special-1.sh} (100%)
 rename tests/mv/{no-target-dir => no-target-dir.sh} (100%)
 rename tests/mv/{part-fail => part-fail.sh} (100%)
 rename tests/mv/{part-hardlink => part-hardlink.sh} (100%)
 rename tests/mv/{part-rename => part-rename.sh} (100%)
 rename tests/mv/{part-symlink => part-symlink.sh} (100%)
 rename tests/mv/{partition-perm => partition-perm.sh} (100%)
 rename tests/mv/{perm-1 => perm-1.sh} (100%)
 rename tests/mv/{sticky-to-xpart => sticky-to-xpart.sh} (100%)
 rename tests/mv/{symlink-onto-hardlink-to-self => symlink-onto-hardlink-to-self.sh} (100%)
 rename tests/mv/{symlink-onto-hardlink => symlink-onto-hardlink.sh} (100%)
 rename tests/mv/{to-symlink => to-symlink.sh} (100%)
 rename tests/mv/{trailing-slash => trailing-slash.sh} (100%)
 rename tests/mv/{update => update.sh} (100%)
 rename tests/pr/{pr-tests => pr-tests.pl} (100%)
 rename tests/readlink/{can-e => can-e.sh} (100%)
 rename tests/readlink/{can-f => can-f.sh} (100%)
 rename tests/readlink/{can-m => can-m.sh} (100%)
 rename tests/readlink/{rl-1 => rl-1.sh} (100%)
 rename tests/rm/{cycle => cycle.sh} (100%)
 rename tests/rm/{d-1 => d-1.sh} (100%)
 rename tests/rm/{d-2 => d-2.sh} (100%)
 rename tests/rm/{d-3 => d-3.sh} (100%)
 rename tests/rm/{dangling-symlink => dangling-symlink.sh} (100%)
 rename tests/rm/{deep-1 => deep-1.sh} (100%)
 rename tests/rm/{deep-2 => deep-2.sh} (100%)
 rename tests/rm/{dir-no-w => dir-no-w.sh} (100%)
 rename tests/rm/{dir-nonrecur => dir-nonrecur.sh} (100%)
 rename tests/rm/{dot-rel => dot-rel.sh} (100%)
 rename tests/rm/{empty-inacc => empty-inacc.sh} (100%)
 rename tests/rm/{empty-name => empty-name.pl} (100%)
 rename tests/rm/{ext3-perf => ext3-perf.sh} (100%)
 rename tests/rm/{f-1 => f-1.sh} (100%)
 rename tests/rm/{fail-2eperm => fail-2eperm.sh} (100%)
 rename tests/rm/{fail-eacces => fail-eacces.sh} (100%)
 rename tests/rm/{hash => hash.sh} (100%)
 rename tests/rm/{i-1 => i-1.sh} (100%)
 rename tests/rm/{i-never => i-never.sh} (100%)
 rename tests/rm/{i-no-r => i-no-r.sh} (100%)
 rename tests/rm/{ignorable => ignorable.sh} (100%)
 rename tests/rm/{inaccessible => inaccessible.sh} (100%)
 rename tests/rm/{interactive-always => interactive-always.sh} (100%)
 rename tests/rm/{interactive-once => interactive-once.sh} (100%)
 rename tests/rm/{ir-1 => ir-1.sh} (100%)
 rename tests/rm/{isatty => isatty.sh} (100%)
 rename tests/rm/{many-dir-entries-vs-OOM => many-dir-entries-vs-OOM.sh} (100%)
 rename tests/rm/{no-give-up => no-give-up.sh} (100%)
 rename tests/rm/{one-file-system => one-file-system.sh} (100%)
 rename tests/rm/{one-file-system2 => one-file-system2.sh} (100%)
 rename tests/rm/{r-1 => r-1.sh} (100%)
 rename tests/rm/{r-2 => r-2.sh} (100%)
 rename tests/rm/{r-3 => r-3.sh} (100%)
 rename tests/rm/{r-4 => r-4.sh} (100%)
 rename tests/rm/{read-only => read-only.sh} (100%)
 rename tests/rm/{readdir-bug => readdir-bug.sh} (100%)
 rename tests/rm/{rm1 => rm1.sh} (100%)
 rename tests/rm/{rm2 => rm2.sh} (100%)
 rename tests/rm/{rm3 => rm3.sh} (100%)
 rename tests/rm/{rm4 => rm4.sh} (100%)
 rename tests/rm/{rm5 => rm5.sh} (100%)
 rename tests/rm/{sunos-1 => sunos-1.sh} (100%)
 rename tests/rm/{unread2 => unread2.sh} (100%)
 rename tests/rm/{unread3 => unread3.sh} (100%)
 rename tests/rm/{unreadable => unreadable.pl} (100%)
 rename tests/rm/{v-slash => v-slash.sh} (100%)
 rename tests/rmdir/{fail-perm => fail-perm.sh} (100%)
 rename tests/rmdir/{ignore => ignore.sh} (100%)
 rename tests/rmdir/{t-slash => t-slash.sh} (100%)
 rename tests/split/{additional-suffix => additional-suffix.sh} (100%)
 rename tests/split/{b-chunk => b-chunk.sh} (100%)
 rename tests/split/{fail => fail.sh} (100%)
 rename tests/split/{filter => filter.sh} (100%)
 rename tests/split/{guard-input => guard-input.sh} (100%)
 rename tests/split/{l-chunk => l-chunk.sh} (100%)
 rename tests/split/{lines => lines.sh} (100%)
 rename tests/split/{numeric => numeric.sh} (100%)
 rename tests/split/{r-chunk => r-chunk.sh} (100%)
 rename tests/split/{suffix-auto-length => suffix-auto-length.sh} (100%)
 rename tests/split/{suffix-length => suffix-length.sh} (100%)
 rename tests/tail-2/{F-vs-missing => F-vs-missing.sh} (100%)
 rename tests/tail-2/{F-vs-rename => F-vs-rename.sh} (100%)
 rename tests/tail-2/{append-only => append-only.sh} (100%)
 rename tests/tail-2/{assert-2 => assert-2.sh} (100%)
 rename tests/tail-2/{assert => assert.sh} (100%)
 rename tests/tail-2/{big-4gb => big-4gb.sh} (100%)
 rename tests/tail-2/{flush-initial => flush-initial.sh} (100%)
 rename tests/tail-2/{follow-name => follow-name.sh} (100%)
 rename tests/tail-2/{follow-stdin => follow-stdin.sh} (100%)
 rename tests/tail-2/{infloop-1 => infloop-1.sh} (100%)
 rename tests/tail-2/{inotify-hash-abuse => inotify-hash-abuse.sh} (100%)
 rename tests/tail-2/{inotify-hash-abuse2 => inotify-hash-abuse2.sh} (100%)
 rename tests/tail-2/{inotify-race => inotify-race.sh} (100%)
 rename tests/tail-2/{inotify-rotate => inotify-rotate.sh} (100%)
 rename tests/tail-2/{pid => pid.sh} (100%)
 rename tests/tail-2/{pipe-f => pipe-f.sh} (100%)
 rename tests/tail-2/{pipe-f2 => pipe-f2.sh} (100%)
 rename tests/tail-2/{proc-ksyms => proc-ksyms.sh} (100%)
 rename tests/tail-2/{start-middle => start-middle.sh} (100%)
 rename tests/tail-2/{tail-n0f => tail-n0f.sh} (100%)
 rename tests/tail-2/{wait => wait.sh} (100%)
 rename tests/touch/{60-seconds => 60-seconds.sh} (100%)
 rename tests/touch/{dangling-symlink => dangling-symlink.sh} (100%)
 rename tests/touch/{dir-1 => dir-1.sh} (100%)
 rename tests/touch/{empty-file => empty-file.sh} (100%)
 rename tests/touch/{fail-diag => fail-diag.sh} (100%)
 rename tests/touch/{fifo => fifo.sh} (100%)
 rename tests/touch/{no-create-missing => no-create-missing.sh} (100%)
 rename tests/touch/{no-dereference => no-dereference.sh} (100%)
 rename tests/touch/{no-rights => no-rights.sh} (100%)
 rename tests/touch/{not-owner => not-owner.sh} (100%)
 rename tests/touch/{now-owned-by-other => now-owned-by-other.sh} (100%)
 rename tests/touch/{obsolescent => obsolescent.sh} (100%)
 rename tests/touch/{read-only => read-only.sh} (100%)
 rename tests/touch/{relative => relative.sh} (100%)
 rename tests/touch/{trailing-slash => trailing-slash.sh} (100%)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index ff0af84..a547b11 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -45,7 +45,7 @@ check_DATA = .built-programs
             && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
           > $@-t && mv $@-t $@
 
-TEST_EXTENSIONS = .xpl
+TEST_EXTENSIONS = .sh .pl .xpl
 
 if HAVE_PERL
 TESTSUITE_PERL = $(PERL)
@@ -63,6 +63,9 @@ LOG_COMPILER = \
   --test-name "$$f" --srcdir '$(srcdir)' \
   --shell '$(SHELL)' --perl '$(TESTSUITE_PERL)' --
 
+PL_LOG_COMPILER = $(LOG_COMPILER)
+SH_LOG_COMPILER = $(LOG_COMPILER)
+
 # Perl scripts that must be run in tainted mode.
 XPL_LOG_COMPILER = \
   $(TESTSUITE_PERL) -wT -I$(srcdir) -MCoreutils -MCuSkip -M"CuTmpdir qw($$f)"
@@ -131,32 +134,32 @@ EXTRA_DIST =		\
   $(pr_data)
 
 root_tests =					\
-  chown/basic					\
-  cp/cp-a-selinux				\
-  cp/preserve-gid				\
-  cp/special-bits				\
-  cp/cp-mv-enotsup-xattr			\
-  cp/capability					\
-  cp/sparse-fiemap				\
-  dd/skip-seek-past-dev				\
-  df/problematic-chars				\
-  du/bind-mount-dir-cycle			\
-  install/install-C-root			\
-  ls/capability					\
-  ls/nameless-uid				\
-  misc/chcon					\
-  misc/chroot-credentials			\
-  misc/id-setgid				\
-  misc/selinux					\
-  misc/truncate-owned-by-other			\
-  mkdir/writable-under-readonly			\
-  mv/sticky-to-xpart				\
-  rm/fail-2eperm				\
-  rm/no-give-up					\
-  rm/one-file-system				\
-  rm/read-only					\
-  tail-2/append-only				\
-  touch/now-owned-by-other
+  chown/basic.sh				\
+  cp/cp-a-selinux.sh				\
+  cp/preserve-gid.sh				\
+  cp/special-bits.sh				\
+  cp/cp-mv-enotsup-xattr.sh			\
+  cp/capability.sh				\
+  cp/sparse-fiemap.sh				\
+  dd/skip-seek-past-dev.sh			\
+  df/problematic-chars.sh			\
+  du/bind-mount-dir-cycle.sh			\
+  install/install-C-root.sh			\
+  ls/capability.sh				\
+  ls/nameless-uid.sh				\
+  misc/chcon.sh					\
+  misc/chroot-credentials.sh			\
+  misc/id-setgid.sh				\
+  misc/selinux.sh				\
+  misc/truncate-owned-by-other.sh		\
+  mkdir/writable-under-readonly.sh		\
+  mv/sticky-to-xpart.sh				\
+  rm/fail-2eperm.sh				\
+  rm/no-give-up.sh				\
+  rm/one-file-system.sh				\
+  rm/read-only.sh				\
+  tail-2/append-only.sh				\
+  touch/now-owned-by-other.sh
 
 .PHONY: check-root
 check-root:
@@ -191,473 +194,473 @@ EXTRA_DIST += $(TESTS)
 # Put head-elide-tail early, because it's long-running.
 
 TESTS =						\
-  misc/help-version				\
-  tail-2/inotify-race				\
-  misc/invalid-opt				\
-  rm/ext3-perf					\
-  rm/cycle					\
-  cp/link-heap					\
-  misc/tty-eof					\
-  tail-2/inotify-hash-abuse			\
-  tail-2/inotify-hash-abuse2			\
-  tail-2/F-vs-missing				\
-  tail-2/F-vs-rename				\
-  tail-2/inotify-rotate				\
-  chmod/no-x					\
-  chgrp/basic					\
-  rm/dangling-symlink				\
-  misc/ls-time					\
-  rm/d-1					\
-  rm/d-2					\
-  rm/d-3					\
-  rm/deep-1					\
-  rm/deep-2					\
-  rm/dir-no-w					\
-  rm/dir-nonrecur				\
-  rm/dot-rel					\
-  rm/isatty					\
-  rm/empty-inacc				\
-  rm/empty-name					\
-  rm/f-1					\
-  rm/fail-eacces				\
+  misc/help-version.sh				\
+  tail-2/inotify-race.sh			\
+  misc/invalid-opt.pl				\
+  rm/ext3-perf.sh				\
+  rm/cycle.sh					\
+  cp/link-heap.sh				\
+  misc/tty-eof.pl				\
+  tail-2/inotify-hash-abuse.sh			\
+  tail-2/inotify-hash-abuse2.sh			\
+  tail-2/F-vs-missing.sh			\
+  tail-2/F-vs-rename.sh				\
+  tail-2/inotify-rotate.sh			\
+  chmod/no-x.sh					\
+  chgrp/basic.sh				\
+  rm/dangling-symlink.sh			\
+  misc/ls-time.sh				\
+  rm/d-1.sh					\
+  rm/d-2.sh					\
+  rm/d-3.sh					\
+  rm/deep-1.sh					\
+  rm/deep-2.sh					\
+  rm/dir-no-w.sh				\
+  rm/dir-nonrecur.sh				\
+  rm/dot-rel.sh					\
+  rm/isatty.sh					\
+  rm/empty-inacc.sh				\
+  rm/empty-name.pl				\
+  rm/f-1.sh					\
+  rm/fail-eacces.sh				\
   rm/fail-eperm.xpl				\
-  tail-2/assert					\
-  rm/hash					\
-  rm/i-1					\
-  rm/i-never					\
-  rm/i-no-r					\
-  tail-2/infloop-1				\
-  rm/ignorable					\
-  rm/inaccessible				\
-  rm/interactive-always				\
-  rm/interactive-once				\
-  rm/ir-1					\
-  rm/one-file-system2				\
-  rm/r-1					\
-  rm/r-2					\
-  rm/r-3					\
-  rm/r-4					\
-  rm/readdir-bug				\
-  rm/rm1					\
-  touch/empty-file				\
-  rm/rm2					\
-  rm/rm3					\
-  rm/rm4					\
-  rm/rm5					\
-  rm/sunos-1					\
-  rm/unread2					\
-  rm/unread3					\
-  rm/unreadable					\
-  rm/v-slash					\
-  rm/many-dir-entries-vs-OOM			\
-  chgrp/default-no-deref			\
-  chgrp/deref					\
-  chgrp/no-x					\
-  chgrp/posix-H					\
-  chgrp/recurse					\
-  fmt/base					\
-  fmt/long-line					\
-  fmt/goal-option				\
-  misc/env					\
-  misc/ptx					\
-  misc/test					\
-  misc/seq					\
-  misc/seq-long-double				\
-  misc/head					\
-  misc/head-elide-tail				\
-  tail-2/tail-n0f				\
-  misc/ls-misc					\
-  misc/date					\
-  misc/date-next-dow				\
-  misc/ptx-overrun				\
-  misc/xstrtol					\
-  tail-2/pid					\
-  misc/od					\
-  misc/od-float					\
-  misc/mktemp					\
-  misc/arch					\
-  misc/pr					\
-  misc/join					\
-  pr/pr-tests					\
-  misc/pwd-option				\
-  misc/chcon-fail				\
-  misc/cut					\
-  misc/wc					\
-  misc/wc-files0-from				\
-  misc/wc-files0				\
-  misc/wc-parallel				\
-  misc/cat-proc					\
-  misc/cat-buf					\
-  misc/base64					\
-  misc/basename					\
-  misc/close-stdout				\
-  misc/chroot-fail				\
-  misc/comm					\
-  misc/csplit					\
-  misc/csplit-1000				\
-  misc/csplit-heap				\
-  misc/date-sec					\
-  misc/dircolors				\
-  misc/dirname					\
-  misc/env-null					\
-  misc/expand					\
-  misc/expr					\
-  misc/factor					\
-  misc/false-status				\
-  misc/fold					\
-  misc/groups-dash				\
-  misc/groups-version				\
-  misc/head-c					\
-  misc/head-pos					\
-  misc/id-context				\
-  misc/id-groups				\
-  misc/id-setgid				\
-  misc/md5sum					\
-  misc/md5sum-bsd				\
-  misc/md5sum-newline				\
-  misc/md5sum-parallel				\
-  misc/mknod					\
-  misc/nice					\
-  misc/nice-fail				\
-  misc/nl					\
-  misc/nohup					\
-  misc/nproc-avail				\
-  misc/nproc-positive				\
-  misc/od-N					\
-  misc/od-multiple-t				\
-  misc/od-x8					\
-  misc/paste					\
-  misc/pathchk1					\
-  misc/printenv					\
-  misc/printf					\
-  misc/printf-cov				\
-  misc/printf-hex				\
-  misc/printf-surprise				\
-  misc/pwd-long					\
-  misc/readlink-fp-loop				\
-  misc/readlink-root				\
-  misc/realpath					\
-  misc/runcon-no-reorder			\
-  misc/sha1sum					\
-  misc/sha1sum-vec				\
-  misc/sha224sum				\
-  misc/sha256sum				\
-  misc/sha384sum				\
-  misc/sha512sum				\
-  misc/shred-exact				\
-  misc/shred-passes				\
-  misc/shred-remove				\
-  misc/shuf					\
-  misc/sort					\
-  misc/sort-benchmark-random			\
-  misc/sort-compress				\
-  misc/sort-compress-hang			\
-  misc/sort-compress-proc			\
-  misc/sort-continue				\
-  misc/sort-debug-keys				\
-  misc/sort-debug-warn				\
-  misc/sort-discrim				\
-  misc/sort-files0-from				\
-  misc/sort-float				\
-  misc/sort-merge				\
-  misc/sort-merge-fdlimit			\
-  misc/sort-month				\
-  misc/sort-exit-early				\
-  misc/sort-rand				\
-  misc/sort-spinlock-abuse			\
-  misc/sort-stale-thread-mem			\
-  misc/sort-unique				\
-  misc/sort-unique-segv				\
-  misc/sort-version				\
-  misc/sort-NaN-infloop				\
-  misc/sort-u-FMR				\
-  split/filter					\
-  split/suffix-auto-length			\
-  split/suffix-length				\
-  split/additional-suffix			\
-  split/b-chunk					\
-  split/fail					\
-  split/lines					\
-  split/l-chunk					\
-  split/r-chunk					\
-  split/numeric					\
-  split/guard-input				\
-  misc/stat-birthtime				\
-  misc/stat-fmt					\
-  misc/stat-hyphen				\
-  misc/stat-mount				\
-  misc/stat-nanoseconds				\
-  misc/stat-printf				\
-  misc/stat-slash				\
-  misc/stdbuf					\
-  misc/stty					\
-  misc/stty-invalid				\
-  misc/stty-pairs				\
-  misc/stty-row-col				\
-  misc/sum					\
-  misc/sum-sysv					\
-  misc/tac					\
-  misc/tac-continue				\
-  misc/tac-2-nonseekable			\
-  misc/tail					\
-  misc/tee					\
-  misc/tee-dash					\
-  misc/test-diag				\
-  misc/timeout					\
-  misc/timeout-group				\
-  misc/timeout-parameters			\
-  misc/tr					\
-  misc/tr-case-class				\
-  misc/truncate-dangling-symlink		\
-  misc/truncate-dir-fail			\
-  misc/truncate-fail-diag			\
-  misc/truncate-fifo				\
-  misc/truncate-no-create-missing		\
-  misc/truncate-overflow			\
-  misc/truncate-parameters			\
-  misc/truncate-relative			\
-  misc/tsort					\
-  misc/unexpand					\
-  misc/uniq					\
-  misc/uniq-perf				\
-  misc/xattr					\
-  tail-2/wait					\
-  chmod/c-option				\
-  chmod/equal-x					\
-  chmod/equals					\
-  chmod/inaccessible				\
-  chmod/octal					\
-  chmod/setgid					\
-  chmod/silent					\
-  chmod/thru-dangling				\
-  chmod/umask-x					\
-  chmod/usage					\
-  chown/deref					\
-  chown/preserve-root				\
-  chown/separator				\
-  cp/abuse					\
-  cp/acl					\
-  cp/attr-existing				\
-  cp/backup-1					\
-  cp/backup-dir					\
-  cp/backup-is-src				\
-  cp/cp-HL					\
-  cp/cp-deref					\
-  cp/cp-i					\
-  cp/cp-mv-backup				\
-  cp/cp-parents					\
-  cp/deref-slink				\
-  cp/dir-rm-dest				\
-  cp/dir-slash					\
-  cp/dir-vs-file				\
-  cp/existing-perm-dir				\
-  cp/existing-perm-race				\
-  cp/fail-perm					\
-  cp/fiemap-empty                               \
-  cp/fiemap-perf                                \
-  cp/fiemap-2                                   \
-  cp/file-perm-race				\
-  cp/into-self					\
-  cp/link					\
-  cp/link-no-deref				\
-  cp/link-preserve				\
-  cp/link-symlink				\
-  cp/nfs-removal-race				\
-  cp/no-deref-link1				\
-  cp/no-deref-link2				\
-  cp/no-deref-link3				\
-  cp/parent-perm				\
-  cp/parent-perm-race				\
-  cp/perm					\
-  cp/preserve-2					\
-  cp/preserve-link				\
-  cp/preserve-slink-time			\
-  cp/proc-short-read				\
-  cp/proc-zero-len				\
-  cp/r-vs-symlink				\
-  cp/reflink-auto				\
-  cp/reflink-perm				\
-  cp/same-file					\
-  cp/slink-2-slink				\
-  cp/sparse					\
-  cp/sparse-to-pipe				\
-  cp/special-f					\
-  cp/src-base-dot				\
-  cp/symlink-slash				\
-  cp/thru-dangling				\
-  df/header					\
-  df/df-P					\
-  df/unreadable					\
-  df/total-unprocessed				\
-  df/no-mtab-status				\
-  dd/direct					\
-  dd/misc					\
-  dd/nocache					\
-  dd/not-rewound				\
-  dd/reblock					\
-  dd/skip-seek					\
-  dd/skip-seek2					\
-  dd/bytes					\
-  dd/skip-seek-past-file			\
-  dd/sparse					\
-  dd/stderr					\
-  dd/unblock					\
-  dd/unblock-sync				\
-  df/total-verify				\
-  du/2g						\
-  du/8gb					\
-  du/basic					\
-  du/bigtime					\
-  du/deref					\
-  du/deref-args					\
-  du/exclude					\
-  du/fd-leak					\
-  du/files0-from				\
-  du/files0-from-dir				\
-  du/hard-link					\
-  du/inacc-dest					\
-  du/inacc-dir					\
-  du/inaccessible-cwd				\
-  du/long-from-unreadable			\
-  du/long-sloop					\
-  du/max-depth					\
-  du/move-dir-while-traversing			\
-  du/no-deref					\
-  du/no-x					\
-  du/one-file-system				\
-  du/restore-wd					\
-  du/slash					\
-  du/slink					\
-  du/trailing-slash				\
-  du/two-args					\
-  id/gnu-zero-uids				\
-  id/no-context					\
-  install/basic-1				\
-  install/create-leading			\
-  install/d-slashdot				\
-  install/install-C				\
-  install/install-C-selinux			\
-  install/strip-program				\
-  install/trap					\
-  ln/backup-1					\
-  ln/hard-backup				\
-  ln/hard-to-sym				\
-  ln/misc					\
-  ln/relative					\
-  ln/sf-1					\
-  ln/slash-decorated-nonexistent-dest		\
-  ln/target-1					\
-  ls/abmon-align				\
-  ls/block-size					\
-  ls/color-clear-to-eol				\
-  ls/color-dtype-dir				\
-  ls/color-norm					\
-  ls/dangle					\
-  ls/dired					\
-  ls/file-type					\
-  ls/follow-slink				\
-  ls/getxattr-speedup				\
-  ls/infloop					\
-  ls/inode					\
-  ls/m-option					\
-  ls/multihardlink				\
-  ls/no-arg					\
-  ls/no-cap					\
-  ls/proc-selinux-segfault			\
-  ls/readdir-mountpoint-inode			\
-  ls/recursive					\
-  ls/root-rel-symlink-color			\
-  ls/rt-1					\
-  ls/slink-acl					\
-  ls/stat-dtype					\
-  ls/stat-failed				\
-  ls/stat-free-color				\
-  ls/stat-free-symlinks				\
-  ls/stat-vs-dirent				\
-  ls/symlink-slash				\
-  ls/time-style-diag				\
-  ls/x-option					\
-  mkdir/p-1					\
-  mkdir/p-2					\
-  mkdir/p-3					\
-  mkdir/p-slashdot				\
-  mkdir/p-thru-slink				\
-  mkdir/p-v					\
-  mkdir/parents					\
-  mkdir/perm					\
-  mkdir/selinux					\
-  mkdir/special-1				\
-  mkdir/t-slash					\
-  mv/acl					\
-  mv/atomic					\
-  mv/atomic2					\
-  mv/backup-dir					\
-  mv/backup-is-src				\
-  mv/childproof					\
-  mv/diag					\
-  mv/dir-file					\
-  mv/dir2dir					\
-  mv/dup-source					\
-  mv/force					\
-  mv/hard-2					\
-  mv/hard-3					\
-  mv/hard-4					\
-  mv/hard-link-1				\
-  mv/hard-verbose				\
-  mv/i-1					\
-  mv/i-2					\
-  mv/i-3					\
-  mv/i-4					\
-  mv/i-5					\
-  mv/i-link-no					\
-  mv/into-self					\
-  mv/into-self-2				\
-  mv/into-self-3				\
-  mv/into-self-4				\
-  mv/leak-fd					\
-  mv/mv-n					\
-  mv/mv-special-1				\
-  mv/no-target-dir				\
-  mv/part-fail					\
-  mv/part-hardlink				\
-  mv/part-rename				\
-  mv/part-symlink				\
-  mv/partition-perm				\
-  mv/perm-1					\
-  mv/symlink-onto-hardlink			\
-  mv/symlink-onto-hardlink-to-self		\
-  mv/to-symlink					\
-  mv/trailing-slash				\
-  mv/update					\
-  readlink/can-e				\
-  readlink/can-f				\
-  readlink/can-m				\
-  readlink/rl-1					\
-  rmdir/fail-perm				\
-  rmdir/ignore					\
-  rmdir/t-slash					\
-  tail-2/assert-2				\
-  tail-2/big-4gb				\
-  tail-2/flush-initial				\
-  tail-2/follow-name				\
-  tail-2/follow-stdin				\
-  tail-2/pipe-f					\
-  tail-2/pipe-f2				\
-  tail-2/proc-ksyms				\
-  tail-2/start-middle				\
-  touch/60-seconds				\
-  touch/dangling-symlink			\
-  touch/dir-1					\
-  touch/fail-diag				\
-  touch/fifo					\
-  touch/no-create-missing			\
-  touch/no-dereference				\
-  touch/no-rights				\
-  touch/not-owner				\
-  touch/obsolescent				\
-  touch/read-only				\
-  touch/relative				\
-  touch/trailing-slash				\
+  tail-2/assert.sh				\
+  rm/hash.sh					\
+  rm/i-1.sh					\
+  rm/i-never.sh					\
+  rm/i-no-r.sh					\
+  tail-2/infloop-1.sh				\
+  rm/ignorable.sh				\
+  rm/inaccessible.sh				\
+  rm/interactive-always.sh			\
+  rm/interactive-once.sh			\
+  rm/ir-1.sh					\
+  rm/one-file-system2.sh			\
+  rm/r-1.sh					\
+  rm/r-2.sh					\
+  rm/r-3.sh					\
+  rm/r-4.sh					\
+  rm/readdir-bug.sh				\
+  rm/rm1.sh					\
+  touch/empty-file.sh				\
+  rm/rm2.sh					\
+  rm/rm3.sh					\
+  rm/rm4.sh					\
+  rm/rm5.sh					\
+  rm/sunos-1.sh					\
+  rm/unread2.sh					\
+  rm/unread3.sh					\
+  rm/unreadable.pl				\
+  rm/v-slash.sh					\
+  rm/many-dir-entries-vs-OOM.sh			\
+  chgrp/default-no-deref.sh			\
+  chgrp/deref.sh				\
+  chgrp/no-x.sh					\
+  chgrp/posix-H.sh				\
+  chgrp/recurse.sh				\
+  fmt/base.pl					\
+  fmt/long-line.sh				\
+  fmt/goal-option.sh				\
+  misc/env.sh					\
+  misc/ptx.pl					\
+  misc/test.pl					\
+  misc/seq.pl					\
+  misc/seq-long-double.sh			\
+  misc/head.pl					\
+  misc/head-elide-tail.pl			\
+  tail-2/tail-n0f.sh				\
+  misc/ls-misc.pl				\
+  misc/date.pl					\
+  misc/date-next-dow.pl				\
+  misc/ptx-overrun.sh				\
+  misc/xstrtol.pl				\
+  tail-2/pid.sh					\
+  misc/od.pl					\
+  misc/od-float.sh				\
+  misc/mktemp.pl				\
+  misc/arch.sh					\
+  misc/pr.pl					\
+  misc/join.pl					\
+  pr/pr-tests.pl				\
+  misc/pwd-option.sh				\
+  misc/chcon-fail.sh				\
+  misc/cut.pl					\
+  misc/wc.pl					\
+  misc/wc-files0-from.pl			\
+  misc/wc-files0.sh				\
+  misc/wc-parallel.sh				\
+  misc/cat-proc.sh				\
+  misc/cat-buf.sh				\
+  misc/base64.pl				\
+  misc/basename.pl				\
+  misc/close-stdout.sh				\
+  misc/chroot-fail.sh				\
+  misc/comm.pl					\
+  misc/csplit.sh				\
+  misc/csplit-1000.sh				\
+  misc/csplit-heap.sh				\
+  misc/date-sec.sh				\
+  misc/dircolors.pl				\
+  misc/dirname.pl				\
+  misc/env-null.sh				\
+  misc/expand.pl				\
+  misc/expr.pl					\
+  misc/factor.pl				\
+  misc/false-status.sh				\
+  misc/fold.pl					\
+  misc/groups-dash.sh				\
+  misc/groups-version.sh			\
+  misc/head-c.sh				\
+  misc/head-pos.sh				\
+  misc/id-context.sh				\
+  misc/id-groups.sh				\
+  misc/id-setgid.sh				\
+  misc/md5sum.pl				\
+  misc/md5sum-bsd.sh				\
+  misc/md5sum-newline.pl			\
+  misc/md5sum-parallel.sh			\
+  misc/mknod.sh					\
+  misc/nice.sh					\
+  misc/nice-fail.sh				\
+  misc/nl.sh					\
+  misc/nohup.sh					\
+  misc/nproc-avail.sh				\
+  misc/nproc-positive.sh			\
+  misc/od-N.sh					\
+  misc/od-multiple-t.sh				\
+  misc/od-x8.sh					\
+  misc/paste.pl					\
+  misc/pathchk1.sh				\
+  misc/printenv.sh				\
+  misc/printf.sh				\
+  misc/printf-cov.pl				\
+  misc/printf-hex.sh				\
+  misc/printf-surprise.sh			\
+  misc/pwd-long.sh				\
+  misc/readlink-fp-loop.sh			\
+  misc/readlink-root.sh				\
+  misc/realpath.sh				\
+  misc/runcon-no-reorder.sh			\
+  misc/sha1sum.pl				\
+  misc/sha1sum-vec.pl				\
+  misc/sha224sum.pl				\
+  misc/sha256sum.pl				\
+  misc/sha384sum.pl				\
+  misc/sha512sum.pl				\
+  misc/shred-exact.sh				\
+  misc/shred-passes.sh				\
+  misc/shred-remove.sh				\
+  misc/shuf.sh					\
+  misc/sort.pl					\
+  misc/sort-benchmark-random.sh			\
+  misc/sort-compress.sh				\
+  misc/sort-compress-hang.sh			\
+  misc/sort-compress-proc.sh			\
+  misc/sort-continue.sh				\
+  misc/sort-debug-keys.sh			\
+  misc/sort-debug-warn.sh			\
+  misc/sort-discrim.sh				\
+  misc/sort-files0-from.pl			\
+  misc/sort-float.sh				\
+  misc/sort-merge.pl				\
+  misc/sort-merge-fdlimit.sh			\
+  misc/sort-month.sh				\
+  misc/sort-exit-early.sh			\
+  misc/sort-rand.sh				\
+  misc/sort-spinlock-abuse.sh			\
+  misc/sort-stale-thread-mem.sh			\
+  misc/sort-unique.sh				\
+  misc/sort-unique-segv.sh			\
+  misc/sort-version.sh				\
+  misc/sort-NaN-infloop.sh			\
+  misc/sort-u-FMR.sh				\
+  split/filter.sh				\
+  split/suffix-auto-length.sh			\
+  split/suffix-length.sh			\
+  split/additional-suffix.sh			\
+  split/b-chunk.sh				\
+  split/fail.sh					\
+  split/lines.sh				\
+  split/l-chunk.sh				\
+  split/r-chunk.sh				\
+  split/numeric.sh				\
+  split/guard-input.sh				\
+  misc/stat-birthtime.sh			\
+  misc/stat-fmt.sh				\
+  misc/stat-hyphen.sh				\
+  misc/stat-mount.sh				\
+  misc/stat-nanoseconds.sh			\
+  misc/stat-printf.pl				\
+  misc/stat-slash.sh				\
+  misc/stdbuf.sh				\
+  misc/stty.sh					\
+  misc/stty-invalid.sh				\
+  misc/stty-pairs.sh				\
+  misc/stty-row-col.sh				\
+  misc/sum.pl					\
+  misc/sum-sysv.sh				\
+  misc/tac.pl					\
+  misc/tac-continue.sh				\
+  misc/tac-2-nonseekable.sh			\
+  misc/tail.pl					\
+  misc/tee.sh					\
+  misc/tee-dash.sh				\
+  misc/test-diag.pl				\
+  misc/timeout.sh				\
+  misc/timeout-group.sh				\
+  misc/timeout-parameters.sh			\
+  misc/tr.pl					\
+  misc/tr-case-class.sh				\
+  misc/truncate-dangling-symlink.sh		\
+  misc/truncate-dir-fail.sh			\
+  misc/truncate-fail-diag.sh			\
+  misc/truncate-fifo.sh				\
+  misc/truncate-no-create-missing.sh		\
+  misc/truncate-overflow.sh			\
+  misc/truncate-parameters.sh			\
+  misc/truncate-relative.sh			\
+  misc/tsort.pl					\
+  misc/unexpand.pl				\
+  misc/uniq.pl					\
+  misc/uniq-perf.sh				\
+  misc/xattr.sh					\
+  tail-2/wait.sh				\
+  chmod/c-option.sh				\
+  chmod/equal-x.sh				\
+  chmod/equals.sh				\
+  chmod/inaccessible.sh				\
+  chmod/octal.sh				\
+  chmod/setgid.sh				\
+  chmod/silent.sh				\
+  chmod/thru-dangling.sh			\
+  chmod/umask-x.sh				\
+  chmod/usage.sh				\
+  chown/deref.sh				\
+  chown/preserve-root.sh			\
+  chown/separator.sh				\
+  cp/abuse.sh					\
+  cp/acl.sh					\
+  cp/attr-existing.sh				\
+  cp/backup-1.sh				\
+  cp/backup-dir.sh				\
+  cp/backup-is-src.sh				\
+  cp/cp-HL.sh					\
+  cp/cp-deref.sh				\
+  cp/cp-i.sh					\
+  cp/cp-mv-backup.sh				\
+  cp/cp-parents.sh				\
+  cp/deref-slink.sh				\
+  cp/dir-rm-dest.sh				\
+  cp/dir-slash.sh				\
+  cp/dir-vs-file.sh				\
+  cp/existing-perm-dir.sh			\
+  cp/existing-perm-race.sh			\
+  cp/fail-perm.sh				\
+  cp/fiemap-empty.sh				\
+  cp/fiemap-perf.sh				\
+  cp/fiemap-2.sh				\
+  cp/file-perm-race.sh				\
+  cp/into-self.sh				\
+  cp/link.sh					\
+  cp/link-no-deref.sh				\
+  cp/link-preserve.sh				\
+  cp/link-symlink.sh				\
+  cp/nfs-removal-race.sh			\
+  cp/no-deref-link1.sh				\
+  cp/no-deref-link2.sh				\
+  cp/no-deref-link3.sh				\
+  cp/parent-perm.sh				\
+  cp/parent-perm-race.sh			\
+  cp/perm.sh					\
+  cp/preserve-2.sh				\
+  cp/preserve-link.sh				\
+  cp/preserve-slink-time.sh			\
+  cp/proc-short-read.sh				\
+  cp/proc-zero-len.sh				\
+  cp/r-vs-symlink.sh				\
+  cp/reflink-auto.sh				\
+  cp/reflink-perm.sh				\
+  cp/same-file.sh				\
+  cp/slink-2-slink.sh				\
+  cp/sparse.sh					\
+  cp/sparse-to-pipe.sh				\
+  cp/special-f.sh				\
+  cp/src-base-dot.sh				\
+  cp/symlink-slash.sh				\
+  cp/thru-dangling.sh				\
+  df/header.sh					\
+  df/df-P.sh					\
+  df/unreadable.sh				\
+  df/total-unprocessed.sh			\
+  df/no-mtab-status.sh				\
+  dd/direct.sh					\
+  dd/misc.sh					\
+  dd/nocache.sh					\
+  dd/not-rewound.sh				\
+  dd/reblock.sh					\
+  dd/skip-seek.pl				\
+  dd/skip-seek2.sh				\
+  dd/bytes.sh					\
+  dd/skip-seek-past-file.sh			\
+  dd/sparse.sh					\
+  dd/stderr.sh					\
+  dd/unblock.pl					\
+  dd/unblock-sync.sh				\
+  df/total-verify.sh				\
+  du/2g.sh					\
+  du/8gb.sh					\
+  du/basic.sh					\
+  du/bigtime.sh					\
+  du/deref.sh					\
+  du/deref-args.sh				\
+  du/exclude.sh					\
+  du/fd-leak.sh					\
+  du/files0-from.pl				\
+  du/files0-from-dir.sh				\
+  du/hard-link.sh				\
+  du/inacc-dest.sh				\
+  du/inacc-dir.sh				\
+  du/inaccessible-cwd.sh			\
+  du/long-from-unreadable.sh			\
+  du/long-sloop.sh				\
+  du/max-depth.sh				\
+  du/move-dir-while-traversing.sh		\
+  du/no-deref.sh				\
+  du/no-x.sh					\
+  du/one-file-system.sh				\
+  du/restore-wd.sh				\
+  du/slash.sh					\
+  du/slink.sh					\
+  du/trailing-slash.sh				\
+  du/two-args.sh				\
+  id/gnu-zero-uids.sh				\
+  id/no-context.sh				\
+  install/basic-1.sh				\
+  install/create-leading.sh			\
+  install/d-slashdot.sh				\
+  install/install-C.sh				\
+  install/install-C-selinux.sh			\
+  install/strip-program.sh			\
+  install/trap.sh				\
+  ln/backup-1.sh				\
+  ln/hard-backup.sh				\
+  ln/hard-to-sym.sh				\
+  ln/misc.sh					\
+  ln/relative.sh				\
+  ln/sf-1.sh					\
+  ln/slash-decorated-nonexistent-dest.sh	\
+  ln/target-1.sh				\
+  ls/abmon-align.sh				\
+  ls/block-size.sh				\
+  ls/color-clear-to-eol.sh			\
+  ls/color-dtype-dir.sh				\
+  ls/color-norm.sh				\
+  ls/dangle.sh					\
+  ls/dired.sh					\
+  ls/file-type.sh				\
+  ls/follow-slink.sh				\
+  ls/getxattr-speedup.sh			\
+  ls/infloop.sh					\
+  ls/inode.sh					\
+  ls/m-option.sh				\
+  ls/multihardlink.sh				\
+  ls/no-arg.sh					\
+  ls/no-cap.sh					\
+  ls/proc-selinux-segfault.sh			\
+  ls/readdir-mountpoint-inode.sh		\
+  ls/recursive.sh				\
+  ls/root-rel-symlink-color.sh			\
+  ls/rt-1.sh					\
+  ls/slink-acl.sh				\
+  ls/stat-dtype.sh				\
+  ls/stat-failed.sh				\
+  ls/stat-free-color.sh				\
+  ls/stat-free-symlinks.sh			\
+  ls/stat-vs-dirent.sh				\
+  ls/symlink-slash.sh				\
+  ls/time-style-diag.sh				\
+  ls/x-option.sh				\
+  mkdir/p-1.sh					\
+  mkdir/p-2.sh					\
+  mkdir/p-3.sh					\
+  mkdir/p-slashdot.sh				\
+  mkdir/p-thru-slink.sh				\
+  mkdir/p-v.sh					\
+  mkdir/parents.sh				\
+  mkdir/perm.sh					\
+  mkdir/selinux.sh				\
+  mkdir/special-1.sh				\
+  mkdir/t-slash.sh				\
+  mv/acl.sh					\
+  mv/atomic.sh					\
+  mv/atomic2.sh					\
+  mv/backup-dir.sh				\
+  mv/backup-is-src.sh				\
+  mv/childproof.sh				\
+  mv/diag.sh					\
+  mv/dir-file.sh				\
+  mv/dir2dir.sh					\
+  mv/dup-source.sh				\
+  mv/force.sh					\
+  mv/hard-2.sh					\
+  mv/hard-3.sh					\
+  mv/hard-4.sh					\
+  mv/hard-link-1.sh				\
+  mv/hard-verbose.sh				\
+  mv/i-1.pl					\
+  mv/i-2.sh					\
+  mv/i-3.sh					\
+  mv/i-4.sh					\
+  mv/i-5.sh					\
+  mv/i-link-no.sh				\
+  mv/into-self.sh				\
+  mv/into-self-2.sh				\
+  mv/into-self-3.sh				\
+  mv/into-self-4.sh				\
+  mv/leak-fd.sh					\
+  mv/mv-n.sh					\
+  mv/mv-special-1.sh				\
+  mv/no-target-dir.sh				\
+  mv/part-fail.sh				\
+  mv/part-hardlink.sh				\
+  mv/part-rename.sh				\
+  mv/part-symlink.sh				\
+  mv/partition-perm.sh				\
+  mv/perm-1.sh					\
+  mv/symlink-onto-hardlink.sh			\
+  mv/symlink-onto-hardlink-to-self.sh		\
+  mv/to-symlink.sh				\
+  mv/trailing-slash.sh				\
+  mv/update.sh					\
+  readlink/can-e.sh				\
+  readlink/can-f.sh				\
+  readlink/can-m.sh				\
+  readlink/rl-1.sh				\
+  rmdir/fail-perm.sh				\
+  rmdir/ignore.sh				\
+  rmdir/t-slash.sh				\
+  tail-2/assert-2.sh				\
+  tail-2/big-4gb.sh				\
+  tail-2/flush-initial.sh			\
+  tail-2/follow-name.sh				\
+  tail-2/follow-stdin.sh			\
+  tail-2/pipe-f.sh				\
+  tail-2/pipe-f2.sh				\
+  tail-2/proc-ksyms.sh				\
+  tail-2/start-middle.sh			\
+  touch/60-seconds.sh				\
+  touch/dangling-symlink.sh			\
+  touch/dir-1.sh				\
+  touch/fail-diag.sh				\
+  touch/fifo.sh					\
+  touch/no-create-missing.sh			\
+  touch/no-dereference.sh			\
+  touch/no-rights.sh				\
+  touch/not-owner.sh				\
+  touch/obsolescent.sh				\
+  touch/read-only.sh				\
+  touch/relative.sh				\
+  touch/trailing-slash.sh			\
   $(root_tests)
 
 pr_data =					\
diff --git a/tests/chgrp/basic b/tests/chgrp/basic.sh
similarity index 100%
rename from tests/chgrp/basic
rename to tests/chgrp/basic.sh
diff --git a/tests/chgrp/default-no-deref b/tests/chgrp/default-no-deref.sh
similarity index 100%
rename from tests/chgrp/default-no-deref
rename to tests/chgrp/default-no-deref.sh
diff --git a/tests/chgrp/deref b/tests/chgrp/deref.sh
similarity index 100%
rename from tests/chgrp/deref
rename to tests/chgrp/deref.sh
diff --git a/tests/chgrp/no-x b/tests/chgrp/no-x.sh
similarity index 100%
rename from tests/chgrp/no-x
rename to tests/chgrp/no-x.sh
diff --git a/tests/chgrp/posix-H b/tests/chgrp/posix-H.sh
similarity index 100%
rename from tests/chgrp/posix-H
rename to tests/chgrp/posix-H.sh
diff --git a/tests/chgrp/recurse b/tests/chgrp/recurse.sh
similarity index 100%
rename from tests/chgrp/recurse
rename to tests/chgrp/recurse.sh
diff --git a/tests/chmod/c-option b/tests/chmod/c-option.sh
similarity index 100%
rename from tests/chmod/c-option
rename to tests/chmod/c-option.sh
diff --git a/tests/chmod/equal-x b/tests/chmod/equal-x.sh
similarity index 100%
rename from tests/chmod/equal-x
rename to tests/chmod/equal-x.sh
diff --git a/tests/chmod/equals b/tests/chmod/equals.sh
similarity index 100%
rename from tests/chmod/equals
rename to tests/chmod/equals.sh
diff --git a/tests/chmod/inaccessible b/tests/chmod/inaccessible.sh
similarity index 100%
rename from tests/chmod/inaccessible
rename to tests/chmod/inaccessible.sh
diff --git a/tests/chmod/no-x b/tests/chmod/no-x.sh
similarity index 100%
rename from tests/chmod/no-x
rename to tests/chmod/no-x.sh
diff --git a/tests/chmod/octal b/tests/chmod/octal.sh
similarity index 100%
rename from tests/chmod/octal
rename to tests/chmod/octal.sh
diff --git a/tests/chmod/setgid b/tests/chmod/setgid.sh
similarity index 100%
rename from tests/chmod/setgid
rename to tests/chmod/setgid.sh
diff --git a/tests/chmod/silent b/tests/chmod/silent.sh
similarity index 100%
rename from tests/chmod/silent
rename to tests/chmod/silent.sh
diff --git a/tests/chmod/thru-dangling b/tests/chmod/thru-dangling.sh
similarity index 100%
rename from tests/chmod/thru-dangling
rename to tests/chmod/thru-dangling.sh
diff --git a/tests/chmod/umask-x b/tests/chmod/umask-x.sh
similarity index 100%
rename from tests/chmod/umask-x
rename to tests/chmod/umask-x.sh
diff --git a/tests/chmod/usage b/tests/chmod/usage.sh
similarity index 100%
rename from tests/chmod/usage
rename to tests/chmod/usage.sh
diff --git a/tests/chown/basic b/tests/chown/basic.sh
similarity index 100%
rename from tests/chown/basic
rename to tests/chown/basic.sh
diff --git a/tests/chown/deref b/tests/chown/deref.sh
similarity index 100%
rename from tests/chown/deref
rename to tests/chown/deref.sh
diff --git a/tests/chown/preserve-root b/tests/chown/preserve-root.sh
similarity index 100%
rename from tests/chown/preserve-root
rename to tests/chown/preserve-root.sh
diff --git a/tests/chown/separator b/tests/chown/separator.sh
similarity index 100%
rename from tests/chown/separator
rename to tests/chown/separator.sh
diff --git a/tests/cp/abuse b/tests/cp/abuse.sh
similarity index 100%
rename from tests/cp/abuse
rename to tests/cp/abuse.sh
diff --git a/tests/cp/acl b/tests/cp/acl.sh
similarity index 100%
rename from tests/cp/acl
rename to tests/cp/acl.sh
diff --git a/tests/cp/attr-existing b/tests/cp/attr-existing.sh
similarity index 100%
rename from tests/cp/attr-existing
rename to tests/cp/attr-existing.sh
diff --git a/tests/cp/backup-1 b/tests/cp/backup-1.sh
similarity index 100%
rename from tests/cp/backup-1
rename to tests/cp/backup-1.sh
diff --git a/tests/cp/backup-dir b/tests/cp/backup-dir.sh
similarity index 100%
rename from tests/cp/backup-dir
rename to tests/cp/backup-dir.sh
diff --git a/tests/cp/backup-is-src b/tests/cp/backup-is-src.sh
similarity index 100%
rename from tests/cp/backup-is-src
rename to tests/cp/backup-is-src.sh
diff --git a/tests/cp/capability b/tests/cp/capability.sh
similarity index 100%
rename from tests/cp/capability
rename to tests/cp/capability.sh
diff --git a/tests/cp/cp-HL b/tests/cp/cp-HL.sh
similarity index 100%
rename from tests/cp/cp-HL
rename to tests/cp/cp-HL.sh
diff --git a/tests/cp/cp-a-selinux b/tests/cp/cp-a-selinux.sh
similarity index 100%
rename from tests/cp/cp-a-selinux
rename to tests/cp/cp-a-selinux.sh
diff --git a/tests/cp/cp-deref b/tests/cp/cp-deref.sh
similarity index 100%
rename from tests/cp/cp-deref
rename to tests/cp/cp-deref.sh
diff --git a/tests/cp/cp-i b/tests/cp/cp-i.sh
similarity index 100%
rename from tests/cp/cp-i
rename to tests/cp/cp-i.sh
diff --git a/tests/cp/cp-mv-backup b/tests/cp/cp-mv-backup.sh
similarity index 100%
rename from tests/cp/cp-mv-backup
rename to tests/cp/cp-mv-backup.sh
diff --git a/tests/cp/cp-mv-enotsup-xattr b/tests/cp/cp-mv-enotsup-xattr.sh
similarity index 100%
rename from tests/cp/cp-mv-enotsup-xattr
rename to tests/cp/cp-mv-enotsup-xattr.sh
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents.sh
similarity index 100%
rename from tests/cp/cp-parents
rename to tests/cp/cp-parents.sh
diff --git a/tests/cp/deref-slink b/tests/cp/deref-slink.sh
similarity index 100%
rename from tests/cp/deref-slink
rename to tests/cp/deref-slink.sh
diff --git a/tests/cp/dir-rm-dest b/tests/cp/dir-rm-dest.sh
similarity index 100%
rename from tests/cp/dir-rm-dest
rename to tests/cp/dir-rm-dest.sh
diff --git a/tests/cp/dir-slash b/tests/cp/dir-slash.sh
similarity index 100%
rename from tests/cp/dir-slash
rename to tests/cp/dir-slash.sh
diff --git a/tests/cp/dir-vs-file b/tests/cp/dir-vs-file.sh
similarity index 100%
rename from tests/cp/dir-vs-file
rename to tests/cp/dir-vs-file.sh
diff --git a/tests/cp/existing-perm-dir b/tests/cp/existing-perm-dir.sh
similarity index 100%
rename from tests/cp/existing-perm-dir
rename to tests/cp/existing-perm-dir.sh
diff --git a/tests/cp/existing-perm-race b/tests/cp/existing-perm-race.sh
similarity index 100%
rename from tests/cp/existing-perm-race
rename to tests/cp/existing-perm-race.sh
diff --git a/tests/cp/fail-perm b/tests/cp/fail-perm.sh
similarity index 100%
rename from tests/cp/fail-perm
rename to tests/cp/fail-perm.sh
diff --git a/tests/cp/fiemap-2 b/tests/cp/fiemap-2.sh
similarity index 100%
rename from tests/cp/fiemap-2
rename to tests/cp/fiemap-2.sh
diff --git a/tests/cp/fiemap-empty b/tests/cp/fiemap-empty.sh
similarity index 100%
rename from tests/cp/fiemap-empty
rename to tests/cp/fiemap-empty.sh
diff --git a/tests/cp/fiemap-perf b/tests/cp/fiemap-perf.sh
similarity index 100%
rename from tests/cp/fiemap-perf
rename to tests/cp/fiemap-perf.sh
diff --git a/tests/cp/file-perm-race b/tests/cp/file-perm-race.sh
similarity index 100%
rename from tests/cp/file-perm-race
rename to tests/cp/file-perm-race.sh
diff --git a/tests/cp/into-self b/tests/cp/into-self.sh
similarity index 100%
rename from tests/cp/into-self
rename to tests/cp/into-self.sh
diff --git a/tests/cp/link-heap b/tests/cp/link-heap.sh
similarity index 100%
rename from tests/cp/link-heap
rename to tests/cp/link-heap.sh
diff --git a/tests/cp/link-no-deref b/tests/cp/link-no-deref.sh
similarity index 100%
rename from tests/cp/link-no-deref
rename to tests/cp/link-no-deref.sh
diff --git a/tests/cp/link-preserve b/tests/cp/link-preserve.sh
similarity index 100%
rename from tests/cp/link-preserve
rename to tests/cp/link-preserve.sh
diff --git a/tests/cp/link-symlink b/tests/cp/link-symlink.sh
similarity index 100%
rename from tests/cp/link-symlink
rename to tests/cp/link-symlink.sh
diff --git a/tests/cp/link b/tests/cp/link.sh
similarity index 100%
rename from tests/cp/link
rename to tests/cp/link.sh
diff --git a/tests/cp/nfs-removal-race b/tests/cp/nfs-removal-race.sh
similarity index 100%
rename from tests/cp/nfs-removal-race
rename to tests/cp/nfs-removal-race.sh
diff --git a/tests/cp/no-deref-link1 b/tests/cp/no-deref-link1.sh
similarity index 100%
rename from tests/cp/no-deref-link1
rename to tests/cp/no-deref-link1.sh
diff --git a/tests/cp/no-deref-link2 b/tests/cp/no-deref-link2.sh
similarity index 100%
rename from tests/cp/no-deref-link2
rename to tests/cp/no-deref-link2.sh
diff --git a/tests/cp/no-deref-link3 b/tests/cp/no-deref-link3.sh
similarity index 100%
rename from tests/cp/no-deref-link3
rename to tests/cp/no-deref-link3.sh
diff --git a/tests/cp/parent-perm-race b/tests/cp/parent-perm-race.sh
similarity index 100%
rename from tests/cp/parent-perm-race
rename to tests/cp/parent-perm-race.sh
diff --git a/tests/cp/parent-perm b/tests/cp/parent-perm.sh
similarity index 100%
rename from tests/cp/parent-perm
rename to tests/cp/parent-perm.sh
diff --git a/tests/cp/perm b/tests/cp/perm.sh
similarity index 100%
rename from tests/cp/perm
rename to tests/cp/perm.sh
diff --git a/tests/cp/preserve-2 b/tests/cp/preserve-2.sh
similarity index 100%
rename from tests/cp/preserve-2
rename to tests/cp/preserve-2.sh
diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid.sh
similarity index 100%
rename from tests/cp/preserve-gid
rename to tests/cp/preserve-gid.sh
diff --git a/tests/cp/preserve-link b/tests/cp/preserve-link.sh
similarity index 100%
rename from tests/cp/preserve-link
rename to tests/cp/preserve-link.sh
diff --git a/tests/cp/preserve-slink-time b/tests/cp/preserve-slink-time.sh
similarity index 100%
rename from tests/cp/preserve-slink-time
rename to tests/cp/preserve-slink-time.sh
diff --git a/tests/cp/proc-short-read b/tests/cp/proc-short-read.sh
similarity index 100%
rename from tests/cp/proc-short-read
rename to tests/cp/proc-short-read.sh
diff --git a/tests/cp/proc-zero-len b/tests/cp/proc-zero-len.sh
similarity index 100%
rename from tests/cp/proc-zero-len
rename to tests/cp/proc-zero-len.sh
diff --git a/tests/cp/r-vs-symlink b/tests/cp/r-vs-symlink.sh
similarity index 100%
rename from tests/cp/r-vs-symlink
rename to tests/cp/r-vs-symlink.sh
diff --git a/tests/cp/reflink-auto b/tests/cp/reflink-auto.sh
similarity index 100%
rename from tests/cp/reflink-auto
rename to tests/cp/reflink-auto.sh
diff --git a/tests/cp/reflink-perm b/tests/cp/reflink-perm.sh
similarity index 100%
rename from tests/cp/reflink-perm
rename to tests/cp/reflink-perm.sh
diff --git a/tests/cp/same-file b/tests/cp/same-file.sh
similarity index 100%
rename from tests/cp/same-file
rename to tests/cp/same-file.sh
diff --git a/tests/cp/slink-2-slink b/tests/cp/slink-2-slink.sh
similarity index 100%
rename from tests/cp/slink-2-slink
rename to tests/cp/slink-2-slink.sh
diff --git a/tests/cp/sparse-fiemap b/tests/cp/sparse-fiemap.sh
similarity index 100%
rename from tests/cp/sparse-fiemap
rename to tests/cp/sparse-fiemap.sh
diff --git a/tests/cp/sparse-to-pipe b/tests/cp/sparse-to-pipe.sh
similarity index 100%
rename from tests/cp/sparse-to-pipe
rename to tests/cp/sparse-to-pipe.sh
diff --git a/tests/cp/sparse b/tests/cp/sparse.sh
similarity index 100%
rename from tests/cp/sparse
rename to tests/cp/sparse.sh
diff --git a/tests/cp/special-bits b/tests/cp/special-bits.sh
similarity index 100%
rename from tests/cp/special-bits
rename to tests/cp/special-bits.sh
diff --git a/tests/cp/special-f b/tests/cp/special-f.sh
similarity index 100%
rename from tests/cp/special-f
rename to tests/cp/special-f.sh
diff --git a/tests/cp/src-base-dot b/tests/cp/src-base-dot.sh
similarity index 100%
rename from tests/cp/src-base-dot
rename to tests/cp/src-base-dot.sh
diff --git a/tests/cp/symlink-slash b/tests/cp/symlink-slash.sh
similarity index 100%
rename from tests/cp/symlink-slash
rename to tests/cp/symlink-slash.sh
diff --git a/tests/cp/thru-dangling b/tests/cp/thru-dangling.sh
similarity index 100%
rename from tests/cp/thru-dangling
rename to tests/cp/thru-dangling.sh
diff --git a/tests/dd/bytes b/tests/dd/bytes.sh
similarity index 100%
rename from tests/dd/bytes
rename to tests/dd/bytes.sh
diff --git a/tests/dd/direct b/tests/dd/direct.sh
similarity index 100%
rename from tests/dd/direct
rename to tests/dd/direct.sh
diff --git a/tests/dd/misc b/tests/dd/misc.sh
similarity index 100%
rename from tests/dd/misc
rename to tests/dd/misc.sh
diff --git a/tests/dd/nocache b/tests/dd/nocache.sh
similarity index 100%
rename from tests/dd/nocache
rename to tests/dd/nocache.sh
diff --git a/tests/dd/not-rewound b/tests/dd/not-rewound.sh
similarity index 100%
rename from tests/dd/not-rewound
rename to tests/dd/not-rewound.sh
diff --git a/tests/dd/reblock b/tests/dd/reblock.sh
similarity index 100%
rename from tests/dd/reblock
rename to tests/dd/reblock.sh
diff --git a/tests/dd/skip-seek-past-dev b/tests/dd/skip-seek-past-dev.sh
similarity index 100%
rename from tests/dd/skip-seek-past-dev
rename to tests/dd/skip-seek-past-dev.sh
diff --git a/tests/dd/skip-seek-past-file b/tests/dd/skip-seek-past-file.sh
similarity index 100%
rename from tests/dd/skip-seek-past-file
rename to tests/dd/skip-seek-past-file.sh
diff --git a/tests/dd/skip-seek b/tests/dd/skip-seek.pl
similarity index 100%
rename from tests/dd/skip-seek
rename to tests/dd/skip-seek.pl
diff --git a/tests/dd/skip-seek2 b/tests/dd/skip-seek2.sh
similarity index 100%
rename from tests/dd/skip-seek2
rename to tests/dd/skip-seek2.sh
diff --git a/tests/dd/sparse b/tests/dd/sparse.sh
similarity index 100%
rename from tests/dd/sparse
rename to tests/dd/sparse.sh
diff --git a/tests/dd/stderr b/tests/dd/stderr.sh
similarity index 100%
rename from tests/dd/stderr
rename to tests/dd/stderr.sh
diff --git a/tests/dd/unblock-sync b/tests/dd/unblock-sync.sh
similarity index 100%
rename from tests/dd/unblock-sync
rename to tests/dd/unblock-sync.sh
diff --git a/tests/dd/unblock b/tests/dd/unblock.pl
similarity index 100%
rename from tests/dd/unblock
rename to tests/dd/unblock.pl
diff --git a/tests/df/df-P b/tests/df/df-P.sh
similarity index 100%
rename from tests/df/df-P
rename to tests/df/df-P.sh
diff --git a/tests/df/header b/tests/df/header.sh
similarity index 100%
rename from tests/df/header
rename to tests/df/header.sh
diff --git a/tests/df/no-mtab-status b/tests/df/no-mtab-status.sh
similarity index 100%
rename from tests/df/no-mtab-status
rename to tests/df/no-mtab-status.sh
diff --git a/tests/df/problematic-chars b/tests/df/problematic-chars.sh
similarity index 100%
rename from tests/df/problematic-chars
rename to tests/df/problematic-chars.sh
diff --git a/tests/df/total-unprocessed b/tests/df/total-unprocessed.sh
similarity index 100%
rename from tests/df/total-unprocessed
rename to tests/df/total-unprocessed.sh
diff --git a/tests/df/total-verify b/tests/df/total-verify.sh
similarity index 100%
rename from tests/df/total-verify
rename to tests/df/total-verify.sh
diff --git a/tests/df/unreadable b/tests/df/unreadable.sh
similarity index 100%
rename from tests/df/unreadable
rename to tests/df/unreadable.sh
diff --git a/tests/du/2g b/tests/du/2g.sh
similarity index 100%
rename from tests/du/2g
rename to tests/du/2g.sh
diff --git a/tests/du/8gb b/tests/du/8gb.sh
similarity index 100%
rename from tests/du/8gb
rename to tests/du/8gb.sh
diff --git a/tests/du/basic b/tests/du/basic.sh
similarity index 100%
rename from tests/du/basic
rename to tests/du/basic.sh
diff --git a/tests/du/bigtime b/tests/du/bigtime.sh
similarity index 100%
rename from tests/du/bigtime
rename to tests/du/bigtime.sh
diff --git a/tests/du/bind-mount-dir-cycle b/tests/du/bind-mount-dir-cycle.sh
similarity index 100%
rename from tests/du/bind-mount-dir-cycle
rename to tests/du/bind-mount-dir-cycle.sh
diff --git a/tests/du/deref-args b/tests/du/deref-args.sh
similarity index 100%
rename from tests/du/deref-args
rename to tests/du/deref-args.sh
diff --git a/tests/du/deref b/tests/du/deref.sh
similarity index 100%
rename from tests/du/deref
rename to tests/du/deref.sh
diff --git a/tests/du/exclude b/tests/du/exclude.sh
similarity index 100%
rename from tests/du/exclude
rename to tests/du/exclude.sh
diff --git a/tests/du/fd-leak b/tests/du/fd-leak.sh
similarity index 100%
rename from tests/du/fd-leak
rename to tests/du/fd-leak.sh
diff --git a/tests/du/files0-from-dir b/tests/du/files0-from-dir.sh
similarity index 100%
rename from tests/du/files0-from-dir
rename to tests/du/files0-from-dir.sh
diff --git a/tests/du/files0-from b/tests/du/files0-from.pl
similarity index 100%
rename from tests/du/files0-from
rename to tests/du/files0-from.pl
diff --git a/tests/du/hard-link b/tests/du/hard-link.sh
similarity index 100%
rename from tests/du/hard-link
rename to tests/du/hard-link.sh
diff --git a/tests/du/inacc-dest b/tests/du/inacc-dest.sh
similarity index 100%
rename from tests/du/inacc-dest
rename to tests/du/inacc-dest.sh
diff --git a/tests/du/inacc-dir b/tests/du/inacc-dir.sh
similarity index 100%
rename from tests/du/inacc-dir
rename to tests/du/inacc-dir.sh
diff --git a/tests/du/inaccessible-cwd b/tests/du/inaccessible-cwd.sh
similarity index 100%
rename from tests/du/inaccessible-cwd
rename to tests/du/inaccessible-cwd.sh
diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable.sh
similarity index 100%
rename from tests/du/long-from-unreadable
rename to tests/du/long-from-unreadable.sh
diff --git a/tests/du/long-sloop b/tests/du/long-sloop.sh
similarity index 100%
rename from tests/du/long-sloop
rename to tests/du/long-sloop.sh
diff --git a/tests/du/max-depth b/tests/du/max-depth.sh
similarity index 100%
rename from tests/du/max-depth
rename to tests/du/max-depth.sh
diff --git a/tests/du/move-dir-while-traversing b/tests/du/move-dir-while-traversing.sh
similarity index 100%
rename from tests/du/move-dir-while-traversing
rename to tests/du/move-dir-while-traversing.sh
diff --git a/tests/du/no-deref b/tests/du/no-deref.sh
similarity index 100%
rename from tests/du/no-deref
rename to tests/du/no-deref.sh
diff --git a/tests/du/no-x b/tests/du/no-x.sh
similarity index 100%
rename from tests/du/no-x
rename to tests/du/no-x.sh
diff --git a/tests/du/one-file-system b/tests/du/one-file-system.sh
similarity index 100%
rename from tests/du/one-file-system
rename to tests/du/one-file-system.sh
diff --git a/tests/du/restore-wd b/tests/du/restore-wd.sh
similarity index 100%
rename from tests/du/restore-wd
rename to tests/du/restore-wd.sh
diff --git a/tests/du/slash b/tests/du/slash.sh
similarity index 100%
rename from tests/du/slash
rename to tests/du/slash.sh
diff --git a/tests/du/slink b/tests/du/slink.sh
similarity index 100%
rename from tests/du/slink
rename to tests/du/slink.sh
diff --git a/tests/du/trailing-slash b/tests/du/trailing-slash.sh
similarity index 100%
rename from tests/du/trailing-slash
rename to tests/du/trailing-slash.sh
diff --git a/tests/du/two-args b/tests/du/two-args.sh
similarity index 100%
rename from tests/du/two-args
rename to tests/du/two-args.sh
diff --git a/tests/fmt/base b/tests/fmt/base.pl
similarity index 100%
rename from tests/fmt/base
rename to tests/fmt/base.pl
diff --git a/tests/fmt/goal-option b/tests/fmt/goal-option.sh
similarity index 100%
rename from tests/fmt/goal-option
rename to tests/fmt/goal-option.sh
diff --git a/tests/fmt/long-line b/tests/fmt/long-line.sh
similarity index 100%
rename from tests/fmt/long-line
rename to tests/fmt/long-line.sh
diff --git a/tests/id/gnu-zero-uids b/tests/id/gnu-zero-uids.sh
similarity index 100%
rename from tests/id/gnu-zero-uids
rename to tests/id/gnu-zero-uids.sh
diff --git a/tests/id/no-context b/tests/id/no-context.sh
similarity index 100%
rename from tests/id/no-context
rename to tests/id/no-context.sh
diff --git a/tests/install/basic-1 b/tests/install/basic-1.sh
similarity index 100%
rename from tests/install/basic-1
rename to tests/install/basic-1.sh
diff --git a/tests/install/create-leading b/tests/install/create-leading.sh
similarity index 100%
rename from tests/install/create-leading
rename to tests/install/create-leading.sh
diff --git a/tests/install/d-slashdot b/tests/install/d-slashdot.sh
similarity index 100%
rename from tests/install/d-slashdot
rename to tests/install/d-slashdot.sh
diff --git a/tests/install/install-C-root b/tests/install/install-C-root.sh
similarity index 100%
rename from tests/install/install-C-root
rename to tests/install/install-C-root.sh
diff --git a/tests/install/install-C-selinux b/tests/install/install-C-selinux.sh
similarity index 100%
rename from tests/install/install-C-selinux
rename to tests/install/install-C-selinux.sh
diff --git a/tests/install/install-C b/tests/install/install-C.sh
similarity index 100%
rename from tests/install/install-C
rename to tests/install/install-C.sh
diff --git a/tests/install/strip-program b/tests/install/strip-program.sh
similarity index 100%
rename from tests/install/strip-program
rename to tests/install/strip-program.sh
diff --git a/tests/install/trap b/tests/install/trap.sh
similarity index 100%
rename from tests/install/trap
rename to tests/install/trap.sh
diff --git a/tests/ln/backup-1 b/tests/ln/backup-1.sh
similarity index 100%
rename from tests/ln/backup-1
rename to tests/ln/backup-1.sh
diff --git a/tests/ln/hard-backup b/tests/ln/hard-backup.sh
similarity index 100%
rename from tests/ln/hard-backup
rename to tests/ln/hard-backup.sh
diff --git a/tests/ln/hard-to-sym b/tests/ln/hard-to-sym.sh
similarity index 100%
rename from tests/ln/hard-to-sym
rename to tests/ln/hard-to-sym.sh
diff --git a/tests/ln/misc b/tests/ln/misc.sh
similarity index 100%
rename from tests/ln/misc
rename to tests/ln/misc.sh
diff --git a/tests/ln/relative b/tests/ln/relative.sh
similarity index 100%
rename from tests/ln/relative
rename to tests/ln/relative.sh
diff --git a/tests/ln/sf-1 b/tests/ln/sf-1.sh
similarity index 100%
rename from tests/ln/sf-1
rename to tests/ln/sf-1.sh
diff --git a/tests/ln/slash-decorated-nonexistent-dest b/tests/ln/slash-decorated-nonexistent-dest.sh
similarity index 100%
rename from tests/ln/slash-decorated-nonexistent-dest
rename to tests/ln/slash-decorated-nonexistent-dest.sh
diff --git a/tests/ln/target-1 b/tests/ln/target-1.sh
similarity index 100%
rename from tests/ln/target-1
rename to tests/ln/target-1.sh
diff --git a/tests/ls/abmon-align b/tests/ls/abmon-align.sh
similarity index 100%
rename from tests/ls/abmon-align
rename to tests/ls/abmon-align.sh
diff --git a/tests/ls/block-size b/tests/ls/block-size.sh
similarity index 100%
rename from tests/ls/block-size
rename to tests/ls/block-size.sh
diff --git a/tests/ls/capability b/tests/ls/capability.sh
similarity index 100%
rename from tests/ls/capability
rename to tests/ls/capability.sh
diff --git a/tests/ls/color-clear-to-eol b/tests/ls/color-clear-to-eol.sh
similarity index 100%
rename from tests/ls/color-clear-to-eol
rename to tests/ls/color-clear-to-eol.sh
diff --git a/tests/ls/color-dtype-dir b/tests/ls/color-dtype-dir.sh
similarity index 100%
rename from tests/ls/color-dtype-dir
rename to tests/ls/color-dtype-dir.sh
diff --git a/tests/ls/color-norm b/tests/ls/color-norm.sh
similarity index 100%
rename from tests/ls/color-norm
rename to tests/ls/color-norm.sh
diff --git a/tests/ls/dangle b/tests/ls/dangle.sh
similarity index 100%
rename from tests/ls/dangle
rename to tests/ls/dangle.sh
diff --git a/tests/ls/dired b/tests/ls/dired.sh
similarity index 100%
rename from tests/ls/dired
rename to tests/ls/dired.sh
diff --git a/tests/ls/file-type b/tests/ls/file-type.sh
similarity index 100%
rename from tests/ls/file-type
rename to tests/ls/file-type.sh
diff --git a/tests/ls/follow-slink b/tests/ls/follow-slink.sh
similarity index 100%
rename from tests/ls/follow-slink
rename to tests/ls/follow-slink.sh
diff --git a/tests/ls/getxattr-speedup b/tests/ls/getxattr-speedup.sh
similarity index 100%
rename from tests/ls/getxattr-speedup
rename to tests/ls/getxattr-speedup.sh
diff --git a/tests/ls/infloop b/tests/ls/infloop.sh
similarity index 100%
rename from tests/ls/infloop
rename to tests/ls/infloop.sh
diff --git a/tests/ls/inode b/tests/ls/inode.sh
similarity index 100%
rename from tests/ls/inode
rename to tests/ls/inode.sh
diff --git a/tests/ls/m-option b/tests/ls/m-option.sh
similarity index 100%
rename from tests/ls/m-option
rename to tests/ls/m-option.sh
diff --git a/tests/ls/multihardlink b/tests/ls/multihardlink.sh
similarity index 100%
rename from tests/ls/multihardlink
rename to tests/ls/multihardlink.sh
diff --git a/tests/ls/nameless-uid b/tests/ls/nameless-uid.sh
similarity index 100%
rename from tests/ls/nameless-uid
rename to tests/ls/nameless-uid.sh
diff --git a/tests/ls/no-arg b/tests/ls/no-arg.sh
similarity index 100%
rename from tests/ls/no-arg
rename to tests/ls/no-arg.sh
diff --git a/tests/ls/no-cap b/tests/ls/no-cap.sh
similarity index 100%
rename from tests/ls/no-cap
rename to tests/ls/no-cap.sh
diff --git a/tests/ls/proc-selinux-segfault b/tests/ls/proc-selinux-segfault.sh
similarity index 100%
rename from tests/ls/proc-selinux-segfault
rename to tests/ls/proc-selinux-segfault.sh
diff --git a/tests/ls/readdir-mountpoint-inode b/tests/ls/readdir-mountpoint-inode.sh
similarity index 100%
rename from tests/ls/readdir-mountpoint-inode
rename to tests/ls/readdir-mountpoint-inode.sh
diff --git a/tests/ls/recursive b/tests/ls/recursive.sh
similarity index 100%
rename from tests/ls/recursive
rename to tests/ls/recursive.sh
diff --git a/tests/ls/root-rel-symlink-color b/tests/ls/root-rel-symlink-color.sh
similarity index 100%
rename from tests/ls/root-rel-symlink-color
rename to tests/ls/root-rel-symlink-color.sh
diff --git a/tests/ls/rt-1 b/tests/ls/rt-1.sh
similarity index 100%
rename from tests/ls/rt-1
rename to tests/ls/rt-1.sh
diff --git a/tests/ls/slink-acl b/tests/ls/slink-acl.sh
similarity index 100%
rename from tests/ls/slink-acl
rename to tests/ls/slink-acl.sh
diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype.sh
similarity index 100%
rename from tests/ls/stat-dtype
rename to tests/ls/stat-dtype.sh
diff --git a/tests/ls/stat-failed b/tests/ls/stat-failed.sh
similarity index 100%
rename from tests/ls/stat-failed
rename to tests/ls/stat-failed.sh
diff --git a/tests/ls/stat-free-color b/tests/ls/stat-free-color.sh
similarity index 100%
rename from tests/ls/stat-free-color
rename to tests/ls/stat-free-color.sh
diff --git a/tests/ls/stat-free-symlinks b/tests/ls/stat-free-symlinks.sh
similarity index 100%
rename from tests/ls/stat-free-symlinks
rename to tests/ls/stat-free-symlinks.sh
diff --git a/tests/ls/stat-vs-dirent b/tests/ls/stat-vs-dirent.sh
similarity index 100%
rename from tests/ls/stat-vs-dirent
rename to tests/ls/stat-vs-dirent.sh
diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash.sh
similarity index 100%
rename from tests/ls/symlink-slash
rename to tests/ls/symlink-slash.sh
diff --git a/tests/ls/time-style-diag b/tests/ls/time-style-diag.sh
similarity index 100%
rename from tests/ls/time-style-diag
rename to tests/ls/time-style-diag.sh
diff --git a/tests/ls/x-option b/tests/ls/x-option.sh
similarity index 100%
rename from tests/ls/x-option
rename to tests/ls/x-option.sh
diff --git a/tests/misc/arch b/tests/misc/arch.sh
similarity index 100%
rename from tests/misc/arch
rename to tests/misc/arch.sh
diff --git a/tests/misc/base64 b/tests/misc/base64.pl
similarity index 100%
rename from tests/misc/base64
rename to tests/misc/base64.pl
diff --git a/tests/misc/basename b/tests/misc/basename.pl
similarity index 100%
rename from tests/misc/basename
rename to tests/misc/basename.pl
diff --git a/tests/misc/cat-buf b/tests/misc/cat-buf.sh
similarity index 100%
rename from tests/misc/cat-buf
rename to tests/misc/cat-buf.sh
diff --git a/tests/misc/cat-proc b/tests/misc/cat-proc.sh
similarity index 100%
rename from tests/misc/cat-proc
rename to tests/misc/cat-proc.sh
diff --git a/tests/misc/chcon-fail b/tests/misc/chcon-fail.sh
similarity index 100%
rename from tests/misc/chcon-fail
rename to tests/misc/chcon-fail.sh
diff --git a/tests/misc/chcon b/tests/misc/chcon.sh
similarity index 100%
rename from tests/misc/chcon
rename to tests/misc/chcon.sh
diff --git a/tests/misc/chroot-credentials b/tests/misc/chroot-credentials.sh
similarity index 100%
rename from tests/misc/chroot-credentials
rename to tests/misc/chroot-credentials.sh
diff --git a/tests/misc/chroot-fail b/tests/misc/chroot-fail.sh
similarity index 100%
rename from tests/misc/chroot-fail
rename to tests/misc/chroot-fail.sh
diff --git a/tests/misc/close-stdout b/tests/misc/close-stdout.sh
similarity index 100%
rename from tests/misc/close-stdout
rename to tests/misc/close-stdout.sh
diff --git a/tests/misc/comm b/tests/misc/comm.pl
similarity index 100%
rename from tests/misc/comm
rename to tests/misc/comm.pl
diff --git a/tests/misc/csplit-1000 b/tests/misc/csplit-1000.sh
similarity index 100%
rename from tests/misc/csplit-1000
rename to tests/misc/csplit-1000.sh
diff --git a/tests/misc/csplit-heap b/tests/misc/csplit-heap.sh
similarity index 100%
rename from tests/misc/csplit-heap
rename to tests/misc/csplit-heap.sh
diff --git a/tests/misc/csplit b/tests/misc/csplit.sh
similarity index 100%
rename from tests/misc/csplit
rename to tests/misc/csplit.sh
diff --git a/tests/misc/cut b/tests/misc/cut.pl
similarity index 100%
rename from tests/misc/cut
rename to tests/misc/cut.pl
diff --git a/tests/misc/date-next-dow b/tests/misc/date-next-dow.pl
similarity index 100%
rename from tests/misc/date-next-dow
rename to tests/misc/date-next-dow.pl
diff --git a/tests/misc/date-sec b/tests/misc/date-sec.sh
similarity index 100%
rename from tests/misc/date-sec
rename to tests/misc/date-sec.sh
diff --git a/tests/misc/date b/tests/misc/date.pl
similarity index 100%
rename from tests/misc/date
rename to tests/misc/date.pl
diff --git a/tests/misc/dircolors b/tests/misc/dircolors.pl
similarity index 100%
rename from tests/misc/dircolors
rename to tests/misc/dircolors.pl
diff --git a/tests/misc/dirname b/tests/misc/dirname.pl
similarity index 100%
rename from tests/misc/dirname
rename to tests/misc/dirname.pl
diff --git a/tests/misc/env-null b/tests/misc/env-null.sh
similarity index 100%
rename from tests/misc/env-null
rename to tests/misc/env-null.sh
diff --git a/tests/misc/env b/tests/misc/env.sh
similarity index 100%
rename from tests/misc/env
rename to tests/misc/env.sh
diff --git a/tests/misc/expand b/tests/misc/expand.pl
similarity index 100%
rename from tests/misc/expand
rename to tests/misc/expand.pl
diff --git a/tests/misc/expr b/tests/misc/expr.pl
similarity index 100%
rename from tests/misc/expr
rename to tests/misc/expr.pl
diff --git a/tests/misc/factor b/tests/misc/factor.pl
similarity index 100%
rename from tests/misc/factor
rename to tests/misc/factor.pl
diff --git a/tests/misc/false-status b/tests/misc/false-status.sh
similarity index 100%
rename from tests/misc/false-status
rename to tests/misc/false-status.sh
diff --git a/tests/misc/fold b/tests/misc/fold.pl
similarity index 100%
rename from tests/misc/fold
rename to tests/misc/fold.pl
diff --git a/tests/misc/groups-dash b/tests/misc/groups-dash.sh
similarity index 100%
rename from tests/misc/groups-dash
rename to tests/misc/groups-dash.sh
diff --git a/tests/misc/groups-version b/tests/misc/groups-version.sh
similarity index 100%
rename from tests/misc/groups-version
rename to tests/misc/groups-version.sh
diff --git a/tests/misc/head-c b/tests/misc/head-c.sh
similarity index 100%
rename from tests/misc/head-c
rename to tests/misc/head-c.sh
diff --git a/tests/misc/head-elide-tail b/tests/misc/head-elide-tail.pl
similarity index 100%
rename from tests/misc/head-elide-tail
rename to tests/misc/head-elide-tail.pl
diff --git a/tests/misc/head-pos b/tests/misc/head-pos.sh
similarity index 100%
rename from tests/misc/head-pos
rename to tests/misc/head-pos.sh
diff --git a/tests/misc/head b/tests/misc/head.pl
similarity index 100%
rename from tests/misc/head
rename to tests/misc/head.pl
diff --git a/tests/misc/help-version b/tests/misc/help-version.sh
similarity index 100%
rename from tests/misc/help-version
rename to tests/misc/help-version.sh
diff --git a/tests/misc/id-context b/tests/misc/id-context.sh
similarity index 100%
rename from tests/misc/id-context
rename to tests/misc/id-context.sh
diff --git a/tests/misc/id-groups b/tests/misc/id-groups.sh
similarity index 100%
rename from tests/misc/id-groups
rename to tests/misc/id-groups.sh
diff --git a/tests/misc/id-setgid b/tests/misc/id-setgid.sh
similarity index 100%
rename from tests/misc/id-setgid
rename to tests/misc/id-setgid.sh
diff --git a/tests/misc/invalid-opt b/tests/misc/invalid-opt.pl
similarity index 100%
rename from tests/misc/invalid-opt
rename to tests/misc/invalid-opt.pl
diff --git a/tests/misc/join b/tests/misc/join.pl
similarity index 100%
rename from tests/misc/join
rename to tests/misc/join.pl
diff --git a/tests/misc/ls-misc b/tests/misc/ls-misc.pl
similarity index 100%
rename from tests/misc/ls-misc
rename to tests/misc/ls-misc.pl
diff --git a/tests/misc/ls-time b/tests/misc/ls-time.sh
similarity index 100%
rename from tests/misc/ls-time
rename to tests/misc/ls-time.sh
diff --git a/tests/misc/md5sum-bsd b/tests/misc/md5sum-bsd.sh
similarity index 100%
rename from tests/misc/md5sum-bsd
rename to tests/misc/md5sum-bsd.sh
diff --git a/tests/misc/md5sum-newline b/tests/misc/md5sum-newline.pl
similarity index 100%
rename from tests/misc/md5sum-newline
rename to tests/misc/md5sum-newline.pl
diff --git a/tests/misc/md5sum-parallel b/tests/misc/md5sum-parallel.sh
similarity index 100%
rename from tests/misc/md5sum-parallel
rename to tests/misc/md5sum-parallel.sh
diff --git a/tests/misc/md5sum b/tests/misc/md5sum.pl
similarity index 100%
rename from tests/misc/md5sum
rename to tests/misc/md5sum.pl
diff --git a/tests/misc/mknod b/tests/misc/mknod.sh
similarity index 100%
rename from tests/misc/mknod
rename to tests/misc/mknod.sh
diff --git a/tests/misc/mktemp b/tests/misc/mktemp.pl
similarity index 100%
rename from tests/misc/mktemp
rename to tests/misc/mktemp.pl
diff --git a/tests/misc/nice-fail b/tests/misc/nice-fail.sh
similarity index 100%
rename from tests/misc/nice-fail
rename to tests/misc/nice-fail.sh
diff --git a/tests/misc/nice b/tests/misc/nice.sh
similarity index 100%
rename from tests/misc/nice
rename to tests/misc/nice.sh
diff --git a/tests/misc/nl b/tests/misc/nl.sh
similarity index 100%
rename from tests/misc/nl
rename to tests/misc/nl.sh
diff --git a/tests/misc/nohup b/tests/misc/nohup.sh
similarity index 100%
rename from tests/misc/nohup
rename to tests/misc/nohup.sh
diff --git a/tests/misc/nproc-avail b/tests/misc/nproc-avail.sh
similarity index 100%
rename from tests/misc/nproc-avail
rename to tests/misc/nproc-avail.sh
diff --git a/tests/misc/nproc-positive b/tests/misc/nproc-positive.sh
similarity index 100%
rename from tests/misc/nproc-positive
rename to tests/misc/nproc-positive.sh
diff --git a/tests/misc/od-N b/tests/misc/od-N.sh
similarity index 100%
rename from tests/misc/od-N
rename to tests/misc/od-N.sh
diff --git a/tests/misc/od-float b/tests/misc/od-float.sh
similarity index 100%
rename from tests/misc/od-float
rename to tests/misc/od-float.sh
diff --git a/tests/misc/od-multiple-t b/tests/misc/od-multiple-t.sh
similarity index 100%
rename from tests/misc/od-multiple-t
rename to tests/misc/od-multiple-t.sh
diff --git a/tests/misc/od-x8 b/tests/misc/od-x8.sh
similarity index 100%
rename from tests/misc/od-x8
rename to tests/misc/od-x8.sh
diff --git a/tests/misc/od b/tests/misc/od.pl
similarity index 100%
rename from tests/misc/od
rename to tests/misc/od.pl
diff --git a/tests/misc/paste b/tests/misc/paste.pl
similarity index 100%
rename from tests/misc/paste
rename to tests/misc/paste.pl
diff --git a/tests/misc/pathchk1 b/tests/misc/pathchk1.sh
similarity index 100%
rename from tests/misc/pathchk1
rename to tests/misc/pathchk1.sh
diff --git a/tests/misc/pr b/tests/misc/pr.pl
similarity index 100%
rename from tests/misc/pr
rename to tests/misc/pr.pl
diff --git a/tests/misc/printenv b/tests/misc/printenv.sh
similarity index 100%
rename from tests/misc/printenv
rename to tests/misc/printenv.sh
diff --git a/tests/misc/printf-cov b/tests/misc/printf-cov.pl
similarity index 100%
rename from tests/misc/printf-cov
rename to tests/misc/printf-cov.pl
diff --git a/tests/misc/printf-hex b/tests/misc/printf-hex.sh
similarity index 100%
rename from tests/misc/printf-hex
rename to tests/misc/printf-hex.sh
diff --git a/tests/misc/printf-surprise b/tests/misc/printf-surprise.sh
similarity index 100%
rename from tests/misc/printf-surprise
rename to tests/misc/printf-surprise.sh
diff --git a/tests/misc/printf b/tests/misc/printf.sh
similarity index 100%
rename from tests/misc/printf
rename to tests/misc/printf.sh
diff --git a/tests/misc/ptx-overrun b/tests/misc/ptx-overrun.sh
similarity index 100%
rename from tests/misc/ptx-overrun
rename to tests/misc/ptx-overrun.sh
diff --git a/tests/misc/ptx b/tests/misc/ptx.pl
similarity index 100%
rename from tests/misc/ptx
rename to tests/misc/ptx.pl
diff --git a/tests/misc/pwd-long b/tests/misc/pwd-long.sh
similarity index 100%
rename from tests/misc/pwd-long
rename to tests/misc/pwd-long.sh
diff --git a/tests/misc/pwd-option b/tests/misc/pwd-option.sh
similarity index 100%
rename from tests/misc/pwd-option
rename to tests/misc/pwd-option.sh
diff --git a/tests/misc/readlink-fp-loop b/tests/misc/readlink-fp-loop.sh
similarity index 100%
rename from tests/misc/readlink-fp-loop
rename to tests/misc/readlink-fp-loop.sh
diff --git a/tests/misc/readlink-root b/tests/misc/readlink-root.sh
similarity index 100%
rename from tests/misc/readlink-root
rename to tests/misc/readlink-root.sh
diff --git a/tests/misc/realpath b/tests/misc/realpath.sh
similarity index 100%
rename from tests/misc/realpath
rename to tests/misc/realpath.sh
diff --git a/tests/misc/runcon-no-reorder b/tests/misc/runcon-no-reorder.sh
similarity index 100%
rename from tests/misc/runcon-no-reorder
rename to tests/misc/runcon-no-reorder.sh
diff --git a/tests/misc/selinux b/tests/misc/selinux.sh
similarity index 100%
rename from tests/misc/selinux
rename to tests/misc/selinux.sh
diff --git a/tests/misc/seq-long-double b/tests/misc/seq-long-double.sh
similarity index 100%
rename from tests/misc/seq-long-double
rename to tests/misc/seq-long-double.sh
diff --git a/tests/misc/seq b/tests/misc/seq.pl
similarity index 100%
rename from tests/misc/seq
rename to tests/misc/seq.pl
diff --git a/tests/misc/sha1sum-vec b/tests/misc/sha1sum-vec.pl
similarity index 100%
rename from tests/misc/sha1sum-vec
rename to tests/misc/sha1sum-vec.pl
diff --git a/tests/misc/sha1sum b/tests/misc/sha1sum.pl
similarity index 100%
rename from tests/misc/sha1sum
rename to tests/misc/sha1sum.pl
diff --git a/tests/misc/sha224sum b/tests/misc/sha224sum.pl
similarity index 100%
rename from tests/misc/sha224sum
rename to tests/misc/sha224sum.pl
diff --git a/tests/misc/sha256sum b/tests/misc/sha256sum.pl
similarity index 100%
rename from tests/misc/sha256sum
rename to tests/misc/sha256sum.pl
diff --git a/tests/misc/sha384sum b/tests/misc/sha384sum.pl
similarity index 100%
rename from tests/misc/sha384sum
rename to tests/misc/sha384sum.pl
diff --git a/tests/misc/sha512sum b/tests/misc/sha512sum.pl
similarity index 100%
rename from tests/misc/sha512sum
rename to tests/misc/sha512sum.pl
diff --git a/tests/misc/shred-exact b/tests/misc/shred-exact.sh
similarity index 100%
rename from tests/misc/shred-exact
rename to tests/misc/shred-exact.sh
diff --git a/tests/misc/shred-passes b/tests/misc/shred-passes.sh
similarity index 100%
rename from tests/misc/shred-passes
rename to tests/misc/shred-passes.sh
diff --git a/tests/misc/shred-remove b/tests/misc/shred-remove.sh
similarity index 100%
rename from tests/misc/shred-remove
rename to tests/misc/shred-remove.sh
diff --git a/tests/misc/shuf b/tests/misc/shuf.sh
similarity index 100%
rename from tests/misc/shuf
rename to tests/misc/shuf.sh
diff --git a/tests/misc/sort-NaN-infloop b/tests/misc/sort-NaN-infloop.sh
similarity index 100%
rename from tests/misc/sort-NaN-infloop
rename to tests/misc/sort-NaN-infloop.sh
diff --git a/tests/misc/sort-benchmark-random b/tests/misc/sort-benchmark-random.sh
similarity index 100%
rename from tests/misc/sort-benchmark-random
rename to tests/misc/sort-benchmark-random.sh
diff --git a/tests/misc/sort-compress-hang b/tests/misc/sort-compress-hang.sh
similarity index 100%
rename from tests/misc/sort-compress-hang
rename to tests/misc/sort-compress-hang.sh
diff --git a/tests/misc/sort-compress-proc b/tests/misc/sort-compress-proc.sh
similarity index 100%
rename from tests/misc/sort-compress-proc
rename to tests/misc/sort-compress-proc.sh
diff --git a/tests/misc/sort-compress b/tests/misc/sort-compress.sh
similarity index 100%
rename from tests/misc/sort-compress
rename to tests/misc/sort-compress.sh
diff --git a/tests/misc/sort-continue b/tests/misc/sort-continue.sh
similarity index 100%
rename from tests/misc/sort-continue
rename to tests/misc/sort-continue.sh
diff --git a/tests/misc/sort-debug-keys b/tests/misc/sort-debug-keys.sh
similarity index 100%
rename from tests/misc/sort-debug-keys
rename to tests/misc/sort-debug-keys.sh
diff --git a/tests/misc/sort-debug-warn b/tests/misc/sort-debug-warn.sh
similarity index 100%
rename from tests/misc/sort-debug-warn
rename to tests/misc/sort-debug-warn.sh
diff --git a/tests/misc/sort-discrim b/tests/misc/sort-discrim.sh
similarity index 100%
rename from tests/misc/sort-discrim
rename to tests/misc/sort-discrim.sh
diff --git a/tests/misc/sort-exit-early b/tests/misc/sort-exit-early.sh
similarity index 100%
rename from tests/misc/sort-exit-early
rename to tests/misc/sort-exit-early.sh
diff --git a/tests/misc/sort-files0-from b/tests/misc/sort-files0-from.pl
similarity index 100%
rename from tests/misc/sort-files0-from
rename to tests/misc/sort-files0-from.pl
diff --git a/tests/misc/sort-float b/tests/misc/sort-float.sh
similarity index 100%
rename from tests/misc/sort-float
rename to tests/misc/sort-float.sh
diff --git a/tests/misc/sort-merge-fdlimit b/tests/misc/sort-merge-fdlimit.sh
similarity index 100%
rename from tests/misc/sort-merge-fdlimit
rename to tests/misc/sort-merge-fdlimit.sh
diff --git a/tests/misc/sort-merge b/tests/misc/sort-merge.pl
similarity index 100%
rename from tests/misc/sort-merge
rename to tests/misc/sort-merge.pl
diff --git a/tests/misc/sort-month b/tests/misc/sort-month.sh
similarity index 100%
rename from tests/misc/sort-month
rename to tests/misc/sort-month.sh
diff --git a/tests/misc/sort-rand b/tests/misc/sort-rand.sh
similarity index 100%
rename from tests/misc/sort-rand
rename to tests/misc/sort-rand.sh
diff --git a/tests/misc/sort-spinlock-abuse b/tests/misc/sort-spinlock-abuse.sh
similarity index 100%
rename from tests/misc/sort-spinlock-abuse
rename to tests/misc/sort-spinlock-abuse.sh
diff --git a/tests/misc/sort-stale-thread-mem b/tests/misc/sort-stale-thread-mem.sh
similarity index 100%
rename from tests/misc/sort-stale-thread-mem
rename to tests/misc/sort-stale-thread-mem.sh
diff --git a/tests/misc/sort-u-FMR b/tests/misc/sort-u-FMR.sh
similarity index 100%
rename from tests/misc/sort-u-FMR
rename to tests/misc/sort-u-FMR.sh
diff --git a/tests/misc/sort-unique-segv b/tests/misc/sort-unique-segv.sh
similarity index 100%
rename from tests/misc/sort-unique-segv
rename to tests/misc/sort-unique-segv.sh
diff --git a/tests/misc/sort-unique b/tests/misc/sort-unique.sh
similarity index 100%
rename from tests/misc/sort-unique
rename to tests/misc/sort-unique.sh
diff --git a/tests/misc/sort-version b/tests/misc/sort-version.sh
similarity index 100%
rename from tests/misc/sort-version
rename to tests/misc/sort-version.sh
diff --git a/tests/misc/sort b/tests/misc/sort.pl
similarity index 100%
rename from tests/misc/sort
rename to tests/misc/sort.pl
diff --git a/tests/misc/stat-birthtime b/tests/misc/stat-birthtime.sh
similarity index 100%
rename from tests/misc/stat-birthtime
rename to tests/misc/stat-birthtime.sh
diff --git a/tests/misc/stat-fmt b/tests/misc/stat-fmt.sh
similarity index 100%
rename from tests/misc/stat-fmt
rename to tests/misc/stat-fmt.sh
diff --git a/tests/misc/stat-hyphen b/tests/misc/stat-hyphen.sh
similarity index 100%
rename from tests/misc/stat-hyphen
rename to tests/misc/stat-hyphen.sh
diff --git a/tests/misc/stat-mount b/tests/misc/stat-mount.sh
similarity index 100%
rename from tests/misc/stat-mount
rename to tests/misc/stat-mount.sh
diff --git a/tests/misc/stat-nanoseconds b/tests/misc/stat-nanoseconds.sh
similarity index 100%
rename from tests/misc/stat-nanoseconds
rename to tests/misc/stat-nanoseconds.sh
diff --git a/tests/misc/stat-printf b/tests/misc/stat-printf.pl
similarity index 100%
rename from tests/misc/stat-printf
rename to tests/misc/stat-printf.pl
diff --git a/tests/misc/stat-slash b/tests/misc/stat-slash.sh
similarity index 100%
rename from tests/misc/stat-slash
rename to tests/misc/stat-slash.sh
diff --git a/tests/misc/stdbuf b/tests/misc/stdbuf.sh
similarity index 100%
rename from tests/misc/stdbuf
rename to tests/misc/stdbuf.sh
diff --git a/tests/misc/stty-invalid b/tests/misc/stty-invalid.sh
similarity index 100%
rename from tests/misc/stty-invalid
rename to tests/misc/stty-invalid.sh
diff --git a/tests/misc/stty-pairs b/tests/misc/stty-pairs.sh
similarity index 100%
rename from tests/misc/stty-pairs
rename to tests/misc/stty-pairs.sh
diff --git a/tests/misc/stty-row-col b/tests/misc/stty-row-col.sh
similarity index 100%
rename from tests/misc/stty-row-col
rename to tests/misc/stty-row-col.sh
diff --git a/tests/misc/stty b/tests/misc/stty.sh
similarity index 100%
rename from tests/misc/stty
rename to tests/misc/stty.sh
diff --git a/tests/misc/sum-sysv b/tests/misc/sum-sysv.sh
similarity index 100%
rename from tests/misc/sum-sysv
rename to tests/misc/sum-sysv.sh
diff --git a/tests/misc/sum b/tests/misc/sum.pl
similarity index 100%
rename from tests/misc/sum
rename to tests/misc/sum.pl
diff --git a/tests/misc/tac-2-nonseekable b/tests/misc/tac-2-nonseekable.sh
similarity index 100%
rename from tests/misc/tac-2-nonseekable
rename to tests/misc/tac-2-nonseekable.sh
diff --git a/tests/misc/tac-continue b/tests/misc/tac-continue.sh
similarity index 100%
rename from tests/misc/tac-continue
rename to tests/misc/tac-continue.sh
diff --git a/tests/misc/tac b/tests/misc/tac.pl
similarity index 100%
rename from tests/misc/tac
rename to tests/misc/tac.pl
diff --git a/tests/misc/tail b/tests/misc/tail.pl
similarity index 100%
rename from tests/misc/tail
rename to tests/misc/tail.pl
diff --git a/tests/misc/tee-dash b/tests/misc/tee-dash.sh
similarity index 100%
rename from tests/misc/tee-dash
rename to tests/misc/tee-dash.sh
diff --git a/tests/misc/tee b/tests/misc/tee.sh
similarity index 100%
rename from tests/misc/tee
rename to tests/misc/tee.sh
diff --git a/tests/misc/test-diag b/tests/misc/test-diag.pl
similarity index 100%
rename from tests/misc/test-diag
rename to tests/misc/test-diag.pl
diff --git a/tests/misc/test b/tests/misc/test.pl
similarity index 100%
rename from tests/misc/test
rename to tests/misc/test.pl
diff --git a/tests/misc/timeout-group b/tests/misc/timeout-group.sh
similarity index 100%
rename from tests/misc/timeout-group
rename to tests/misc/timeout-group.sh
diff --git a/tests/misc/timeout-parameters b/tests/misc/timeout-parameters.sh
similarity index 100%
rename from tests/misc/timeout-parameters
rename to tests/misc/timeout-parameters.sh
diff --git a/tests/misc/timeout b/tests/misc/timeout.sh
similarity index 100%
rename from tests/misc/timeout
rename to tests/misc/timeout.sh
diff --git a/tests/misc/tr-case-class b/tests/misc/tr-case-class.sh
similarity index 100%
rename from tests/misc/tr-case-class
rename to tests/misc/tr-case-class.sh
diff --git a/tests/misc/tr b/tests/misc/tr.pl
similarity index 100%
rename from tests/misc/tr
rename to tests/misc/tr.pl
diff --git a/tests/misc/truncate-dangling-symlink b/tests/misc/truncate-dangling-symlink.sh
similarity index 100%
rename from tests/misc/truncate-dangling-symlink
rename to tests/misc/truncate-dangling-symlink.sh
diff --git a/tests/misc/truncate-dir-fail b/tests/misc/truncate-dir-fail.sh
similarity index 100%
rename from tests/misc/truncate-dir-fail
rename to tests/misc/truncate-dir-fail.sh
diff --git a/tests/misc/truncate-fail-diag b/tests/misc/truncate-fail-diag.sh
similarity index 100%
rename from tests/misc/truncate-fail-diag
rename to tests/misc/truncate-fail-diag.sh
diff --git a/tests/misc/truncate-fifo b/tests/misc/truncate-fifo.sh
similarity index 100%
rename from tests/misc/truncate-fifo
rename to tests/misc/truncate-fifo.sh
diff --git a/tests/misc/truncate-no-create-missing b/tests/misc/truncate-no-create-missing.sh
similarity index 100%
rename from tests/misc/truncate-no-create-missing
rename to tests/misc/truncate-no-create-missing.sh
diff --git a/tests/misc/truncate-overflow b/tests/misc/truncate-overflow.sh
similarity index 100%
rename from tests/misc/truncate-overflow
rename to tests/misc/truncate-overflow.sh
diff --git a/tests/misc/truncate-owned-by-other b/tests/misc/truncate-owned-by-other.sh
similarity index 100%
rename from tests/misc/truncate-owned-by-other
rename to tests/misc/truncate-owned-by-other.sh
diff --git a/tests/misc/truncate-parameters b/tests/misc/truncate-parameters.sh
similarity index 100%
rename from tests/misc/truncate-parameters
rename to tests/misc/truncate-parameters.sh
diff --git a/tests/misc/truncate-relative b/tests/misc/truncate-relative.sh
similarity index 100%
rename from tests/misc/truncate-relative
rename to tests/misc/truncate-relative.sh
diff --git a/tests/misc/tsort b/tests/misc/tsort.pl
similarity index 100%
rename from tests/misc/tsort
rename to tests/misc/tsort.pl
diff --git a/tests/misc/tty-eof b/tests/misc/tty-eof.pl
similarity index 100%
rename from tests/misc/tty-eof
rename to tests/misc/tty-eof.pl
diff --git a/tests/misc/unexpand b/tests/misc/unexpand.pl
similarity index 100%
rename from tests/misc/unexpand
rename to tests/misc/unexpand.pl
diff --git a/tests/misc/uniq-perf b/tests/misc/uniq-perf.sh
similarity index 100%
rename from tests/misc/uniq-perf
rename to tests/misc/uniq-perf.sh
diff --git a/tests/misc/uniq b/tests/misc/uniq.pl
similarity index 100%
rename from tests/misc/uniq
rename to tests/misc/uniq.pl
diff --git a/tests/misc/wc-files0-from b/tests/misc/wc-files0-from.pl
similarity index 100%
rename from tests/misc/wc-files0-from
rename to tests/misc/wc-files0-from.pl
diff --git a/tests/misc/wc-files0 b/tests/misc/wc-files0.sh
similarity index 100%
rename from tests/misc/wc-files0
rename to tests/misc/wc-files0.sh
diff --git a/tests/misc/wc-parallel b/tests/misc/wc-parallel.sh
similarity index 100%
rename from tests/misc/wc-parallel
rename to tests/misc/wc-parallel.sh
diff --git a/tests/misc/wc b/tests/misc/wc.pl
similarity index 100%
rename from tests/misc/wc
rename to tests/misc/wc.pl
diff --git a/tests/misc/xattr b/tests/misc/xattr.sh
similarity index 100%
rename from tests/misc/xattr
rename to tests/misc/xattr.sh
diff --git a/tests/misc/xstrtol b/tests/misc/xstrtol.pl
similarity index 100%
rename from tests/misc/xstrtol
rename to tests/misc/xstrtol.pl
diff --git a/tests/mkdir/p-1 b/tests/mkdir/p-1.sh
similarity index 100%
rename from tests/mkdir/p-1
rename to tests/mkdir/p-1.sh
diff --git a/tests/mkdir/p-2 b/tests/mkdir/p-2.sh
similarity index 100%
rename from tests/mkdir/p-2
rename to tests/mkdir/p-2.sh
diff --git a/tests/mkdir/p-3 b/tests/mkdir/p-3.sh
similarity index 100%
rename from tests/mkdir/p-3
rename to tests/mkdir/p-3.sh
diff --git a/tests/mkdir/p-slashdot b/tests/mkdir/p-slashdot.sh
similarity index 100%
rename from tests/mkdir/p-slashdot
rename to tests/mkdir/p-slashdot.sh
diff --git a/tests/mkdir/p-thru-slink b/tests/mkdir/p-thru-slink.sh
similarity index 100%
rename from tests/mkdir/p-thru-slink
rename to tests/mkdir/p-thru-slink.sh
diff --git a/tests/mkdir/p-v b/tests/mkdir/p-v.sh
similarity index 100%
rename from tests/mkdir/p-v
rename to tests/mkdir/p-v.sh
diff --git a/tests/mkdir/parents b/tests/mkdir/parents.sh
similarity index 100%
rename from tests/mkdir/parents
rename to tests/mkdir/parents.sh
diff --git a/tests/mkdir/perm b/tests/mkdir/perm.sh
similarity index 100%
rename from tests/mkdir/perm
rename to tests/mkdir/perm.sh
diff --git a/tests/mkdir/selinux b/tests/mkdir/selinux.sh
similarity index 100%
rename from tests/mkdir/selinux
rename to tests/mkdir/selinux.sh
diff --git a/tests/mkdir/special-1 b/tests/mkdir/special-1.sh
similarity index 100%
rename from tests/mkdir/special-1
rename to tests/mkdir/special-1.sh
diff --git a/tests/mkdir/t-slash b/tests/mkdir/t-slash.sh
similarity index 100%
rename from tests/mkdir/t-slash
rename to tests/mkdir/t-slash.sh
diff --git a/tests/mkdir/writable-under-readonly b/tests/mkdir/writable-under-readonly.sh
similarity index 100%
rename from tests/mkdir/writable-under-readonly
rename to tests/mkdir/writable-under-readonly.sh
diff --git a/tests/mv/acl b/tests/mv/acl.sh
similarity index 100%
rename from tests/mv/acl
rename to tests/mv/acl.sh
diff --git a/tests/mv/atomic b/tests/mv/atomic.sh
similarity index 100%
rename from tests/mv/atomic
rename to tests/mv/atomic.sh
diff --git a/tests/mv/atomic2 b/tests/mv/atomic2.sh
similarity index 100%
rename from tests/mv/atomic2
rename to tests/mv/atomic2.sh
diff --git a/tests/mv/backup-dir b/tests/mv/backup-dir.sh
similarity index 100%
rename from tests/mv/backup-dir
rename to tests/mv/backup-dir.sh
diff --git a/tests/mv/backup-is-src b/tests/mv/backup-is-src.sh
similarity index 100%
rename from tests/mv/backup-is-src
rename to tests/mv/backup-is-src.sh
diff --git a/tests/mv/childproof b/tests/mv/childproof.sh
similarity index 100%
rename from tests/mv/childproof
rename to tests/mv/childproof.sh
diff --git a/tests/mv/diag b/tests/mv/diag.sh
similarity index 100%
rename from tests/mv/diag
rename to tests/mv/diag.sh
diff --git a/tests/mv/dir-file b/tests/mv/dir-file.sh
similarity index 100%
rename from tests/mv/dir-file
rename to tests/mv/dir-file.sh
diff --git a/tests/mv/dir2dir b/tests/mv/dir2dir.sh
similarity index 100%
rename from tests/mv/dir2dir
rename to tests/mv/dir2dir.sh
diff --git a/tests/mv/dup-source b/tests/mv/dup-source.sh
similarity index 100%
rename from tests/mv/dup-source
rename to tests/mv/dup-source.sh
diff --git a/tests/mv/force b/tests/mv/force.sh
similarity index 100%
rename from tests/mv/force
rename to tests/mv/force.sh
diff --git a/tests/mv/hard-2 b/tests/mv/hard-2.sh
similarity index 100%
rename from tests/mv/hard-2
rename to tests/mv/hard-2.sh
diff --git a/tests/mv/hard-3 b/tests/mv/hard-3.sh
similarity index 100%
rename from tests/mv/hard-3
rename to tests/mv/hard-3.sh
diff --git a/tests/mv/hard-4 b/tests/mv/hard-4.sh
similarity index 100%
rename from tests/mv/hard-4
rename to tests/mv/hard-4.sh
diff --git a/tests/mv/hard-link-1 b/tests/mv/hard-link-1.sh
similarity index 100%
rename from tests/mv/hard-link-1
rename to tests/mv/hard-link-1.sh
diff --git a/tests/mv/hard-verbose b/tests/mv/hard-verbose.sh
similarity index 100%
rename from tests/mv/hard-verbose
rename to tests/mv/hard-verbose.sh
diff --git a/tests/mv/i-1 b/tests/mv/i-1.pl
similarity index 100%
rename from tests/mv/i-1
rename to tests/mv/i-1.pl
diff --git a/tests/mv/i-2 b/tests/mv/i-2.sh
similarity index 100%
rename from tests/mv/i-2
rename to tests/mv/i-2.sh
diff --git a/tests/mv/i-3 b/tests/mv/i-3.sh
similarity index 100%
rename from tests/mv/i-3
rename to tests/mv/i-3.sh
diff --git a/tests/mv/i-4 b/tests/mv/i-4.sh
similarity index 100%
rename from tests/mv/i-4
rename to tests/mv/i-4.sh
diff --git a/tests/mv/i-5 b/tests/mv/i-5.sh
similarity index 100%
rename from tests/mv/i-5
rename to tests/mv/i-5.sh
diff --git a/tests/mv/i-link-no b/tests/mv/i-link-no.sh
similarity index 100%
rename from tests/mv/i-link-no
rename to tests/mv/i-link-no.sh
diff --git a/tests/mv/into-self-2 b/tests/mv/into-self-2.sh
similarity index 100%
rename from tests/mv/into-self-2
rename to tests/mv/into-self-2.sh
diff --git a/tests/mv/into-self-3 b/tests/mv/into-self-3.sh
similarity index 100%
rename from tests/mv/into-self-3
rename to tests/mv/into-self-3.sh
diff --git a/tests/mv/into-self-4 b/tests/mv/into-self-4.sh
similarity index 100%
rename from tests/mv/into-self-4
rename to tests/mv/into-self-4.sh
diff --git a/tests/mv/into-self b/tests/mv/into-self.sh
similarity index 100%
rename from tests/mv/into-self
rename to tests/mv/into-self.sh
diff --git a/tests/mv/leak-fd b/tests/mv/leak-fd.sh
similarity index 100%
rename from tests/mv/leak-fd
rename to tests/mv/leak-fd.sh
diff --git a/tests/mv/mv-n b/tests/mv/mv-n.sh
similarity index 100%
rename from tests/mv/mv-n
rename to tests/mv/mv-n.sh
diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1.sh
similarity index 100%
rename from tests/mv/mv-special-1
rename to tests/mv/mv-special-1.sh
diff --git a/tests/mv/no-target-dir b/tests/mv/no-target-dir.sh
similarity index 100%
rename from tests/mv/no-target-dir
rename to tests/mv/no-target-dir.sh
diff --git a/tests/mv/part-fail b/tests/mv/part-fail.sh
similarity index 100%
rename from tests/mv/part-fail
rename to tests/mv/part-fail.sh
diff --git a/tests/mv/part-hardlink b/tests/mv/part-hardlink.sh
similarity index 100%
rename from tests/mv/part-hardlink
rename to tests/mv/part-hardlink.sh
diff --git a/tests/mv/part-rename b/tests/mv/part-rename.sh
similarity index 100%
rename from tests/mv/part-rename
rename to tests/mv/part-rename.sh
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink.sh
similarity index 100%
rename from tests/mv/part-symlink
rename to tests/mv/part-symlink.sh
diff --git a/tests/mv/partition-perm b/tests/mv/partition-perm.sh
similarity index 100%
rename from tests/mv/partition-perm
rename to tests/mv/partition-perm.sh
diff --git a/tests/mv/perm-1 b/tests/mv/perm-1.sh
similarity index 100%
rename from tests/mv/perm-1
rename to tests/mv/perm-1.sh
diff --git a/tests/mv/sticky-to-xpart b/tests/mv/sticky-to-xpart.sh
similarity index 100%
rename from tests/mv/sticky-to-xpart
rename to tests/mv/sticky-to-xpart.sh
diff --git a/tests/mv/symlink-onto-hardlink-to-self b/tests/mv/symlink-onto-hardlink-to-self.sh
similarity index 100%
rename from tests/mv/symlink-onto-hardlink-to-self
rename to tests/mv/symlink-onto-hardlink-to-self.sh
diff --git a/tests/mv/symlink-onto-hardlink b/tests/mv/symlink-onto-hardlink.sh
similarity index 100%
rename from tests/mv/symlink-onto-hardlink
rename to tests/mv/symlink-onto-hardlink.sh
diff --git a/tests/mv/to-symlink b/tests/mv/to-symlink.sh
similarity index 100%
rename from tests/mv/to-symlink
rename to tests/mv/to-symlink.sh
diff --git a/tests/mv/trailing-slash b/tests/mv/trailing-slash.sh
similarity index 100%
rename from tests/mv/trailing-slash
rename to tests/mv/trailing-slash.sh
diff --git a/tests/mv/update b/tests/mv/update.sh
similarity index 100%
rename from tests/mv/update
rename to tests/mv/update.sh
diff --git a/tests/pr/pr-tests b/tests/pr/pr-tests.pl
similarity index 100%
rename from tests/pr/pr-tests
rename to tests/pr/pr-tests.pl
diff --git a/tests/readlink/can-e b/tests/readlink/can-e.sh
similarity index 100%
rename from tests/readlink/can-e
rename to tests/readlink/can-e.sh
diff --git a/tests/readlink/can-f b/tests/readlink/can-f.sh
similarity index 100%
rename from tests/readlink/can-f
rename to tests/readlink/can-f.sh
diff --git a/tests/readlink/can-m b/tests/readlink/can-m.sh
similarity index 100%
rename from tests/readlink/can-m
rename to tests/readlink/can-m.sh
diff --git a/tests/readlink/rl-1 b/tests/readlink/rl-1.sh
similarity index 100%
rename from tests/readlink/rl-1
rename to tests/readlink/rl-1.sh
diff --git a/tests/rm/cycle b/tests/rm/cycle.sh
similarity index 100%
rename from tests/rm/cycle
rename to tests/rm/cycle.sh
diff --git a/tests/rm/d-1 b/tests/rm/d-1.sh
similarity index 100%
rename from tests/rm/d-1
rename to tests/rm/d-1.sh
diff --git a/tests/rm/d-2 b/tests/rm/d-2.sh
similarity index 100%
rename from tests/rm/d-2
rename to tests/rm/d-2.sh
diff --git a/tests/rm/d-3 b/tests/rm/d-3.sh
similarity index 100%
rename from tests/rm/d-3
rename to tests/rm/d-3.sh
diff --git a/tests/rm/dangling-symlink b/tests/rm/dangling-symlink.sh
similarity index 100%
rename from tests/rm/dangling-symlink
rename to tests/rm/dangling-symlink.sh
diff --git a/tests/rm/deep-1 b/tests/rm/deep-1.sh
similarity index 100%
rename from tests/rm/deep-1
rename to tests/rm/deep-1.sh
diff --git a/tests/rm/deep-2 b/tests/rm/deep-2.sh
similarity index 100%
rename from tests/rm/deep-2
rename to tests/rm/deep-2.sh
diff --git a/tests/rm/dir-no-w b/tests/rm/dir-no-w.sh
similarity index 100%
rename from tests/rm/dir-no-w
rename to tests/rm/dir-no-w.sh
diff --git a/tests/rm/dir-nonrecur b/tests/rm/dir-nonrecur.sh
similarity index 100%
rename from tests/rm/dir-nonrecur
rename to tests/rm/dir-nonrecur.sh
diff --git a/tests/rm/dot-rel b/tests/rm/dot-rel.sh
similarity index 100%
rename from tests/rm/dot-rel
rename to tests/rm/dot-rel.sh
diff --git a/tests/rm/empty-inacc b/tests/rm/empty-inacc.sh
similarity index 100%
rename from tests/rm/empty-inacc
rename to tests/rm/empty-inacc.sh
diff --git a/tests/rm/empty-name b/tests/rm/empty-name.pl
similarity index 100%
rename from tests/rm/empty-name
rename to tests/rm/empty-name.pl
diff --git a/tests/rm/ext3-perf b/tests/rm/ext3-perf.sh
similarity index 100%
rename from tests/rm/ext3-perf
rename to tests/rm/ext3-perf.sh
diff --git a/tests/rm/f-1 b/tests/rm/f-1.sh
similarity index 100%
rename from tests/rm/f-1
rename to tests/rm/f-1.sh
diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm.sh
similarity index 100%
rename from tests/rm/fail-2eperm
rename to tests/rm/fail-2eperm.sh
diff --git a/tests/rm/fail-eacces b/tests/rm/fail-eacces.sh
similarity index 100%
rename from tests/rm/fail-eacces
rename to tests/rm/fail-eacces.sh
diff --git a/tests/rm/hash b/tests/rm/hash.sh
similarity index 100%
rename from tests/rm/hash
rename to tests/rm/hash.sh
diff --git a/tests/rm/i-1 b/tests/rm/i-1.sh
similarity index 100%
rename from tests/rm/i-1
rename to tests/rm/i-1.sh
diff --git a/tests/rm/i-never b/tests/rm/i-never.sh
similarity index 100%
rename from tests/rm/i-never
rename to tests/rm/i-never.sh
diff --git a/tests/rm/i-no-r b/tests/rm/i-no-r.sh
similarity index 100%
rename from tests/rm/i-no-r
rename to tests/rm/i-no-r.sh
diff --git a/tests/rm/ignorable b/tests/rm/ignorable.sh
similarity index 100%
rename from tests/rm/ignorable
rename to tests/rm/ignorable.sh
diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible.sh
similarity index 100%
rename from tests/rm/inaccessible
rename to tests/rm/inaccessible.sh
diff --git a/tests/rm/interactive-always b/tests/rm/interactive-always.sh
similarity index 100%
rename from tests/rm/interactive-always
rename to tests/rm/interactive-always.sh
diff --git a/tests/rm/interactive-once b/tests/rm/interactive-once.sh
similarity index 100%
rename from tests/rm/interactive-once
rename to tests/rm/interactive-once.sh
diff --git a/tests/rm/ir-1 b/tests/rm/ir-1.sh
similarity index 100%
rename from tests/rm/ir-1
rename to tests/rm/ir-1.sh
diff --git a/tests/rm/isatty b/tests/rm/isatty.sh
similarity index 100%
rename from tests/rm/isatty
rename to tests/rm/isatty.sh
diff --git a/tests/rm/many-dir-entries-vs-OOM b/tests/rm/many-dir-entries-vs-OOM.sh
similarity index 100%
rename from tests/rm/many-dir-entries-vs-OOM
rename to tests/rm/many-dir-entries-vs-OOM.sh
diff --git a/tests/rm/no-give-up b/tests/rm/no-give-up.sh
similarity index 100%
rename from tests/rm/no-give-up
rename to tests/rm/no-give-up.sh
diff --git a/tests/rm/one-file-system b/tests/rm/one-file-system.sh
similarity index 100%
rename from tests/rm/one-file-system
rename to tests/rm/one-file-system.sh
diff --git a/tests/rm/one-file-system2 b/tests/rm/one-file-system2.sh
similarity index 100%
rename from tests/rm/one-file-system2
rename to tests/rm/one-file-system2.sh
diff --git a/tests/rm/r-1 b/tests/rm/r-1.sh
similarity index 100%
rename from tests/rm/r-1
rename to tests/rm/r-1.sh
diff --git a/tests/rm/r-2 b/tests/rm/r-2.sh
similarity index 100%
rename from tests/rm/r-2
rename to tests/rm/r-2.sh
diff --git a/tests/rm/r-3 b/tests/rm/r-3.sh
similarity index 100%
rename from tests/rm/r-3
rename to tests/rm/r-3.sh
diff --git a/tests/rm/r-4 b/tests/rm/r-4.sh
similarity index 100%
rename from tests/rm/r-4
rename to tests/rm/r-4.sh
diff --git a/tests/rm/read-only b/tests/rm/read-only.sh
similarity index 100%
rename from tests/rm/read-only
rename to tests/rm/read-only.sh
diff --git a/tests/rm/readdir-bug b/tests/rm/readdir-bug.sh
similarity index 100%
rename from tests/rm/readdir-bug
rename to tests/rm/readdir-bug.sh
diff --git a/tests/rm/rm1 b/tests/rm/rm1.sh
similarity index 100%
rename from tests/rm/rm1
rename to tests/rm/rm1.sh
diff --git a/tests/rm/rm2 b/tests/rm/rm2.sh
similarity index 100%
rename from tests/rm/rm2
rename to tests/rm/rm2.sh
diff --git a/tests/rm/rm3 b/tests/rm/rm3.sh
similarity index 100%
rename from tests/rm/rm3
rename to tests/rm/rm3.sh
diff --git a/tests/rm/rm4 b/tests/rm/rm4.sh
similarity index 100%
rename from tests/rm/rm4
rename to tests/rm/rm4.sh
diff --git a/tests/rm/rm5 b/tests/rm/rm5.sh
similarity index 100%
rename from tests/rm/rm5
rename to tests/rm/rm5.sh
diff --git a/tests/rm/sunos-1 b/tests/rm/sunos-1.sh
similarity index 100%
rename from tests/rm/sunos-1
rename to tests/rm/sunos-1.sh
diff --git a/tests/rm/unread2 b/tests/rm/unread2.sh
similarity index 100%
rename from tests/rm/unread2
rename to tests/rm/unread2.sh
diff --git a/tests/rm/unread3 b/tests/rm/unread3.sh
similarity index 100%
rename from tests/rm/unread3
rename to tests/rm/unread3.sh
diff --git a/tests/rm/unreadable b/tests/rm/unreadable.pl
similarity index 100%
rename from tests/rm/unreadable
rename to tests/rm/unreadable.pl
diff --git a/tests/rm/v-slash b/tests/rm/v-slash.sh
similarity index 100%
rename from tests/rm/v-slash
rename to tests/rm/v-slash.sh
diff --git a/tests/rmdir/fail-perm b/tests/rmdir/fail-perm.sh
similarity index 100%
rename from tests/rmdir/fail-perm
rename to tests/rmdir/fail-perm.sh
diff --git a/tests/rmdir/ignore b/tests/rmdir/ignore.sh
similarity index 100%
rename from tests/rmdir/ignore
rename to tests/rmdir/ignore.sh
diff --git a/tests/rmdir/t-slash b/tests/rmdir/t-slash.sh
similarity index 100%
rename from tests/rmdir/t-slash
rename to tests/rmdir/t-slash.sh
diff --git a/tests/split/additional-suffix b/tests/split/additional-suffix.sh
similarity index 100%
rename from tests/split/additional-suffix
rename to tests/split/additional-suffix.sh
diff --git a/tests/split/b-chunk b/tests/split/b-chunk.sh
similarity index 100%
rename from tests/split/b-chunk
rename to tests/split/b-chunk.sh
diff --git a/tests/split/fail b/tests/split/fail.sh
similarity index 100%
rename from tests/split/fail
rename to tests/split/fail.sh
diff --git a/tests/split/filter b/tests/split/filter.sh
similarity index 100%
rename from tests/split/filter
rename to tests/split/filter.sh
diff --git a/tests/split/guard-input b/tests/split/guard-input.sh
similarity index 100%
rename from tests/split/guard-input
rename to tests/split/guard-input.sh
diff --git a/tests/split/l-chunk b/tests/split/l-chunk.sh
similarity index 100%
rename from tests/split/l-chunk
rename to tests/split/l-chunk.sh
diff --git a/tests/split/lines b/tests/split/lines.sh
similarity index 100%
rename from tests/split/lines
rename to tests/split/lines.sh
diff --git a/tests/split/numeric b/tests/split/numeric.sh
similarity index 100%
rename from tests/split/numeric
rename to tests/split/numeric.sh
diff --git a/tests/split/r-chunk b/tests/split/r-chunk.sh
similarity index 100%
rename from tests/split/r-chunk
rename to tests/split/r-chunk.sh
diff --git a/tests/split/suffix-auto-length b/tests/split/suffix-auto-length.sh
similarity index 100%
rename from tests/split/suffix-auto-length
rename to tests/split/suffix-auto-length.sh
diff --git a/tests/split/suffix-length b/tests/split/suffix-length.sh
similarity index 100%
rename from tests/split/suffix-length
rename to tests/split/suffix-length.sh
diff --git a/tests/tail-2/F-vs-missing b/tests/tail-2/F-vs-missing.sh
similarity index 100%
rename from tests/tail-2/F-vs-missing
rename to tests/tail-2/F-vs-missing.sh
diff --git a/tests/tail-2/F-vs-rename b/tests/tail-2/F-vs-rename.sh
similarity index 100%
rename from tests/tail-2/F-vs-rename
rename to tests/tail-2/F-vs-rename.sh
diff --git a/tests/tail-2/append-only b/tests/tail-2/append-only.sh
similarity index 100%
rename from tests/tail-2/append-only
rename to tests/tail-2/append-only.sh
diff --git a/tests/tail-2/assert-2 b/tests/tail-2/assert-2.sh
similarity index 100%
rename from tests/tail-2/assert-2
rename to tests/tail-2/assert-2.sh
diff --git a/tests/tail-2/assert b/tests/tail-2/assert.sh
similarity index 100%
rename from tests/tail-2/assert
rename to tests/tail-2/assert.sh
diff --git a/tests/tail-2/big-4gb b/tests/tail-2/big-4gb.sh
similarity index 100%
rename from tests/tail-2/big-4gb
rename to tests/tail-2/big-4gb.sh
diff --git a/tests/tail-2/flush-initial b/tests/tail-2/flush-initial.sh
similarity index 100%
rename from tests/tail-2/flush-initial
rename to tests/tail-2/flush-initial.sh
diff --git a/tests/tail-2/follow-name b/tests/tail-2/follow-name.sh
similarity index 100%
rename from tests/tail-2/follow-name
rename to tests/tail-2/follow-name.sh
diff --git a/tests/tail-2/follow-stdin b/tests/tail-2/follow-stdin.sh
similarity index 100%
rename from tests/tail-2/follow-stdin
rename to tests/tail-2/follow-stdin.sh
diff --git a/tests/tail-2/infloop-1 b/tests/tail-2/infloop-1.sh
similarity index 100%
rename from tests/tail-2/infloop-1
rename to tests/tail-2/infloop-1.sh
diff --git a/tests/tail-2/inotify-hash-abuse b/tests/tail-2/inotify-hash-abuse.sh
similarity index 100%
rename from tests/tail-2/inotify-hash-abuse
rename to tests/tail-2/inotify-hash-abuse.sh
diff --git a/tests/tail-2/inotify-hash-abuse2 b/tests/tail-2/inotify-hash-abuse2.sh
similarity index 100%
rename from tests/tail-2/inotify-hash-abuse2
rename to tests/tail-2/inotify-hash-abuse2.sh
diff --git a/tests/tail-2/inotify-race b/tests/tail-2/inotify-race.sh
similarity index 100%
rename from tests/tail-2/inotify-race
rename to tests/tail-2/inotify-race.sh
diff --git a/tests/tail-2/inotify-rotate b/tests/tail-2/inotify-rotate.sh
similarity index 100%
rename from tests/tail-2/inotify-rotate
rename to tests/tail-2/inotify-rotate.sh
diff --git a/tests/tail-2/pid b/tests/tail-2/pid.sh
similarity index 100%
rename from tests/tail-2/pid
rename to tests/tail-2/pid.sh
diff --git a/tests/tail-2/pipe-f b/tests/tail-2/pipe-f.sh
similarity index 100%
rename from tests/tail-2/pipe-f
rename to tests/tail-2/pipe-f.sh
diff --git a/tests/tail-2/pipe-f2 b/tests/tail-2/pipe-f2.sh
similarity index 100%
rename from tests/tail-2/pipe-f2
rename to tests/tail-2/pipe-f2.sh
diff --git a/tests/tail-2/proc-ksyms b/tests/tail-2/proc-ksyms.sh
similarity index 100%
rename from tests/tail-2/proc-ksyms
rename to tests/tail-2/proc-ksyms.sh
diff --git a/tests/tail-2/start-middle b/tests/tail-2/start-middle.sh
similarity index 100%
rename from tests/tail-2/start-middle
rename to tests/tail-2/start-middle.sh
diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f.sh
similarity index 100%
rename from tests/tail-2/tail-n0f
rename to tests/tail-2/tail-n0f.sh
diff --git a/tests/tail-2/wait b/tests/tail-2/wait.sh
similarity index 100%
rename from tests/tail-2/wait
rename to tests/tail-2/wait.sh
diff --git a/tests/touch/60-seconds b/tests/touch/60-seconds.sh
similarity index 100%
rename from tests/touch/60-seconds
rename to tests/touch/60-seconds.sh
diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink.sh
similarity index 100%
rename from tests/touch/dangling-symlink
rename to tests/touch/dangling-symlink.sh
diff --git a/tests/touch/dir-1 b/tests/touch/dir-1.sh
similarity index 100%
rename from tests/touch/dir-1
rename to tests/touch/dir-1.sh
diff --git a/tests/touch/empty-file b/tests/touch/empty-file.sh
similarity index 100%
rename from tests/touch/empty-file
rename to tests/touch/empty-file.sh
diff --git a/tests/touch/fail-diag b/tests/touch/fail-diag.sh
similarity index 100%
rename from tests/touch/fail-diag
rename to tests/touch/fail-diag.sh
diff --git a/tests/touch/fifo b/tests/touch/fifo.sh
similarity index 100%
rename from tests/touch/fifo
rename to tests/touch/fifo.sh
diff --git a/tests/touch/no-create-missing b/tests/touch/no-create-missing.sh
similarity index 100%
rename from tests/touch/no-create-missing
rename to tests/touch/no-create-missing.sh
diff --git a/tests/touch/no-dereference b/tests/touch/no-dereference.sh
similarity index 100%
rename from tests/touch/no-dereference
rename to tests/touch/no-dereference.sh
diff --git a/tests/touch/no-rights b/tests/touch/no-rights.sh
similarity index 100%
rename from tests/touch/no-rights
rename to tests/touch/no-rights.sh
diff --git a/tests/touch/not-owner b/tests/touch/not-owner.sh
similarity index 100%
rename from tests/touch/not-owner
rename to tests/touch/not-owner.sh
diff --git a/tests/touch/now-owned-by-other b/tests/touch/now-owned-by-other.sh
similarity index 100%
rename from tests/touch/now-owned-by-other
rename to tests/touch/now-owned-by-other.sh
diff --git a/tests/touch/obsolescent b/tests/touch/obsolescent.sh
similarity index 100%
rename from tests/touch/obsolescent
rename to tests/touch/obsolescent.sh
diff --git a/tests/touch/read-only b/tests/touch/read-only.sh
similarity index 100%
rename from tests/touch/read-only
rename to tests/touch/read-only.sh
diff --git a/tests/touch/relative b/tests/touch/relative.sh
similarity index 100%
rename from tests/touch/relative
rename to tests/touch/relative.sh
diff --git a/tests/touch/trailing-slash b/tests/touch/trailing-slash.sh
similarity index 100%
rename from tests/touch/trailing-slash
rename to tests/touch/trailing-slash.sh
-- 
1.7.12



From MAILER-DAEMON Thu Aug 30 09:21:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74ga-00049L-At
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:21:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43457)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73fi-00086s-7u
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:16:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73fc-0001Zg-7L
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:16:30 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:42722)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T73fb-0001ZG-Vs
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:16:24 -0400
Received: by bkcjc3 with SMTP id jc3so775700bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 05:16:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:subject:content-type
	:content-transfer-encoding;
	bh=wAdz11XUeQuBkPBl4mApqvgicFmg1mS8qB6Wzmk2SdQ=;
	b=vcp47ot4pKExTzc9vHQJlguaLhpdsJYjFnRzT7hB9J3FWno63Y5ViphsHwCSxHl2nX
	32ecOjLOoVc6Djfu+YzVR4ivQcEIWmXA1G7XlVOuJzm8a0gps8rCk5FSAnD8xwmypV4j
	IbfXkS0Iboli79B9ZXFxttGoL6RL2D+LweRnIMEIc2bNaKfcbypHjfX7/7kH2MI8FkkP
	mwFjeLRnfuzVYRxPIqu9V2OrfcY9MStTs9QekcRLN7UtwJHVHSIGYet9RtLrH/HPVYX8
	TBV6O1VGelHOuUyE+KCHTqSHZTvX+X1Vp9s2Umvs1lHVXz8I/cwp3k0R8vTpEbk7R+1F
	mcaw==
Received: by 10.204.129.23 with SMTP id m23mr2691302bks.28.1346328983171;
	Thu, 30 Aug 2012 05:16:23 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id t23sm1141691bks.4.2012.08.30.05.16.21
	(version=SSLv3 cipher=OTHER); Thu, 30 Aug 2012 05:16:22 -0700 (PDT)
Message-ID: <503F5992.507@gmail.com>
Date: Thu, 30 Aug 2012 14:16:18 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: Re: [PATCH] scripts: git commit message hook: prohibit use of
	"Signed-off-by
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
X-Mailman-Approved-At: Thu, 30 Aug 2012 09:21:23 -0400
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, 30 Aug 2012 12:16:36 -0000

Jim Meyering wrote:
>
> I noticed a lot of Signed-off-by: lines in Stefano's series.
> This makes our no-S-o-b policy more apparent:
>
> >From 4f76f9b42ad71df40f1f714f2ecfb1e4b6cd7078 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <address@hidden>
> Date: Thu, 30 Aug 2012 13:07:10 +0200
> Subject: [PATCH] scripts: git commit message hook: prohibit use of  "Signed-off-by:"
>
> * scripts/git-hooks/commit-msg: Reject a commit log message that
> contains "Signed-off-by:".
> ---
>  scripts/git-hooks/commit-msg | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg
> index a5e4090..f867331 100755
> --- a/scripts/git-hooks/commit-msg
> +++ b/scripts/git-hooks/commit-msg
> @@ -125,6 +125,9 @@ sub check_msg($$)
>    $buf =~ m!https?://debbugs\.gnu\.org/(?:cgi/bugreport\.cgi\?bug=)?(\d+)!s
>      and return "use shorter http://bugs.gnu.org/$1";;
>
> +  $buf =~ /^ *Signed-off-by:/i
> +    and return q(do not use "Signed-off-by:");
> +
>    return '';
>  }
>
Sigh, this will likely cause problems with my "ci" git alias ("commit -s"),
which I'm very finger-trained to use.  Couldn't the hook be instead enhanced
to strip "Signed-off-by:" lines?  Or better again, those "Signed-off-by:"
lines that refer to the author or the committer?

Regards,
  Stefano




From MAILER-DAEMON Thu Aug 30 09:21:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74ga-0004Ay-TD
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:21:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57908)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T74G9-0000Ua-Av
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:54:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T74G0-0007DJ-0P
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:54:09 -0400
Received: from mail-ee0-f41.google.com ([74.125.83.41]:34665)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T74Fz-0007D4-Mu
	for coreutils@gnu.org; Thu, 30 Aug 2012 08:53:59 -0400
Received: by eeke49 with SMTP id e49so840135eek.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 05:53:58 -0700 (PDT)
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=YtFsV5mgn5vL6E31qP1SySYCl2fdMMJ5wWAEve9qRbA=;
	b=x8z3tfScMeuAEcrLZPlRB03aSCuHaJyBBaFa0laxXlCPMSiv65GkuzrsXGEfMd2ovQ
	VFeJFKWDKDxTQJTg462orfy4OCWSph3ThFedj/wrekdB49/LUzxJo5VC4fBE3RyKOaND
	6dWbA+XH8jzemgiX+XcDKw1l5FcAUiKBazouf8IG25Fwedi85jIn805SdN9S5JyaBVxL
	jUmxJpmj+PhqUM2t2I+3nbCujp/b+gSAQhMSV3T3jJ4pQjdwCZNnZS8e8tBrFRB2NkiJ
	Qq1gGcma3EaQVn1NgQM9TSjJCXInGuYRbNpaRZwN1ioS2UJztBOWvNpyWirbQFIKG40N
	RYeQ==
Received: by 10.14.218.134 with SMTP id k6mr6501859eep.14.1346331238746;
	Thu, 30 Aug 2012 05:53:58 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id r45sm4728735eem.6.2012.08.30.05.53.56
	(version=SSLv3 cipher=OTHER); Thu, 30 Aug 2012 05:53:57 -0700 (PDT)
Message-ID: <503F6262.3040706@gmail.com>
Date: Thu, 30 Aug 2012 14:53:54 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net> <503F0FDB.2020501@gmail.com>
	<871uio3d29.fsf@rho.meyering.net> <503F429F.9070409@gmail.com>
	<87ipc01soc.fsf@rho.meyering.net>
In-Reply-To: <87ipc01soc.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.83.41
X-Mailman-Approved-At: Thu, 30 Aug 2012 09:21:23 -0400
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, 30 Aug 2012 12:54:15 -0000

On 08/30/2012 02:16 PM, Jim Meyering wrote:
>
> I've merged those into the appropriate change sets, removed all
> Signed-off-by: lines and made a few minor wording changes.
> Please review the differences.  If you're happy with the result,
> I'll push the lot.
>
I have few nits against myself then :-)  Inlined below.  Could you fix
them before pushing?

Thanks,
  Stefano

> From a5af26936f26bcde91c45d99c499d648ecc37af4 Mon Sep 17 00:00:00 2001
> From: Stefano Lattarini <stefano.lattarini@gmail.com>
> Date: Wed, 29 Aug 2012 13:55:49 +0200
> Subject: [PATCH 03/22] build: add extra *.texi files to coreutils_TEXINFOS,
>  not EXTRA_DIST
> 
> * doc/Makefile.am (coreutils_TEXINFO): List them here, instead of ...
> (EXTRA_DIST): ... listing them here.  This ensure
>
s/ensure/ensures/

> the rebuild rules will be more faithful.
> ($(DVIS), $(INFO_DEPS)): No need to depend on $(EXTRA_DIST) now.
> ---

> From 78f9df627616976bf27777d5751d60f0fe841cac Mon Sep 17 00:00:00 2001
> From: Stefano Lattarini <stefano.lattarini@gmail.com>
> Date: Wed, 29 Aug 2012 14:01:12 +0200
> Subject: [PATCH 04/22] build: prefer '$(top_srcdir)/doc' over '$(srcdir)' in
>  doc Makefile
> 
> This is just a preparatory refactoring that will become useful in
> a future change (where
>
s/where/when/ maybe.

> the doc/Makefile.am makefile will be merged
> with the top-level one).
> 
> * doc/Makefile.am (doc_srcdir): New, defined to '$(top_srcdir)/doc'.
>
s/defined/define/.

> Use it throughout instead of "bare" '$(srcdir)'.
> ---
>  doc/Makefile.am | 28 +++++++++++++++-------------
>  1 file changed, 15 insertions(+), 13 deletions(-)


> From 88efe23e17882a42c167b9524858bb0883e18e70 Mon Sep 17 00:00:00 2001
> From: Stefano Lattarini <stefano.lattarini@gmail.com>
> Date: Wed, 29 Aug 2012 16:57:41 +0200
> Subject: [PATCH 15/22] build: provide convenience target 'all_programs' also
>  at top-level
> 
> This will be mostly useful in future changes.
> 
> * Makefile.am (all_programs): New, simply the work delegating to
>
s/the work/work by/.

> From 56a914537bd732b6c38ea64ec25c7e0477fbb890 Mon Sep 17 00:00:00 2001
> From: Stefano Lattarini <stefano.lattarini@gmail.com>
> Date: Wed, 29 Aug 2012 21:31:57 +0200
> Subject: [PATCH 16/22] build: rework some recipes in man/Makefile.am, for
>  future changes
> 
> This change is merely required to make future changes easier.
> 
> In particular, since we are going to merge the contents of
> 'man/Makefile.am' in
>
s/in/into/

> the top-level Makefile, we need to avoid
> conflicts with the rules and variables in 'dist-check.mk', and
> to prepare for changes in the value of the '$*' variable in the
>
s/in the/as used in the/

> recipe of the '.x -> .1' suffix rule.
> 
> * man/Makefile.am (t, mapped_name): Delete, inlining their use ...
> (.1.x): ... in the recipe of this suffix rule.  Other adjustments
> to prepare to changes in the value of the '$*' automatic variable.
> While at it, made more resilient about unlikely but possible failure.
> Adjust and reorder few comments.
> ---

> 
> From f6696dd246d96ce3449119c4d2f2365bac156de1 Mon Sep 17 00:00:00 2001
> From: Stefano Lattarini <stefano.lattarini@gmail.com>
> Date: Wed, 29 Aug 2012 16:37:24 +0200
> Subject: [PATCH 17/22] build: don't use recursive make to build the 'man'
>  subdirectory
> 
> * Makefile.am: Include 'man/local.mk'.
> (SUBDIRS): Remove 'man'.
> * configure.ac ($MAN): Adjust to have a leading 'man/' component.
>
s/to have/so that all its entries have/

> (AC_CONFIG_FILES): Remove 'man/Makefile'.
> * man/Makefile.am: Rename ...
> * man/local.mk: ... like this.  With further adjustments: each 'foo.1'
> target renamed like 'man/foo.1', each '../src/foo.c' dependency as
> 'src/foo.c', and each '$(srcdir)' usage as '$(srcdir)/man'.  Also ...
> (mandep): Adjust, removing the leading '../' component.
> Several whitespace adjustments wile at it.
>
s/wile/while/.

> (ASSORT): Remove, it's already defined in the top-level Makefile.am.
> * cfg.mk (sc_option_desc_uppercase, sc_man_file_correlation): Remove
> the associated recipes, they are now directly available from the
> included 'man/local.mk'.  Actually, the other changes in this commit
> have made these recipes instable and not completely correct, bu that
>
s/bu/but/

> will be fixed in later changes.
> ---

> From aaa9d080a4d0d60a6d5498cb01204115c8fc9b7d Mon Sep 17 00:00:00 2001
> From: Stefano Lattarini <stefano.lattarini@gmail.com>
> Date: Wed, 29 Aug 2012 17:37:35 +0200
> Subject: [PATCH 18/22] maint: move man-related syntax checks in cfg.mk
> 
> This is more natural, now that the top-level Makefile has access to
> all the variables and rules once defined only in 'man/Makefile.am'

> (that was before the previous commit).
>
This aside seems redundant now that I re-read it with a cold mind.  I'd
say we just remove it.

> * man/local.mk (all_programs, sc_option_desc_uppercase,
> sc_man_file_correlation check-x-vs-1, check-programs-vs-x): Move
> from here ...
> * cfg.mk: ... to here.  Adjust some comments in the process.
> ---
> 
> From 963dc11f81e569b971fda7eb73ffed91ef18a7ec Mon Sep 17 00:00:00 2001
> From: Stefano Lattarini <stefano.lattarini@gmail.com>
> Date: Wed, 29 Aug 2012 17:57:45 +0200
> Subject: [PATCH 20/22] maint: adjust syntax check 'sc_option_desc_uppercase'
> 
> * cfg.mk (sc_option_desc_uppercase): Here, by grafting the 'man/'
> prefix to the manpages obtained from the $(NO_INSTALL_PROGS_DEFAULT)
>
The last "the" can be safely removed IMHO.

> and listed as prerequisites for this rule.


> From 0aec09e9850fb107fc939c782642d33c8b91f188 Mon Sep 17 00:00:00 2001
> From: Stefano Lattarini <stefano.lattarini@gmail.com>
>
I think this change should have you as the author, as you've completely
changed my original patch (making it much better, I admit :-)

> Date: Wed, 29 Aug 2012 17:59:48 +0200
> Subject: [PATCH 21/22] build: factor out a little more re list of *.texi
>  files
> 
> We may well want to switch from checking all *.texi to
> checking only version-controlled .texi files, so encapsulate
> this concept in one place.
> 
> * doc/local.mk (doc_srcdir): Delete.  Use this instead:
> (texi_files): Define.  All usages adjusted.

Thanks,
  Stefano


From MAILER-DAEMON Thu Aug 30 09:23:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74ii-0004iv-6X
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:23:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54153)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T74ib-0004iJ-RJ
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:23:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T74iR-00030c-Sg
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:23:33 -0400
Received: from mx.meyering.net ([88.168.87.75]:33861)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T74iR-00030R-CZ
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:23:23 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 337C46045E;
	Thu, 30 Aug 2012 15:23:22 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
In-Reply-To: <503F6262.3040706@gmail.com> (Stefano Lattarini's message of
	"Thu, 30 Aug 2012 14:53:54 +0200")
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net> <503F0FDB.2020501@gmail.com>
	<871uio3d29.fsf@rho.meyering.net> <503F429F.9070409@gmail.com>
	<87ipc01soc.fsf@rho.meyering.net> <503F6262.3040706@gmail.com>
Date: Thu, 30 Aug 2012 15:23:22 +0200
Message-ID: <878vcw1pkl.fsf@rho.meyering.net>
Lines: 205
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 30 Aug 2012 13:23:38 -0000

Stefano Lattarini wrote:
> On 08/30/2012 02:16 PM, Jim Meyering wrote:
>>
>> I've merged those into the appropriate change sets, removed all
>> Signed-off-by: lines and made a few minor wording changes.
>> Please review the differences.  If you're happy with the result,
>> I'll push the lot.
>>
> I have few nits against myself then :-)  Inlined below.  Could you fix
> them before pushing?
>
> Thanks,
>   Stefano
>
>> From a5af26936f26bcde91c45d99c499d648ecc37af4 Mon Sep 17 00:00:00 2001
>> From: Stefano Lattarini <stefano.lattarini@gmail.com>
>> Date: Wed, 29 Aug 2012 13:55:49 +0200
>> Subject: [PATCH 03/22] build: add extra *.texi files to coreutils_TEXINFOS,
>>  not EXTRA_DIST
>>
>> * doc/Makefile.am (coreutils_TEXINFO): List them here, instead of ...
>> (EXTRA_DIST): ... listing them here.  This ensure
>>
> s/ensure/ensures/

Done.

>> the rebuild rules will be more faithful.
>> ($(DVIS), $(INFO_DEPS)): No need to depend on $(EXTRA_DIST) now.
>> ---
>
>> From 78f9df627616976bf27777d5751d60f0fe841cac Mon Sep 17 00:00:00 2001
>> From: Stefano Lattarini <stefano.lattarini@gmail.com>
>> Date: Wed, 29 Aug 2012 14:01:12 +0200
>> Subject: [PATCH 04/22] build: prefer '$(top_srcdir)/doc' over '$(srcdir)' in
>>  doc Makefile
>>
>> This is just a preparatory refactoring that will become useful in
>> a future change (where
>>
> s/where/when/ maybe.

I did s/where/in which/

>> the doc/Makefile.am makefile will be merged
>> with the top-level one).
>>
>> * doc/Makefile.am (doc_srcdir): New, defined to '$(top_srcdir)/doc'.
>>
> s/defined/define/.

Done

>> Use it throughout instead of "bare" '$(srcdir)'.
>> ---
>>  doc/Makefile.am | 28 +++++++++++++++-------------
>>  1 file changed, 15 insertions(+), 13 deletions(-)
>
>
>> From 88efe23e17882a42c167b9524858bb0883e18e70 Mon Sep 17 00:00:00 2001
>> From: Stefano Lattarini <stefano.lattarini@gmail.com>
>> Date: Wed, 29 Aug 2012 16:57:41 +0200
>> Subject: [PATCH 15/22] build: provide convenience target 'all_programs' also
>>  at top-level
>>
>> This will be mostly useful in future changes.
>>
>> * Makefile.am (all_programs): New, simply the work delegating to
>>
> s/the work/work by/.

Done.

>> From 56a914537bd732b6c38ea64ec25c7e0477fbb890 Mon Sep 17 00:00:00 2001
>> From: Stefano Lattarini <stefano.lattarini@gmail.com>
>> Date: Wed, 29 Aug 2012 21:31:57 +0200
>> Subject: [PATCH 16/22] build: rework some recipes in man/Makefile.am, for
>>  future changes
>>
>> This change is merely required to make future changes easier.
>>
>> In particular, since we are going to merge the contents of
>> 'man/Makefile.am' in
>>
> s/in/into/

Done.

>> the top-level Makefile, we need to avoid
>> conflicts with the rules and variables in 'dist-check.mk', and
>> to prepare for changes in the value of the '$*' variable in the
>>
> s/in the/as used in the/

Done.

>> recipe of the '.x -> .1' suffix rule.
>>
>> * man/Makefile.am (t, mapped_name): Delete, inlining their use ...
>> (.1.x): ... in the recipe of this suffix rule.  Other adjustments
>> to prepare to changes in the value of the '$*' automatic variable.
>> While at it, made more resilient about unlikely but possible failure.
>> Adjust and reorder few comments.
>> ---
>
>>
>> From f6696dd246d96ce3449119c4d2f2365bac156de1 Mon Sep 17 00:00:00 2001
>> From: Stefano Lattarini <stefano.lattarini@gmail.com>
>> Date: Wed, 29 Aug 2012 16:37:24 +0200
>> Subject: [PATCH 17/22] build: don't use recursive make to build the 'man'
>>  subdirectory
>>
>> * Makefile.am: Include 'man/local.mk'.
>> (SUBDIRS): Remove 'man'.
>> * configure.ac ($MAN): Adjust to have a leading 'man/' component.
>>
> s/to have/so that all its entries have/

I have a slight preference for using "each" over "all"

  * configure.ac ($MAN): Adjust so that each of its entries has a leading
  'man/' component.

>> (AC_CONFIG_FILES): Remove 'man/Makefile'.
>> * man/Makefile.am: Rename ...
>> * man/local.mk: ... like this.  With further adjustments: each 'foo.1'
>> target renamed like 'man/foo.1', each '../src/foo.c' dependency as
>> 'src/foo.c', and each '$(srcdir)' usage as '$(srcdir)/man'.  Also ...
>> (mandep): Adjust, removing the leading '../' component.
>> Several whitespace adjustments wile at it.
>>
> s/wile/while/.

Done

>> (ASSORT): Remove, it's already defined in the top-level Makefile.am.
>> * cfg.mk (sc_option_desc_uppercase, sc_man_file_correlation): Remove
>> the associated recipes, they are now directly available from the
>> included 'man/local.mk'.  Actually, the other changes in this commit
>> have made these recipes instable and not completely correct, bu that
>>
> s/bu/but/

Done

>> will be fixed in later changes.
>> ---
>
>> From aaa9d080a4d0d60a6d5498cb01204115c8fc9b7d Mon Sep 17 00:00:00 2001
>> From: Stefano Lattarini <stefano.lattarini@gmail.com>
>> Date: Wed, 29 Aug 2012 17:37:35 +0200
>> Subject: [PATCH 18/22] maint: move man-related syntax checks in cfg.mk
>>
>> This is more natural, now that the top-level Makefile has access to
>> all the variables and rules once defined only in 'man/Makefile.am'
>
>> (that was before the previous commit).
>>
> This aside seems redundant now that I re-read it with a cold mind.  I'd
> say we just remove it.

Done.

>> * man/local.mk (all_programs, sc_option_desc_uppercase,
>> sc_man_file_correlation check-x-vs-1, check-programs-vs-x): Move
>> from here ...
>> * cfg.mk: ... to here.  Adjust some comments in the process.
>> ---
>>
>> From 963dc11f81e569b971fda7eb73ffed91ef18a7ec Mon Sep 17 00:00:00 2001
>> From: Stefano Lattarini <stefano.lattarini@gmail.com>
>> Date: Wed, 29 Aug 2012 17:57:45 +0200
>> Subject: [PATCH 20/22] maint: adjust syntax check 'sc_option_desc_uppercase'
>>
>> * cfg.mk (sc_option_desc_uppercase): Here, by grafting the 'man/'
>> prefix to the manpages obtained from the $(NO_INSTALL_PROGS_DEFAULT)
>>
> The last "the" can be safely removed IMHO.

Done.

>> and listed as prerequisites for this rule.
>
>
>> From 0aec09e9850fb107fc939c782642d33c8b91f188 Mon Sep 17 00:00:00 2001
>> From: Stefano Lattarini <stefano.lattarini@gmail.com>
>>
> I think this change should have you as the author, as you've completely
> changed my original patch (making it much better, I admit :-)

Hmm... I guess so.
Thanks.

>> Date: Wed, 29 Aug 2012 17:59:48 +0200
>> Subject: [PATCH 21/22] build: factor out a little more re list of *.texi
>>  files
>>
>> We may well want to switch from checking all *.texi to
>> checking only version-controlled .texi files, so encapsulate
>> this concept in one place.
>>
>> * doc/local.mk (doc_srcdir): Delete.  Use this instead:
>> (texi_files): Define.  All usages adjusted.

Ok?


From MAILER-DAEMON Thu Aug 30 09:28:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74n2-0005Kt-St
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:28:08 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56313)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T74mv-0005KJ-Nn
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:28:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T74mt-0005G9-Ga
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:28:01 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:64064)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T74mt-0005Fq-9g
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:27:59 -0400
Received: by weys10 with SMTP id s10so1117358wey.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 06:27:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer;
	bh=2rKqjVDkMiJ5xC34Gmr1+Q3s4oe8QaRNf+Uir91xwHs=;
	b=hfPR8JH/AOeFQlI194WduI5VFGmf7smfqkkYdb/c16i0i9ENaEjDlHM50UQp/htXGM
	ldKbYYu6Aq0pkL7VW8LFWme5u0rOwEwKgi5HR3r1aSGHoJoF7+I/YDPNyYY76lZ1ElQt
	AlwUYfAaH12k6rscSQCv8+GrWJ5lGcdLRmr+Fhemst8WoBzuF1lWSt0dxRWPXE0PFl8l
	m7999hnwipH14aurph2xvQuWLRt9rovszsmqRj8/hyLfxkwhKfZKg0s2eaFLITIm+yVJ
	/fy9bhfp+nD0u9PQwdu/MrMfmuIG8hmq3EaHEvWwENUOzKiH75isUU4ksJs8oSX+ketI
	1JBA==
Received: by 10.216.197.162 with SMTP id t34mr3191210wen.5.1346333278440;
	Thu, 30 Aug 2012 06:27:58 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id b7sm1204034wiz.9.2012.08.30.06.27.56
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 06:27:57 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH] build: enable the 'subdir-objects' Automake option globally
Date: Thu, 30 Aug 2012 15:27:47 +0200
Message-Id: <095010a9c9f10122c1aa95229fcad010d67f485d.1346333243.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 13:28:07 -0000

This is not strictly required now (it will be once we make more
parts of the coreutils build system non-recursive), but enabling
it early help to ensure that we don't unwittingly introduce any
incompatibility or subtle breakage that might get to bite us later.

* configure.ac (AM_INIT_AUTOMAKE): Add  'subdir-objects'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 5651fd1..83b9fea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,8 @@ AC_CONFIG_SRCDIR([src/ls.c])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
 
-AM_INIT_AUTOMAKE([1.11.1 no-dist-gzip dist-xz color-tests parallel-tests])
+AM_INIT_AUTOMAKE([1.11.1 no-dist-gzip dist-xz color-tests parallel-tests
+                  subdir-objects])
 AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
 
 dnl POSIXCHECK is worthwhile for maintainers, but adds several seconds
-- 
1.7.12



From MAILER-DAEMON Thu Aug 30 09:36:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74vY-00071m-PW
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:36:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44990)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T74vU-00070U-VJ
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:36:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T74vQ-00005X-AT
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:36:52 -0400
Received: from mx.meyering.net ([88.168.87.75]:33900)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T74vQ-00005R-2t
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:36:48 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 559C16011C;
	Thu, 30 Aug 2012 15:36:47 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] scripts: git commit message hook: prohibit use of
	"Signed-off-by
In-Reply-To: <503F5992.507@gmail.com> (Stefano Lattarini's message of "Thu, 30
	Aug 2012 14:16:18 +0200")
References: <503F5992.507@gmail.com>
Date: Thu, 30 Aug 2012 15:36:47 +0200
Message-ID: <871uio1oy8.fsf@rho.meyering.net>
Lines: 24
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
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, 30 Aug 2012 13:36:55 -0000

Stefano Lattarini wrote:
> Jim Meyering wrote:
>>
>> I noticed a lot of Signed-off-by: lines in Stefano's series.
>> This makes our no-S-o-b policy more apparent:
...
>> +  $buf =~ /^ *Signed-off-by:/i
>> +    and return q(do not use "Signed-off-by:");
>> +
>>    return '';
>>  }
>>
> Sigh, this will likely cause problems with my "ci" git alias ("commit -s"),
> which I'm very finger-trained to use.  Couldn't the hook be instead enhanced
> to strip "Signed-off-by:" lines?  Or better again, those "Signed-off-by:"
> lines that refer to the author or the committer?

I suggest you avoid using git commit's -s option.
Instead, record your general preference in ~/.gitconfig and in
any coreutils working directory do this (assuming that differs):

    git config format.signoff true

>From then on, "git ci" will do what we want.


From MAILER-DAEMON Thu Aug 30 09:37:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74vq-00075j-UD
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:37:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45096)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T74vg-00074u-1p
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:37:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T74vW-00007e-Ff
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:37:03 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:62868)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T74vW-00006z-8N
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:36:54 -0400
Received: by bkcjc3 with SMTP id jc3so818959bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 06:36:53 -0700 (PDT)
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=XEM1VxVkcgVqvFHJrSeEYURO6ZZPPrASfQrktrZoxo0=;
	b=eWsVxDsFFQch8f9fhDCKnjDhE6bY/eI6LiLfLgVyQWJHK05Khmf0knvRi+jk1ceolA
	Ksf/6BTftGWn4i7Bo/zFRtwQGFquJTxLj0zjZNG0c+DzVxxNXUrBH0mCEgEp3sLdE8OY
	pYao0DPVobLhe8PgIAJQ4geg/9iy4P+KwVJ3uss6iXENGkSsBuR580xp/8qBwvKQIgPS
	kENGOHyT9EuFRqB1fGEvjedSEp4EBEGhs0XGZd7ZJcSgiwEEdqF+nMS1m7akInNE1aAO
	XgYo+zibRI9p8pUVrt9L9c+jV4iG/p7Xu0llUQgPsMnZKoQFbB0xj2OIyO2KaWpp+43Q
	lnQg==
Received: by 10.205.118.138 with SMTP id fq10mr2862037bkc.58.1346333813249;
	Thu, 30 Aug 2012 06:36:53 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id n5sm1344640bkv.14.2012.08.30.06.36.51
	(version=SSLv3 cipher=OTHER); Thu, 30 Aug 2012 06:36:52 -0700 (PDT)
Message-ID: <503F6C70.9060205@gmail.com>
Date: Thu, 30 Aug 2012 15:36:48 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net> <503F0FDB.2020501@gmail.com>
	<871uio3d29.fsf@rho.meyering.net> <503F429F.9070409@gmail.com>
	<87ipc01soc.fsf@rho.meyering.net> <503F6262.3040706@gmail.com>
	<878vcw1pkl.fsf@rho.meyering.net>
In-Reply-To: <878vcw1pkl.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 30 Aug 2012 13:37:13 -0000

On 08/30/2012 03:23 PM, Jim Meyering wrote:
> 
> Ok?
>
ACK.

Thanks,
  Stefano


From MAILER-DAEMON Thu Aug 30 09:39:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T74y4-0007Jn-7I
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:39:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45926)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T74xz-0007Ir-8G
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:39:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T74xp-0000lB-O1
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:39:27 -0400
Received: from mx.meyering.net ([88.168.87.75]:33907)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T74xp-0000kx-ER
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:39:17 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 8250D60103;
	Thu, 30 Aug 2012 15:39:16 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] scripts: git commit message hook: prohibit use of
	"Signed-off-by
In-Reply-To: <503F5992.507@gmail.com> (Stefano Lattarini's message of "Thu, 30
	Aug 2012 14:16:18 +0200")
References: <503F5992.507@gmail.com>
Date: Thu, 30 Aug 2012 15:39:16 +0200
Message-ID: <87vcg0zegr.fsf@rho.meyering.net>
Lines: 10
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
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, 30 Aug 2012 13:39:31 -0000

Stefano Lattarini wrote:
...
> Or better again, those "Signed-off-by:"
> lines that refer to the author or the committer?

As far as I've seen here, the only Signed-off-by lines
have always matched the name of the committer.  If we
decide there is something to be gained by allowing
"Signed-off-by: someone-else", then I'll be happy to
relax the hook.


From MAILER-DAEMON Thu Aug 30 09:54:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T75CO-0000dF-8l
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 09:54:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39343)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T75CI-0000bf-PW
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:54:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T75CD-0006A6-Mw
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:54:14 -0400
Received: from mail-ey0-f169.google.com ([209.85.215.169]:55457)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T75CD-00069j-GW
	for coreutils@gnu.org; Thu, 30 Aug 2012 09:54:09 -0400
Received: by eaaf11 with SMTP id f11so692235eaa.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 06:54:08 -0700 (PDT)
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=vpz3SH0hkXadGw5atU/nwx1ktDPEk1Nb4P2wRUJqk4I=;
	b=zAazxn+vuUdk0cFHWBC04kvhW9w8X8Ij7dPaqhncqkz6O2d9ZATVYxMIUgKTmDQSda
	lHeCGdrSBhYILbjeElAWP4Xb9lZwyqiL9iYkkQzJVnjDsbAFCzw465F7Oll+X5dp9Zn2
	QKK2oYleeLQzHys4Cae6TlNq8rN1L/Pwx9PYvqeLd2taUjSRmeboXBorqcCwD9b6iutf
	1hNFng1lwqPQWAzbg+gFPnjBYBs/WbODUmNzrhprXihR92At5zVmq075DkcEHs+FGeDh
	Ef1ePxc5r8SABfVQlF4How2qNqoh077xP4ZoozT7AXyQgK4l+3M1Cpx/5EG4cIUMPsEz
	JrQQ==
Received: by 10.14.181.132 with SMTP id l4mr6746087eem.17.1346334848612;
	Thu, 30 Aug 2012 06:54:08 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id h42sm5169205eem.5.2012.08.30.06.54.07
	(version=SSLv3 cipher=OTHER); Thu, 30 Aug 2012 06:54:07 -0700 (PDT)
Message-ID: <503F707C.1010507@gmail.com>
Date: Thu, 30 Aug 2012 15:54:04 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] scripts: git commit message hook: prohibit use of
	"Signed-off-by
References: <503F5992.507@gmail.com> <871uio1oy8.fsf@rho.meyering.net>
In-Reply-To: <871uio1oy8.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.169
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, 30 Aug 2012 13:54:19 -0000

On 08/30/2012 03:36 PM, Jim Meyering wrote:
> Stefano Lattarini wrote:
>> Jim Meyering wrote:
>>>
>>> I noticed a lot of Signed-off-by: lines in Stefano's series.
>>> This makes our no-S-o-b policy more apparent:
> ...
>>> +  $buf =~ /^ *Signed-off-by:/i
>>> +    and return q(do not use "Signed-off-by:");
>>> +
>>>    return '';
>>>  }
>>>
>> Sigh, this will likely cause problems with my "ci" git alias ("commit -s"),
>> which I'm very finger-trained to use.  Couldn't the hook be instead enhanced
>> to strip "Signed-off-by:" lines?  Or better again, those "Signed-off-by:"
>> lines that refer to the author or the committer?
> 
> I suggest you avoid using git commit's -s option.
> Instead, record your general preference in ~/.gitconfig and in
> any coreutils working directory do this (assuming that differs):
> 
>     git config format.signoff true
>
s/true/false/ I guess ...

> From then on, "git ci" will do what we want.
>
OK, I'll surely give it a try.

Thanks,
  Stefano


From MAILER-DAEMON Thu Aug 30 10:02:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T75KG-0001WH-MK
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 10:02:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50377)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T75K5-0001VA-SM
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:02:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T75K0-000195-6d
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:02:17 -0400
Received: from mx.meyering.net ([88.168.87.75]:33972)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T75Jz-000191-Vm
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:02:12 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id B2EF5602A6;
	Thu, 30 Aug 2012 16:02:10 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] scripts: git commit message hook: prohibit use of
	"Signed-off-by
In-Reply-To: <503F707C.1010507@gmail.com> (Stefano Lattarini's message of
	"Thu, 30 Aug 2012 15:54:04 +0200")
References: <503F5992.507@gmail.com> <871uio1oy8.fsf@rho.meyering.net>
	<503F707C.1010507@gmail.com>
Date: Thu, 30 Aug 2012 16:02:10 +0200
Message-ID: <87d328zdel.fsf@rho.meyering.net>
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
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, 30 Aug 2012 14:02:27 -0000

Stefano Lattarini wrote:

> On 08/30/2012 03:36 PM, Jim Meyering wrote:
>> Stefano Lattarini wrote:
>>> Jim Meyering wrote:
>>>>
>>>> I noticed a lot of Signed-off-by: lines in Stefano's series.
>>>> This makes our no-S-o-b policy more apparent:
>> ...
>>>> +  $buf =~ /^ *Signed-off-by:/i
>>>> +    and return q(do not use "Signed-off-by:");
>>>> +
>>>>    return '';
>>>>  }
>>>>
>>> Sigh, this will likely cause problems with my "ci" git alias ("commit -s"),
>>> which I'm very finger-trained to use.  Couldn't the hook be instead enhanced
>>> to strip "Signed-off-by:" lines?  Or better again, those "Signed-off-by:"
>>> lines that refer to the author or the committer?
>>
>> I suggest you avoid using git commit's -s option.
>> Instead, record your general preference in ~/.gitconfig and in
>> any coreutils working directory do this (assuming that differs):
>>
>>     git config format.signoff true
>>
> s/true/false/ I guess ...

Hah!  Yes, definitely.


From MAILER-DAEMON Thu Aug 30 10:06:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T75Nu-00027T-Fp
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 10:06:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38280)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T75Nn-00026M-Nn
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:06:12 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T75Nj-0002Wx-JK
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:06:07 -0400
Received: from mx.meyering.net ([88.168.87.75]:33986)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T75Nj-0002Wh-AL
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:06:03 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 80959602A6;
	Thu, 30 Aug 2012 16:06:02 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] build: enable the 'subdir-objects' Automake option
	globally
In-Reply-To: <095010a9c9f10122c1aa95229fcad010d67f485d.1346333243.git.stefano.lattarini@gmail.com>
	(Stefano Lattarini's message of "Thu, 30 Aug 2012 15:27:47 +0200")
References: <095010a9c9f10122c1aa95229fcad010d67f485d.1346333243.git.stefano.lattarini@gmail.com>
Date: Thu, 30 Aug 2012 16:06:02 +0200
Message-ID: <877gsgzd85.fsf@rho.meyering.net>
Lines: 34
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 30 Aug 2012 14:06:12 -0000

Stefano Lattarini wrote:
> This is not strictly required now (it will be once we make more
> parts of the coreutils build system non-recursive), but enabling
> it early help to ensure that we don't unwittingly introduce any
> incompatibility or subtle breakage that might get to bite us later.
>
> * configure.ac (AM_INIT_AUTOMAKE): Add  'subdir-objects'.
>
> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
> ---
>  configure.ac | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 5651fd1..83b9fea 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -32,7 +32,8 @@ AC_CONFIG_SRCDIR([src/ls.c])
>  AC_CONFIG_AUX_DIR([build-aux])
>  AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
>
> -AM_INIT_AUTOMAKE([1.11.1 no-dist-gzip dist-xz color-tests parallel-tests])
> +AM_INIT_AUTOMAKE([1.11.1 no-dist-gzip dist-xz color-tests parallel-tests
> +                  subdir-objects])

Thanks.  That looks fine.
I adjusted log message wording to this (also removing S-o-b):

  This is not strictly required now (it will be once we make more
  parts of the coreutils build system non-recursive), but enabling
  it early helps to ensure that we don't unwittingly introduce any
  incompatibility or subtle breakage later.

  * configure.ac (AM_INIT_AUTOMAKE): Add  'subdir-objects'.


From MAILER-DAEMON Thu Aug 30 10:11:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T75Se-0002Q7-5C
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 10:11:08 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59842)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T75ST-0002PU-Ft
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:11:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T75SP-0004SP-Gs
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:10:57 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:36275)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T75SP-0004S5-AL
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:10:53 -0400
Received: by bkcjc3 with SMTP id jc3so837656bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 07:10:52 -0700 (PDT)
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=IWTOwVoyFa2WQqD0l1kaL+Ve8gV3ckx4/NRNTJXN8uY=;
	b=O4FEDUk7mA4ByZ93mysOA71rRa1ao0DyAsXB+bktKTJzFewrdzAnmgJxCAiy4aUc46
	KI+D+VNl9j71+JGMBHLWao39GZUUxRfr9w5DaLi0+sOv2iAY8RZ4vPocSq0mHKJnny2i
	bMLyRpxCECuOVY9ZH+zl4zvpXua8lEQ10dvFu05MXTnh9t0SYTdj1GZEGio7shhOMMD6
	E1MlV7JPYq2VdH9P9YaRhnjrAIYIrxqMIWsIVg7F4HStFpDXlE1TenLcHiwpgIEkS4jX
	9S8wuCY1BKvvUntMJqNrCu/cYzUlH6a4d3no0ceURcDiUXuToEq6BdClvUA7uy7EK3cA
	j1yA==
Received: by 10.204.156.17 with SMTP id u17mr2900710bkw.52.1346335852276;
	Thu, 30 Aug 2012 07:10:52 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id y20sm1436851bkv.11.2012.08.30.07.10.50
	(version=SSLv3 cipher=OTHER); Thu, 30 Aug 2012 07:10:51 -0700 (PDT)
Message-ID: <503F7467.8040308@gmail.com>
Date: Thu, 30 Aug 2012 16:10:47 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] build: enable the 'subdir-objects' Automake option
	globally
References: <095010a9c9f10122c1aa95229fcad010d67f485d.1346333243.git.stefano.lattarini@gmail.com>
	<877gsgzd85.fsf@rho.meyering.net>
In-Reply-To: <877gsgzd85.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 30 Aug 2012 14:11:06 -0000

On 08/30/2012 04:06 PM, Jim Meyering wrote:
>
> Thanks.  That looks fine.
> I adjusted log message wording to this (also removing S-o-b):
>
Thanks.  One minor nit (against myself) ...

>   This is not strictly required now (it will be once we make more
>   parts of the coreutils build system non-recursive), but enabling
>   it early helps to ensure that we don't unwittingly introduce any
>   incompatibility or subtle breakage later.
> 
>   * configure.ac (AM_INIT_AUTOMAKE): Add  'subdir-objects'.
>
... extra space here!

Regards,
  Stefano


From MAILER-DAEMON Thu Aug 30 10:13:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T75VM-0002cA-Gt
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 10:13:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60928)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T75VH-0002c1-3o
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:13:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T75VB-0005Si-Bo
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:13:50 -0400
Received: from mx.meyering.net ([88.168.87.75]:34005)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T75VB-0005Sc-3H
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:13:45 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 26ABB6011C;
	Thu, 30 Aug 2012 16:13:44 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] build: enable the 'subdir-objects' Automake option
	globally
In-Reply-To: <503F7467.8040308@gmail.com> (Stefano Lattarini's message of
	"Thu, 30 Aug 2012 16:10:47 +0200")
References: <095010a9c9f10122c1aa95229fcad010d67f485d.1346333243.git.stefano.lattarini@gmail.com>
	<877gsgzd85.fsf@rho.meyering.net> <503F7467.8040308@gmail.com>
Date: Thu, 30 Aug 2012 16:13:44 +0200
Message-ID: <871uiozcvb.fsf@rho.meyering.net>
Lines: 19
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 30 Aug 2012 14:13:55 -0000

Stefano Lattarini wrote:

> On 08/30/2012 04:06 PM, Jim Meyering wrote:
>>
>> Thanks.  That looks fine.
>> I adjusted log message wording to this (also removing S-o-b):
>>
> Thanks.  One minor nit (against myself) ...
>
>>   This is not strictly required now (it will be once we make more
>>   parts of the coreutils build system non-recursive), but enabling
>>   it early helps to ensure that we don't unwittingly introduce any
>>   incompatibility or subtle breakage later.
>>
>>   * configure.ac (AM_INIT_AUTOMAKE): Add  'subdir-objects'.
>>
> ... extra space here!

Sorry, I'd already pushed it.


From MAILER-DAEMON Thu Aug 30 10:21:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T75cs-0003OS-IB
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 10:21:42 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47790)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T75ch-0003Mq-IX
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:21:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T75cb-0008Ur-B2
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:21:31 -0400
Received: from mx.meyering.net ([88.168.87.75]:34028)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T75cb-0008Un-2B
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:21:25 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id EA5416011C;
	Thu, 30 Aug 2012 16:21:23 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 4/7] tests: avoid use of '-T' in shebang line to enable
	perl taint mode
In-Reply-To: <af9e85f46fbd010c59e966808da5d89b2b217cc8.1346327498.git.stefano.lattarini@gmail.com>
	(Stefano Lattarini's message of "Thu, 30 Aug 2012 14:13:10 +0200")
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<cover.1346327497.git.stefano.lattarini@gmail.com>
	<af9e85f46fbd010c59e966808da5d89b2b217cc8.1346327498.git.stefano.lattarini@gmail.com>
Date: Thu, 30 Aug 2012 16:21:23 +0200
Message-ID: <87vcg0xxy4.fsf@rho.meyering.net>
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 30 Aug 2012 14:21:41 -0000

Stefano Lattarini wrote:
> * tests/rm/fail-eperm: Rename ...
> * tests/rm/fail-eperm.xpl: ... like this
> * tests/Makefile.am (TESTS): Adjust.
> (TEST_EXTENSIONS): New, list '.xpl'.
> (XPL_TEST_LOGS): New, run a perl test in tainted mode.
> * tests/shell-or-perl: Simplify this script: we no longer need to
> parse the shebang line and adjust the flags in the perl invocation
> accordingly.
> ---
>  tests/Makefile.am                       | 8 +++++++-
>  tests/rm/{fail-eperm => fail-eperm.xpl} | 0
>  tests/shell-or-perl                     | 9 ++-------
>  3 files changed, 9 insertions(+), 8 deletions(-)
>  rename tests/rm/{fail-eperm => fail-eperm.xpl} (100%)

Thanks for working on all of this.

This patch turns off -T (taint-checking) for all but one of the perl-based
test scripts.  I think it is a valuable feature to leave enabled for as
many tests as possible.  Do you have a good reason for turning it off?
I.e., why not define PL_LOG_COMPILER to use -T?


From MAILER-DAEMON Thu Aug 30 10:26:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T75hy-0004nG-Bh
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 10:26:58 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54637)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1T75hs-0004iv-QE
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:26:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1T75hj-0001vg-0i
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:26:52 -0400
Received: from mail-vb0-f41.google.com ([209.85.212.41]:45796)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1T75hi-0001vc-Si
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:26:42 -0400
Received: by vbkv13 with SMTP id v13so2241453vbk.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 07:26:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	bh=QXqwzDm+Vc7Zh8nEUmOzO64QgzAy0SF2U9WPENI0+gE=;
	b=p2jf19DUZLVcZPPZKrpETYBdZ/9X71ID87IkafOPPwPzwAKstMkIOWaDuGeOAwyNsv
	P74LL5w93xhL5ZAxYsQmBXU0Hze4YRN0QsNmFzept8BFZTOG7aRZc9PgLHPv7XPB+euQ
	oKLMcZGCkKTbhw627+6fvUv/jNms4RcR4YnjsXEf0nM9Bp2byAMWRHcQB2SaY11nNiN7
	Ce0f3CLyWSDxoZAr1N/aLnKYrhnzAmr3hpajf6ANznGHc1g5P4yuNjRt8l5sY2KQFGpz
	gmZtIj3iiqKJriQChUSswr84US6R9KVl/Qw59LgmBvD2jCjYIj1WzGtSuJ+5k/16ZUR+
	f2Pw==
Received: by 10.58.151.197 with SMTP id us5mr3535353veb.14.1346336456971;
	Thu, 30 Aug 2012 07:20:56 -0700 (PDT)
Received: from [143.48.11.9] (tango.cshl.edu. [143.48.11.9])
	by mx.google.com with ESMTPS id b7sm373607vdv.2.2012.08.30.07.20.56
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 07:20:56 -0700 (PDT)
Message-ID: <503F76C7.7080606@gmail.com>
Date: Thu, 30 Aug 2012 10:20:55 -0400
From: Assaf Gordon <assafgordon@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.4) Gecko/20120510 Icedove/10.0.4
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: sort: new feature: use environment variable to set buffer size
References: <503E8078.9090009@gmail.com> <503EC565.1090900@draigBrady.com>
	<87ipc03g75.fsf@rho.meyering.net>
In-Reply-To: <87ipc03g75.fsf@rho.meyering.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.41
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, 30 Aug 2012 14:26:56 -0000

Jim Meyering wrote, On 08/30/2012 05:02 AM:
> P=E1draig Brady wrote:
>> Thanks for the detailed rationale, however
>> ...
>>
>> So currently I'd be 70:30 against adding such a variable.
>=20
> Thanks for replying, P=E1draig.  Those are good points.
> Another is that we have a strong aversion to adding
> support for new environment variables in coreutils programs
> because it makes formerly-robust usage prone to malfunction or abuse.
>=20

Thanks for the detailed reply. I understand your objection to a new envir=
onment variable.


Perhaps you can suggest an alternative:

I'm looking for a way to make a script (that uses sort with pipe input) b=
e adapted "well enough" to work on servers with varying=20
hardware (memory and CPU).
When using regular file input, the memory usage will be efficient (with t=
he recent changes, based on the file size and up to a certain threshold o=
f total/available physical memory).
But when using pipes, there's no easy way to set memory usage, and the de=
fault is very low.

Perhaps there's a way to use "default_sort_size()" with pipe input?=20

Or expose the value returned by "default_sort_size()" as a command-line p=
rogram (similar to "nproc")?
(I couldn't find a portable way to report total/available ram across diff=
erent unix machines).

possibly going on a tangent here, but a small program like "physmem" that=
 will report either total, available, or recommended ram could be useful.=


Any suggestions will be appreciated.

Thanks,
 -gordon




From MAILER-DAEMON Thu Aug 30 10:42:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T75xI-0007ng-KC
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 10:42:48 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36529)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T75xD-0007mE-5I
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:42:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T75x9-00082r-2s
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:42:43 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:50137)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T75x8-00082Y-SK
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:42:39 -0400
Received: by bkcjc3 with SMTP id jc3so856353bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 07:42:38 -0700 (PDT)
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=iDMtgiTFvspln3ushBCo0nlPPKoETL/As8jWhYSXpSw=;
	b=VSdBmfn+7eCOvLapV03P6aSQoPgwKvoHX0CLY0RSDIWEmm5fszeDFVIN6ou4EYgpod
	zUnkOupq9GIWa34eRSuj486Fsj5b1i6DB5WV1zUdBNCiElLtlBk0+/Uyf0AeLvp/PO5b
	6/vRR4BdpM8lmT5fizr9MGTqnEHEPkC9ZB3zL6AE8p0Yu5/PRuCPZlvFvkHzBsigbhQX
	/XRE1/0NfoVtyDCHEuX4y9gUqH/mSOYlWxxPWLj8cdp/ojGOm09wln/SyjO7Wt01YKV4
	ot8hFEcBgut9Y9guZwLBnV0XeggvPMmABh54FMB7GW7fWpjWAsdx1i4sRfskyaJLJ9ru
	/KOg==
Received: by 10.205.134.139 with SMTP id ic11mr2965611bkc.40.1346337757647;
	Thu, 30 Aug 2012 07:42:37 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hs2sm1530203bkc.1.2012.08.30.07.42.34
	(version=SSLv3 cipher=OTHER); Thu, 30 Aug 2012 07:42:35 -0700 (PDT)
Message-ID: <503F7BD7.3000000@gmail.com>
Date: Thu, 30 Aug 2012 16:42:31 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 4/7] tests: avoid use of '-T' in shebang line to enable
	perl taint mode
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<cover.1346327497.git.stefano.lattarini@gmail.com>
	<af9e85f46fbd010c59e966808da5d89b2b217cc8.1346327498.git.stefano.lattarini@gmail.com>
	<87vcg0xxy4.fsf@rho.meyering.net>
In-Reply-To: <87vcg0xxy4.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 30 Aug 2012 14:42:47 -0000

On 08/30/2012 04:21 PM, Jim Meyering wrote:
> Stefano Lattarini wrote:
>> * tests/rm/fail-eperm: Rename ...
>> * tests/rm/fail-eperm.xpl: ... like this
>> * tests/Makefile.am (TESTS): Adjust.
>> (TEST_EXTENSIONS): New, list '.xpl'.
>> (XPL_TEST_LOGS): New, run a perl test in tainted mode.
>> * tests/shell-or-perl: Simplify this script: we no longer need to
>> parse the shebang line and adjust the flags in the perl invocation
>> accordingly.
>> ---
>>  tests/Makefile.am                       | 8 +++++++-
>>  tests/rm/{fail-eperm => fail-eperm.xpl} | 0
>>  tests/shell-or-perl                     | 9 ++-------
>>  3 files changed, 9 insertions(+), 8 deletions(-)
>>  rename tests/rm/{fail-eperm => fail-eperm.xpl} (100%)
> 
> Thanks for working on all of this.
> 
> This patch turns off -T (taint-checking) for all but one of the perl-based
> test scripts.
>
Which, unless I'm mistaken, is the same behaviour we had *before* the patch.
Or am I missing something.

> I think it is a valuable feature to leave enabled for as
> many tests as possible.  Do you have a good reason for turning it off?
> I.e., why not define PL_LOG_COMPILER to use -T?
>
This patch tries keep the behaviour of the perl test scripts as  unchaged
as possible, an I think this should not be changed.  If you believe running
most '*.pl' tests with '-T' would be better, that could be easily done in
a follow-up patch to be applied after this series, no?

Thanks,
  Stefano


From MAILER-DAEMON Thu Aug 30 10:50:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T764u-0002Lr-6F
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 10:50:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45774)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T764m-0002IE-UH
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:50:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T764i-0002RW-Ol
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:50:32 -0400
Received: from mx.meyering.net ([88.168.87.75]:34103)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T764i-0002R0-HW
	for coreutils@gnu.org; Thu, 30 Aug 2012 10:50:28 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 78C2160103;
	Thu, 30 Aug 2012 16:50:27 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 4/7] tests: avoid use of '-T' in shebang line to enable
	perl taint mode
In-Reply-To: <503F7BD7.3000000@gmail.com> (Stefano Lattarini's message of
	"Thu, 30 Aug 2012 16:42:31 +0200")
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<cover.1346327497.git.stefano.lattarini@gmail.com>
	<af9e85f46fbd010c59e966808da5d89b2b217cc8.1346327498.git.stefano.lattarini@gmail.com>
	<87vcg0xxy4.fsf@rho.meyering.net> <503F7BD7.3000000@gmail.com>
Date: Thu, 30 Aug 2012 16:50:27 +0200
Message-ID: <87k3wgxwlo.fsf@rho.meyering.net>
Lines: 28
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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, 30 Aug 2012 14:50:38 -0000

Stefano Lattarini wrote:
> On 08/30/2012 04:21 PM, Jim Meyering wrote:
>> Stefano Lattarini wrote:
>>> * tests/rm/fail-eperm: Rename ...
>>> * tests/rm/fail-eperm.xpl: ... like this
>>> * tests/Makefile.am (TESTS): Adjust.
>>> (TEST_EXTENSIONS): New, list '.xpl'.
>>> (XPL_TEST_LOGS): New, run a perl test in tainted mode.
>>> * tests/shell-or-perl: Simplify this script: we no longer need to
>>> parse the shebang line and adjust the flags in the perl invocation
>>> accordingly.
>>> ---
>>>  tests/Makefile.am                       | 8 +++++++-
>>>  tests/rm/{fail-eperm => fail-eperm.xpl} | 0
>>>  tests/shell-or-perl                     | 9 ++-------
>>>  3 files changed, 9 insertions(+), 8 deletions(-)
>>>  rename tests/rm/{fail-eperm => fail-eperm.xpl} (100%)
>>
>> Thanks for working on all of this.
>>
>> This patch turns off -T (taint-checking) for all but one of the perl-based
>> test scripts.
>>
> Which, unless I'm mistaken, is the same behaviour we had *before* the patch.
> Or am I missing something.

Oh... I was relying on memory rather than looking at code.
You're right.  Only that one test currently uses -T.


From MAILER-DAEMON Thu Aug 30 11:36:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T76nO-0003rE-69
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 11:36:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54318)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1T76mt-0003b9-VF
	for coreutils@gnu.org; Thu, 30 Aug 2012 11:36:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1T76mK-0005LB-Fk
	for coreutils@gnu.org; Thu, 30 Aug 2012 11:36:07 -0400
Received: from mail-vb0-f41.google.com ([209.85.212.41]:37739)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <assafgordon@gmail.com>) id 1T76mK-0005L2-7Y
	for coreutils@gnu.org; Thu, 30 Aug 2012 11:35:32 -0400
Received: by vbkv13 with SMTP id v13so2356555vbk.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 08:35:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:user-agent:mime-version:to:subject
	:content-type; bh=SsTZY+BRKaAwXIJm/bfSQl1z+eHO/1VGT6fNXDqG2RI=;
	b=X0LWlDS4hGn3DFOYyavD30k6ueV9NjCrNaMMR32Oq2KnoQkA29G3DfWVTpE8bytBce
	+3pB5eCbYyc8hUxibzwsYgJAKNJpsqVUkjRxZwApeZb6DPvHmZFE6Xn8cWw/gOBWhWo8
	rhRzN0ifrL20lntpAW0YySFTskcwx9ugR6S3IkTyKui7GPkL8q4zBhsF2Iqws5nG8MwB
	mA0fafsyyqnsXGKARpL0lWWfwIIfkHvFdO78VVtd6REmQB8DeRS3O1Xvqw8ln5GCSY/k
	+1a/xI/a+kMM+77c7BcAxuexlVBfBocyYYmeL8uchCeqDRoYXcsGvFpgpYVqFjNcJyyv
	XA0g==
Received: by 10.52.33.139 with SMTP id r11mr2898081vdi.11.1346340931733;
	Thu, 30 Aug 2012 08:35:31 -0700 (PDT)
Received: from [143.48.11.9] (tango.cshl.edu. [143.48.11.9])
	by mx.google.com with ESMTPS id by3sm464599vdc.17.2012.08.30.08.35.30
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 08:35:30 -0700 (PDT)
Message-ID: <503F8842.1040002@gmail.com>
Date: Thu, 30 Aug 2012 11:35:30 -0400
From: Assaf Gordon <assafgordon@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.4) Gecko/20120510 Icedove/10.0.4
MIME-Version: 1.0
To: Coreutils <coreutils@gnu.org>
Subject: physmem: a new program to report memory information
Content-Type: multipart/mixed; boundary="------------030506080008090209070906"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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: Thu, 30 Aug 2012 15:36:37 -0000

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

Hello,

Related to the previous sort+memory envvar usage thread: http://thread.gmane.org/gmane.comp.gnu.coreutils.general/3028/focus=3090 .

Attached is a suggestion for a tiny command-line program "physmem", that similarly to "nproc", exposes the gnulib functions "physmem_total()" and "physmem_available()".

The code is closely modeled after nproc, and the "recommended" memory usage is calculated using sort's default_sort_size() .

The program works like this:
===
$ ./src/physmem --help
Usage: ./src/physmem [OPTION]...
Prints information about physical memory.

  -t, --total           print the total physical memory.
  -a, --available       print the available physical memory.
  -r, --recommended     print a safe recommended amount of useable memory.
  -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)
      --si              like -h, but use powers of 1000 not 1024
      --help     display this help and exit
      --version  output version information and exit

Report physmem bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report physmem translation bugs to <http://translationproject.org/team/>
For complete documentation, run: info coreutils 'physmem invocation'
===

The actual working code (at the bottom of physmem.c) is:
===
  switch(memory_report_type)
    {
    case total:
      memory = physmem_total();
      break;

    case available:
      memory = physmem_available();
      break;

    case recommended:
      memory = default_sort_size();
      break;
    }

  char buf[LONGEST_HUMAN_READABLE + 1];
  fputs (human_readable (memory, buf, human_output_opts,1,1),stdout);
  fputs("\n", stdout);
===

So it's very simple, and rely on existing coreutils code.

Please let me know if this is something you'd be willing to include in coreutils.

Thanks,
 -gordon

--------------030506080008090209070906
Content-Type: text/x-diff;
 name="0001-physmem-A-new-program-to-report-mem-information.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0001-physmem-A-new-program-to-report-mem-information.patch"

>From 1eccf56a49bc0aa3f167a0fce1a65c91a92ed468 Mon Sep 17 00:00:00 2001
From: Assaf Gordon <assafgordon@gmail.com>
Date: Thu, 30 Aug 2012 11:21:57 -0400
Subject: [PATCH] physmem: A new program to report mem information.

---
 src/Makefile.am |    2 +
 src/physmem.c   |  215 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 217 insertions(+), 0 deletions(-)
 create mode 100644 src/physmem.c

diff --git a/src/Makefile.am b/src/Makefile.am
index 896c902..ae0c20c7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -90,6 +90,7 @@ EXTRA_PROGRAMS = \
   od		\
   paste		\
   pathchk	\
+  physmem	\
   pr		\
   printenv	\
   printf	\
@@ -198,6 +199,7 @@ chroot_LDADD = $(LDADD)
 cksum_LDADD = $(LDADD)
 comm_LDADD = $(LDADD)
 nproc_LDADD = $(LDADD)
+physmem_LDADD = $(LDADD)
 cp_LDADD = $(LDADD)
 csplit_LDADD = $(LDADD)
 cut_LDADD = $(LDADD)
diff --git a/src/physmem.c b/src/physmem.c
new file mode 100644
index 0000000..b990503
--- /dev/null
+++ b/src/physmem.c
@@ -0,0 +1,215 @@
+/* physmem - report the total/available/recommended memory
+   Copyright (C) 2009-2012 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Assaf Gordon.  */
+
+#include <config.h>
+#include <getopt.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#include "system.h"
+#include "error.h"
+#include "xstrtol.h"
+#include "physmem.h"
+#include "human.h"
+
+#ifndef RLIMIT_DATA
+struct rlimit { size_t rlim_cur; };
+# define getrlimit(Resource, Rlp) (-1)
+#endif
+
+/* The official name of this program (e.g., no 'g' prefix).  */
+#define PROGRAM_NAME "physmem"
+
+#define AUTHORS proper_name ("Assaf Gordon")
+
+/* Human-readable options for output.  */
+static int human_output_opts;
+
+enum memory_report_type
+  {
+    total,			/* default */
+    available,
+    recommended
+  };
+
+static enum memory_report_type memory_report_type = total;
+
+/* For long options that have no equivalent short option, use a
+   non-character as a pseudo short option, starting with CHAR_MAX + 1.  */
+enum
+{
+  HUMAN_SI_OPTION= CHAR_MAX + 1
+};
+
+static struct option const longopts[] =
+{
+  {"total", no_argument, NULL, 't'},
+  {"available", no_argument, NULL, 'a'},
+  {"recommended", no_argument, NULL, 'r'},
+  {"human", no_argument, NULL, 'h'},
+  {"si", no_argument, NULL, HUMAN_SI_OPTION},
+  {GETOPT_HELP_OPTION_DECL},
+  {GETOPT_VERSION_OPTION_DECL},
+  {NULL, 0, NULL, 0}
+};
+
+/* Return the default sort size.
+   FIXME: this function was copied from sort.c .
+          extract it to a separate module.
+ */
+static size_t
+default_sort_size (void)
+{
+  /* Let SIZE be MEM, but no more than the maximum object size,
+     total memory, or system resource limits.  Don't bother to check
+     for values like RLIM_INFINITY since in practice they are not much
+     less than SIZE_MAX.  */
+  size_t size = SIZE_MAX;
+  struct rlimit rlimit;
+  if (getrlimit (RLIMIT_DATA, &rlimit) == 0 && rlimit.rlim_cur < size)
+    size = rlimit.rlim_cur;
+#ifdef RLIMIT_AS
+  if (getrlimit (RLIMIT_AS, &rlimit) == 0 && rlimit.rlim_cur < size)
+    size = rlimit.rlim_cur;
+#endif
+
+  /* Leave a large safety margin for the above limits, as failure can
+     occur when they are exceeded.  */
+  size /= 2;
+
+#ifdef RLIMIT_RSS
+  /* Leave a 1/16 margin for RSS to leave room for code, stack, etc.
+     Exceeding RSS is not fatal, but can be quite slow.  */
+  if (getrlimit (RLIMIT_RSS, &rlimit) == 0 && rlimit.rlim_cur / 16 * 15 < size)
+    size = rlimit.rlim_cur / 16 * 15;
+#endif
+
+  /* Let MEM be available memory or 1/8 of total memory, whichever
+     is greater.  */
+  double avail = physmem_available ();
+  double total = physmem_total ();
+  double mem = MAX (avail, total / 8);
+
+  /* Leave a 1/4 margin for physical memory.  */
+  if (total * 0.75 < size)
+    size = total * 0.75;
+
+  /* Return the minimum of MEM and SIZE, but no less than
+     MIN_SORT_SIZE.  Avoid the MIN macro here, as it is not quite
+     right when only one argument is floating point.  */
+  if (mem < size)
+    size = mem;
+  return size;
+}
+
+void
+usage (int status)
+{
+  if (status != EXIT_SUCCESS)
+    emit_try_help ();
+  else
+    {
+      printf (_("Usage: %s [OPTION]...\n"), program_name);
+      fputs (_("\
+Prints information about physical memory.\n\
+\n\
+"), stdout);
+      fputs (_("\
+  -t, --total           print the total physical memory.\n\
+  -a, --available       print the available physical memory.\n\
+  -r, --recommended     print a safe recommended amount of useable memory.\n\
+  -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)\n\
+      --si              like -h, but use powers of 1000 not 1024\n\
+"), stdout);
+
+      fputs (HELP_OPTION_DESCRIPTION, stdout);
+      fputs (VERSION_OPTION_DESCRIPTION, stdout);
+      emit_ancillary_info ();
+    }
+  exit (status);
+}
+
+int
+main (int argc, char **argv)
+{
+  size_t memory =0 ;
+  initialize_main (&argc, &argv);
+  set_program_name (argv[0]);
+  setlocale (LC_ALL, "");
+  bindtextdomain (PACKAGE, LOCALEDIR);
+  textdomain (PACKAGE);
+
+  atexit (close_stdout);
+
+  while (1)
+    {
+      int c = getopt_long (argc, argv, "thar", longopts, NULL);
+      if (c == -1)
+        break;
+      switch (c)
+        {
+        case_GETOPT_HELP_CHAR;
+
+        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
+        case 't':
+          memory_report_type = total;
+          break;
+
+        case 'a':
+          memory_report_type = available;
+          break;
+
+        case 'r':
+          memory_report_type = recommended;
+          break;
+
+        case 'h':
+          human_output_opts = human_autoscale | human_SI | human_base_1024;
+          break;
+
+        case HUMAN_SI_OPTION:
+          human_output_opts = human_autoscale | human_SI;
+          break;
+
+        default:
+          usage (EXIT_FAILURE);
+        }
+    }
+
+  switch(memory_report_type)
+    {
+    case total:
+      memory = physmem_total();
+      break;
+
+    case available:
+      memory = physmem_available();
+      break;
+
+    case recommended:
+      memory = default_sort_size();
+      break;
+    }
+
+  char buf[LONGEST_HUMAN_READABLE + 1];
+  fputs (human_readable (memory, buf, human_output_opts,1,1),stdout);
+  fputs("\n", stdout);
+
+  exit (EXIT_SUCCESS);
+}
-- 
1.7.7.4


--------------030506080008090209070906--


From MAILER-DAEMON Thu Aug 30 12:20:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T77Td-0001LG-Go
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 12:20:17 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34231)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Ta-0001Kv-Rm
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:16 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77TZ-0005mc-Ar
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:14 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:48317)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77TZ-0005lO-3D
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:13 -0400
Received: by weys10 with SMTP id s10so1233426wey.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 09:20:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer;
	bh=07yr1S7hFrsQr7b3E/93tPepOm5lRkWTvg+Bo3ZnBUg=;
	b=s3ZMJh8gU6O5ozwqUxfxDAqAv+z65sZkvebSwTkSmRrb1XyGhR99314S9j76etf0BO
	67dLFq2jCzWVbIsEfrJMznmNVp8AZeI5QAFP2DeGDGiYLECEs6HylccBFZtmq5x+0ffd
	LvD7OOO7JC8ez+QZGC2AUq2LW19Ao1DDXu5sdpqPU04CcLHDutULT1vdrgxXI+qeFm16
	BLIT7YRtXyqk429tCKkRNmOTYHOY8021KioDPaiI9MLxWQ14QPMTUykzePR3OCEVYrup
	1cLeBddVvewppjCSc0gqv661DItbzoAM02FI21YottrqBzP5xL3vLbUO7VxK7bPjVUmj
	tw8A==
Received: by 10.180.105.130 with SMTP id gm2mr1630839wib.6.1346343612151;
	Thu, 30 Aug 2012 09:20:12 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hv8sm1520361wib.0.2012.08.30.09.20.09
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 09:20:10 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 0/7] Minor cleanup and refactoring.
Date: Thu, 30 Aug 2012 18:19:51 +0200
Message-Id: <cover.1346341298.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 16:20:16 -0000

Found these when trying to convert 'src/' to a non-recursive setup.
I think they should be simple and uncontroversial enough to go into
the repository ASAP.

Thanks,
  Stefano

-*-*-*-

Stefano Lattarini (7):
  build: move definition of 'all_programs' in cfg.mk
  build: some refactorings in cfg.mk
  build: don't use foo_LDADD if there's no foo program
  maint: remove unused variable in src/Makefile.am
  maint: more uses of $(ASSORT)
  build: don't use '$<' in non-suffix rules
  maint: get rid of obsolete script 'cvsu'

 Makefile.am     |   5 -
 build-aux/cvsu  | 512 --------------------------------------------------------
 cfg.mk          |  15 +-
 src/Makefile.am |  37 ++--
 4 files changed, 29 insertions(+), 540 deletions(-)
 delete mode 100755 build-aux/cvsu



From MAILER-DAEMON Thu Aug 30 12:20:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T77Tg-0001PQ-KW
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 12:20:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34233)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Tb-0001Kw-2g
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Ta-0005nU-0z
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:15 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:48317)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77TZ-0005lO-Qn
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:13 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so1233426wey.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 09:20:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=fgQ42/q3WOuFCzOvXGtWzmHU5vmClENtQ03oaaxMu3E=;
	b=p2FDSi4rdXFvxJkSI0ekUuxg2DjacgPXOTYMoIdM8GzdqeiwglhzEzPaNjQ1i/jU2a
	NXjRQ1NkiVL4HOLYW1aSl/BdybXubNqQ2onINOuDgId3KqpBRiAV/dmYGlU2D2Pjxwew
	Rl/9qBmNi0SddGDsTpTz8A4ucOOkV0HPhvXCTI/vYZd5NV8SOOpR0oNJOpLySiFRxdzE
	7z2eHdVbm/paDBclxsE3GAHjkptNnP+PaBw2atTv3TAOBR8Likg2bhVNoDLkT/HWuEhc
	jSpTQ1J0N3Tx2WqeB1ePicI0r1ppRiP2nbSDggjgqunAt8+dhm6jK5euve25bA7Ftkaj
	YJkg==
Received: by 10.216.198.10 with SMTP id u10mr3171747wen.80.1346343613451;
	Thu, 30 Aug 2012 09:20:13 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hv8sm1520361wib.0.2012.08.30.09.20.12
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 09:20:12 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 1/7] build: move definition of 'all_programs' in cfg.mk
Date: Thu, 30 Aug 2012 18:19:52 +0200
Message-Id: <3c2ed16319a4dfb7ecc5b7b3b813b4de64324301.1346341298.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 16:20:19 -0000

* Makefile.am: Move definition of target 'all_programs' from here ...
* cfg.mk: ... to here, which is the only file where it is used.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 Makefile.am | 4 ----
 cfg.mk      | 6 ++++++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index d14bf88..673c964 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -170,9 +170,5 @@ check-git-hook-script-sync:
 	rm -rf $$t;							\
 	test $$fail = 0
 
-.PHONY: all_programs
-all_programs:
-	@cd ./src && $(MAKE) -s $@
-
 include $(top_srcdir)/doc/local.mk
 include $(top_srcdir)/man/local.mk
diff --git a/cfg.mk b/cfg.mk
index 50fb13e..35f1071 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -166,6 +166,12 @@ sc_long_lines:
 	  sed -e "s|^|$$file:|" -e '$(FILTER_LONG_LINES)';		\
 	done | grep . && { msg="$$halt" $(_sc_say_and_exit) } || :
 
+# TODO: remove once the build system in 'src/' is merged with the
+# top-level one.
+.PHONY: all_programs
+all_programs:
+	@cd ./src && $(MAKE) -s $@
+
 # Option descriptions should not start with a capital letter.
 # One could grep source directly as follows:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')


From MAILER-DAEMON Thu Aug 30 12:20:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T77Tl-0001UY-PP
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 12:20:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34248)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Tc-0001L9-Or
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Tb-0005pR-Nx
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:16 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:48377)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Tb-0005op-Ey
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:15 -0400
Received: by wgbdt14 with SMTP id dt14so1179001wgb.30
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 09:20:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=gi/riX/fNFUWH3oIZ5Vr/ekQMtQD5ItJpWAH+LxDm78=;
	b=fo/4bca17T5RX96WVV/YqSP62A7sKd9XsPCuopo78asU3DdWJIEew1s7nWkJJst39o
	WaOIIveYrJAZ3xrbxVTIIaeC75xzgq2ooEG7xRigpyIzwgss1eBeQj0pOrszq9lNzokE
	vqE7DodJmpaenun1pECUG9n6w3r3JeEkDqHtjwEamvgI9Fo+zWxEEr3kLeP030hZJy9f
	i9wN4hjFyl5vo8czmvIa84Pq+ox1zgT5SJfMxLRIdC3FfXVW+aiJIZKDFIdctEuDp+hx
	BzIuwZS79OxqcVia8JbksxzNAMj7C9Pk0LxF/r/SXkZoRWHrAfHgoyGXj8JOyno9Vaxf
	TF/w==
Received: by 10.180.100.35 with SMTP id ev3mr1624549wib.7.1346343614664;
	Thu, 30 Aug 2012 09:20:14 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hv8sm1520361wib.0.2012.08.30.09.20.13
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 09:20:14 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 2/7] build: some refactorings in cfg.mk
Date: Thu, 30 Aug 2012 18:19:53 +0200
Message-Id: <25c7ba153dffa60c25b96c2751f84f0b63024d71.1346341298.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 16:20:25 -0000

Partly a minor cleanup, partly a preparation for future changes.

* Makefile.am (all_programs): Rename ...
(all-progs-but-lbracket): ... like this, and re-define it to expand
at make time rather than only at recipe time (i.e., using $(shell ...)
instead of `...`).
(check-programs-vs-x): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 cfg.mk | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 35f1071..b5f4174 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -207,16 +207,17 @@ check-x-vs-1:
 	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
 	rm $$t
 
-all_programs =								\
-      (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list)		\
-       | grep -v '\['
+# Writing a portable rule to generate a manpage like '[.1' would be
+# a nightmare.
+all-progs-but-lbracket = $(filter-out [, $(shell \
+      (cd ./src && MAKEFLAGS= ${MAKE} -s all_programs.list)))
 
 # Ensure that for each .x file in the 'man/' subdirectory, there is a
 # corresponding coreutils program.
 .PHONY: check-programs-vs-x
 check-programs-vs-x: all_programs
 	@status=0;					\
-	for p in dummy `$(all_programs)`; do		\
+	for p in dummy $(all-progs-but-lbracket); do	\
 	  test $$p = dummy && continue;			\
 	  test $$p = ginstall && p=install || : ;	\
 	  test -f $(srcdir)/man/$$p.x			\


From MAILER-DAEMON Thu Aug 30 12:20:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T77Tm-0001XY-Ut
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 12:20:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34322)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Th-0001Qm-7u
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Tg-0005vB-4p
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:21 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:48317)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Tf-0005lO-QC
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:20 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so1233426wey.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 09:20:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=KFT8JmuWjWLm2QxaltNlqs7/uk9AxC99M8fZ54XC1BE=;
	b=bQnCQHWQP5Y5vW2rTDkU0iAdFWbmvClhUd3nX+SAW+jXoAkBhs2Llz76Fh1dWvH0sP
	y3+8nDVMSp/fYLudA2tWUzCMF3faym5/8I67iyVkSOcFlzDJkc9wuj84DE3iZoYMy7eE
	unOIAIKJEtsfjrmmCq8sOC8Km9enfSWVeLF9L8okZLTRsaBrohSpgJHsVk2HSSnIFSSr
	h+rEOy6HPLUeVxfh6RqnCO6M2R8vDfQm9/4OSiIRF5MzIieNwFMM7EZjkf1Meu1ffTQ+
	FIEveWidshMq110Wj/Cz4hnLpe4sJkpQI5kZ6NCRCCnPMpU8gALehOTygsFfX0fzZe1k
	toTA==
Received: by 10.180.102.136 with SMTP id fo8mr1551475wib.19.1346343619403;
	Thu, 30 Aug 2012 09:20:19 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hv8sm1520361wib.0.2012.08.30.09.20.17
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 09:20:17 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 5/7] maint: more uses of $(ASSORT)
Date: Thu, 30 Aug 2012 18:19:56 +0200
Message-Id: <4e53d7e8ffbaefeac7f7e713a5d0528cf6afcb83.1346341298.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 16:20:26 -0000

* src/Makefile.am (fs-kernel-magic, fs-magic): Here, instead of
inlining its expansion "LC_ALL=C sort".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 src/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 235deaa..e681ccf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -529,7 +529,7 @@ fs-magic: Makefile
 	  |grep 0x | perl -p						\
 	    $(fs_normalize_perl_subst)					\
 	  | grep -Ev 'S_MAGIC_EXT[34]|STACK_END'			\
-	  | LC_ALL=C sort						\
+	  | $(ASSORT)							\
 	  > $@-t && mv $@-t $@
 
 CLEANFILES += fs-kernel-magic
@@ -538,7 +538,7 @@ fs-kernel-magic: Makefile
 	  | perl -p							\
 	    $(fs_normalize_perl_subst)					\
 	  | grep -Ev 'S_MAGIC_EXT[34]|STACK_END'			\
-	  | LC_ALL=C sort						\
+	  | $(ASSORT)							\
 	  > $@-t && mv $@-t $@
 
 BUILT_SOURCES += fs-is-local.h


From MAILER-DAEMON Thu Aug 30 12:20:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T77To-0001b3-4t
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 12:20:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34405)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Tl-0001UU-Ih
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Te-0005sl-C6
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:25 -0400
Received: from mail-wi0-f169.google.com ([209.85.212.169]:37074)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Te-0005rm-58
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:18 -0400
Received: by wibhm2 with SMTP id hm2so407937wib.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 09:20:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=RxBT1cJDah6jBxgCWdbhglvqj9FHTRSClFVeMZ+4Bm8=;
	b=pYsI2YTFOlo6oPBcdHwmXETHg5PDEW8eGAenIsWhA2G32H0ymKZlEoWB7toOxj7Ktz
	aO/p5gL8Jt2aTuFRwEWH0kFCoGh452eqpcWqn83VzmriOCNmZCYxXVryRxDAxe9Fz0UV
	r2v15hNqA5OQJYEWJaRt4+bWQ6J+cYwL3fjdVq0k3RsFsHFGAVtsrgBKBdqmBKhaswjr
	CO4XkZxbqU+VU3Fs+gsWqYGbBO9IHRjpYkcFfyKQUROuq26KguXj9uPl2zGO0F0Tjhqn
	BSTzS/EJQpZy0HhS3fh3SOPPFM4cev9w5jfIiD+QPz1+gJJVIEqq/N23mTsQupRP7cT2
	64dg==
Received: by 10.180.97.135 with SMTP id ea7mr1599715wib.11.1346343617353;
	Thu, 30 Aug 2012 09:20:17 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hv8sm1520361wib.0.2012.08.30.09.20.16
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 09:20:16 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 4/7] maint: remove unused variable in src/Makefile.am
Date: Thu, 30 Aug 2012 18:19:55 +0200
Message-Id: <dafc906b7fc6bd8f12b8af9a4c59cb571daf46f3.1346341298.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 16:20:26 -0000

* src/Makefile.am (editpl): This.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 src/Makefile.am | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 63c2b11..235deaa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -460,8 +460,6 @@ libstdbuf_so_LDADD =
 libstdbuf_so_LDFLAGS = -shared
 libstdbuf_so_CFLAGS = -fPIC $(AM_CFLAGS)
 
-editpl = sed -e 's,@''PERL''@,$(PERL),g'
-
 BUILT_SOURCES += dircolors.h
 dircolors.h: dcgen dircolors.hin
 	$(AM_V_GEN)rm -f $@ $@-t


From MAILER-DAEMON Thu Aug 30 12:20:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T77Tu-0001j1-AS
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 12:20:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34500)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Tq-0001gq-BX
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Tj-000612-9w
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:30 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:48317)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Ti-0005lO-Vg
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:23 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so1233426wey.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 09:20:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=F1LNsgN/xdTAK7PvHZ1tcgjUsZ+UBB4mrttaWDJRT+o=;
	b=GmNdIbTkH6udLTeCjx5Yv92ZWcOf767P1VfXJOUUY+86Vkxm/V6vnNSRWu2n0PrsQQ
	4DENiUZdcQ4/WWFgYeJxAmOjjOrdfBjL8J5xxbV+YLYlupSdpS1p2JvIVCQT+4yMUw9j
	ERXacotL47bHqgF1yr+U4WVEqr0lTBqga+oAql1bRyjDrv+iiEe1/Px77xTRAOE16NZv
	Hsg+KufxqmyQhNZvyEqSza901pURO8Q3ebFD6LLtIHmNwBM2kjKRblmIvcYoQhIv4kRC
	7ndOQNDUlHd3GfIIgfLr77LxHi5bAleqhASJxmh6COt/desVjPAdXG8KrxxlkkFW9ycl
	DVCw==
Received: by 10.180.76.36 with SMTP id h4mr1586123wiw.13.1346343622619;
	Thu, 30 Aug 2012 09:20:22 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hv8sm1520361wib.0.2012.08.30.09.20.20
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 09:20:21 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 7/7] maint: get rid of obsolete script 'cvsu'
Date: Thu, 30 Aug 2012 18:19:58 +0200
Message-Id: <56467889f5dbe817f8c9e3e17d411b6083d995fb.1346341298.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 16:20:32 -0000

It was useful only back when coreutils used CVS as its version
control system.

* build-aux/cvsu: Delete.
* Makefile.am (EXTRA_DIST): Remove it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 Makefile.am    |   1 -
 build-aux/cvsu | 512 ---------------------------------------------------------
 2 files changed, 513 deletions(-)
 delete mode 100755 build-aux/cvsu

diff --git a/Makefile.am b/Makefile.am
index 673c964..b47b1c1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,7 +49,6 @@ EXTRA_DIST =				\
   THANKStt.in				\
   bootstrap				\
   bootstrap.conf			\
-  build-aux/cvsu			\
   cfg.mk				\
   dist-check.mk				\
   maint.mk				\
diff --git a/build-aux/cvsu b/build-aux/cvsu
deleted file mode 100755
index 741f6b2..0000000
--- a/build-aux/cvsu
+++ /dev/null
@@ -1,512 +0,0 @@
-#! /usr/bin/perl -w
-
-# cvsu - do a quick check to see what files are out of date.
-#
-# Copyright (C) 2000-2005  Pavel Roskin <proski@gnu.org>
-# Initially written by Tom Tromey <tromey@cygnus.com>
-# Completely rewritten by Pavel Roskin <proski@gnu.org>
-#
-# 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/>.
-
-
-require 5.004;
-use Getopt::Long;
-use File::Basename;
-use Time::Local;
-use strict;
-
-use vars qw($list_types %messages %options @batch_list $batch_cmd
-            $no_recurse $explain_type $find_mode $short_print
-            $no_cvsignore $nolinks $file $single_filename $curr_dir
-            @common_ignores $ignore_rx %entries %subdirs %removed);
-
-use constant SUBDIR_FOUND => 1;
-use constant SUBDIR_CVS   => 2;
-
-# This list comes from the CVS manual.
-use constant STANDARD_IGNORES =>
-        ('RCS', 'SCCS', 'CVS', 'CVS.adm', 'RCSLOG', 'cvslog.*', 'tags',
-         'TAGS', '.make.state', '.nse_depinfo', '*~', '#*', '.#*', ',*',
-         "_\$*", "*\$", '*.old', '*.bak', '*.BAK', '*.orig', '*.rej',
-         '.del-*', '*.a', '*.olb', '*.o', '*.obj', '*.so', '*.exe',
-         '*.Z', '*.elc', '*.ln', 'core');
-
-# 3-letter month names in POSIX locale, for fast date decoding
-my %months = (
-    "Jan" => 0,
-    "Feb" => 1,
-    "Mar" => 2,
-    "Apr" => 3,
-    "May" => 4,
-    "Jun" => 5,
-    "Jul" => 6,
-    "Aug" => 7,
-    "Sep" => 8,
-    "Oct" => 9,
-    "Nov" => 10,
-    "Dec" => 11
-);
-
-# print usage information and exit
-sub usage ()
-{
-    print "Usage:\n" .
-        "  cvsu [OPTIONS] [FILE] ...\n" .
-        "Options:\n" .
-        "  --local		Disable recursion\n" .
-        "  --explain		Verbosely print status of files\n" .
-        "  --find		Emulate find - filenames only\n" .
-        "  --short		Don't print paths\n" .
-        "  --ignore		Don't read .cvsignore\n" .
-        "  --messages		List known file types and long messages\n" .
-        "  --nolinks		Disable recognizing hard and soft links\n" .
-        "  --types=[^]LIST	Print only file types [not] from LIST\n" .
-        "  --batch=COMMAND	Execute this command on files\n" .
-        "  --help		Print this usage information\n" .
-        "  --version		Print version number\n" .
-        "Abbreviations and short options are supported\n";
-    exit 0;
-}
-
-# print version information and exit
-sub version ()
-{
-    print "cvsu - CVS offline examiner, version 0.2.3\n";
-    exit 0;
-}
-
-# If types begin with '^', make inversion
-sub adjust_types ()
-{
-    if ($list_types =~ m{^\^(.*)$}) {
-        $list_types = "";
-        foreach (keys %messages) {
-            $list_types .= $_
-                if (index ($1, $_) < 0);
-        }
-    }
-}
-
-# list known messages and exit
-sub list_messages ()
-{
-    my $default_mark;
-    print "Recognizable file types are:\n";
-    foreach (sort keys %messages) {
-        if (index($list_types, $_) >= 0) {
-            $default_mark = "*";
-        } else {
-            $default_mark = " ";
-        }
-        print "  $default_mark $_ $messages{$_}\n";
-    }
-    print "* indicates file types listed by default\n";
-    exit 0;
-}
-
-# Initialize @common_ignores
-# Also read $HOME/.cvsignore and append it to @common_ignores
-sub init_ignores ()
-{
-    my $HOME = $ENV{"HOME"};
-
-    push @common_ignores, STANDARD_IGNORES;
-
-    unless (defined($HOME)) {
-        return;
-    }
-
-    my $home_cvsignore = "${HOME}/.cvsignore";
-
-    if (-f "$home_cvsignore") {
-
-        unless (open (CVSIGNORE, "< $home_cvsignore")) {
-            error ("couldn't open $home_cvsignore: $!");
-        }
-
-        while (<CVSIGNORE>) {
-            push (@common_ignores, split);
-        }
-
-        close (CVSIGNORE);
-    }
-
-    my $CVSIGNOREENV = $ENV{"CVSIGNORE"};
-
-    unless (defined($CVSIGNOREENV)) {
-        return;
-    }
-
-    my @ignores_var = split (/ /, $CVSIGNOREENV);
-    push (@common_ignores, @ignores_var);
-
-}
-
-# Print message and exit (like "die", but without raising an exception).
-# Newline is added at the end.
-sub error ($)
-{
-        print STDERR "cvsu: ERROR: " . shift(@_) . "\n";
-        exit 1;
-}
-
-# execute commands from @exec_list with $exec_cmd
-sub do_batch ()
-{
-        my @cmd_list = split (' ', $batch_cmd);
-        system (@cmd_list,  @batch_list);
-}
-
-# print files status
-# Parameter 1: status in one-letter representation
-sub file_status ($)
-{
-    my $type = shift (@_);
-    my $item;
-    my $pathfile;
-
-    return
-        if $ignore_rx ne '' && $type =~ /[?SLD]/ && $file =~ /$ignore_rx/;
-
-    return
-        if (index($list_types, $type) < 0);
-
-    $pathfile = $curr_dir . $file;
-
-    if (defined($batch_cmd)) {
-        push (@batch_list, $pathfile);
-        # 1000 items in the command line might be too much for HP-UX
-        if ($#batch_list > 1000) {
-            do_batch();
-            undef @batch_list;
-        }
-    }
-
-    if ($short_print) {
-        $item = $file;
-    } else {
-        $item = $pathfile;
-    }
-
-    if ($find_mode) {
-        print "$item\n";
-    } else {
-        $type = $messages{$type}
-            if ($explain_type);
-        print "$type $item\n";
-    }
-}
-
-# load entries from CVS/Entries and CVS/Entries.Log
-# Parameter 1: file name for CVS/Entries
-# Return: list of entries in the format used in CVS/Entries
-sub load_entries ($);
-sub load_entries ($)
-{
-    my $entries_file = shift (@_);
-    my $entries_log_file = "$entries_file.Log";
-    my %ent = ();
-
-    unless (open (ENTRIES, "< $entries_file")) {
-        error ("couldn't open $entries_file: $!");
-    }
-    while (<ENTRIES>) {
-        chomp;
-        $ent{$_} = 1;
-    }
-    close (ENTRIES);
-
-    if (open (ENTRIES, "< $entries_log_file")) {
-        while (<ENTRIES>) {
-            chomp;
-            if ( m{^A (.+)} ) {
-                $ent{$1} = 1;
-            } elsif ( m{^R (.+)} ) {
-                delete $ent{$1};
-            } else {
-                # Note: "cvs commit" helps even when you are offline
-                error ("$entries_log_file:$.: unrecognizable line, " .
-                        "try \"cvs commit\"");
-            }
-        }
-        close (ENTRIES);
-    }
-
-    return keys %ent;
-}
-
-# process one directory
-# Parameter 1: directory name
-sub process_arg ($);
-sub process_arg ($)
-{
-    my $arg = shift (@_);
-    my %found_files = ();
-
-    # $file, $curr_dir, and $ignore_rx must be seen in file_status
-    local $file = "";
-    local $ignore_rx = "";
-    local $single_filename = 0;
-
-    if ( $arg eq "" or -d $arg ) {
-        $curr_dir = $arg;
-        my $real_curr_dir = $curr_dir eq "" ? "." : $curr_dir;
-
-        error ("$real_curr_dir is not a directory")
-            unless ( -d $real_curr_dir );
-
-        # Scan present files.
-        file_status (".");
-        opendir (DIR, $real_curr_dir) ||
-            error ("couldn't open directory $real_curr_dir: $!");
-        foreach (readdir (DIR)) {
-            $found_files {$_} = 1;
-        }
-        closedir (DIR);
-    } else {
-        $single_filename = basename $arg;
-        $curr_dir = dirname $arg;
-        $found_files{$single_filename} = 1 if lstat $arg;
-    }
-
-    $curr_dir .= "/"
-        unless ( $curr_dir eq "" || $curr_dir =~ m{/$} );
-
-    # Scan CVS/Entries.
-    my %entries = ();
-    my %subdirs = ();
-    my %removed = ();
-
-    foreach ( load_entries ("${curr_dir}CVS/Entries") ) {
-        if ( m{^D/([^/]+)/} ) {
-            $subdirs{$1} = SUBDIR_FOUND if !$single_filename;
-        } elsif ( m{^/([^/]+)/([^/])[^/]*/([^/]*)/} ) {
-            if ( !$single_filename or $single_filename eq $1 ) {
-                $entries{$1} = $3;
-                $removed{$1} = 1
-                    if $2 eq '-';
-            }
-        } elsif ( m{^D$} ) {
-            next;
-        } else {
-            error ("${curr_dir}CVS/Entries: unrecognizable line");
-        }
-    }
-
-    if ( $single_filename && !$entries{$single_filename} &&
-         !$found_files{$single_filename} ) {
-        error ("nothing known about $arg");
-    }
-
-    # Scan .cvsignore if any
-    unless ($no_cvsignore) {
-        my (@ignore_list) = ();
-
-        if (-f "${curr_dir}.cvsignore") {
-            open (CVSIGNORE, "< ${curr_dir}.cvsignore")
-                || error ("couldn't open ${curr_dir}.cvsignore: $!");
-            while (<CVSIGNORE>) {
-                push (@ignore_list, split);
-            }
-            close (CVSIGNORE);
-        }
-
-        my ($iter);
-        foreach $iter (@ignore_list, @common_ignores) {
-            if ($iter eq '!') {
-                $ignore_rx = ''
-            } else {
-                if ($ignore_rx eq '') {
-                    $ignore_rx = '^(';
-                } else {
-                    $ignore_rx .= '|';
-                }
-                $ignore_rx .= glob_to_rx ($iter);
-            }
-        }
-        $ignore_rx .= ')$'
-            if $ignore_rx ne '';
-    }
-
-    # File is missing
-    foreach $file (sort keys %entries) {
-        unless ($found_files{$file}) {
-            if ($removed{$file}) {
-                file_status("R");
-            } else {
-                file_status("U");
-            }
-        }
-    }
-
-    foreach $file (sort keys %found_files) {
-        next if ($file eq '.' || $file eq '..');
-        lstat ($curr_dir . $file) ||
-            error ("lstat() failed on $curr_dir . $file");
-        if (! $nolinks && -l _) {
-            file_status ("L");
-        } elsif (-d _) {
-            if ($file eq 'CVS') {
-                file_status ("C");
-            } elsif ($subdirs{$file}) {
-                $subdirs{$file} = SUBDIR_CVS;
-            } else {
-                file_status ("D"); # Unknown directory
-            }
-        } elsif (! (-f _) && ! (-l _)) {
-            file_status ("S"); # This must be something very special
-        } elsif (! $nolinks && (stat _) [3] > 1 ) {
-            file_status ("H"); # Hard link
-        } elsif (! $entries{$file}) {
-            file_status ("?");
-        } elsif ($entries{$file} =~ /^Initial |^dummy /) {
-            file_status ("A");
-        } elsif ($entries{$file} =~ /^Result of merge/) {
-            file_status ("G");
-        } elsif ($entries{$file} !~
-                /^(...) (...) (..) (..):(..):(..) (....)$/) {
-            error ("Invalid timestamp for $curr_dir$file: $entries{$file}");
-        } else {
-            my $cvtime = timegm($6, $5, $4, $3, $months{$2}, $7 - 1900);
-            my $mtime = (stat _) [9];
-            if ($cvtime == $mtime) {
-                file_status ("F");
-            } elsif ($cvtime < $mtime) {
-                file_status ("M");
-            } else {
-                file_status ("O");
-            }
-        }
-    }
-
-    # Now do directories.
-    unless ($no_recurse) {
-        my $save_curr_dir = $curr_dir;
-        foreach $file (sort keys %subdirs) {
-            if ($subdirs{$file} == SUBDIR_FOUND) {
-                $curr_dir = $save_curr_dir;
-                file_status ("X");
-            } elsif ($subdirs{$file} == SUBDIR_CVS) {
-                process_arg ($save_curr_dir . $file)
-            }
-        }
-    }
-}
-
-# Turn a glob into a regexp without recognizing square brackets.
-sub glob_to_rx_simple ($)
-{
-    my ($expr) = @_;
-    # Quote all non-word characters, convert ? to . and * to .*
-    $expr =~ s/(\W)/\\$1/g;
-    $expr =~ s/\\\*/.*/g;
-    $expr =~ s/\\\?/./g;
-    return $expr;
-}
-
-# Turn a glob into a regexp
-sub glob_to_rx ($)
-{
-    my $result = '';
-    my ($expr) = @_;
-    # Find parts in square brackets and copy them literally
-    # Text outside brackets is processed by glob_to_rx_simple()
-    while ($expr ne '') {
-        if ($expr =~ /^(.*?)(\[.*?\])(.*)/) {
-            $expr = $3;
-            $result .= glob_to_rx_simple ($1) . $2;
-        } else {
-            $result .= glob_to_rx_simple ($expr);
-            last;
-        }
-    }
-    return $result;
-}
-
-sub Main ()
-{
-    # types of files to be listed
-    $list_types = "^.FCL";
-
-    # long status messages
-    %messages = (
-        "?" => "Unlisted file",
-        "." => "Known directory",
-        "F" => "Up-to-date file",
-        "C" => "CVS admin directory",
-        "M" => "Modified file",
-        "S" => "Special file",
-        "D" => "Unlisted directory",
-        "L" => "Symbolic link",
-        "H" => "Hard link",
-        "U" => "Lost file",
-        "X" => "Lost directory",
-        "A" => "Newly added",
-        "O" => "Older copy",
-        "G" => "Result of merge",
-        "R" => "Removed file"
-    );
-
-    undef @batch_list;		# List of files for batch processing
-    undef $batch_cmd;		# Command to be executed on files
-    $no_recurse = 0;		# If this is set, do only local files
-    $explain_type = 0;		# Verbosely print status of files
-    $find_mode = 0;		# Don't print status at all
-    $short_print = 0;		# Print only filenames without path
-    $no_cvsignore = 0;		# Ignore .cvsignore
-    $nolinks = 0;		# Do not test for soft- or hard-links
-    my $want_msg = 0;		# List possible filetypes and exit
-    my $want_help = 0;		# Print help and exit
-    my $want_ver = 0;		# Print version and exit
-
-    my %options = (
-        "types=s"  => \$list_types,
-        "batch=s"  => \$batch_cmd,
-        "local"	   => \$no_recurse,
-        "explain"  => \$explain_type,
-        "find"	   => \$find_mode,
-        "short"	   => \$short_print,
-        "ignore"   => \$no_cvsignore,
-        "messages" => \$want_msg,
-        "nolinks"  => \$nolinks,
-        "help"     => \$want_help,
-        "version"  => \$want_ver
-    );
-
-    GetOptions(%options);
-
-    adjust_types();
-
-    list_messages() if $want_msg;
-    usage() if $want_help;
-    version() if $want_ver;
-
-    unless ($no_cvsignore) {
-        init_ignores();
-    }
-
-    if ($#ARGV < 0) {
-        @ARGV = ("");
-    }
-
-    foreach (@ARGV) {
-        process_arg ($_);
-    }
-
-    if ($#batch_list >= 0) {
-            do_batch();
-    }
-}
-
-Main();


From MAILER-DAEMON Thu Aug 30 12:20:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T77Tu-0001je-Gl
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 12:20:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34409)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Tl-0001UZ-PW
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Th-0005yg-RS
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:25 -0400
Received: from mail-wg0-f41.google.com ([74.125.82.41]:44995)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Th-0005wu-LI
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:21 -0400
Received: by wgbds1 with SMTP id ds1so228294wgb.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 09:20:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=0te8U3VOh1SEWRgwtcH7NK6j7lBW1yxjAYykz4HXF+M=;
	b=UxcfoTghQCezmjUuhJdA3upoE0R6dvVsrQuuLdbXTYbyhSB28frjT1wx9aYTw4vStS
	C1fjh0qp6v01+gAnFvKJyhnltFl3N13+1ge34YxBP5LqCvWrcHhpDu15nYUOzWpac91e
	85XQvdI1sFhwNGLOZ/+uEsxVcxdaecc77zb9pjWXy9zGJGFhOVZVWXBhJaFrWVToyQuU
	F0YZMGPaxifW+vqARzXaBhgM7hTPunY4cOlwj7LpAtPkn5xSuXPacuchzdkz3jf9dZEA
	V1/Z9g3eT6ka0L6frKPAPDAI9EU+/+DUoeGwm6PM1tLO2V48QkRNNcnS5EQ8icf2Z1+p
	4VvA==
Received: by 10.180.100.131 with SMTP id ey3mr1578412wib.15.1346343620906;
	Thu, 30 Aug 2012 09:20:20 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hv8sm1520361wib.0.2012.08.30.09.20.19
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 09:20:20 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 6/7] build: don't use '$<' in non-suffix rules
Date: Thu, 30 Aug 2012 18:19:57 +0200
Message-Id: <914052cdbda99bced728e48badddbc067504081d.1346341298.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.41
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 16:20:33 -0000

* src/Makefile.am (fs-def): Here: it's not portable to some non-GNU
make implementations.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index e681ccf..9be3acf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -498,7 +498,7 @@ fs-magic-compare: fs-magic fs-kernel-magic fs-def
 
 CLEANFILES += fs-def
 fs-def: fs.h
-	grep '^# *define ' $< | $(ASSORT) > $@-t && mv $@-t $@
+	grep '^# *define ' fs.h | $(ASSORT) > $@-t && mv $@-t $@
 
 # Massage bits of the statfs man page and definitions from
 # /usr/include/linux/magic.h to be in a form consistent with what's in fs.h.


From MAILER-DAEMON Thu Aug 30 12:20:36 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T77Tw-0001qA-PG
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 12:20:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34391)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Tk-0001UB-No
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Tc-0005py-I8
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:24 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:48317)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T77Tc-0005lO-Bn
	for coreutils@gnu.org; Thu, 30 Aug 2012 12:20:16 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so1233426wey.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 09:20:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=+Cbhfa1JpKlRpo73THQ2UPBd84ggkaNo02jbR+0zveI=;
	b=GRV9H/JmW5F3p9Mi0bahxJwhfZEn4ATfh2eTqLyLb2sasXP1buk2gm4Oq9DWpSpcx6
	OFKgfsd6Mjj1D9ydiq5ydm0pwFatk8A70AqTejZAdNkoLC2Vev7MyzKgexeIuV0SIvNG
	8aXAcM5ibrSlfRvyEk0z2t6Qequbl1BqlpH2xVn1+LrWK0Puz+cRHhd3e0bX9xS7IqAK
	02ll3rq4/qm1ZqiCc+mGrwJCFhbNdvjuloj9v2WQakUqpLatQsdCPHz7HN8d+x7Gf6u0
	OA5WUzXbE48xWu9NAr7nBegKXGcu7HQSHognvzz31JtVpvWcP562SBFdoojOYWo6YWUk
	3siw==
Received: by 10.216.214.208 with SMTP id c58mr3151965wep.148.1346343616044;
	Thu, 30 Aug 2012 09:20:16 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hv8sm1520361wib.0.2012.08.30.09.20.14
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 30 Aug 2012 09:20:15 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 3/7] build: don't use foo_LDADD if there's no foo program
Date: Thu, 30 Aug 2012 18:19:54 +0200
Message-Id: <7ef3117f7a7096334c61583354d60756b7c911a4.1346341298.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com>
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Thu, 30 Aug 2012 16:20:35 -0000

For example, instead of factoring out the extra linker flags needed
by 'cp', 'mv' ind 'install' into a '$(copy_LDADD)' variable, factor
them out in a '$(copy_ldadd)' variable.

Partly a minor cleanup, partly a preparation for future changes.

* src/Makefile.am (copy_LDADD): Rename ...
(copy_ldadd): ... like this.
(remove_LDADD): Rename ...
(remove_ldadd): ... like this.
All uses adjusted.  Some comments updated.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 src/Makefile.am | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 896c902..63c2b11 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -177,6 +177,10 @@ nodist_libver_a_SOURCES = version.c version.h
 # Tell the linker to omit references to unused shared libraries.
 AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
 
+# Extra libraries needed by more than one program.  Will be updated later.
+copy_ldadd =
+remove_ldadd =
+
 # Sometimes, the expansion of $(LIBINTL) includes -lc which may
 # include modules defining variables like 'optind', so libcoreutils.a
 # must precede $(LIBINTL) in order to ensure we use GNU getopt.
@@ -297,25 +301,22 @@ __LDADD = $(test_LDADD)
 dir_LDADD = $(ls_LDADD)
 vdir_LDADD = $(ls_LDADD)
 
-# Shared files
-copy_LDADD =
-cp_LDADD += $(copy_LDADD)
-ginstall_LDADD += $(copy_LDADD)
-mv_LDADD += $(copy_LDADD)
+cp_LDADD += $(copy_ldadd)
+ginstall_LDADD += $(copy_ldadd)
+mv_LDADD += $(copy_ldadd)
 
-remove_LDADD =
-mv_LDADD += $(remove_LDADD)
-rm_LDADD += $(remove_LDADD)
+mv_LDADD += $(remove_ldadd)
+rm_LDADD += $(remove_ldadd)
 
 # for eaccess, euidaccess
-copy_LDADD += $(LIB_EACCESS)
-remove_LDADD += $(LIB_EACCESS)
+copy_ldadd += $(LIB_EACCESS)
+remove_ldadd += $(LIB_EACCESS)
 sort_LDADD += $(LIB_EACCESS)
 test_LDADD += $(LIB_EACCESS)
 
 # for selinux use
+copy_ldadd += $(LIB_SELINUX)
 chcon_LDADD += $(LIB_SELINUX)
-copy_LDADD += $(LIB_SELINUX)
 ginstall_LDADD += $(LIB_SELINUX)
 id_LDADD += $(LIB_SELINUX)
 ls_LDADD += $(LIB_SELINUX)
@@ -326,7 +327,7 @@ runcon_LDADD += $(LIB_SELINUX)
 stat_LDADD += $(LIB_SELINUX)
 
 # for gettime, settime, utimecmp, utimens
-copy_LDADD += $(LIB_CLOCK_GETTIME)
+copy_ldadd += $(LIB_CLOCK_GETTIME)
 date_LDADD += $(LIB_CLOCK_GETTIME)
 ginstall_LDADD += $(LIB_CLOCK_GETTIME)
 ls_LDADD += $(LIB_CLOCK_GETTIME)
@@ -357,11 +358,11 @@ factor_LDADD += $(LIB_GMP)
 uptime_LDADD += $(GETLOADAVG_LIBS)
 
 # for various ACL functions
-copy_LDADD += $(LIB_ACL)
+copy_ldadd += $(LIB_ACL)
 ls_LDADD += $(LIB_ACL)
 
 # for various xattr functions
-copy_LDADD += $(LIB_XATTR)
+copy_ldadd += $(LIB_XATTR)
 
 # for print_unicode_char, proper_name_utf8
 cat_LDADD += $(LIBICONV)


From MAILER-DAEMON Thu Aug 30 13:15:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T78LQ-0007im-9R
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 13:15:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60584)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T78JJ-0006E9-Gq
	for coreutils@gnu.org; Thu, 30 Aug 2012 13:13:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T78J4-0006Na-Ce
	for coreutils@gnu.org; Thu, 30 Aug 2012 13:13:41 -0400
Received: from mx.meyering.net ([88.168.87.75]:34484)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T78J0-0006Mj-PZ
	for coreutils@gnu.org; Thu, 30 Aug 2012 13:13:26 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 2FD45600FC;
	Thu, 30 Aug 2012 19:13:21 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 3/7] build: require Automake >= 1.11.6
In-Reply-To: <e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
	(Stefano Lattarini's message of "Thu, 30 Aug 2012 14:13:09 +0200")
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<cover.1346327497.git.stefano.lattarini@gmail.com>
	<e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
Date: Thu, 30 Aug 2012 19:13:21 +0200
Message-ID: <878vcwxpzi.fsf@rho.meyering.net>
Lines: 4715
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
X-Mailman-Approved-At: Thu, 30 Aug 2012 13:15:50 -0400
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, 30 Aug 2012 17:13:56 -0000

Stefano Lattarini wrote:
> Now that we use AM_TESTS_ENVIRONMENT, we should require at least
> Automake >= 1.11.2; but since all the Automake version until 1.11.5
> are vulnerable to CVE-2012-3386:
>
>   <https://lists.gnu.org/archive/html/automake/2012-07/msg00023.html>
>
> it's even better to require 1.11.6.
>
> * configure.ac (AM_INIT_AUTOMAKE): Bump version requirement to 1.11.6.
> * bootstrap.conf ($buildreq): Likewise.

Thanks.
I'm about to push this series.
The only non-grammar/typo change has been to s/6/2/ to this c-set.
I prefer that because there is already a check in maint.mk
for that CVE, and besides, we don't want to preclude the use of
an automake that declares itself 1.11.2 yet that has the fix
for that bug.

Here's the modified series.
I'll wait for your ACK.

>From cddadbcd80991c0b7b91e2228510176e51a9ea1c Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Thu, 30 Aug 2012 14:13:07 +0200
Subject: [PATCH 1/7] tests: merge tests/check.mk into tests/Makefile.am

The separation has become unnecessary after all the ancient
'tests/*/Makefile.am' makefiles have been merged into the
"more-top-level" one 'tests/Makefile.am'.

* tests/check.mk: Merge ...
* tests/Makefile.am: ... in here.  Some comments tweaking while
at it.
---
 tests/Makefile.am | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 tests/check.mk    | 94 -----------------------------------------------------
 2 files changed, 95 insertions(+), 96 deletions(-)
 delete mode 100644 tests/check.mk

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 87d6cad..eed4e2e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,100 @@
 ## Process this file with automake to produce Makefile.in -*-Makefile-*-.

+## Copyright (C) 2007-2012 Free Software Foundation, Inc.
+
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure that all version-controlled executable files are listed in TESTS.
+# Collect test names from the line matching /^TESTS = \\$$/ to the following
+# one that does not end in '\'.
+_v = TESTS
+_w = root_tests
+vc_exe_in_TESTS: Makefile
+	$(AM_V_GEN)if test -d $(top_srcdir)/.git && test $(srcdir) = .; then \
+	 {								\
+	  for list in $(_v) $(_w); do					\
+	    sed -n "/^$$list =[	 ]*\\\\$$/,/[^\]$$/p" Makefile.am |	\
+	    sed -n 's/^  *\([^$$	 ]\{1,\}\).*/\1/p';		\
+	  done;								\
+	  for f in `cd $(top_srcdir) &&					\
+	   build-aux/vc-list-files $(subdir) | sed 's!^$(subdir)/!!'`; do \
+	    test -f "$$f" && test -x "$$f" && echo "$$f";		\
+	  done;								\
+	 } | sort | uniq -u | grep . && exit 1 ||:;			\
+	else :; fi
+
+check: vc_exe_in_TESTS
+.PHONY: vc_exe_in_TESTS
+
+CLEANFILES =
+CLEANFILES += .built-programs
+check_DATA = .built-programs
+.built-programs: $(top_srcdir)/src/Makefile.am
+	$(AM_V_GEN)(cd $(top_builddir)/src				\
+            && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
+          > $@-t && mv $@-t $@
+
+# '$f' is set by the Automake-generated test harness to the path of the
+# current test script stripped of VPATH components, and is used by the
+# shell-or-perl script to determine the name of the temporary files to be
+# used.  Note that $f is a shell variable, not a make macro, so the use of
+# '$$f' below is correct, and not a typo.
+LOG_COMPILER = \
+  $(SHELL) $(srcdir)/shell-or-perl \
+  --test-name "$$f" --srcdir '$(srcdir)' \
+  --shell '$(SHELL)' --perl '$(PERL)' --
+
+# Note that the first lines are statements.  They ensure that environment
+# variables that can perturb tests are unset or set to expected values.
+# The rest are envvar settings that propagate build-related Makefile
+# variables to test scripts.
+TESTS_ENVIRONMENT =				\
+  . $(srcdir)/lang-default;			\
+  tmp__=$${TMPDIR-/tmp};			\
+  test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.;	\
+  . $(srcdir)/envvar-check;			\
+  TMPDIR=$$tmp__; export TMPDIR;		\
+  export					\
+  VERSION='$(VERSION)'				\
+  LOCALE_FR='$(LOCALE_FR)'			\
+  LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)'		\
+  abs_top_builddir='$(abs_top_builddir)'	\
+  abs_top_srcdir='$(abs_top_srcdir)'		\
+  abs_srcdir='$(abs_srcdir)'			\
+  built_programs="`cat .built-programs`"	\
+  host_os=$(host_os)				\
+  host_triplet='$(host_triplet)'		\
+  srcdir='$(srcdir)'				\
+  top_srcdir='$(top_srcdir)'			\
+  CONFIG_HEADER='$(abs_top_builddir)/$(CONFIG_INCLUDE)' \
+  CU_TEST_NAME=`basename '$(abs_srcdir)'`,`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
+  CC='$(CC)'					\
+  AWK='$(AWK)'					\
+  EGREP='$(EGREP)'				\
+  EXEEXT='$(EXEEXT)'				\
+  MAKE=$(MAKE)					\
+  PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'	\
+  PACKAGE_VERSION=$(PACKAGE_VERSION)		\
+  PERL='$(PERL)'				\
+  PREFERABLY_POSIX_SHELL='$(PREFERABLY_POSIX_SHELL)' \
+  ; test -d /usr/xpg4/bin && PATH='/usr/xpg4/bin$(PATH_SEPARATOR)'"$$PATH"; \
+  PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
+  ; 9>&2
+
+# On failure, display the global testsuite log on stdout.
+VERBOSE = yes
+
 # Sort in traditional ASCII order, regardless of the current locale;
 # otherwise we may get into trouble with distinct strings that the
 # current locale considers to be equal.
@@ -713,5 +808,3 @@ pr_data =					\
   pr/ttb3-0FF					\
   pr/ttb3-FF					\
   pr/w72l24f-ll
-
-include $(srcdir)/check.mk
diff --git a/tests/check.mk b/tests/check.mk
deleted file mode 100644
index 0e08f6d..0000000
--- a/tests/check.mk
+++ /dev/null
@@ -1,94 +0,0 @@
-# Include this file at the end of each tests/*/Makefile.am.
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Ensure that all version-controlled executable files are listed in TESTS.
-# Collect test names from the line matching /^TESTS = \\$$/ to the following
-# one that does not end in '\'.
-_v = TESTS
-_w = root_tests
-vc_exe_in_TESTS: Makefile
-	$(AM_V_GEN)if test -d $(top_srcdir)/.git && test $(srcdir) = .; then \
-	 {								\
-	  for list in $(_v) $(_w); do					\
-	    sed -n "/^$$list =[	 ]*\\\\$$/,/[^\]$$/p" Makefile.am |	\
-	    sed -n 's/^  *\([^$$	 ]\{1,\}\).*/\1/p';		\
-	  done;								\
-	  for f in `cd $(top_srcdir) &&					\
-	   build-aux/vc-list-files $(subdir) | sed 's!^$(subdir)/!!'`; do \
-	    test -f "$$f" && test -x "$$f" && echo "$$f";		\
-	  done;								\
-	 } | sort | uniq -u | grep . && exit 1 ||:;			\
-	else :; fi
-
-check: vc_exe_in_TESTS
-.PHONY: vc_exe_in_TESTS
-
-CLEANFILES =
-CLEANFILES += .built-programs
-check_DATA = .built-programs
-.built-programs: $(top_srcdir)/src/Makefile.am
-	$(AM_V_GEN)(cd $(top_builddir)/src				\
-            && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
-          > $@-t && mv $@-t $@
-
-## '$f' is set by the Automake-generated test harness to the path of the
-## current test script stripped of VPATH components, and is used by the
-## shell-or-perl script to determine the name of the temporary files to be
-## used.  Note that $f is a shell variable, not a make macro, so the use of
-## '$$f' below is correct, and not a typo.
-LOG_COMPILER = \
-  $(SHELL) $(srcdir)/shell-or-perl \
-  --test-name "$$f" --srcdir '$(srcdir)' \
-  --shell '$(SHELL)' --perl '$(PERL)' --
-
-# Note that the first lines are statements.  They ensure that environment
-# variables that can perturb tests are unset or set to expected values.
-# The rest are envvar settings that propagate build-related Makefile
-# variables to test scripts.
-TESTS_ENVIRONMENT =				\
-  . $(srcdir)/lang-default;			\
-  tmp__=$${TMPDIR-/tmp};			\
-  test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.;	\
-  . $(srcdir)/envvar-check;			\
-  TMPDIR=$$tmp__; export TMPDIR;		\
-  export					\
-  VERSION='$(VERSION)'				\
-  LOCALE_FR='$(LOCALE_FR)'			\
-  LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)'		\
-  abs_top_builddir='$(abs_top_builddir)'	\
-  abs_top_srcdir='$(abs_top_srcdir)'		\
-  abs_srcdir='$(abs_srcdir)'			\
-  built_programs="`cat .built-programs`"	\
-  host_os=$(host_os)				\
-  host_triplet='$(host_triplet)'		\
-  srcdir='$(srcdir)'				\
-  top_srcdir='$(top_srcdir)'			\
-  CONFIG_HEADER='$(abs_top_builddir)/$(CONFIG_INCLUDE)' \
-  CU_TEST_NAME=`basename '$(abs_srcdir)'`,`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
-  CC='$(CC)'					\
-  AWK='$(AWK)'					\
-  EGREP='$(EGREP)'				\
-  EXEEXT='$(EXEEXT)'				\
-  MAKE=$(MAKE)					\
-  PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'	\
-  PACKAGE_VERSION=$(PACKAGE_VERSION)		\
-  PERL='$(PERL)'				\
-  PREFERABLY_POSIX_SHELL='$(PREFERABLY_POSIX_SHELL)' \
-  ; test -d /usr/xpg4/bin && PATH='/usr/xpg4/bin$(PATH_SEPARATOR)'"$$PATH"; \
-  PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
-  ; 9>&2
-
-VERBOSE = yes
--
1.7.12.146.g16d26b1


>From 34c9c8f70f485727fe26a9fff5dcfa3089f07186 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Thu, 30 Aug 2012 14:13:08 +0200
Subject: [PATCH 2/7] tests: prefer AM_TESTS_ENVIRONMENT over
 TESTS_ENVIRONMENT

The latter should be reserved for user overrides.

* tests/Makefile.am (TESTS_ENVIRONMENT): Rename ...
(AM_TESTS_ENVIRONMENT): ... like this.
---
 tests/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index eed4e2e..9839030 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -59,7 +59,7 @@ LOG_COMPILER = \
 # variables that can perturb tests are unset or set to expected values.
 # The rest are envvar settings that propagate build-related Makefile
 # variables to test scripts.
-TESTS_ENVIRONMENT =				\
+AM_TESTS_ENVIRONMENT =				\
   . $(srcdir)/lang-default;			\
   tmp__=$${TMPDIR-/tmp};			\
   test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.;	\
--
1.7.12.146.g16d26b1


>From 8381e35e240361dd7e0cd08edc6e619205d545a2 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Thu, 30 Aug 2012 16:58:14 +0200
Subject: [PATCH 3/7] build: require Automake >= 1.11.2

Now that we use AM_TESTS_ENVIRONMENT, we must require
Automake >= 1.11.2.
* configure.ac (AM_INIT_AUTOMAKE): Bump version requirement to 1.11.2.
* bootstrap.conf ($buildreq): Likewise.
---
 bootstrap.conf | 2 +-
 configure.ac   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index eab6606..27b5302 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -309,7 +309,7 @@ gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\
 # Build prerequisites
 buildreq="\
 autoconf   2.64
-automake   1.11.1
+automake   1.11.2
 autopoint  -
 bison      -
 gettext    0.17
diff --git a/configure.ac b/configure.ac
index 391b6bc..355dce3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,7 @@ AC_CONFIG_SRCDIR([src/ls.c])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])

-AM_INIT_AUTOMAKE([1.11.1 no-dist-gzip dist-xz color-tests parallel-tests
+AM_INIT_AUTOMAKE([1.11.2 no-dist-gzip dist-xz color-tests parallel-tests
                   subdir-objects])
 AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.

--
1.7.12.146.g16d26b1


>From e44178c59028e3c085a5c89014d44a4f647f3deb Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Thu, 30 Aug 2012 14:13:10 +0200
Subject: [PATCH 4/7] tests: avoid use of '-T' in shebang line to enable perl
 taint mode

* tests/rm/fail-eperm: Rename ...
* tests/rm/fail-eperm.xpl: ... like this
* tests/Makefile.am (TESTS): Adjust.
(TEST_EXTENSIONS): New, list '.xpl'.
(XPL_TEST_LOGS): New, run a perl test in tainted mode.
* tests/shell-or-perl: Simplify this script: we no longer need to
parse the shebang line and adjust the flags in the perl invocation
accordingly.
---
 tests/Makefile.am                       | 8 +++++++-
 tests/rm/{fail-eperm => fail-eperm.xpl} | 0
 tests/shell-or-perl                     | 9 ++-------
 3 files changed, 9 insertions(+), 8 deletions(-)
 rename tests/rm/{fail-eperm => fail-eperm.xpl} (100%)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9839030..581f803 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -45,6 +45,8 @@ check_DATA = .built-programs
             && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
           > $@-t && mv $@-t $@

+TEST_EXTENSIONS = .xpl
+
 # '$f' is set by the Automake-generated test harness to the path of the
 # current test script stripped of VPATH components, and is used by the
 # shell-or-perl script to determine the name of the temporary files to be
@@ -55,6 +57,10 @@ LOG_COMPILER = \
   --test-name "$$f" --srcdir '$(srcdir)' \
   --shell '$(SHELL)' --perl '$(PERL)' --

+# Perl scripts that must be run in tainted mode.
+XPL_LOG_COMPILER = \
+  $(PERL) -wT -I$(srcdir) -MCoreutils -MCuSkip -M"CuTmpdir qw($$f)"
+
 # Note that the first lines are statements.  They ensure that environment
 # variables that can perturb tests are unset or set to expected values.
 # The rest are envvar settings that propagate build-related Makefile
@@ -207,7 +213,7 @@ TESTS =						\
   rm/empty-name					\
   rm/f-1					\
   rm/fail-eacces				\
-  rm/fail-eperm					\
+  rm/fail-eperm.xpl				\
   tail-2/assert					\
   rm/hash					\
   rm/i-1					\
diff --git a/tests/rm/fail-eperm b/tests/rm/fail-eperm.xpl
similarity index 100%
rename from tests/rm/fail-eperm
rename to tests/rm/fail-eperm.xpl
diff --git a/tests/shell-or-perl b/tests/shell-or-perl
index 58c80e3..cb80edf 100644
--- a/tests/shell-or-perl
+++ b/tests/shell-or-perl
@@ -1,7 +1,6 @@
 #! /bin/sh
 # Run a test script of the coreutils test scripts, picking up the right
-# interpreter (i.e., perl or the shell) and the right flags for it (e.g.,
-# perl '-T' flag for perl scripts that must run in tainted mode).
+# interpreter (i.e., perl or the shell) and the right flags for it.
 #
 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
 #
@@ -96,11 +95,7 @@ case $shebang_line in
 '#!/usr/bin/perl'*)
   # The test is a perl script.
   if $cu_PERL -e 'use warnings' > /dev/null 2>&1; then
-    # Perl is available, see if we must run the test with taint
-    # mode on or not.
-    case $shebang_line in *\ -T*) T_=T;; *) T_=;; esac
-    # Now run it.
-    exec $cu_PERL -w$T_ -I"$srcdir" -MCoreutils -MCuSkip \
+    exec $cu_PERL -w -I"$srcdir" -MCoreutils -MCuSkip \
                   -M"CuTmpdir qw($test_name)" \
                   -- "$test_script" ${1+"$@"}
   else
--
1.7.12.146.g16d26b1


>From 00f5ba15dd91a3d9780fe1fbd06a4df436ae6714 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Thu, 30 Aug 2012 14:13:11 +0200
Subject: [PATCH 5/7] tests: detect missing perl at configure runtime

* configure.ac (AM_CONDITIONAL): Set the conditional 'HAVE_PERL' to
true if the configure-time checks (as run by gl_PERL) have been able
to find a working perl.
* tests/no-perl: New script, report a diagnostic about "missing perl"
and exit with status 77.
* tests/Makefile.am (EXTRA_DIST): Distribute it.
(TESTSUITE_PERL): New, define to '$(PERL)' if a perl interpreter has
been found at configure time (i.e., if the 'HAVE_PERL' automake
conditional is true), and to '$(srcdir)/no-perl' otherwise.
(LOG_COMPILER): Use $(TESTSUITE_PERL) instead of $(PERL).
(XPL_LOG_COMPILER): Likewise.
* tests/shell-or-perl: Simplify: no need to actually check whether
perl is working.
---
 configure.ac        |  7 +++++++
 tests/Makefile.am   | 11 +++++++++--
 tests/no-perl       |  6 ++++++
 tests/shell-or-perl | 11 ++---------
 4 files changed, 24 insertions(+), 11 deletions(-)
 create mode 100644 tests/no-perl

diff --git a/configure.ac b/configure.ac
index 355dce3..083fd34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,6 +60,13 @@ gl_EARLY
 gl_INIT
 coreutils_MACROS

+# The test suite needs to know if we have a working perl.
+# FIXME: this is suboptimal.  Ideally, we would be able to call gl_PERL
+# with an ACTION-IF-NOT-FOUND argument ...
+cu_have_perl=yes
+case $PERL in *"/missing ") cu_have_perl=no;; esac
+AM_CONDITIONAL([HAVE_PERL], [test $cu_have_perl = yes])
+
 AC_ARG_ENABLE([gcc-warnings],
   [AS_HELP_STRING([--enable-gcc-warnings],
                   [turn on lots of GCC warnings (for developers)])],
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 581f803..ff0af84 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -47,6 +47,12 @@ check_DATA = .built-programs

 TEST_EXTENSIONS = .xpl

+if HAVE_PERL
+TESTSUITE_PERL = $(PERL)
+else
+TESTSUITE_PERL = $(SHELL) $(srcdir)/no-perl
+endif
+
 # '$f' is set by the Automake-generated test harness to the path of the
 # current test script stripped of VPATH components, and is used by the
 # shell-or-perl script to determine the name of the temporary files to be
@@ -55,11 +61,11 @@ TEST_EXTENSIONS = .xpl
 LOG_COMPILER = \
   $(SHELL) $(srcdir)/shell-or-perl \
   --test-name "$$f" --srcdir '$(srcdir)' \
-  --shell '$(SHELL)' --perl '$(PERL)' --
+  --shell '$(SHELL)' --perl '$(TESTSUITE_PERL)' --

 # Perl scripts that must be run in tainted mode.
 XPL_LOG_COMPILER = \
-  $(PERL) -wT -I$(srcdir) -MCoreutils -MCuSkip -M"CuTmpdir qw($$f)"
+  $(TESTSUITE_PERL) -wT -I$(srcdir) -MCoreutils -MCuSkip -M"CuTmpdir qw($$f)"

 # Note that the first lines are statements.  They ensure that environment
 # variables that can perturb tests are unset or set to expected values.
@@ -118,6 +124,7 @@ EXTRA_DIST =		\
   init.cfg		\
   init.sh		\
   lang-default		\
+  no-perl		\
   other-fs-tmpdir	\
   sample-test		\
   shell-or-perl		\
diff --git a/tests/no-perl b/tests/no-perl
new file mode 100644
index 0000000..956a826
--- /dev/null
+++ b/tests/no-perl
@@ -0,0 +1,6 @@
+#! /bin/sh
+# Perl is not available, the test should be considered skipped.
+# FD 9 should have been opened by the test suite harness, pointing
+# to the original stderr (usually, the user's terminal).
+echo "test skipped: no usable version of Perl found" >&9
+exit 77
diff --git a/tests/shell-or-perl b/tests/shell-or-perl
index cb80edf..409db0e 100644
--- a/tests/shell-or-perl
+++ b/tests/shell-or-perl
@@ -94,15 +94,8 @@ read shebang_line < "$test_script" \
 case $shebang_line in
 '#!/usr/bin/perl'*)
   # The test is a perl script.
-  if $cu_PERL -e 'use warnings' > /dev/null 2>&1; then
-    exec $cu_PERL -w -I"$srcdir" -MCoreutils -MCuSkip \
-                  -M"CuTmpdir qw($test_name)" \
-                  -- "$test_script" ${1+"$@"}
-  else
-    # Perl is not available, skip the test.
-    echo "$test_name: skip: no usable version of Perl found"
-    exit 77
-  fi
+  exec $cu_PERL -w -I"$srcdir" -MCoreutils -MCuSkip \
+                -M"CuTmpdir qw($test_name)" -- "$test_script" ${1+"$@"}
   ;;
 *)
   # Assume the test is a shell script.
--
1.7.12.146.g16d26b1


>From 9eb4c31eb78c28dd9f72d1cbb940270311be343c Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Thu, 30 Aug 2012 14:13:12 +0200
Subject: [PATCH 6/7] tests: add .sh and .pl suffixes to shell and perl tests,
 respectively

Not only this shrinks the size of the generated Makefile (from > 6300
lines to ~3000), but will allow further simplifications in future
changes.

* tests/Makefile.am (TEST_EXTENSIONS): Add '.sh' and '.pl'.
(PL_LOG_COMPILER, SH_LOG_COMPILER): New, still defined simply to
$(LOG_COMPILER) for the time being.
(TESTS, root_tests): Adjust as described.
* All tests: Rename as described.
---
 tests/Makefile.am                                  | 989 +++++++++++----------
 tests/chgrp/{basic => basic.sh}                    |   0
 .../{default-no-deref => default-no-deref.sh}      |   0
 tests/chgrp/{deref => deref.sh}                    |   0
 tests/chgrp/{no-x => no-x.sh}                      |   0
 tests/chgrp/{posix-H => posix-H.sh}                |   0
 tests/chgrp/{recurse => recurse.sh}                |   0
 tests/chmod/{c-option => c-option.sh}              |   0
 tests/chmod/{equal-x => equal-x.sh}                |   0
 tests/chmod/{equals => equals.sh}                  |   0
 tests/chmod/{inaccessible => inaccessible.sh}      |   0
 tests/chmod/{no-x => no-x.sh}                      |   0
 tests/chmod/{octal => octal.sh}                    |   0
 tests/chmod/{setgid => setgid.sh}                  |   0
 tests/chmod/{silent => silent.sh}                  |   0
 tests/chmod/{thru-dangling => thru-dangling.sh}    |   0
 tests/chmod/{umask-x => umask-x.sh}                |   0
 tests/chmod/{usage => usage.sh}                    |   0
 tests/chown/{basic => basic.sh}                    |   0
 tests/chown/{deref => deref.sh}                    |   0
 tests/chown/{preserve-root => preserve-root.sh}    |   0
 tests/chown/{separator => separator.sh}            |   0
 tests/cp/{abuse => abuse.sh}                       |   0
 tests/cp/{acl => acl.sh}                           |   0
 tests/cp/{attr-existing => attr-existing.sh}       |   0
 tests/cp/{backup-1 => backup-1.sh}                 |   0
 tests/cp/{backup-dir => backup-dir.sh}             |   0
 tests/cp/{backup-is-src => backup-is-src.sh}       |   0
 tests/cp/{capability => capability.sh}             |   0
 tests/cp/{cp-HL => cp-HL.sh}                       |   0
 tests/cp/{cp-a-selinux => cp-a-selinux.sh}         |   0
 tests/cp/{cp-deref => cp-deref.sh}                 |   0
 tests/cp/{cp-i => cp-i.sh}                         |   0
 tests/cp/{cp-mv-backup => cp-mv-backup.sh}         |   0
 ...{cp-mv-enotsup-xattr => cp-mv-enotsup-xattr.sh} |   0
 tests/cp/{cp-parents => cp-parents.sh}             |   0
 tests/cp/{deref-slink => deref-slink.sh}           |   0
 tests/cp/{dir-rm-dest => dir-rm-dest.sh}           |   0
 tests/cp/{dir-slash => dir-slash.sh}               |   0
 tests/cp/{dir-vs-file => dir-vs-file.sh}           |   0
 .../cp/{existing-perm-dir => existing-perm-dir.sh} |   0
 .../{existing-perm-race => existing-perm-race.sh}  |   0
 tests/cp/{fail-perm => fail-perm.sh}               |   0
 tests/cp/{fiemap-2 => fiemap-2.sh}                 |   0
 tests/cp/{fiemap-empty => fiemap-empty.sh}         |   0
 tests/cp/{fiemap-perf => fiemap-perf.sh}           |   0
 tests/cp/{file-perm-race => file-perm-race.sh}     |   0
 tests/cp/{into-self => into-self.sh}               |   0
 tests/cp/{link-heap => link-heap.sh}               |   0
 tests/cp/{link-no-deref => link-no-deref.sh}       |   0
 tests/cp/{link-preserve => link-preserve.sh}       |   0
 tests/cp/{link-symlink => link-symlink.sh}         |   0
 tests/cp/{link => link.sh}                         |   0
 tests/cp/{nfs-removal-race => nfs-removal-race.sh} |   0
 tests/cp/{no-deref-link1 => no-deref-link1.sh}     |   0
 tests/cp/{no-deref-link2 => no-deref-link2.sh}     |   0
 tests/cp/{no-deref-link3 => no-deref-link3.sh}     |   0
 tests/cp/{parent-perm-race => parent-perm-race.sh} |   0
 tests/cp/{parent-perm => parent-perm.sh}           |   0
 tests/cp/{perm => perm.sh}                         |   0
 tests/cp/{preserve-2 => preserve-2.sh}             |   0
 tests/cp/{preserve-gid => preserve-gid.sh}         |   0
 tests/cp/{preserve-link => preserve-link.sh}       |   0
 ...{preserve-slink-time => preserve-slink-time.sh} |   0
 tests/cp/{proc-short-read => proc-short-read.sh}   |   0
 tests/cp/{proc-zero-len => proc-zero-len.sh}       |   0
 tests/cp/{r-vs-symlink => r-vs-symlink.sh}         |   0
 tests/cp/{reflink-auto => reflink-auto.sh}         |   0
 tests/cp/{reflink-perm => reflink-perm.sh}         |   0
 tests/cp/{same-file => same-file.sh}               |   0
 tests/cp/{slink-2-slink => slink-2-slink.sh}       |   0
 tests/cp/{sparse-fiemap => sparse-fiemap.sh}       |   0
 tests/cp/{sparse-to-pipe => sparse-to-pipe.sh}     |   0
 tests/cp/{sparse => sparse.sh}                     |   0
 tests/cp/{special-bits => special-bits.sh}         |   0
 tests/cp/{special-f => special-f.sh}               |   0
 tests/cp/{src-base-dot => src-base-dot.sh}         |   0
 tests/cp/{symlink-slash => symlink-slash.sh}       |   0
 tests/cp/{thru-dangling => thru-dangling.sh}       |   0
 tests/dd/{bytes => bytes.sh}                       |   0
 tests/dd/{direct => direct.sh}                     |   0
 tests/dd/{misc => misc.sh}                         |   0
 tests/dd/{nocache => nocache.sh}                   |   0
 tests/dd/{not-rewound => not-rewound.sh}           |   0
 tests/dd/{reblock => reblock.sh}                   |   0
 .../{skip-seek-past-dev => skip-seek-past-dev.sh}  |   0
 ...{skip-seek-past-file => skip-seek-past-file.sh} |   0
 tests/dd/{skip-seek => skip-seek.pl}               |   0
 tests/dd/{skip-seek2 => skip-seek2.sh}             |   0
 tests/dd/{sparse => sparse.sh}                     |   0
 tests/dd/{stderr => stderr.sh}                     |   0
 tests/dd/{unblock-sync => unblock-sync.sh}         |   0
 tests/dd/{unblock => unblock.pl}                   |   0
 tests/df/{df-P => df-P.sh}                         |   0
 tests/df/{header => header.sh}                     |   0
 tests/df/{no-mtab-status => no-mtab-status.sh}     |   0
 .../df/{problematic-chars => problematic-chars.sh} |   0
 .../df/{total-unprocessed => total-unprocessed.sh} |   0
 tests/df/{total-verify => total-verify.sh}         |   0
 tests/df/{unreadable => unreadable.sh}             |   0
 tests/du/{2g => 2g.sh}                             |   0
 tests/du/{8gb => 8gb.sh}                           |   0
 tests/du/{basic => basic.sh}                       |   0
 tests/du/{bigtime => bigtime.sh}                   |   0
 ...ind-mount-dir-cycle => bind-mount-dir-cycle.sh} |   0
 tests/du/{deref-args => deref-args.sh}             |   0
 tests/du/{deref => deref.sh}                       |   0
 tests/du/{exclude => exclude.sh}                   |   0
 tests/du/{fd-leak => fd-leak.sh}                   |   0
 tests/du/{files0-from-dir => files0-from-dir.sh}   |   0
 tests/du/{files0-from => files0-from.pl}           |   0
 tests/du/{hard-link => hard-link.sh}               |   0
 tests/du/{inacc-dest => inacc-dest.sh}             |   0
 tests/du/{inacc-dir => inacc-dir.sh}               |   0
 tests/du/{inaccessible-cwd => inaccessible-cwd.sh} |   0
 ...ong-from-unreadable => long-from-unreadable.sh} |   0
 tests/du/{long-sloop => long-sloop.sh}             |   0
 tests/du/{max-depth => max-depth.sh}               |   0
 ...ile-traversing => move-dir-while-traversing.sh} |   0
 tests/du/{no-deref => no-deref.sh}                 |   0
 tests/du/{no-x => no-x.sh}                         |   0
 tests/du/{one-file-system => one-file-system.sh}   |   0
 tests/du/{restore-wd => restore-wd.sh}             |   0
 tests/du/{slash => slash.sh}                       |   0
 tests/du/{slink => slink.sh}                       |   0
 tests/du/{trailing-slash => trailing-slash.sh}     |   0
 tests/du/{two-args => two-args.sh}                 |   0
 tests/fmt/{base => base.pl}                        |   0
 tests/fmt/{goal-option => goal-option.sh}          |   0
 tests/fmt/{long-line => long-line.sh}              |   0
 tests/id/{gnu-zero-uids => gnu-zero-uids.sh}       |   0
 tests/id/{no-context => no-context.sh}             |   0
 tests/install/{basic-1 => basic-1.sh}              |   0
 .../install/{create-leading => create-leading.sh}  |   0
 tests/install/{d-slashdot => d-slashdot.sh}        |   0
 .../install/{install-C-root => install-C-root.sh}  |   0
 .../{install-C-selinux => install-C-selinux.sh}    |   0
 tests/install/{install-C => install-C.sh}          |   0
 tests/install/{strip-program => strip-program.sh}  |   0
 tests/install/{trap => trap.sh}                    |   0
 tests/ln/{backup-1 => backup-1.sh}                 |   0
 tests/ln/{hard-backup => hard-backup.sh}           |   0
 tests/ln/{hard-to-sym => hard-to-sym.sh}           |   0
 tests/ln/{misc => misc.sh}                         |   0
 tests/ln/{relative => relative.sh}                 |   0
 tests/ln/{sf-1 => sf-1.sh}                         |   0
 ...nt-dest => slash-decorated-nonexistent-dest.sh} |   0
 tests/ln/{target-1 => target-1.sh}                 |   0
 tests/ls/{abmon-align => abmon-align.sh}           |   0
 tests/ls/{block-size => block-size.sh}             |   0
 tests/ls/{capability => capability.sh}             |   0
 .../{color-clear-to-eol => color-clear-to-eol.sh}  |   0
 tests/ls/{color-dtype-dir => color-dtype-dir.sh}   |   0
 tests/ls/{color-norm => color-norm.sh}             |   0
 tests/ls/{dangle => dangle.sh}                     |   0
 tests/ls/{dired => dired.sh}                       |   0
 tests/ls/{file-type => file-type.sh}               |   0
 tests/ls/{follow-slink => follow-slink.sh}         |   0
 tests/ls/{getxattr-speedup => getxattr-speedup.sh} |   0
 tests/ls/{infloop => infloop.sh}                   |   0
 tests/ls/{inode => inode.sh}                       |   0
 tests/ls/{m-option => m-option.sh}                 |   0
 tests/ls/{multihardlink => multihardlink.sh}       |   0
 tests/ls/{nameless-uid => nameless-uid.sh}         |   0
 tests/ls/{no-arg => no-arg.sh}                     |   0
 tests/ls/{no-cap => no-cap.sh}                     |   0
 ...c-selinux-segfault => proc-selinux-segfault.sh} |   0
 ...ountpoint-inode => readdir-mountpoint-inode.sh} |   0
 tests/ls/{recursive => recursive.sh}               |   0
 ...rel-symlink-color => root-rel-symlink-color.sh} |   0
 tests/ls/{rt-1 => rt-1.sh}                         |   0
 tests/ls/{slink-acl => slink-acl.sh}               |   0
 tests/ls/{stat-dtype => stat-dtype.sh}             |   0
 tests/ls/{stat-failed => stat-failed.sh}           |   0
 tests/ls/{stat-free-color => stat-free-color.sh}   |   0
 .../{stat-free-symlinks => stat-free-symlinks.sh}  |   0
 tests/ls/{stat-vs-dirent => stat-vs-dirent.sh}     |   0
 tests/ls/{symlink-slash => symlink-slash.sh}       |   0
 tests/ls/{time-style-diag => time-style-diag.sh}   |   0
 tests/ls/{x-option => x-option.sh}                 |   0
 tests/misc/{arch => arch.sh}                       |   0
 tests/misc/{base64 => base64.pl}                   |   0
 tests/misc/{basename => basename.pl}               |   0
 tests/misc/{cat-buf => cat-buf.sh}                 |   0
 tests/misc/{cat-proc => cat-proc.sh}               |   0
 tests/misc/{chcon-fail => chcon-fail.sh}           |   0
 tests/misc/{chcon => chcon.sh}                     |   0
 .../{chroot-credentials => chroot-credentials.sh}  |   0
 tests/misc/{chroot-fail => chroot-fail.sh}         |   0
 tests/misc/{close-stdout => close-stdout.sh}       |   0
 tests/misc/{comm => comm.pl}                       |   0
 tests/misc/{csplit-1000 => csplit-1000.sh}         |   0
 tests/misc/{csplit-heap => csplit-heap.sh}         |   0
 tests/misc/{csplit => csplit.sh}                   |   0
 tests/misc/{cut => cut.pl}                         |   0
 tests/misc/{date-next-dow => date-next-dow.pl}     |   0
 tests/misc/{date-sec => date-sec.sh}               |   0
 tests/misc/{date => date.pl}                       |   0
 tests/misc/{dircolors => dircolors.pl}             |   0
 tests/misc/{dirname => dirname.pl}                 |   0
 tests/misc/{env-null => env-null.sh}               |   0
 tests/misc/{env => env.sh}                         |   0
 tests/misc/{expand => expand.pl}                   |   0
 tests/misc/{expr => expr.pl}                       |   0
 tests/misc/{factor => factor.pl}                   |   0
 tests/misc/{false-status => false-status.sh}       |   0
 tests/misc/{fold => fold.pl}                       |   0
 tests/misc/{groups-dash => groups-dash.sh}         |   0
 tests/misc/{groups-version => groups-version.sh}   |   0
 tests/misc/{head-c => head-c.sh}                   |   0
 tests/misc/{head-elide-tail => head-elide-tail.pl} |   0
 tests/misc/{head-pos => head-pos.sh}               |   0
 tests/misc/{head => head.pl}                       |   0
 tests/misc/{help-version => help-version.sh}       |   0
 tests/misc/{id-context => id-context.sh}           |   0
 tests/misc/{id-groups => id-groups.sh}             |   0
 tests/misc/{id-setgid => id-setgid.sh}             |   0
 tests/misc/{invalid-opt => invalid-opt.pl}         |   0
 tests/misc/{join => join.pl}                       |   0
 tests/misc/{ls-misc => ls-misc.pl}                 |   0
 tests/misc/{ls-time => ls-time.sh}                 |   0
 tests/misc/{md5sum-bsd => md5sum-bsd.sh}           |   0
 tests/misc/{md5sum-newline => md5sum-newline.pl}   |   0
 tests/misc/{md5sum-parallel => md5sum-parallel.sh} |   0
 tests/misc/{md5sum => md5sum.pl}                   |   0
 tests/misc/{mknod => mknod.sh}                     |   0
 tests/misc/{mktemp => mktemp.pl}                   |   0
 tests/misc/{nice-fail => nice-fail.sh}             |   0
 tests/misc/{nice => nice.sh}                       |   0
 tests/misc/{nl => nl.sh}                           |   0
 tests/misc/{nohup => nohup.sh}                     |   0
 tests/misc/{nproc-avail => nproc-avail.sh}         |   0
 tests/misc/{nproc-positive => nproc-positive.sh}   |   0
 tests/misc/{od-N => od-N.sh}                       |   0
 tests/misc/{od-float => od-float.sh}               |   0
 tests/misc/{od-multiple-t => od-multiple-t.sh}     |   0
 tests/misc/{od-x8 => od-x8.sh}                     |   0
 tests/misc/{od => od.pl}                           |   0
 tests/misc/{paste => paste.pl}                     |   0
 tests/misc/{pathchk1 => pathchk1.sh}               |   0
 tests/misc/{pr => pr.pl}                           |   0
 tests/misc/{printenv => printenv.sh}               |   0
 tests/misc/{printf-cov => printf-cov.pl}           |   0
 tests/misc/{printf-hex => printf-hex.sh}           |   0
 tests/misc/{printf-surprise => printf-surprise.sh} |   0
 tests/misc/{printf => printf.sh}                   |   0
 tests/misc/{ptx-overrun => ptx-overrun.sh}         |   0
 tests/misc/{ptx => ptx.pl}                         |   0
 tests/misc/{pwd-long => pwd-long.sh}               |   0
 tests/misc/{pwd-option => pwd-option.sh}           |   0
 .../misc/{readlink-fp-loop => readlink-fp-loop.sh} |   0
 tests/misc/{readlink-root => readlink-root.sh}     |   0
 tests/misc/{realpath => realpath.sh}               |   0
 .../{runcon-no-reorder => runcon-no-reorder.sh}    |   0
 tests/misc/{selinux => selinux.sh}                 |   0
 tests/misc/{seq-long-double => seq-long-double.sh} |   0
 tests/misc/{seq => seq.pl}                         |   0
 tests/misc/{sha1sum-vec => sha1sum-vec.pl}         |   0
 tests/misc/{sha1sum => sha1sum.pl}                 |   0
 tests/misc/{sha224sum => sha224sum.pl}             |   0
 tests/misc/{sha256sum => sha256sum.pl}             |   0
 tests/misc/{sha384sum => sha384sum.pl}             |   0
 tests/misc/{sha512sum => sha512sum.pl}             |   0
 tests/misc/{shred-exact => shred-exact.sh}         |   0
 tests/misc/{shred-passes => shred-passes.sh}       |   0
 tests/misc/{shred-remove => shred-remove.sh}       |   0
 tests/misc/{shuf => shuf.sh}                       |   0
 .../misc/{sort-NaN-infloop => sort-NaN-infloop.sh} |   0
 ...t-benchmark-random => sort-benchmark-random.sh} |   0
 .../{sort-compress-hang => sort-compress-hang.sh}  |   0
 .../{sort-compress-proc => sort-compress-proc.sh}  |   0
 tests/misc/{sort-compress => sort-compress.sh}     |   0
 tests/misc/{sort-continue => sort-continue.sh}     |   0
 tests/misc/{sort-debug-keys => sort-debug-keys.sh} |   0
 tests/misc/{sort-debug-warn => sort-debug-warn.sh} |   0
 tests/misc/{sort-discrim => sort-discrim.sh}       |   0
 tests/misc/{sort-exit-early => sort-exit-early.sh} |   0
 .../misc/{sort-files0-from => sort-files0-from.pl} |   0
 tests/misc/{sort-float => sort-float.sh}           |   0
 .../{sort-merge-fdlimit => sort-merge-fdlimit.sh}  |   0
 tests/misc/{sort-merge => sort-merge.pl}           |   0
 tests/misc/{sort-month => sort-month.sh}           |   0
 tests/misc/{sort-rand => sort-rand.sh}             |   0
 ...{sort-spinlock-abuse => sort-spinlock-abuse.sh} |   0
 ...t-stale-thread-mem => sort-stale-thread-mem.sh} |   0
 tests/misc/{sort-u-FMR => sort-u-FMR.sh}           |   0
 .../misc/{sort-unique-segv => sort-unique-segv.sh} |   0
 tests/misc/{sort-unique => sort-unique.sh}         |   0
 tests/misc/{sort-version => sort-version.sh}       |   0
 tests/misc/{sort => sort.pl}                       |   0
 tests/misc/{stat-birthtime => stat-birthtime.sh}   |   0
 tests/misc/{stat-fmt => stat-fmt.sh}               |   0
 tests/misc/{stat-hyphen => stat-hyphen.sh}         |   0
 tests/misc/{stat-mount => stat-mount.sh}           |   0
 .../misc/{stat-nanoseconds => stat-nanoseconds.sh} |   0
 tests/misc/{stat-printf => stat-printf.pl}         |   0
 tests/misc/{stat-slash => stat-slash.sh}           |   0
 tests/misc/{stdbuf => stdbuf.sh}                   |   0
 tests/misc/{stty-invalid => stty-invalid.sh}       |   0
 tests/misc/{stty-pairs => stty-pairs.sh}           |   0
 tests/misc/{stty-row-col => stty-row-col.sh}       |   0
 tests/misc/{stty => stty.sh}                       |   0
 tests/misc/{sum-sysv => sum-sysv.sh}               |   0
 tests/misc/{sum => sum.pl}                         |   0
 .../{tac-2-nonseekable => tac-2-nonseekable.sh}    |   0
 tests/misc/{tac-continue => tac-continue.sh}       |   0
 tests/misc/{tac => tac.pl}                         |   0
 tests/misc/{tail => tail.pl}                       |   0
 tests/misc/{tee-dash => tee-dash.sh}               |   0
 tests/misc/{tee => tee.sh}                         |   0
 tests/misc/{test-diag => test-diag.pl}             |   0
 tests/misc/{test => test.pl}                       |   0
 tests/misc/{timeout-group => timeout-group.sh}     |   0
 .../{timeout-parameters => timeout-parameters.sh}  |   0
 tests/misc/{timeout => timeout.sh}                 |   0
 tests/misc/{tr-case-class => tr-case-class.sh}     |   0
 tests/misc/{tr => tr.pl}                           |   0
 ...ngling-symlink => truncate-dangling-symlink.sh} |   0
 .../{truncate-dir-fail => truncate-dir-fail.sh}    |   0
 .../{truncate-fail-diag => truncate-fail-diag.sh}  |   0
 tests/misc/{truncate-fifo => truncate-fifo.sh}     |   0
 ...reate-missing => truncate-no-create-missing.sh} |   0
 .../{truncate-overflow => truncate-overflow.sh}    |   0
 ...e-owned-by-other => truncate-owned-by-other.sh} |   0
 ...{truncate-parameters => truncate-parameters.sh} |   0
 .../{truncate-relative => truncate-relative.sh}    |   0
 tests/misc/{tsort => tsort.pl}                     |   0
 tests/misc/{tty-eof => tty-eof.pl}                 |   0
 tests/misc/{unexpand => unexpand.pl}               |   0
 tests/misc/{uniq-perf => uniq-perf.sh}             |   0
 tests/misc/{uniq => uniq.pl}                       |   0
 tests/misc/{wc-files0-from => wc-files0-from.pl}   |   0
 tests/misc/{wc-files0 => wc-files0.sh}             |   0
 tests/misc/{wc-parallel => wc-parallel.sh}         |   0
 tests/misc/{wc => wc.pl}                           |   0
 tests/misc/{xattr => xattr.sh}                     |   0
 tests/misc/{xstrtol => xstrtol.pl}                 |   0
 tests/mkdir/{p-1 => p-1.sh}                        |   0
 tests/mkdir/{p-2 => p-2.sh}                        |   0
 tests/mkdir/{p-3 => p-3.sh}                        |   0
 tests/mkdir/{p-slashdot => p-slashdot.sh}          |   0
 tests/mkdir/{p-thru-slink => p-thru-slink.sh}      |   0
 tests/mkdir/{p-v => p-v.sh}                        |   0
 tests/mkdir/{parents => parents.sh}                |   0
 tests/mkdir/{perm => perm.sh}                      |   0
 tests/mkdir/{selinux => selinux.sh}                |   0
 tests/mkdir/{special-1 => special-1.sh}            |   0
 tests/mkdir/{t-slash => t-slash.sh}                |   0
 ...e-under-readonly => writable-under-readonly.sh} |   0
 tests/mv/{acl => acl.sh}                           |   0
 tests/mv/{atomic => atomic.sh}                     |   0
 tests/mv/{atomic2 => atomic2.sh}                   |   0
 tests/mv/{backup-dir => backup-dir.sh}             |   0
 tests/mv/{backup-is-src => backup-is-src.sh}       |   0
 tests/mv/{childproof => childproof.sh}             |   0
 tests/mv/{diag => diag.sh}                         |   0
 tests/mv/{dir-file => dir-file.sh}                 |   0
 tests/mv/{dir2dir => dir2dir.sh}                   |   0
 tests/mv/{dup-source => dup-source.sh}             |   0
 tests/mv/{force => force.sh}                       |   0
 tests/mv/{hard-2 => hard-2.sh}                     |   0
 tests/mv/{hard-3 => hard-3.sh}                     |   0
 tests/mv/{hard-4 => hard-4.sh}                     |   0
 tests/mv/{hard-link-1 => hard-link-1.sh}           |   0
 tests/mv/{hard-verbose => hard-verbose.sh}         |   0
 tests/mv/{i-1 => i-1.pl}                           |   0
 tests/mv/{i-2 => i-2.sh}                           |   0
 tests/mv/{i-3 => i-3.sh}                           |   0
 tests/mv/{i-4 => i-4.sh}                           |   0
 tests/mv/{i-5 => i-5.sh}                           |   0
 tests/mv/{i-link-no => i-link-no.sh}               |   0
 tests/mv/{into-self-2 => into-self-2.sh}           |   0
 tests/mv/{into-self-3 => into-self-3.sh}           |   0
 tests/mv/{into-self-4 => into-self-4.sh}           |   0
 tests/mv/{into-self => into-self.sh}               |   0
 tests/mv/{leak-fd => leak-fd.sh}                   |   0
 tests/mv/{mv-n => mv-n.sh}                         |   0
 tests/mv/{mv-special-1 => mv-special-1.sh}         |   0
 tests/mv/{no-target-dir => no-target-dir.sh}       |   0
 tests/mv/{part-fail => part-fail.sh}               |   0
 tests/mv/{part-hardlink => part-hardlink.sh}       |   0
 tests/mv/{part-rename => part-rename.sh}           |   0
 tests/mv/{part-symlink => part-symlink.sh}         |   0
 tests/mv/{partition-perm => partition-perm.sh}     |   0
 tests/mv/{perm-1 => perm-1.sh}                     |   0
 tests/mv/{sticky-to-xpart => sticky-to-xpart.sh}   |   0
 ...nk-to-self => symlink-onto-hardlink-to-self.sh} |   0
 ...link-onto-hardlink => symlink-onto-hardlink.sh} |   0
 tests/mv/{to-symlink => to-symlink.sh}             |   0
 tests/mv/{trailing-slash => trailing-slash.sh}     |   0
 tests/mv/{update => update.sh}                     |   0
 tests/pr/{pr-tests => pr-tests.pl}                 |   0
 tests/readlink/{can-e => can-e.sh}                 |   0
 tests/readlink/{can-f => can-f.sh}                 |   0
 tests/readlink/{can-m => can-m.sh}                 |   0
 tests/readlink/{rl-1 => rl-1.sh}                   |   0
 tests/rm/{cycle => cycle.sh}                       |   0
 tests/rm/{d-1 => d-1.sh}                           |   0
 tests/rm/{d-2 => d-2.sh}                           |   0
 tests/rm/{d-3 => d-3.sh}                           |   0
 tests/rm/{dangling-symlink => dangling-symlink.sh} |   0
 tests/rm/{deep-1 => deep-1.sh}                     |   0
 tests/rm/{deep-2 => deep-2.sh}                     |   0
 tests/rm/{dir-no-w => dir-no-w.sh}                 |   0
 tests/rm/{dir-nonrecur => dir-nonrecur.sh}         |   0
 tests/rm/{dot-rel => dot-rel.sh}                   |   0
 tests/rm/{empty-inacc => empty-inacc.sh}           |   0
 tests/rm/{empty-name => empty-name.pl}             |   0
 tests/rm/{ext3-perf => ext3-perf.sh}               |   0
 tests/rm/{f-1 => f-1.sh}                           |   0
 tests/rm/{fail-2eperm => fail-2eperm.sh}           |   0
 tests/rm/{fail-eacces => fail-eacces.sh}           |   0
 tests/rm/{hash => hash.sh}                         |   0
 tests/rm/{i-1 => i-1.sh}                           |   0
 tests/rm/{i-never => i-never.sh}                   |   0
 tests/rm/{i-no-r => i-no-r.sh}                     |   0
 tests/rm/{ignorable => ignorable.sh}               |   0
 tests/rm/{inaccessible => inaccessible.sh}         |   0
 .../{interactive-always => interactive-always.sh}  |   0
 tests/rm/{interactive-once => interactive-once.sh} |   0
 tests/rm/{ir-1 => ir-1.sh}                         |   0
 tests/rm/{isatty => isatty.sh}                     |   0
 ...r-entries-vs-OOM => many-dir-entries-vs-OOM.sh} |   0
 tests/rm/{no-give-up => no-give-up.sh}             |   0
 tests/rm/{one-file-system => one-file-system.sh}   |   0
 tests/rm/{one-file-system2 => one-file-system2.sh} |   0
 tests/rm/{r-1 => r-1.sh}                           |   0
 tests/rm/{r-2 => r-2.sh}                           |   0
 tests/rm/{r-3 => r-3.sh}                           |   0
 tests/rm/{r-4 => r-4.sh}                           |   0
 tests/rm/{read-only => read-only.sh}               |   0
 tests/rm/{readdir-bug => readdir-bug.sh}           |   0
 tests/rm/{rm1 => rm1.sh}                           |   0
 tests/rm/{rm2 => rm2.sh}                           |   0
 tests/rm/{rm3 => rm3.sh}                           |   0
 tests/rm/{rm4 => rm4.sh}                           |   0
 tests/rm/{rm5 => rm5.sh}                           |   0
 tests/rm/{sunos-1 => sunos-1.sh}                   |   0
 tests/rm/{unread2 => unread2.sh}                   |   0
 tests/rm/{unread3 => unread3.sh}                   |   0
 tests/rm/{unreadable => unreadable.pl}             |   0
 tests/rm/{v-slash => v-slash.sh}                   |   0
 tests/rmdir/{fail-perm => fail-perm.sh}            |   0
 tests/rmdir/{ignore => ignore.sh}                  |   0
 tests/rmdir/{t-slash => t-slash.sh}                |   0
 .../{additional-suffix => additional-suffix.sh}    |   0
 tests/split/{b-chunk => b-chunk.sh}                |   0
 tests/split/{fail => fail.sh}                      |   0
 tests/split/{filter => filter.sh}                  |   0
 tests/split/{guard-input => guard-input.sh}        |   0
 tests/split/{l-chunk => l-chunk.sh}                |   0
 tests/split/{lines => lines.sh}                    |   0
 tests/split/{numeric => numeric.sh}                |   0
 tests/split/{r-chunk => r-chunk.sh}                |   0
 .../{suffix-auto-length => suffix-auto-length.sh}  |   0
 tests/split/{suffix-length => suffix-length.sh}    |   0
 tests/tail-2/{F-vs-missing => F-vs-missing.sh}     |   0
 tests/tail-2/{F-vs-rename => F-vs-rename.sh}       |   0
 tests/tail-2/{append-only => append-only.sh}       |   0
 tests/tail-2/{assert-2 => assert-2.sh}             |   0
 tests/tail-2/{assert => assert.sh}                 |   0
 tests/tail-2/{big-4gb => big-4gb.sh}               |   0
 tests/tail-2/{flush-initial => flush-initial.sh}   |   0
 tests/tail-2/{follow-name => follow-name.sh}       |   0
 tests/tail-2/{follow-stdin => follow-stdin.sh}     |   0
 tests/tail-2/{infloop-1 => infloop-1.sh}           |   0
 .../{inotify-hash-abuse => inotify-hash-abuse.sh}  |   0
 ...{inotify-hash-abuse2 => inotify-hash-abuse2.sh} |   0
 tests/tail-2/{inotify-race => inotify-race.sh}     |   0
 tests/tail-2/{inotify-rotate => inotify-rotate.sh} |   0
 tests/tail-2/{pid => pid.sh}                       |   0
 tests/tail-2/{pipe-f => pipe-f.sh}                 |   0
 tests/tail-2/{pipe-f2 => pipe-f2.sh}               |   0
 tests/tail-2/{proc-ksyms => proc-ksyms.sh}         |   0
 tests/tail-2/{start-middle => start-middle.sh}     |   0
 tests/tail-2/{tail-n0f => tail-n0f.sh}             |   0
 tests/tail-2/{wait => wait.sh}                     |   0
 tests/touch/{60-seconds => 60-seconds.sh}          |   0
 .../{dangling-symlink => dangling-symlink.sh}      |   0
 tests/touch/{dir-1 => dir-1.sh}                    |   0
 tests/touch/{empty-file => empty-file.sh}          |   0
 tests/touch/{fail-diag => fail-diag.sh}            |   0
 tests/touch/{fifo => fifo.sh}                      |   0
 .../{no-create-missing => no-create-missing.sh}    |   0
 tests/touch/{no-dereference => no-dereference.sh}  |   0
 tests/touch/{no-rights => no-rights.sh}            |   0
 tests/touch/{not-owner => not-owner.sh}            |   0
 .../{now-owned-by-other => now-owned-by-other.sh}  |   0
 tests/touch/{obsolescent => obsolescent.sh}        |   0
 tests/touch/{read-only => read-only.sh}            |   0
 tests/touch/{relative => relative.sh}              |   0
 tests/touch/{trailing-slash => trailing-slash.sh}  |   0
 492 files changed, 496 insertions(+), 493 deletions(-)
 rename tests/chgrp/{basic => basic.sh} (100%)
 rename tests/chgrp/{default-no-deref => default-no-deref.sh} (100%)
 rename tests/chgrp/{deref => deref.sh} (100%)
 rename tests/chgrp/{no-x => no-x.sh} (100%)
 rename tests/chgrp/{posix-H => posix-H.sh} (100%)
 rename tests/chgrp/{recurse => recurse.sh} (100%)
 rename tests/chmod/{c-option => c-option.sh} (100%)
 rename tests/chmod/{equal-x => equal-x.sh} (100%)
 rename tests/chmod/{equals => equals.sh} (100%)
 rename tests/chmod/{inaccessible => inaccessible.sh} (100%)
 rename tests/chmod/{no-x => no-x.sh} (100%)
 rename tests/chmod/{octal => octal.sh} (100%)
 rename tests/chmod/{setgid => setgid.sh} (100%)
 rename tests/chmod/{silent => silent.sh} (100%)
 rename tests/chmod/{thru-dangling => thru-dangling.sh} (100%)
 rename tests/chmod/{umask-x => umask-x.sh} (100%)
 rename tests/chmod/{usage => usage.sh} (100%)
 rename tests/chown/{basic => basic.sh} (100%)
 rename tests/chown/{deref => deref.sh} (100%)
 rename tests/chown/{preserve-root => preserve-root.sh} (100%)
 rename tests/chown/{separator => separator.sh} (100%)
 rename tests/cp/{abuse => abuse.sh} (100%)
 rename tests/cp/{acl => acl.sh} (100%)
 rename tests/cp/{attr-existing => attr-existing.sh} (100%)
 rename tests/cp/{backup-1 => backup-1.sh} (100%)
 rename tests/cp/{backup-dir => backup-dir.sh} (100%)
 rename tests/cp/{backup-is-src => backup-is-src.sh} (100%)
 rename tests/cp/{capability => capability.sh} (100%)
 rename tests/cp/{cp-HL => cp-HL.sh} (100%)
 rename tests/cp/{cp-a-selinux => cp-a-selinux.sh} (100%)
 rename tests/cp/{cp-deref => cp-deref.sh} (100%)
 rename tests/cp/{cp-i => cp-i.sh} (100%)
 rename tests/cp/{cp-mv-backup => cp-mv-backup.sh} (100%)
 rename tests/cp/{cp-mv-enotsup-xattr => cp-mv-enotsup-xattr.sh} (100%)
 rename tests/cp/{cp-parents => cp-parents.sh} (100%)
 rename tests/cp/{deref-slink => deref-slink.sh} (100%)
 rename tests/cp/{dir-rm-dest => dir-rm-dest.sh} (100%)
 rename tests/cp/{dir-slash => dir-slash.sh} (100%)
 rename tests/cp/{dir-vs-file => dir-vs-file.sh} (100%)
 rename tests/cp/{existing-perm-dir => existing-perm-dir.sh} (100%)
 rename tests/cp/{existing-perm-race => existing-perm-race.sh} (100%)
 rename tests/cp/{fail-perm => fail-perm.sh} (100%)
 rename tests/cp/{fiemap-2 => fiemap-2.sh} (100%)
 rename tests/cp/{fiemap-empty => fiemap-empty.sh} (100%)
 rename tests/cp/{fiemap-perf => fiemap-perf.sh} (100%)
 rename tests/cp/{file-perm-race => file-perm-race.sh} (100%)
 rename tests/cp/{into-self => into-self.sh} (100%)
 rename tests/cp/{link-heap => link-heap.sh} (100%)
 rename tests/cp/{link-no-deref => link-no-deref.sh} (100%)
 rename tests/cp/{link-preserve => link-preserve.sh} (100%)
 rename tests/cp/{link-symlink => link-symlink.sh} (100%)
 rename tests/cp/{link => link.sh} (100%)
 rename tests/cp/{nfs-removal-race => nfs-removal-race.sh} (100%)
 rename tests/cp/{no-deref-link1 => no-deref-link1.sh} (100%)
 rename tests/cp/{no-deref-link2 => no-deref-link2.sh} (100%)
 rename tests/cp/{no-deref-link3 => no-deref-link3.sh} (100%)
 rename tests/cp/{parent-perm-race => parent-perm-race.sh} (100%)
 rename tests/cp/{parent-perm => parent-perm.sh} (100%)
 rename tests/cp/{perm => perm.sh} (100%)
 rename tests/cp/{preserve-2 => preserve-2.sh} (100%)
 rename tests/cp/{preserve-gid => preserve-gid.sh} (100%)
 rename tests/cp/{preserve-link => preserve-link.sh} (100%)
 rename tests/cp/{preserve-slink-time => preserve-slink-time.sh} (100%)
 rename tests/cp/{proc-short-read => proc-short-read.sh} (100%)
 rename tests/cp/{proc-zero-len => proc-zero-len.sh} (100%)
 rename tests/cp/{r-vs-symlink => r-vs-symlink.sh} (100%)
 rename tests/cp/{reflink-auto => reflink-auto.sh} (100%)
 rename tests/cp/{reflink-perm => reflink-perm.sh} (100%)
 rename tests/cp/{same-file => same-file.sh} (100%)
 rename tests/cp/{slink-2-slink => slink-2-slink.sh} (100%)
 rename tests/cp/{sparse-fiemap => sparse-fiemap.sh} (100%)
 rename tests/cp/{sparse-to-pipe => sparse-to-pipe.sh} (100%)
 rename tests/cp/{sparse => sparse.sh} (100%)
 rename tests/cp/{special-bits => special-bits.sh} (100%)
 rename tests/cp/{special-f => special-f.sh} (100%)
 rename tests/cp/{src-base-dot => src-base-dot.sh} (100%)
 rename tests/cp/{symlink-slash => symlink-slash.sh} (100%)
 rename tests/cp/{thru-dangling => thru-dangling.sh} (100%)
 rename tests/dd/{bytes => bytes.sh} (100%)
 rename tests/dd/{direct => direct.sh} (100%)
 rename tests/dd/{misc => misc.sh} (100%)
 rename tests/dd/{nocache => nocache.sh} (100%)
 rename tests/dd/{not-rewound => not-rewound.sh} (100%)
 rename tests/dd/{reblock => reblock.sh} (100%)
 rename tests/dd/{skip-seek-past-dev => skip-seek-past-dev.sh} (100%)
 rename tests/dd/{skip-seek-past-file => skip-seek-past-file.sh} (100%)
 rename tests/dd/{skip-seek => skip-seek.pl} (100%)
 rename tests/dd/{skip-seek2 => skip-seek2.sh} (100%)
 rename tests/dd/{sparse => sparse.sh} (100%)
 rename tests/dd/{stderr => stderr.sh} (100%)
 rename tests/dd/{unblock-sync => unblock-sync.sh} (100%)
 rename tests/dd/{unblock => unblock.pl} (100%)
 rename tests/df/{df-P => df-P.sh} (100%)
 rename tests/df/{header => header.sh} (100%)
 rename tests/df/{no-mtab-status => no-mtab-status.sh} (100%)
 rename tests/df/{problematic-chars => problematic-chars.sh} (100%)
 rename tests/df/{total-unprocessed => total-unprocessed.sh} (100%)
 rename tests/df/{total-verify => total-verify.sh} (100%)
 rename tests/df/{unreadable => unreadable.sh} (100%)
 rename tests/du/{2g => 2g.sh} (100%)
 rename tests/du/{8gb => 8gb.sh} (100%)
 rename tests/du/{basic => basic.sh} (100%)
 rename tests/du/{bigtime => bigtime.sh} (100%)
 rename tests/du/{bind-mount-dir-cycle => bind-mount-dir-cycle.sh} (100%)
 rename tests/du/{deref-args => deref-args.sh} (100%)
 rename tests/du/{deref => deref.sh} (100%)
 rename tests/du/{exclude => exclude.sh} (100%)
 rename tests/du/{fd-leak => fd-leak.sh} (100%)
 rename tests/du/{files0-from-dir => files0-from-dir.sh} (100%)
 rename tests/du/{files0-from => files0-from.pl} (100%)
 rename tests/du/{hard-link => hard-link.sh} (100%)
 rename tests/du/{inacc-dest => inacc-dest.sh} (100%)
 rename tests/du/{inacc-dir => inacc-dir.sh} (100%)
 rename tests/du/{inaccessible-cwd => inaccessible-cwd.sh} (100%)
 rename tests/du/{long-from-unreadable => long-from-unreadable.sh} (100%)
 rename tests/du/{long-sloop => long-sloop.sh} (100%)
 rename tests/du/{max-depth => max-depth.sh} (100%)
 rename tests/du/{move-dir-while-traversing => move-dir-while-traversing.sh} (100%)
 rename tests/du/{no-deref => no-deref.sh} (100%)
 rename tests/du/{no-x => no-x.sh} (100%)
 rename tests/du/{one-file-system => one-file-system.sh} (100%)
 rename tests/du/{restore-wd => restore-wd.sh} (100%)
 rename tests/du/{slash => slash.sh} (100%)
 rename tests/du/{slink => slink.sh} (100%)
 rename tests/du/{trailing-slash => trailing-slash.sh} (100%)
 rename tests/du/{two-args => two-args.sh} (100%)
 rename tests/fmt/{base => base.pl} (100%)
 rename tests/fmt/{goal-option => goal-option.sh} (100%)
 rename tests/fmt/{long-line => long-line.sh} (100%)
 rename tests/id/{gnu-zero-uids => gnu-zero-uids.sh} (100%)
 rename tests/id/{no-context => no-context.sh} (100%)
 rename tests/install/{basic-1 => basic-1.sh} (100%)
 rename tests/install/{create-leading => create-leading.sh} (100%)
 rename tests/install/{d-slashdot => d-slashdot.sh} (100%)
 rename tests/install/{install-C-root => install-C-root.sh} (100%)
 rename tests/install/{install-C-selinux => install-C-selinux.sh} (100%)
 rename tests/install/{install-C => install-C.sh} (100%)
 rename tests/install/{strip-program => strip-program.sh} (100%)
 rename tests/install/{trap => trap.sh} (100%)
 rename tests/ln/{backup-1 => backup-1.sh} (100%)
 rename tests/ln/{hard-backup => hard-backup.sh} (100%)
 rename tests/ln/{hard-to-sym => hard-to-sym.sh} (100%)
 rename tests/ln/{misc => misc.sh} (100%)
 rename tests/ln/{relative => relative.sh} (100%)
 rename tests/ln/{sf-1 => sf-1.sh} (100%)
 rename tests/ln/{slash-decorated-nonexistent-dest => slash-decorated-nonexistent-dest.sh} (100%)
 rename tests/ln/{target-1 => target-1.sh} (100%)
 rename tests/ls/{abmon-align => abmon-align.sh} (100%)
 rename tests/ls/{block-size => block-size.sh} (100%)
 rename tests/ls/{capability => capability.sh} (100%)
 rename tests/ls/{color-clear-to-eol => color-clear-to-eol.sh} (100%)
 rename tests/ls/{color-dtype-dir => color-dtype-dir.sh} (100%)
 rename tests/ls/{color-norm => color-norm.sh} (100%)
 rename tests/ls/{dangle => dangle.sh} (100%)
 rename tests/ls/{dired => dired.sh} (100%)
 rename tests/ls/{file-type => file-type.sh} (100%)
 rename tests/ls/{follow-slink => follow-slink.sh} (100%)
 rename tests/ls/{getxattr-speedup => getxattr-speedup.sh} (100%)
 rename tests/ls/{infloop => infloop.sh} (100%)
 rename tests/ls/{inode => inode.sh} (100%)
 rename tests/ls/{m-option => m-option.sh} (100%)
 rename tests/ls/{multihardlink => multihardlink.sh} (100%)
 rename tests/ls/{nameless-uid => nameless-uid.sh} (100%)
 rename tests/ls/{no-arg => no-arg.sh} (100%)
 rename tests/ls/{no-cap => no-cap.sh} (100%)
 rename tests/ls/{proc-selinux-segfault => proc-selinux-segfault.sh} (100%)
 rename tests/ls/{readdir-mountpoint-inode => readdir-mountpoint-inode.sh} (100%)
 rename tests/ls/{recursive => recursive.sh} (100%)
 rename tests/ls/{root-rel-symlink-color => root-rel-symlink-color.sh} (100%)
 rename tests/ls/{rt-1 => rt-1.sh} (100%)
 rename tests/ls/{slink-acl => slink-acl.sh} (100%)
 rename tests/ls/{stat-dtype => stat-dtype.sh} (100%)
 rename tests/ls/{stat-failed => stat-failed.sh} (100%)
 rename tests/ls/{stat-free-color => stat-free-color.sh} (100%)
 rename tests/ls/{stat-free-symlinks => stat-free-symlinks.sh} (100%)
 rename tests/ls/{stat-vs-dirent => stat-vs-dirent.sh} (100%)
 rename tests/ls/{symlink-slash => symlink-slash.sh} (100%)
 rename tests/ls/{time-style-diag => time-style-diag.sh} (100%)
 rename tests/ls/{x-option => x-option.sh} (100%)
 rename tests/misc/{arch => arch.sh} (100%)
 rename tests/misc/{base64 => base64.pl} (100%)
 rename tests/misc/{basename => basename.pl} (100%)
 rename tests/misc/{cat-buf => cat-buf.sh} (100%)
 rename tests/misc/{cat-proc => cat-proc.sh} (100%)
 rename tests/misc/{chcon-fail => chcon-fail.sh} (100%)
 rename tests/misc/{chcon => chcon.sh} (100%)
 rename tests/misc/{chroot-credentials => chroot-credentials.sh} (100%)
 rename tests/misc/{chroot-fail => chroot-fail.sh} (100%)
 rename tests/misc/{close-stdout => close-stdout.sh} (100%)
 rename tests/misc/{comm => comm.pl} (100%)
 rename tests/misc/{csplit-1000 => csplit-1000.sh} (100%)
 rename tests/misc/{csplit-heap => csplit-heap.sh} (100%)
 rename tests/misc/{csplit => csplit.sh} (100%)
 rename tests/misc/{cut => cut.pl} (100%)
 rename tests/misc/{date-next-dow => date-next-dow.pl} (100%)
 rename tests/misc/{date-sec => date-sec.sh} (100%)
 rename tests/misc/{date => date.pl} (100%)
 rename tests/misc/{dircolors => dircolors.pl} (100%)
 rename tests/misc/{dirname => dirname.pl} (100%)
 rename tests/misc/{env-null => env-null.sh} (100%)
 rename tests/misc/{env => env.sh} (100%)
 rename tests/misc/{expand => expand.pl} (100%)
 rename tests/misc/{expr => expr.pl} (100%)
 rename tests/misc/{factor => factor.pl} (100%)
 rename tests/misc/{false-status => false-status.sh} (100%)
 rename tests/misc/{fold => fold.pl} (100%)
 rename tests/misc/{groups-dash => groups-dash.sh} (100%)
 rename tests/misc/{groups-version => groups-version.sh} (100%)
 rename tests/misc/{head-c => head-c.sh} (100%)
 rename tests/misc/{head-elide-tail => head-elide-tail.pl} (100%)
 rename tests/misc/{head-pos => head-pos.sh} (100%)
 rename tests/misc/{head => head.pl} (100%)
 rename tests/misc/{help-version => help-version.sh} (100%)
 rename tests/misc/{id-context => id-context.sh} (100%)
 rename tests/misc/{id-groups => id-groups.sh} (100%)
 rename tests/misc/{id-setgid => id-setgid.sh} (100%)
 rename tests/misc/{invalid-opt => invalid-opt.pl} (100%)
 rename tests/misc/{join => join.pl} (100%)
 rename tests/misc/{ls-misc => ls-misc.pl} (100%)
 rename tests/misc/{ls-time => ls-time.sh} (100%)
 rename tests/misc/{md5sum-bsd => md5sum-bsd.sh} (100%)
 rename tests/misc/{md5sum-newline => md5sum-newline.pl} (100%)
 rename tests/misc/{md5sum-parallel => md5sum-parallel.sh} (100%)
 rename tests/misc/{md5sum => md5sum.pl} (100%)
 rename tests/misc/{mknod => mknod.sh} (100%)
 rename tests/misc/{mktemp => mktemp.pl} (100%)
 rename tests/misc/{nice-fail => nice-fail.sh} (100%)
 rename tests/misc/{nice => nice.sh} (100%)
 rename tests/misc/{nl => nl.sh} (100%)
 rename tests/misc/{nohup => nohup.sh} (100%)
 rename tests/misc/{nproc-avail => nproc-avail.sh} (100%)
 rename tests/misc/{nproc-positive => nproc-positive.sh} (100%)
 rename tests/misc/{od-N => od-N.sh} (100%)
 rename tests/misc/{od-float => od-float.sh} (100%)
 rename tests/misc/{od-multiple-t => od-multiple-t.sh} (100%)
 rename tests/misc/{od-x8 => od-x8.sh} (100%)
 rename tests/misc/{od => od.pl} (100%)
 rename tests/misc/{paste => paste.pl} (100%)
 rename tests/misc/{pathchk1 => pathchk1.sh} (100%)
 rename tests/misc/{pr => pr.pl} (100%)
 rename tests/misc/{printenv => printenv.sh} (100%)
 rename tests/misc/{printf-cov => printf-cov.pl} (100%)
 rename tests/misc/{printf-hex => printf-hex.sh} (100%)
 rename tests/misc/{printf-surprise => printf-surprise.sh} (100%)
 rename tests/misc/{printf => printf.sh} (100%)
 rename tests/misc/{ptx-overrun => ptx-overrun.sh} (100%)
 rename tests/misc/{ptx => ptx.pl} (100%)
 rename tests/misc/{pwd-long => pwd-long.sh} (100%)
 rename tests/misc/{pwd-option => pwd-option.sh} (100%)
 rename tests/misc/{readlink-fp-loop => readlink-fp-loop.sh} (100%)
 rename tests/misc/{readlink-root => readlink-root.sh} (100%)
 rename tests/misc/{realpath => realpath.sh} (100%)
 rename tests/misc/{runcon-no-reorder => runcon-no-reorder.sh} (100%)
 rename tests/misc/{selinux => selinux.sh} (100%)
 rename tests/misc/{seq-long-double => seq-long-double.sh} (100%)
 rename tests/misc/{seq => seq.pl} (100%)
 rename tests/misc/{sha1sum-vec => sha1sum-vec.pl} (100%)
 rename tests/misc/{sha1sum => sha1sum.pl} (100%)
 rename tests/misc/{sha224sum => sha224sum.pl} (100%)
 rename tests/misc/{sha256sum => sha256sum.pl} (100%)
 rename tests/misc/{sha384sum => sha384sum.pl} (100%)
 rename tests/misc/{sha512sum => sha512sum.pl} (100%)
 rename tests/misc/{shred-exact => shred-exact.sh} (100%)
 rename tests/misc/{shred-passes => shred-passes.sh} (100%)
 rename tests/misc/{shred-remove => shred-remove.sh} (100%)
 rename tests/misc/{shuf => shuf.sh} (100%)
 rename tests/misc/{sort-NaN-infloop => sort-NaN-infloop.sh} (100%)
 rename tests/misc/{sort-benchmark-random => sort-benchmark-random.sh} (100%)
 rename tests/misc/{sort-compress-hang => sort-compress-hang.sh} (100%)
 rename tests/misc/{sort-compress-proc => sort-compress-proc.sh} (100%)
 rename tests/misc/{sort-compress => sort-compress.sh} (100%)
 rename tests/misc/{sort-continue => sort-continue.sh} (100%)
 rename tests/misc/{sort-debug-keys => sort-debug-keys.sh} (100%)
 rename tests/misc/{sort-debug-warn => sort-debug-warn.sh} (100%)
 rename tests/misc/{sort-discrim => sort-discrim.sh} (100%)
 rename tests/misc/{sort-exit-early => sort-exit-early.sh} (100%)
 rename tests/misc/{sort-files0-from => sort-files0-from.pl} (100%)
 rename tests/misc/{sort-float => sort-float.sh} (100%)
 rename tests/misc/{sort-merge-fdlimit => sort-merge-fdlimit.sh} (100%)
 rename tests/misc/{sort-merge => sort-merge.pl} (100%)
 rename tests/misc/{sort-month => sort-month.sh} (100%)
 rename tests/misc/{sort-rand => sort-rand.sh} (100%)
 rename tests/misc/{sort-spinlock-abuse => sort-spinlock-abuse.sh} (100%)
 rename tests/misc/{sort-stale-thread-mem => sort-stale-thread-mem.sh} (100%)
 rename tests/misc/{sort-u-FMR => sort-u-FMR.sh} (100%)
 rename tests/misc/{sort-unique-segv => sort-unique-segv.sh} (100%)
 rename tests/misc/{sort-unique => sort-unique.sh} (100%)
 rename tests/misc/{sort-version => sort-version.sh} (100%)
 rename tests/misc/{sort => sort.pl} (100%)
 rename tests/misc/{stat-birthtime => stat-birthtime.sh} (100%)
 rename tests/misc/{stat-fmt => stat-fmt.sh} (100%)
 rename tests/misc/{stat-hyphen => stat-hyphen.sh} (100%)
 rename tests/misc/{stat-mount => stat-mount.sh} (100%)
 rename tests/misc/{stat-nanoseconds => stat-nanoseconds.sh} (100%)
 rename tests/misc/{stat-printf => stat-printf.pl} (100%)
 rename tests/misc/{stat-slash => stat-slash.sh} (100%)
 rename tests/misc/{stdbuf => stdbuf.sh} (100%)
 rename tests/misc/{stty-invalid => stty-invalid.sh} (100%)
 rename tests/misc/{stty-pairs => stty-pairs.sh} (100%)
 rename tests/misc/{stty-row-col => stty-row-col.sh} (100%)
 rename tests/misc/{stty => stty.sh} (100%)
 rename tests/misc/{sum-sysv => sum-sysv.sh} (100%)
 rename tests/misc/{sum => sum.pl} (100%)
 rename tests/misc/{tac-2-nonseekable => tac-2-nonseekable.sh} (100%)
 rename tests/misc/{tac-continue => tac-continue.sh} (100%)
 rename tests/misc/{tac => tac.pl} (100%)
 rename tests/misc/{tail => tail.pl} (100%)
 rename tests/misc/{tee-dash => tee-dash.sh} (100%)
 rename tests/misc/{tee => tee.sh} (100%)
 rename tests/misc/{test-diag => test-diag.pl} (100%)
 rename tests/misc/{test => test.pl} (100%)
 rename tests/misc/{timeout-group => timeout-group.sh} (100%)
 rename tests/misc/{timeout-parameters => timeout-parameters.sh} (100%)
 rename tests/misc/{timeout => timeout.sh} (100%)
 rename tests/misc/{tr-case-class => tr-case-class.sh} (100%)
 rename tests/misc/{tr => tr.pl} (100%)
 rename tests/misc/{truncate-dangling-symlink => truncate-dangling-symlink.sh} (100%)
 rename tests/misc/{truncate-dir-fail => truncate-dir-fail.sh} (100%)
 rename tests/misc/{truncate-fail-diag => truncate-fail-diag.sh} (100%)
 rename tests/misc/{truncate-fifo => truncate-fifo.sh} (100%)
 rename tests/misc/{truncate-no-create-missing => truncate-no-create-missing.sh} (100%)
 rename tests/misc/{truncate-overflow => truncate-overflow.sh} (100%)
 rename tests/misc/{truncate-owned-by-other => truncate-owned-by-other.sh} (100%)
 rename tests/misc/{truncate-parameters => truncate-parameters.sh} (100%)
 rename tests/misc/{truncate-relative => truncate-relative.sh} (100%)
 rename tests/misc/{tsort => tsort.pl} (100%)
 rename tests/misc/{tty-eof => tty-eof.pl} (100%)
 rename tests/misc/{unexpand => unexpand.pl} (100%)
 rename tests/misc/{uniq-perf => uniq-perf.sh} (100%)
 rename tests/misc/{uniq => uniq.pl} (100%)
 rename tests/misc/{wc-files0-from => wc-files0-from.pl} (100%)
 rename tests/misc/{wc-files0 => wc-files0.sh} (100%)
 rename tests/misc/{wc-parallel => wc-parallel.sh} (100%)
 rename tests/misc/{wc => wc.pl} (100%)
 rename tests/misc/{xattr => xattr.sh} (100%)
 rename tests/misc/{xstrtol => xstrtol.pl} (100%)
 rename tests/mkdir/{p-1 => p-1.sh} (100%)
 rename tests/mkdir/{p-2 => p-2.sh} (100%)
 rename tests/mkdir/{p-3 => p-3.sh} (100%)
 rename tests/mkdir/{p-slashdot => p-slashdot.sh} (100%)
 rename tests/mkdir/{p-thru-slink => p-thru-slink.sh} (100%)
 rename tests/mkdir/{p-v => p-v.sh} (100%)
 rename tests/mkdir/{parents => parents.sh} (100%)
 rename tests/mkdir/{perm => perm.sh} (100%)
 rename tests/mkdir/{selinux => selinux.sh} (100%)
 rename tests/mkdir/{special-1 => special-1.sh} (100%)
 rename tests/mkdir/{t-slash => t-slash.sh} (100%)
 rename tests/mkdir/{writable-under-readonly => writable-under-readonly.sh} (100%)
 rename tests/mv/{acl => acl.sh} (100%)
 rename tests/mv/{atomic => atomic.sh} (100%)
 rename tests/mv/{atomic2 => atomic2.sh} (100%)
 rename tests/mv/{backup-dir => backup-dir.sh} (100%)
 rename tests/mv/{backup-is-src => backup-is-src.sh} (100%)
 rename tests/mv/{childproof => childproof.sh} (100%)
 rename tests/mv/{diag => diag.sh} (100%)
 rename tests/mv/{dir-file => dir-file.sh} (100%)
 rename tests/mv/{dir2dir => dir2dir.sh} (100%)
 rename tests/mv/{dup-source => dup-source.sh} (100%)
 rename tests/mv/{force => force.sh} (100%)
 rename tests/mv/{hard-2 => hard-2.sh} (100%)
 rename tests/mv/{hard-3 => hard-3.sh} (100%)
 rename tests/mv/{hard-4 => hard-4.sh} (100%)
 rename tests/mv/{hard-link-1 => hard-link-1.sh} (100%)
 rename tests/mv/{hard-verbose => hard-verbose.sh} (100%)
 rename tests/mv/{i-1 => i-1.pl} (100%)
 rename tests/mv/{i-2 => i-2.sh} (100%)
 rename tests/mv/{i-3 => i-3.sh} (100%)
 rename tests/mv/{i-4 => i-4.sh} (100%)
 rename tests/mv/{i-5 => i-5.sh} (100%)
 rename tests/mv/{i-link-no => i-link-no.sh} (100%)
 rename tests/mv/{into-self-2 => into-self-2.sh} (100%)
 rename tests/mv/{into-self-3 => into-self-3.sh} (100%)
 rename tests/mv/{into-self-4 => into-self-4.sh} (100%)
 rename tests/mv/{into-self => into-self.sh} (100%)
 rename tests/mv/{leak-fd => leak-fd.sh} (100%)
 rename tests/mv/{mv-n => mv-n.sh} (100%)
 rename tests/mv/{mv-special-1 => mv-special-1.sh} (100%)
 rename tests/mv/{no-target-dir => no-target-dir.sh} (100%)
 rename tests/mv/{part-fail => part-fail.sh} (100%)
 rename tests/mv/{part-hardlink => part-hardlink.sh} (100%)
 rename tests/mv/{part-rename => part-rename.sh} (100%)
 rename tests/mv/{part-symlink => part-symlink.sh} (100%)
 rename tests/mv/{partition-perm => partition-perm.sh} (100%)
 rename tests/mv/{perm-1 => perm-1.sh} (100%)
 rename tests/mv/{sticky-to-xpart => sticky-to-xpart.sh} (100%)
 rename tests/mv/{symlink-onto-hardlink-to-self => symlink-onto-hardlink-to-self.sh} (100%)
 rename tests/mv/{symlink-onto-hardlink => symlink-onto-hardlink.sh} (100%)
 rename tests/mv/{to-symlink => to-symlink.sh} (100%)
 rename tests/mv/{trailing-slash => trailing-slash.sh} (100%)
 rename tests/mv/{update => update.sh} (100%)
 rename tests/pr/{pr-tests => pr-tests.pl} (100%)
 rename tests/readlink/{can-e => can-e.sh} (100%)
 rename tests/readlink/{can-f => can-f.sh} (100%)
 rename tests/readlink/{can-m => can-m.sh} (100%)
 rename tests/readlink/{rl-1 => rl-1.sh} (100%)
 rename tests/rm/{cycle => cycle.sh} (100%)
 rename tests/rm/{d-1 => d-1.sh} (100%)
 rename tests/rm/{d-2 => d-2.sh} (100%)
 rename tests/rm/{d-3 => d-3.sh} (100%)
 rename tests/rm/{dangling-symlink => dangling-symlink.sh} (100%)
 rename tests/rm/{deep-1 => deep-1.sh} (100%)
 rename tests/rm/{deep-2 => deep-2.sh} (100%)
 rename tests/rm/{dir-no-w => dir-no-w.sh} (100%)
 rename tests/rm/{dir-nonrecur => dir-nonrecur.sh} (100%)
 rename tests/rm/{dot-rel => dot-rel.sh} (100%)
 rename tests/rm/{empty-inacc => empty-inacc.sh} (100%)
 rename tests/rm/{empty-name => empty-name.pl} (100%)
 rename tests/rm/{ext3-perf => ext3-perf.sh} (100%)
 rename tests/rm/{f-1 => f-1.sh} (100%)
 rename tests/rm/{fail-2eperm => fail-2eperm.sh} (100%)
 rename tests/rm/{fail-eacces => fail-eacces.sh} (100%)
 rename tests/rm/{hash => hash.sh} (100%)
 rename tests/rm/{i-1 => i-1.sh} (100%)
 rename tests/rm/{i-never => i-never.sh} (100%)
 rename tests/rm/{i-no-r => i-no-r.sh} (100%)
 rename tests/rm/{ignorable => ignorable.sh} (100%)
 rename tests/rm/{inaccessible => inaccessible.sh} (100%)
 rename tests/rm/{interactive-always => interactive-always.sh} (100%)
 rename tests/rm/{interactive-once => interactive-once.sh} (100%)
 rename tests/rm/{ir-1 => ir-1.sh} (100%)
 rename tests/rm/{isatty => isatty.sh} (100%)
 rename tests/rm/{many-dir-entries-vs-OOM => many-dir-entries-vs-OOM.sh} (100%)
 rename tests/rm/{no-give-up => no-give-up.sh} (100%)
 rename tests/rm/{one-file-system => one-file-system.sh} (100%)
 rename tests/rm/{one-file-system2 => one-file-system2.sh} (100%)
 rename tests/rm/{r-1 => r-1.sh} (100%)
 rename tests/rm/{r-2 => r-2.sh} (100%)
 rename tests/rm/{r-3 => r-3.sh} (100%)
 rename tests/rm/{r-4 => r-4.sh} (100%)
 rename tests/rm/{read-only => read-only.sh} (100%)
 rename tests/rm/{readdir-bug => readdir-bug.sh} (100%)
 rename tests/rm/{rm1 => rm1.sh} (100%)
 rename tests/rm/{rm2 => rm2.sh} (100%)
 rename tests/rm/{rm3 => rm3.sh} (100%)
 rename tests/rm/{rm4 => rm4.sh} (100%)
 rename tests/rm/{rm5 => rm5.sh} (100%)
 rename tests/rm/{sunos-1 => sunos-1.sh} (100%)
 rename tests/rm/{unread2 => unread2.sh} (100%)
 rename tests/rm/{unread3 => unread3.sh} (100%)
 rename tests/rm/{unreadable => unreadable.pl} (100%)
 rename tests/rm/{v-slash => v-slash.sh} (100%)
 rename tests/rmdir/{fail-perm => fail-perm.sh} (100%)
 rename tests/rmdir/{ignore => ignore.sh} (100%)
 rename tests/rmdir/{t-slash => t-slash.sh} (100%)
 rename tests/split/{additional-suffix => additional-suffix.sh} (100%)
 rename tests/split/{b-chunk => b-chunk.sh} (100%)
 rename tests/split/{fail => fail.sh} (100%)
 rename tests/split/{filter => filter.sh} (100%)
 rename tests/split/{guard-input => guard-input.sh} (100%)
 rename tests/split/{l-chunk => l-chunk.sh} (100%)
 rename tests/split/{lines => lines.sh} (100%)
 rename tests/split/{numeric => numeric.sh} (100%)
 rename tests/split/{r-chunk => r-chunk.sh} (100%)
 rename tests/split/{suffix-auto-length => suffix-auto-length.sh} (100%)
 rename tests/split/{suffix-length => suffix-length.sh} (100%)
 rename tests/tail-2/{F-vs-missing => F-vs-missing.sh} (100%)
 rename tests/tail-2/{F-vs-rename => F-vs-rename.sh} (100%)
 rename tests/tail-2/{append-only => append-only.sh} (100%)
 rename tests/tail-2/{assert-2 => assert-2.sh} (100%)
 rename tests/tail-2/{assert => assert.sh} (100%)
 rename tests/tail-2/{big-4gb => big-4gb.sh} (100%)
 rename tests/tail-2/{flush-initial => flush-initial.sh} (100%)
 rename tests/tail-2/{follow-name => follow-name.sh} (100%)
 rename tests/tail-2/{follow-stdin => follow-stdin.sh} (100%)
 rename tests/tail-2/{infloop-1 => infloop-1.sh} (100%)
 rename tests/tail-2/{inotify-hash-abuse => inotify-hash-abuse.sh} (100%)
 rename tests/tail-2/{inotify-hash-abuse2 => inotify-hash-abuse2.sh} (100%)
 rename tests/tail-2/{inotify-race => inotify-race.sh} (100%)
 rename tests/tail-2/{inotify-rotate => inotify-rotate.sh} (100%)
 rename tests/tail-2/{pid => pid.sh} (100%)
 rename tests/tail-2/{pipe-f => pipe-f.sh} (100%)
 rename tests/tail-2/{pipe-f2 => pipe-f2.sh} (100%)
 rename tests/tail-2/{proc-ksyms => proc-ksyms.sh} (100%)
 rename tests/tail-2/{start-middle => start-middle.sh} (100%)
 rename tests/tail-2/{tail-n0f => tail-n0f.sh} (100%)
 rename tests/tail-2/{wait => wait.sh} (100%)
 rename tests/touch/{60-seconds => 60-seconds.sh} (100%)
 rename tests/touch/{dangling-symlink => dangling-symlink.sh} (100%)
 rename tests/touch/{dir-1 => dir-1.sh} (100%)
 rename tests/touch/{empty-file => empty-file.sh} (100%)
 rename tests/touch/{fail-diag => fail-diag.sh} (100%)
 rename tests/touch/{fifo => fifo.sh} (100%)
 rename tests/touch/{no-create-missing => no-create-missing.sh} (100%)
 rename tests/touch/{no-dereference => no-dereference.sh} (100%)
 rename tests/touch/{no-rights => no-rights.sh} (100%)
 rename tests/touch/{not-owner => not-owner.sh} (100%)
 rename tests/touch/{now-owned-by-other => now-owned-by-other.sh} (100%)
 rename tests/touch/{obsolescent => obsolescent.sh} (100%)
 rename tests/touch/{read-only => read-only.sh} (100%)
 rename tests/touch/{relative => relative.sh} (100%)
 rename tests/touch/{trailing-slash => trailing-slash.sh} (100%)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index ff0af84..a547b11 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -45,7 +45,7 @@ check_DATA = .built-programs
             && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
           > $@-t && mv $@-t $@

-TEST_EXTENSIONS = .xpl
+TEST_EXTENSIONS = .sh .pl .xpl

 if HAVE_PERL
 TESTSUITE_PERL = $(PERL)
@@ -63,6 +63,9 @@ LOG_COMPILER = \
   --test-name "$$f" --srcdir '$(srcdir)' \
   --shell '$(SHELL)' --perl '$(TESTSUITE_PERL)' --

+PL_LOG_COMPILER = $(LOG_COMPILER)
+SH_LOG_COMPILER = $(LOG_COMPILER)
+
 # Perl scripts that must be run in tainted mode.
 XPL_LOG_COMPILER = \
   $(TESTSUITE_PERL) -wT -I$(srcdir) -MCoreutils -MCuSkip -M"CuTmpdir qw($$f)"
@@ -131,32 +134,32 @@ EXTRA_DIST =		\
   $(pr_data)

 root_tests =					\
-  chown/basic					\
-  cp/cp-a-selinux				\
-  cp/preserve-gid				\
-  cp/special-bits				\
-  cp/cp-mv-enotsup-xattr			\
-  cp/capability					\
-  cp/sparse-fiemap				\
-  dd/skip-seek-past-dev				\
-  df/problematic-chars				\
-  du/bind-mount-dir-cycle			\
-  install/install-C-root			\
-  ls/capability					\
-  ls/nameless-uid				\
-  misc/chcon					\
-  misc/chroot-credentials			\
-  misc/id-setgid				\
-  misc/selinux					\
-  misc/truncate-owned-by-other			\
-  mkdir/writable-under-readonly			\
-  mv/sticky-to-xpart				\
-  rm/fail-2eperm				\
-  rm/no-give-up					\
-  rm/one-file-system				\
-  rm/read-only					\
-  tail-2/append-only				\
-  touch/now-owned-by-other
+  chown/basic.sh				\
+  cp/cp-a-selinux.sh				\
+  cp/preserve-gid.sh				\
+  cp/special-bits.sh				\
+  cp/cp-mv-enotsup-xattr.sh			\
+  cp/capability.sh				\
+  cp/sparse-fiemap.sh				\
+  dd/skip-seek-past-dev.sh			\
+  df/problematic-chars.sh			\
+  du/bind-mount-dir-cycle.sh			\
+  install/install-C-root.sh			\
+  ls/capability.sh				\
+  ls/nameless-uid.sh				\
+  misc/chcon.sh					\
+  misc/chroot-credentials.sh			\
+  misc/id-setgid.sh				\
+  misc/selinux.sh				\
+  misc/truncate-owned-by-other.sh		\
+  mkdir/writable-under-readonly.sh		\
+  mv/sticky-to-xpart.sh				\
+  rm/fail-2eperm.sh				\
+  rm/no-give-up.sh				\
+  rm/one-file-system.sh				\
+  rm/read-only.sh				\
+  tail-2/append-only.sh				\
+  touch/now-owned-by-other.sh

 .PHONY: check-root
 check-root:
@@ -191,473 +194,473 @@ EXTRA_DIST += $(TESTS)
 # Put head-elide-tail early, because it's long-running.

 TESTS =						\
-  misc/help-version				\
-  tail-2/inotify-race				\
-  misc/invalid-opt				\
-  rm/ext3-perf					\
-  rm/cycle					\
-  cp/link-heap					\
-  misc/tty-eof					\
-  tail-2/inotify-hash-abuse			\
-  tail-2/inotify-hash-abuse2			\
-  tail-2/F-vs-missing				\
-  tail-2/F-vs-rename				\
-  tail-2/inotify-rotate				\
-  chmod/no-x					\
-  chgrp/basic					\
-  rm/dangling-symlink				\
-  misc/ls-time					\
-  rm/d-1					\
-  rm/d-2					\
-  rm/d-3					\
-  rm/deep-1					\
-  rm/deep-2					\
-  rm/dir-no-w					\
-  rm/dir-nonrecur				\
-  rm/dot-rel					\
-  rm/isatty					\
-  rm/empty-inacc				\
-  rm/empty-name					\
-  rm/f-1					\
-  rm/fail-eacces				\
+  misc/help-version.sh				\
+  tail-2/inotify-race.sh			\
+  misc/invalid-opt.pl				\
+  rm/ext3-perf.sh				\
+  rm/cycle.sh					\
+  cp/link-heap.sh				\
+  misc/tty-eof.pl				\
+  tail-2/inotify-hash-abuse.sh			\
+  tail-2/inotify-hash-abuse2.sh			\
+  tail-2/F-vs-missing.sh			\
+  tail-2/F-vs-rename.sh				\
+  tail-2/inotify-rotate.sh			\
+  chmod/no-x.sh					\
+  chgrp/basic.sh				\
+  rm/dangling-symlink.sh			\
+  misc/ls-time.sh				\
+  rm/d-1.sh					\
+  rm/d-2.sh					\
+  rm/d-3.sh					\
+  rm/deep-1.sh					\
+  rm/deep-2.sh					\
+  rm/dir-no-w.sh				\
+  rm/dir-nonrecur.sh				\
+  rm/dot-rel.sh					\
+  rm/isatty.sh					\
+  rm/empty-inacc.sh				\
+  rm/empty-name.pl				\
+  rm/f-1.sh					\
+  rm/fail-eacces.sh				\
   rm/fail-eperm.xpl				\
-  tail-2/assert					\
-  rm/hash					\
-  rm/i-1					\
-  rm/i-never					\
-  rm/i-no-r					\
-  tail-2/infloop-1				\
-  rm/ignorable					\
-  rm/inaccessible				\
-  rm/interactive-always				\
-  rm/interactive-once				\
-  rm/ir-1					\
-  rm/one-file-system2				\
-  rm/r-1					\
-  rm/r-2					\
-  rm/r-3					\
-  rm/r-4					\
-  rm/readdir-bug				\
-  rm/rm1					\
-  touch/empty-file				\
-  rm/rm2					\
-  rm/rm3					\
-  rm/rm4					\
-  rm/rm5					\
-  rm/sunos-1					\
-  rm/unread2					\
-  rm/unread3					\
-  rm/unreadable					\
-  rm/v-slash					\
-  rm/many-dir-entries-vs-OOM			\
-  chgrp/default-no-deref			\
-  chgrp/deref					\
-  chgrp/no-x					\
-  chgrp/posix-H					\
-  chgrp/recurse					\
-  fmt/base					\
-  fmt/long-line					\
-  fmt/goal-option				\
-  misc/env					\
-  misc/ptx					\
-  misc/test					\
-  misc/seq					\
-  misc/seq-long-double				\
-  misc/head					\
-  misc/head-elide-tail				\
-  tail-2/tail-n0f				\
-  misc/ls-misc					\
-  misc/date					\
-  misc/date-next-dow				\
-  misc/ptx-overrun				\
-  misc/xstrtol					\
-  tail-2/pid					\
-  misc/od					\
-  misc/od-float					\
-  misc/mktemp					\
-  misc/arch					\
-  misc/pr					\
-  misc/join					\
-  pr/pr-tests					\
-  misc/pwd-option				\
-  misc/chcon-fail				\
-  misc/cut					\
-  misc/wc					\
-  misc/wc-files0-from				\
-  misc/wc-files0				\
-  misc/wc-parallel				\
-  misc/cat-proc					\
-  misc/cat-buf					\
-  misc/base64					\
-  misc/basename					\
-  misc/close-stdout				\
-  misc/chroot-fail				\
-  misc/comm					\
-  misc/csplit					\
-  misc/csplit-1000				\
-  misc/csplit-heap				\
-  misc/date-sec					\
-  misc/dircolors				\
-  misc/dirname					\
-  misc/env-null					\
-  misc/expand					\
-  misc/expr					\
-  misc/factor					\
-  misc/false-status				\
-  misc/fold					\
-  misc/groups-dash				\
-  misc/groups-version				\
-  misc/head-c					\
-  misc/head-pos					\
-  misc/id-context				\
-  misc/id-groups				\
-  misc/id-setgid				\
-  misc/md5sum					\
-  misc/md5sum-bsd				\
-  misc/md5sum-newline				\
-  misc/md5sum-parallel				\
-  misc/mknod					\
-  misc/nice					\
-  misc/nice-fail				\
-  misc/nl					\
-  misc/nohup					\
-  misc/nproc-avail				\
-  misc/nproc-positive				\
-  misc/od-N					\
-  misc/od-multiple-t				\
-  misc/od-x8					\
-  misc/paste					\
-  misc/pathchk1					\
-  misc/printenv					\
-  misc/printf					\
-  misc/printf-cov				\
-  misc/printf-hex				\
-  misc/printf-surprise				\
-  misc/pwd-long					\
-  misc/readlink-fp-loop				\
-  misc/readlink-root				\
-  misc/realpath					\
-  misc/runcon-no-reorder			\
-  misc/sha1sum					\
-  misc/sha1sum-vec				\
-  misc/sha224sum				\
-  misc/sha256sum				\
-  misc/sha384sum				\
-  misc/sha512sum				\
-  misc/shred-exact				\
-  misc/shred-passes				\
-  misc/shred-remove				\
-  misc/shuf					\
-  misc/sort					\
-  misc/sort-benchmark-random			\
-  misc/sort-compress				\
-  misc/sort-compress-hang			\
-  misc/sort-compress-proc			\
-  misc/sort-continue				\
-  misc/sort-debug-keys				\
-  misc/sort-debug-warn				\
-  misc/sort-discrim				\
-  misc/sort-files0-from				\
-  misc/sort-float				\
-  misc/sort-merge				\
-  misc/sort-merge-fdlimit			\
-  misc/sort-month				\
-  misc/sort-exit-early				\
-  misc/sort-rand				\
-  misc/sort-spinlock-abuse			\
-  misc/sort-stale-thread-mem			\
-  misc/sort-unique				\
-  misc/sort-unique-segv				\
-  misc/sort-version				\
-  misc/sort-NaN-infloop				\
-  misc/sort-u-FMR				\
-  split/filter					\
-  split/suffix-auto-length			\
-  split/suffix-length				\
-  split/additional-suffix			\
-  split/b-chunk					\
-  split/fail					\
-  split/lines					\
-  split/l-chunk					\
-  split/r-chunk					\
-  split/numeric					\
-  split/guard-input				\
-  misc/stat-birthtime				\
-  misc/stat-fmt					\
-  misc/stat-hyphen				\
-  misc/stat-mount				\
-  misc/stat-nanoseconds				\
-  misc/stat-printf				\
-  misc/stat-slash				\
-  misc/stdbuf					\
-  misc/stty					\
-  misc/stty-invalid				\
-  misc/stty-pairs				\
-  misc/stty-row-col				\
-  misc/sum					\
-  misc/sum-sysv					\
-  misc/tac					\
-  misc/tac-continue				\
-  misc/tac-2-nonseekable			\
-  misc/tail					\
-  misc/tee					\
-  misc/tee-dash					\
-  misc/test-diag				\
-  misc/timeout					\
-  misc/timeout-group				\
-  misc/timeout-parameters			\
-  misc/tr					\
-  misc/tr-case-class				\
-  misc/truncate-dangling-symlink		\
-  misc/truncate-dir-fail			\
-  misc/truncate-fail-diag			\
-  misc/truncate-fifo				\
-  misc/truncate-no-create-missing		\
-  misc/truncate-overflow			\
-  misc/truncate-parameters			\
-  misc/truncate-relative			\
-  misc/tsort					\
-  misc/unexpand					\
-  misc/uniq					\
-  misc/uniq-perf				\
-  misc/xattr					\
-  tail-2/wait					\
-  chmod/c-option				\
-  chmod/equal-x					\
-  chmod/equals					\
-  chmod/inaccessible				\
-  chmod/octal					\
-  chmod/setgid					\
-  chmod/silent					\
-  chmod/thru-dangling				\
-  chmod/umask-x					\
-  chmod/usage					\
-  chown/deref					\
-  chown/preserve-root				\
-  chown/separator				\
-  cp/abuse					\
-  cp/acl					\
-  cp/attr-existing				\
-  cp/backup-1					\
-  cp/backup-dir					\
-  cp/backup-is-src				\
-  cp/cp-HL					\
-  cp/cp-deref					\
-  cp/cp-i					\
-  cp/cp-mv-backup				\
-  cp/cp-parents					\
-  cp/deref-slink				\
-  cp/dir-rm-dest				\
-  cp/dir-slash					\
-  cp/dir-vs-file				\
-  cp/existing-perm-dir				\
-  cp/existing-perm-race				\
-  cp/fail-perm					\
-  cp/fiemap-empty                               \
-  cp/fiemap-perf                                \
-  cp/fiemap-2                                   \
-  cp/file-perm-race				\
-  cp/into-self					\
-  cp/link					\
-  cp/link-no-deref				\
-  cp/link-preserve				\
-  cp/link-symlink				\
-  cp/nfs-removal-race				\
-  cp/no-deref-link1				\
-  cp/no-deref-link2				\
-  cp/no-deref-link3				\
-  cp/parent-perm				\
-  cp/parent-perm-race				\
-  cp/perm					\
-  cp/preserve-2					\
-  cp/preserve-link				\
-  cp/preserve-slink-time			\
-  cp/proc-short-read				\
-  cp/proc-zero-len				\
-  cp/r-vs-symlink				\
-  cp/reflink-auto				\
-  cp/reflink-perm				\
-  cp/same-file					\
-  cp/slink-2-slink				\
-  cp/sparse					\
-  cp/sparse-to-pipe				\
-  cp/special-f					\
-  cp/src-base-dot				\
-  cp/symlink-slash				\
-  cp/thru-dangling				\
-  df/header					\
-  df/df-P					\
-  df/unreadable					\
-  df/total-unprocessed				\
-  df/no-mtab-status				\
-  dd/direct					\
-  dd/misc					\
-  dd/nocache					\
-  dd/not-rewound				\
-  dd/reblock					\
-  dd/skip-seek					\
-  dd/skip-seek2					\
-  dd/bytes					\
-  dd/skip-seek-past-file			\
-  dd/sparse					\
-  dd/stderr					\
-  dd/unblock					\
-  dd/unblock-sync				\
-  df/total-verify				\
-  du/2g						\
-  du/8gb					\
-  du/basic					\
-  du/bigtime					\
-  du/deref					\
-  du/deref-args					\
-  du/exclude					\
-  du/fd-leak					\
-  du/files0-from				\
-  du/files0-from-dir				\
-  du/hard-link					\
-  du/inacc-dest					\
-  du/inacc-dir					\
-  du/inaccessible-cwd				\
-  du/long-from-unreadable			\
-  du/long-sloop					\
-  du/max-depth					\
-  du/move-dir-while-traversing			\
-  du/no-deref					\
-  du/no-x					\
-  du/one-file-system				\
-  du/restore-wd					\
-  du/slash					\
-  du/slink					\
-  du/trailing-slash				\
-  du/two-args					\
-  id/gnu-zero-uids				\
-  id/no-context					\
-  install/basic-1				\
-  install/create-leading			\
-  install/d-slashdot				\
-  install/install-C				\
-  install/install-C-selinux			\
-  install/strip-program				\
-  install/trap					\
-  ln/backup-1					\
-  ln/hard-backup				\
-  ln/hard-to-sym				\
-  ln/misc					\
-  ln/relative					\
-  ln/sf-1					\
-  ln/slash-decorated-nonexistent-dest		\
-  ln/target-1					\
-  ls/abmon-align				\
-  ls/block-size					\
-  ls/color-clear-to-eol				\
-  ls/color-dtype-dir				\
-  ls/color-norm					\
-  ls/dangle					\
-  ls/dired					\
-  ls/file-type					\
-  ls/follow-slink				\
-  ls/getxattr-speedup				\
-  ls/infloop					\
-  ls/inode					\
-  ls/m-option					\
-  ls/multihardlink				\
-  ls/no-arg					\
-  ls/no-cap					\
-  ls/proc-selinux-segfault			\
-  ls/readdir-mountpoint-inode			\
-  ls/recursive					\
-  ls/root-rel-symlink-color			\
-  ls/rt-1					\
-  ls/slink-acl					\
-  ls/stat-dtype					\
-  ls/stat-failed				\
-  ls/stat-free-color				\
-  ls/stat-free-symlinks				\
-  ls/stat-vs-dirent				\
-  ls/symlink-slash				\
-  ls/time-style-diag				\
-  ls/x-option					\
-  mkdir/p-1					\
-  mkdir/p-2					\
-  mkdir/p-3					\
-  mkdir/p-slashdot				\
-  mkdir/p-thru-slink				\
-  mkdir/p-v					\
-  mkdir/parents					\
-  mkdir/perm					\
-  mkdir/selinux					\
-  mkdir/special-1				\
-  mkdir/t-slash					\
-  mv/acl					\
-  mv/atomic					\
-  mv/atomic2					\
-  mv/backup-dir					\
-  mv/backup-is-src				\
-  mv/childproof					\
-  mv/diag					\
-  mv/dir-file					\
-  mv/dir2dir					\
-  mv/dup-source					\
-  mv/force					\
-  mv/hard-2					\
-  mv/hard-3					\
-  mv/hard-4					\
-  mv/hard-link-1				\
-  mv/hard-verbose				\
-  mv/i-1					\
-  mv/i-2					\
-  mv/i-3					\
-  mv/i-4					\
-  mv/i-5					\
-  mv/i-link-no					\
-  mv/into-self					\
-  mv/into-self-2				\
-  mv/into-self-3				\
-  mv/into-self-4				\
-  mv/leak-fd					\
-  mv/mv-n					\
-  mv/mv-special-1				\
-  mv/no-target-dir				\
-  mv/part-fail					\
-  mv/part-hardlink				\
-  mv/part-rename				\
-  mv/part-symlink				\
-  mv/partition-perm				\
-  mv/perm-1					\
-  mv/symlink-onto-hardlink			\
-  mv/symlink-onto-hardlink-to-self		\
-  mv/to-symlink					\
-  mv/trailing-slash				\
-  mv/update					\
-  readlink/can-e				\
-  readlink/can-f				\
-  readlink/can-m				\
-  readlink/rl-1					\
-  rmdir/fail-perm				\
-  rmdir/ignore					\
-  rmdir/t-slash					\
-  tail-2/assert-2				\
-  tail-2/big-4gb				\
-  tail-2/flush-initial				\
-  tail-2/follow-name				\
-  tail-2/follow-stdin				\
-  tail-2/pipe-f					\
-  tail-2/pipe-f2				\
-  tail-2/proc-ksyms				\
-  tail-2/start-middle				\
-  touch/60-seconds				\
-  touch/dangling-symlink			\
-  touch/dir-1					\
-  touch/fail-diag				\
-  touch/fifo					\
-  touch/no-create-missing			\
-  touch/no-dereference				\
-  touch/no-rights				\
-  touch/not-owner				\
-  touch/obsolescent				\
-  touch/read-only				\
-  touch/relative				\
-  touch/trailing-slash				\
+  tail-2/assert.sh				\
+  rm/hash.sh					\
+  rm/i-1.sh					\
+  rm/i-never.sh					\
+  rm/i-no-r.sh					\
+  tail-2/infloop-1.sh				\
+  rm/ignorable.sh				\
+  rm/inaccessible.sh				\
+  rm/interactive-always.sh			\
+  rm/interactive-once.sh			\
+  rm/ir-1.sh					\
+  rm/one-file-system2.sh			\
+  rm/r-1.sh					\
+  rm/r-2.sh					\
+  rm/r-3.sh					\
+  rm/r-4.sh					\
+  rm/readdir-bug.sh				\
+  rm/rm1.sh					\
+  touch/empty-file.sh				\
+  rm/rm2.sh					\
+  rm/rm3.sh					\
+  rm/rm4.sh					\
+  rm/rm5.sh					\
+  rm/sunos-1.sh					\
+  rm/unread2.sh					\
+  rm/unread3.sh					\
+  rm/unreadable.pl				\
+  rm/v-slash.sh					\
+  rm/many-dir-entries-vs-OOM.sh			\
+  chgrp/default-no-deref.sh			\
+  chgrp/deref.sh				\
+  chgrp/no-x.sh					\
+  chgrp/posix-H.sh				\
+  chgrp/recurse.sh				\
+  fmt/base.pl					\
+  fmt/long-line.sh				\
+  fmt/goal-option.sh				\
+  misc/env.sh					\
+  misc/ptx.pl					\
+  misc/test.pl					\
+  misc/seq.pl					\
+  misc/seq-long-double.sh			\
+  misc/head.pl					\
+  misc/head-elide-tail.pl			\
+  tail-2/tail-n0f.sh				\
+  misc/ls-misc.pl				\
+  misc/date.pl					\
+  misc/date-next-dow.pl				\
+  misc/ptx-overrun.sh				\
+  misc/xstrtol.pl				\
+  tail-2/pid.sh					\
+  misc/od.pl					\
+  misc/od-float.sh				\
+  misc/mktemp.pl				\
+  misc/arch.sh					\
+  misc/pr.pl					\
+  misc/join.pl					\
+  pr/pr-tests.pl				\
+  misc/pwd-option.sh				\
+  misc/chcon-fail.sh				\
+  misc/cut.pl					\
+  misc/wc.pl					\
+  misc/wc-files0-from.pl			\
+  misc/wc-files0.sh				\
+  misc/wc-parallel.sh				\
+  misc/cat-proc.sh				\
+  misc/cat-buf.sh				\
+  misc/base64.pl				\
+  misc/basename.pl				\
+  misc/close-stdout.sh				\
+  misc/chroot-fail.sh				\
+  misc/comm.pl					\
+  misc/csplit.sh				\
+  misc/csplit-1000.sh				\
+  misc/csplit-heap.sh				\
+  misc/date-sec.sh				\
+  misc/dircolors.pl				\
+  misc/dirname.pl				\
+  misc/env-null.sh				\
+  misc/expand.pl				\
+  misc/expr.pl					\
+  misc/factor.pl				\
+  misc/false-status.sh				\
+  misc/fold.pl					\
+  misc/groups-dash.sh				\
+  misc/groups-version.sh			\
+  misc/head-c.sh				\
+  misc/head-pos.sh				\
+  misc/id-context.sh				\
+  misc/id-groups.sh				\
+  misc/id-setgid.sh				\
+  misc/md5sum.pl				\
+  misc/md5sum-bsd.sh				\
+  misc/md5sum-newline.pl			\
+  misc/md5sum-parallel.sh			\
+  misc/mknod.sh					\
+  misc/nice.sh					\
+  misc/nice-fail.sh				\
+  misc/nl.sh					\
+  misc/nohup.sh					\
+  misc/nproc-avail.sh				\
+  misc/nproc-positive.sh			\
+  misc/od-N.sh					\
+  misc/od-multiple-t.sh				\
+  misc/od-x8.sh					\
+  misc/paste.pl					\
+  misc/pathchk1.sh				\
+  misc/printenv.sh				\
+  misc/printf.sh				\
+  misc/printf-cov.pl				\
+  misc/printf-hex.sh				\
+  misc/printf-surprise.sh			\
+  misc/pwd-long.sh				\
+  misc/readlink-fp-loop.sh			\
+  misc/readlink-root.sh				\
+  misc/realpath.sh				\
+  misc/runcon-no-reorder.sh			\
+  misc/sha1sum.pl				\
+  misc/sha1sum-vec.pl				\
+  misc/sha224sum.pl				\
+  misc/sha256sum.pl				\
+  misc/sha384sum.pl				\
+  misc/sha512sum.pl				\
+  misc/shred-exact.sh				\
+  misc/shred-passes.sh				\
+  misc/shred-remove.sh				\
+  misc/shuf.sh					\
+  misc/sort.pl					\
+  misc/sort-benchmark-random.sh			\
+  misc/sort-compress.sh				\
+  misc/sort-compress-hang.sh			\
+  misc/sort-compress-proc.sh			\
+  misc/sort-continue.sh				\
+  misc/sort-debug-keys.sh			\
+  misc/sort-debug-warn.sh			\
+  misc/sort-discrim.sh				\
+  misc/sort-files0-from.pl			\
+  misc/sort-float.sh				\
+  misc/sort-merge.pl				\
+  misc/sort-merge-fdlimit.sh			\
+  misc/sort-month.sh				\
+  misc/sort-exit-early.sh			\
+  misc/sort-rand.sh				\
+  misc/sort-spinlock-abuse.sh			\
+  misc/sort-stale-thread-mem.sh			\
+  misc/sort-unique.sh				\
+  misc/sort-unique-segv.sh			\
+  misc/sort-version.sh				\
+  misc/sort-NaN-infloop.sh			\
+  misc/sort-u-FMR.sh				\
+  split/filter.sh				\
+  split/suffix-auto-length.sh			\
+  split/suffix-length.sh			\
+  split/additional-suffix.sh			\
+  split/b-chunk.sh				\
+  split/fail.sh					\
+  split/lines.sh				\
+  split/l-chunk.sh				\
+  split/r-chunk.sh				\
+  split/numeric.sh				\
+  split/guard-input.sh				\
+  misc/stat-birthtime.sh			\
+  misc/stat-fmt.sh				\
+  misc/stat-hyphen.sh				\
+  misc/stat-mount.sh				\
+  misc/stat-nanoseconds.sh			\
+  misc/stat-printf.pl				\
+  misc/stat-slash.sh				\
+  misc/stdbuf.sh				\
+  misc/stty.sh					\
+  misc/stty-invalid.sh				\
+  misc/stty-pairs.sh				\
+  misc/stty-row-col.sh				\
+  misc/sum.pl					\
+  misc/sum-sysv.sh				\
+  misc/tac.pl					\
+  misc/tac-continue.sh				\
+  misc/tac-2-nonseekable.sh			\
+  misc/tail.pl					\
+  misc/tee.sh					\
+  misc/tee-dash.sh				\
+  misc/test-diag.pl				\
+  misc/timeout.sh				\
+  misc/timeout-group.sh				\
+  misc/timeout-parameters.sh			\
+  misc/tr.pl					\
+  misc/tr-case-class.sh				\
+  misc/truncate-dangling-symlink.sh		\
+  misc/truncate-dir-fail.sh			\
+  misc/truncate-fail-diag.sh			\
+  misc/truncate-fifo.sh				\
+  misc/truncate-no-create-missing.sh		\
+  misc/truncate-overflow.sh			\
+  misc/truncate-parameters.sh			\
+  misc/truncate-relative.sh			\
+  misc/tsort.pl					\
+  misc/unexpand.pl				\
+  misc/uniq.pl					\
+  misc/uniq-perf.sh				\
+  misc/xattr.sh					\
+  tail-2/wait.sh				\
+  chmod/c-option.sh				\
+  chmod/equal-x.sh				\
+  chmod/equals.sh				\
+  chmod/inaccessible.sh				\
+  chmod/octal.sh				\
+  chmod/setgid.sh				\
+  chmod/silent.sh				\
+  chmod/thru-dangling.sh			\
+  chmod/umask-x.sh				\
+  chmod/usage.sh				\
+  chown/deref.sh				\
+  chown/preserve-root.sh			\
+  chown/separator.sh				\
+  cp/abuse.sh					\
+  cp/acl.sh					\
+  cp/attr-existing.sh				\
+  cp/backup-1.sh				\
+  cp/backup-dir.sh				\
+  cp/backup-is-src.sh				\
+  cp/cp-HL.sh					\
+  cp/cp-deref.sh				\
+  cp/cp-i.sh					\
+  cp/cp-mv-backup.sh				\
+  cp/cp-parents.sh				\
+  cp/deref-slink.sh				\
+  cp/dir-rm-dest.sh				\
+  cp/dir-slash.sh				\
+  cp/dir-vs-file.sh				\
+  cp/existing-perm-dir.sh			\
+  cp/existing-perm-race.sh			\
+  cp/fail-perm.sh				\
+  cp/fiemap-empty.sh				\
+  cp/fiemap-perf.sh				\
+  cp/fiemap-2.sh				\
+  cp/file-perm-race.sh				\
+  cp/into-self.sh				\
+  cp/link.sh					\
+  cp/link-no-deref.sh				\
+  cp/link-preserve.sh				\
+  cp/link-symlink.sh				\
+  cp/nfs-removal-race.sh			\
+  cp/no-deref-link1.sh				\
+  cp/no-deref-link2.sh				\
+  cp/no-deref-link3.sh				\
+  cp/parent-perm.sh				\
+  cp/parent-perm-race.sh			\
+  cp/perm.sh					\
+  cp/preserve-2.sh				\
+  cp/preserve-link.sh				\
+  cp/preserve-slink-time.sh			\
+  cp/proc-short-read.sh				\
+  cp/proc-zero-len.sh				\
+  cp/r-vs-symlink.sh				\
+  cp/reflink-auto.sh				\
+  cp/reflink-perm.sh				\
+  cp/same-file.sh				\
+  cp/slink-2-slink.sh				\
+  cp/sparse.sh					\
+  cp/sparse-to-pipe.sh				\
+  cp/special-f.sh				\
+  cp/src-base-dot.sh				\
+  cp/symlink-slash.sh				\
+  cp/thru-dangling.sh				\
+  df/header.sh					\
+  df/df-P.sh					\
+  df/unreadable.sh				\
+  df/total-unprocessed.sh			\
+  df/no-mtab-status.sh				\
+  dd/direct.sh					\
+  dd/misc.sh					\
+  dd/nocache.sh					\
+  dd/not-rewound.sh				\
+  dd/reblock.sh					\
+  dd/skip-seek.pl				\
+  dd/skip-seek2.sh				\
+  dd/bytes.sh					\
+  dd/skip-seek-past-file.sh			\
+  dd/sparse.sh					\
+  dd/stderr.sh					\
+  dd/unblock.pl					\
+  dd/unblock-sync.sh				\
+  df/total-verify.sh				\
+  du/2g.sh					\
+  du/8gb.sh					\
+  du/basic.sh					\
+  du/bigtime.sh					\
+  du/deref.sh					\
+  du/deref-args.sh				\
+  du/exclude.sh					\
+  du/fd-leak.sh					\
+  du/files0-from.pl				\
+  du/files0-from-dir.sh				\
+  du/hard-link.sh				\
+  du/inacc-dest.sh				\
+  du/inacc-dir.sh				\
+  du/inaccessible-cwd.sh			\
+  du/long-from-unreadable.sh			\
+  du/long-sloop.sh				\
+  du/max-depth.sh				\
+  du/move-dir-while-traversing.sh		\
+  du/no-deref.sh				\
+  du/no-x.sh					\
+  du/one-file-system.sh				\
+  du/restore-wd.sh				\
+  du/slash.sh					\
+  du/slink.sh					\
+  du/trailing-slash.sh				\
+  du/two-args.sh				\
+  id/gnu-zero-uids.sh				\
+  id/no-context.sh				\
+  install/basic-1.sh				\
+  install/create-leading.sh			\
+  install/d-slashdot.sh				\
+  install/install-C.sh				\
+  install/install-C-selinux.sh			\
+  install/strip-program.sh			\
+  install/trap.sh				\
+  ln/backup-1.sh				\
+  ln/hard-backup.sh				\
+  ln/hard-to-sym.sh				\
+  ln/misc.sh					\
+  ln/relative.sh				\
+  ln/sf-1.sh					\
+  ln/slash-decorated-nonexistent-dest.sh	\
+  ln/target-1.sh				\
+  ls/abmon-align.sh				\
+  ls/block-size.sh				\
+  ls/color-clear-to-eol.sh			\
+  ls/color-dtype-dir.sh				\
+  ls/color-norm.sh				\
+  ls/dangle.sh					\
+  ls/dired.sh					\
+  ls/file-type.sh				\
+  ls/follow-slink.sh				\
+  ls/getxattr-speedup.sh			\
+  ls/infloop.sh					\
+  ls/inode.sh					\
+  ls/m-option.sh				\
+  ls/multihardlink.sh				\
+  ls/no-arg.sh					\
+  ls/no-cap.sh					\
+  ls/proc-selinux-segfault.sh			\
+  ls/readdir-mountpoint-inode.sh		\
+  ls/recursive.sh				\
+  ls/root-rel-symlink-color.sh			\
+  ls/rt-1.sh					\
+  ls/slink-acl.sh				\
+  ls/stat-dtype.sh				\
+  ls/stat-failed.sh				\
+  ls/stat-free-color.sh				\
+  ls/stat-free-symlinks.sh			\
+  ls/stat-vs-dirent.sh				\
+  ls/symlink-slash.sh				\
+  ls/time-style-diag.sh				\
+  ls/x-option.sh				\
+  mkdir/p-1.sh					\
+  mkdir/p-2.sh					\
+  mkdir/p-3.sh					\
+  mkdir/p-slashdot.sh				\
+  mkdir/p-thru-slink.sh				\
+  mkdir/p-v.sh					\
+  mkdir/parents.sh				\
+  mkdir/perm.sh					\
+  mkdir/selinux.sh				\
+  mkdir/special-1.sh				\
+  mkdir/t-slash.sh				\
+  mv/acl.sh					\
+  mv/atomic.sh					\
+  mv/atomic2.sh					\
+  mv/backup-dir.sh				\
+  mv/backup-is-src.sh				\
+  mv/childproof.sh				\
+  mv/diag.sh					\
+  mv/dir-file.sh				\
+  mv/dir2dir.sh					\
+  mv/dup-source.sh				\
+  mv/force.sh					\
+  mv/hard-2.sh					\
+  mv/hard-3.sh					\
+  mv/hard-4.sh					\
+  mv/hard-link-1.sh				\
+  mv/hard-verbose.sh				\
+  mv/i-1.pl					\
+  mv/i-2.sh					\
+  mv/i-3.sh					\
+  mv/i-4.sh					\
+  mv/i-5.sh					\
+  mv/i-link-no.sh				\
+  mv/into-self.sh				\
+  mv/into-self-2.sh				\
+  mv/into-self-3.sh				\
+  mv/into-self-4.sh				\
+  mv/leak-fd.sh					\
+  mv/mv-n.sh					\
+  mv/mv-special-1.sh				\
+  mv/no-target-dir.sh				\
+  mv/part-fail.sh				\
+  mv/part-hardlink.sh				\
+  mv/part-rename.sh				\
+  mv/part-symlink.sh				\
+  mv/partition-perm.sh				\
+  mv/perm-1.sh					\
+  mv/symlink-onto-hardlink.sh			\
+  mv/symlink-onto-hardlink-to-self.sh		\
+  mv/to-symlink.sh				\
+  mv/trailing-slash.sh				\
+  mv/update.sh					\
+  readlink/can-e.sh				\
+  readlink/can-f.sh				\
+  readlink/can-m.sh				\
+  readlink/rl-1.sh				\
+  rmdir/fail-perm.sh				\
+  rmdir/ignore.sh				\
+  rmdir/t-slash.sh				\
+  tail-2/assert-2.sh				\
+  tail-2/big-4gb.sh				\
+  tail-2/flush-initial.sh			\
+  tail-2/follow-name.sh				\
+  tail-2/follow-stdin.sh			\
+  tail-2/pipe-f.sh				\
+  tail-2/pipe-f2.sh				\
+  tail-2/proc-ksyms.sh				\
+  tail-2/start-middle.sh			\
+  touch/60-seconds.sh				\
+  touch/dangling-symlink.sh			\
+  touch/dir-1.sh				\
+  touch/fail-diag.sh				\
+  touch/fifo.sh					\
+  touch/no-create-missing.sh			\
+  touch/no-dereference.sh			\
+  touch/no-rights.sh				\
+  touch/not-owner.sh				\
+  touch/obsolescent.sh				\
+  touch/read-only.sh				\
+  touch/relative.sh				\
+  touch/trailing-slash.sh			\
   $(root_tests)

 pr_data =					\
diff --git a/tests/chgrp/basic b/tests/chgrp/basic.sh
similarity index 100%
rename from tests/chgrp/basic
rename to tests/chgrp/basic.sh
diff --git a/tests/chgrp/default-no-deref b/tests/chgrp/default-no-deref.sh
similarity index 100%
rename from tests/chgrp/default-no-deref
rename to tests/chgrp/default-no-deref.sh
diff --git a/tests/chgrp/deref b/tests/chgrp/deref.sh
similarity index 100%
rename from tests/chgrp/deref
rename to tests/chgrp/deref.sh
diff --git a/tests/chgrp/no-x b/tests/chgrp/no-x.sh
similarity index 100%
rename from tests/chgrp/no-x
rename to tests/chgrp/no-x.sh
diff --git a/tests/chgrp/posix-H b/tests/chgrp/posix-H.sh
similarity index 100%
rename from tests/chgrp/posix-H
rename to tests/chgrp/posix-H.sh
diff --git a/tests/chgrp/recurse b/tests/chgrp/recurse.sh
similarity index 100%
rename from tests/chgrp/recurse
rename to tests/chgrp/recurse.sh
diff --git a/tests/chmod/c-option b/tests/chmod/c-option.sh
similarity index 100%
rename from tests/chmod/c-option
rename to tests/chmod/c-option.sh
diff --git a/tests/chmod/equal-x b/tests/chmod/equal-x.sh
similarity index 100%
rename from tests/chmod/equal-x
rename to tests/chmod/equal-x.sh
diff --git a/tests/chmod/equals b/tests/chmod/equals.sh
similarity index 100%
rename from tests/chmod/equals
rename to tests/chmod/equals.sh
diff --git a/tests/chmod/inaccessible b/tests/chmod/inaccessible.sh
similarity index 100%
rename from tests/chmod/inaccessible
rename to tests/chmod/inaccessible.sh
diff --git a/tests/chmod/no-x b/tests/chmod/no-x.sh
similarity index 100%
rename from tests/chmod/no-x
rename to tests/chmod/no-x.sh
diff --git a/tests/chmod/octal b/tests/chmod/octal.sh
similarity index 100%
rename from tests/chmod/octal
rename to tests/chmod/octal.sh
diff --git a/tests/chmod/setgid b/tests/chmod/setgid.sh
similarity index 100%
rename from tests/chmod/setgid
rename to tests/chmod/setgid.sh
diff --git a/tests/chmod/silent b/tests/chmod/silent.sh
similarity index 100%
rename from tests/chmod/silent
rename to tests/chmod/silent.sh
diff --git a/tests/chmod/thru-dangling b/tests/chmod/thru-dangling.sh
similarity index 100%
rename from tests/chmod/thru-dangling
rename to tests/chmod/thru-dangling.sh
diff --git a/tests/chmod/umask-x b/tests/chmod/umask-x.sh
similarity index 100%
rename from tests/chmod/umask-x
rename to tests/chmod/umask-x.sh
diff --git a/tests/chmod/usage b/tests/chmod/usage.sh
similarity index 100%
rename from tests/chmod/usage
rename to tests/chmod/usage.sh
diff --git a/tests/chown/basic b/tests/chown/basic.sh
similarity index 100%
rename from tests/chown/basic
rename to tests/chown/basic.sh
diff --git a/tests/chown/deref b/tests/chown/deref.sh
similarity index 100%
rename from tests/chown/deref
rename to tests/chown/deref.sh
diff --git a/tests/chown/preserve-root b/tests/chown/preserve-root.sh
similarity index 100%
rename from tests/chown/preserve-root
rename to tests/chown/preserve-root.sh
diff --git a/tests/chown/separator b/tests/chown/separator.sh
similarity index 100%
rename from tests/chown/separator
rename to tests/chown/separator.sh
diff --git a/tests/cp/abuse b/tests/cp/abuse.sh
similarity index 100%
rename from tests/cp/abuse
rename to tests/cp/abuse.sh
diff --git a/tests/cp/acl b/tests/cp/acl.sh
similarity index 100%
rename from tests/cp/acl
rename to tests/cp/acl.sh
diff --git a/tests/cp/attr-existing b/tests/cp/attr-existing.sh
similarity index 100%
rename from tests/cp/attr-existing
rename to tests/cp/attr-existing.sh
diff --git a/tests/cp/backup-1 b/tests/cp/backup-1.sh
similarity index 100%
rename from tests/cp/backup-1
rename to tests/cp/backup-1.sh
diff --git a/tests/cp/backup-dir b/tests/cp/backup-dir.sh
similarity index 100%
rename from tests/cp/backup-dir
rename to tests/cp/backup-dir.sh
diff --git a/tests/cp/backup-is-src b/tests/cp/backup-is-src.sh
similarity index 100%
rename from tests/cp/backup-is-src
rename to tests/cp/backup-is-src.sh
diff --git a/tests/cp/capability b/tests/cp/capability.sh
similarity index 100%
rename from tests/cp/capability
rename to tests/cp/capability.sh
diff --git a/tests/cp/cp-HL b/tests/cp/cp-HL.sh
similarity index 100%
rename from tests/cp/cp-HL
rename to tests/cp/cp-HL.sh
diff --git a/tests/cp/cp-a-selinux b/tests/cp/cp-a-selinux.sh
similarity index 100%
rename from tests/cp/cp-a-selinux
rename to tests/cp/cp-a-selinux.sh
diff --git a/tests/cp/cp-deref b/tests/cp/cp-deref.sh
similarity index 100%
rename from tests/cp/cp-deref
rename to tests/cp/cp-deref.sh
diff --git a/tests/cp/cp-i b/tests/cp/cp-i.sh
similarity index 100%
rename from tests/cp/cp-i
rename to tests/cp/cp-i.sh
diff --git a/tests/cp/cp-mv-backup b/tests/cp/cp-mv-backup.sh
similarity index 100%
rename from tests/cp/cp-mv-backup
rename to tests/cp/cp-mv-backup.sh
diff --git a/tests/cp/cp-mv-enotsup-xattr b/tests/cp/cp-mv-enotsup-xattr.sh
similarity index 100%
rename from tests/cp/cp-mv-enotsup-xattr
rename to tests/cp/cp-mv-enotsup-xattr.sh
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents.sh
similarity index 100%
rename from tests/cp/cp-parents
rename to tests/cp/cp-parents.sh
diff --git a/tests/cp/deref-slink b/tests/cp/deref-slink.sh
similarity index 100%
rename from tests/cp/deref-slink
rename to tests/cp/deref-slink.sh
diff --git a/tests/cp/dir-rm-dest b/tests/cp/dir-rm-dest.sh
similarity index 100%
rename from tests/cp/dir-rm-dest
rename to tests/cp/dir-rm-dest.sh
diff --git a/tests/cp/dir-slash b/tests/cp/dir-slash.sh
similarity index 100%
rename from tests/cp/dir-slash
rename to tests/cp/dir-slash.sh
diff --git a/tests/cp/dir-vs-file b/tests/cp/dir-vs-file.sh
similarity index 100%
rename from tests/cp/dir-vs-file
rename to tests/cp/dir-vs-file.sh
diff --git a/tests/cp/existing-perm-dir b/tests/cp/existing-perm-dir.sh
similarity index 100%
rename from tests/cp/existing-perm-dir
rename to tests/cp/existing-perm-dir.sh
diff --git a/tests/cp/existing-perm-race b/tests/cp/existing-perm-race.sh
similarity index 100%
rename from tests/cp/existing-perm-race
rename to tests/cp/existing-perm-race.sh
diff --git a/tests/cp/fail-perm b/tests/cp/fail-perm.sh
similarity index 100%
rename from tests/cp/fail-perm
rename to tests/cp/fail-perm.sh
diff --git a/tests/cp/fiemap-2 b/tests/cp/fiemap-2.sh
similarity index 100%
rename from tests/cp/fiemap-2
rename to tests/cp/fiemap-2.sh
diff --git a/tests/cp/fiemap-empty b/tests/cp/fiemap-empty.sh
similarity index 100%
rename from tests/cp/fiemap-empty
rename to tests/cp/fiemap-empty.sh
diff --git a/tests/cp/fiemap-perf b/tests/cp/fiemap-perf.sh
similarity index 100%
rename from tests/cp/fiemap-perf
rename to tests/cp/fiemap-perf.sh
diff --git a/tests/cp/file-perm-race b/tests/cp/file-perm-race.sh
similarity index 100%
rename from tests/cp/file-perm-race
rename to tests/cp/file-perm-race.sh
diff --git a/tests/cp/into-self b/tests/cp/into-self.sh
similarity index 100%
rename from tests/cp/into-self
rename to tests/cp/into-self.sh
diff --git a/tests/cp/link-heap b/tests/cp/link-heap.sh
similarity index 100%
rename from tests/cp/link-heap
rename to tests/cp/link-heap.sh
diff --git a/tests/cp/link-no-deref b/tests/cp/link-no-deref.sh
similarity index 100%
rename from tests/cp/link-no-deref
rename to tests/cp/link-no-deref.sh
diff --git a/tests/cp/link-preserve b/tests/cp/link-preserve.sh
similarity index 100%
rename from tests/cp/link-preserve
rename to tests/cp/link-preserve.sh
diff --git a/tests/cp/link-symlink b/tests/cp/link-symlink.sh
similarity index 100%
rename from tests/cp/link-symlink
rename to tests/cp/link-symlink.sh
diff --git a/tests/cp/link b/tests/cp/link.sh
similarity index 100%
rename from tests/cp/link
rename to tests/cp/link.sh
diff --git a/tests/cp/nfs-removal-race b/tests/cp/nfs-removal-race.sh
similarity index 100%
rename from tests/cp/nfs-removal-race
rename to tests/cp/nfs-removal-race.sh
diff --git a/tests/cp/no-deref-link1 b/tests/cp/no-deref-link1.sh
similarity index 100%
rename from tests/cp/no-deref-link1
rename to tests/cp/no-deref-link1.sh
diff --git a/tests/cp/no-deref-link2 b/tests/cp/no-deref-link2.sh
similarity index 100%
rename from tests/cp/no-deref-link2
rename to tests/cp/no-deref-link2.sh
diff --git a/tests/cp/no-deref-link3 b/tests/cp/no-deref-link3.sh
similarity index 100%
rename from tests/cp/no-deref-link3
rename to tests/cp/no-deref-link3.sh
diff --git a/tests/cp/parent-perm-race b/tests/cp/parent-perm-race.sh
similarity index 100%
rename from tests/cp/parent-perm-race
rename to tests/cp/parent-perm-race.sh
diff --git a/tests/cp/parent-perm b/tests/cp/parent-perm.sh
similarity index 100%
rename from tests/cp/parent-perm
rename to tests/cp/parent-perm.sh
diff --git a/tests/cp/perm b/tests/cp/perm.sh
similarity index 100%
rename from tests/cp/perm
rename to tests/cp/perm.sh
diff --git a/tests/cp/preserve-2 b/tests/cp/preserve-2.sh
similarity index 100%
rename from tests/cp/preserve-2
rename to tests/cp/preserve-2.sh
diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid.sh
similarity index 100%
rename from tests/cp/preserve-gid
rename to tests/cp/preserve-gid.sh
diff --git a/tests/cp/preserve-link b/tests/cp/preserve-link.sh
similarity index 100%
rename from tests/cp/preserve-link
rename to tests/cp/preserve-link.sh
diff --git a/tests/cp/preserve-slink-time b/tests/cp/preserve-slink-time.sh
similarity index 100%
rename from tests/cp/preserve-slink-time
rename to tests/cp/preserve-slink-time.sh
diff --git a/tests/cp/proc-short-read b/tests/cp/proc-short-read.sh
similarity index 100%
rename from tests/cp/proc-short-read
rename to tests/cp/proc-short-read.sh
diff --git a/tests/cp/proc-zero-len b/tests/cp/proc-zero-len.sh
similarity index 100%
rename from tests/cp/proc-zero-len
rename to tests/cp/proc-zero-len.sh
diff --git a/tests/cp/r-vs-symlink b/tests/cp/r-vs-symlink.sh
similarity index 100%
rename from tests/cp/r-vs-symlink
rename to tests/cp/r-vs-symlink.sh
diff --git a/tests/cp/reflink-auto b/tests/cp/reflink-auto.sh
similarity index 100%
rename from tests/cp/reflink-auto
rename to tests/cp/reflink-auto.sh
diff --git a/tests/cp/reflink-perm b/tests/cp/reflink-perm.sh
similarity index 100%
rename from tests/cp/reflink-perm
rename to tests/cp/reflink-perm.sh
diff --git a/tests/cp/same-file b/tests/cp/same-file.sh
similarity index 100%
rename from tests/cp/same-file
rename to tests/cp/same-file.sh
diff --git a/tests/cp/slink-2-slink b/tests/cp/slink-2-slink.sh
similarity index 100%
rename from tests/cp/slink-2-slink
rename to tests/cp/slink-2-slink.sh
diff --git a/tests/cp/sparse-fiemap b/tests/cp/sparse-fiemap.sh
similarity index 100%
rename from tests/cp/sparse-fiemap
rename to tests/cp/sparse-fiemap.sh
diff --git a/tests/cp/sparse-to-pipe b/tests/cp/sparse-to-pipe.sh
similarity index 100%
rename from tests/cp/sparse-to-pipe
rename to tests/cp/sparse-to-pipe.sh
diff --git a/tests/cp/sparse b/tests/cp/sparse.sh
similarity index 100%
rename from tests/cp/sparse
rename to tests/cp/sparse.sh
diff --git a/tests/cp/special-bits b/tests/cp/special-bits.sh
similarity index 100%
rename from tests/cp/special-bits
rename to tests/cp/special-bits.sh
diff --git a/tests/cp/special-f b/tests/cp/special-f.sh
similarity index 100%
rename from tests/cp/special-f
rename to tests/cp/special-f.sh
diff --git a/tests/cp/src-base-dot b/tests/cp/src-base-dot.sh
similarity index 100%
rename from tests/cp/src-base-dot
rename to tests/cp/src-base-dot.sh
diff --git a/tests/cp/symlink-slash b/tests/cp/symlink-slash.sh
similarity index 100%
rename from tests/cp/symlink-slash
rename to tests/cp/symlink-slash.sh
diff --git a/tests/cp/thru-dangling b/tests/cp/thru-dangling.sh
similarity index 100%
rename from tests/cp/thru-dangling
rename to tests/cp/thru-dangling.sh
diff --git a/tests/dd/bytes b/tests/dd/bytes.sh
similarity index 100%
rename from tests/dd/bytes
rename to tests/dd/bytes.sh
diff --git a/tests/dd/direct b/tests/dd/direct.sh
similarity index 100%
rename from tests/dd/direct
rename to tests/dd/direct.sh
diff --git a/tests/dd/misc b/tests/dd/misc.sh
similarity index 100%
rename from tests/dd/misc
rename to tests/dd/misc.sh
diff --git a/tests/dd/nocache b/tests/dd/nocache.sh
similarity index 100%
rename from tests/dd/nocache
rename to tests/dd/nocache.sh
diff --git a/tests/dd/not-rewound b/tests/dd/not-rewound.sh
similarity index 100%
rename from tests/dd/not-rewound
rename to tests/dd/not-rewound.sh
diff --git a/tests/dd/reblock b/tests/dd/reblock.sh
similarity index 100%
rename from tests/dd/reblock
rename to tests/dd/reblock.sh
diff --git a/tests/dd/skip-seek-past-dev b/tests/dd/skip-seek-past-dev.sh
similarity index 100%
rename from tests/dd/skip-seek-past-dev
rename to tests/dd/skip-seek-past-dev.sh
diff --git a/tests/dd/skip-seek-past-file b/tests/dd/skip-seek-past-file.sh
similarity index 100%
rename from tests/dd/skip-seek-past-file
rename to tests/dd/skip-seek-past-file.sh
diff --git a/tests/dd/skip-seek b/tests/dd/skip-seek.pl
similarity index 100%
rename from tests/dd/skip-seek
rename to tests/dd/skip-seek.pl
diff --git a/tests/dd/skip-seek2 b/tests/dd/skip-seek2.sh
similarity index 100%
rename from tests/dd/skip-seek2
rename to tests/dd/skip-seek2.sh
diff --git a/tests/dd/sparse b/tests/dd/sparse.sh
similarity index 100%
rename from tests/dd/sparse
rename to tests/dd/sparse.sh
diff --git a/tests/dd/stderr b/tests/dd/stderr.sh
similarity index 100%
rename from tests/dd/stderr
rename to tests/dd/stderr.sh
diff --git a/tests/dd/unblock-sync b/tests/dd/unblock-sync.sh
similarity index 100%
rename from tests/dd/unblock-sync
rename to tests/dd/unblock-sync.sh
diff --git a/tests/dd/unblock b/tests/dd/unblock.pl
similarity index 100%
rename from tests/dd/unblock
rename to tests/dd/unblock.pl
diff --git a/tests/df/df-P b/tests/df/df-P.sh
similarity index 100%
rename from tests/df/df-P
rename to tests/df/df-P.sh
diff --git a/tests/df/header b/tests/df/header.sh
similarity index 100%
rename from tests/df/header
rename to tests/df/header.sh
diff --git a/tests/df/no-mtab-status b/tests/df/no-mtab-status.sh
similarity index 100%
rename from tests/df/no-mtab-status
rename to tests/df/no-mtab-status.sh
diff --git a/tests/df/problematic-chars b/tests/df/problematic-chars.sh
similarity index 100%
rename from tests/df/problematic-chars
rename to tests/df/problematic-chars.sh
diff --git a/tests/df/total-unprocessed b/tests/df/total-unprocessed.sh
similarity index 100%
rename from tests/df/total-unprocessed
rename to tests/df/total-unprocessed.sh
diff --git a/tests/df/total-verify b/tests/df/total-verify.sh
similarity index 100%
rename from tests/df/total-verify
rename to tests/df/total-verify.sh
diff --git a/tests/df/unreadable b/tests/df/unreadable.sh
similarity index 100%
rename from tests/df/unreadable
rename to tests/df/unreadable.sh
diff --git a/tests/du/2g b/tests/du/2g.sh
similarity index 100%
rename from tests/du/2g
rename to tests/du/2g.sh
diff --git a/tests/du/8gb b/tests/du/8gb.sh
similarity index 100%
rename from tests/du/8gb
rename to tests/du/8gb.sh
diff --git a/tests/du/basic b/tests/du/basic.sh
similarity index 100%
rename from tests/du/basic
rename to tests/du/basic.sh
diff --git a/tests/du/bigtime b/tests/du/bigtime.sh
similarity index 100%
rename from tests/du/bigtime
rename to tests/du/bigtime.sh
diff --git a/tests/du/bind-mount-dir-cycle b/tests/du/bind-mount-dir-cycle.sh
similarity index 100%
rename from tests/du/bind-mount-dir-cycle
rename to tests/du/bind-mount-dir-cycle.sh
diff --git a/tests/du/deref-args b/tests/du/deref-args.sh
similarity index 100%
rename from tests/du/deref-args
rename to tests/du/deref-args.sh
diff --git a/tests/du/deref b/tests/du/deref.sh
similarity index 100%
rename from tests/du/deref
rename to tests/du/deref.sh
diff --git a/tests/du/exclude b/tests/du/exclude.sh
similarity index 100%
rename from tests/du/exclude
rename to tests/du/exclude.sh
diff --git a/tests/du/fd-leak b/tests/du/fd-leak.sh
similarity index 100%
rename from tests/du/fd-leak
rename to tests/du/fd-leak.sh
diff --git a/tests/du/files0-from-dir b/tests/du/files0-from-dir.sh
similarity index 100%
rename from tests/du/files0-from-dir
rename to tests/du/files0-from-dir.sh
diff --git a/tests/du/files0-from b/tests/du/files0-from.pl
similarity index 100%
rename from tests/du/files0-from
rename to tests/du/files0-from.pl
diff --git a/tests/du/hard-link b/tests/du/hard-link.sh
similarity index 100%
rename from tests/du/hard-link
rename to tests/du/hard-link.sh
diff --git a/tests/du/inacc-dest b/tests/du/inacc-dest.sh
similarity index 100%
rename from tests/du/inacc-dest
rename to tests/du/inacc-dest.sh
diff --git a/tests/du/inacc-dir b/tests/du/inacc-dir.sh
similarity index 100%
rename from tests/du/inacc-dir
rename to tests/du/inacc-dir.sh
diff --git a/tests/du/inaccessible-cwd b/tests/du/inaccessible-cwd.sh
similarity index 100%
rename from tests/du/inaccessible-cwd
rename to tests/du/inaccessible-cwd.sh
diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable.sh
similarity index 100%
rename from tests/du/long-from-unreadable
rename to tests/du/long-from-unreadable.sh
diff --git a/tests/du/long-sloop b/tests/du/long-sloop.sh
similarity index 100%
rename from tests/du/long-sloop
rename to tests/du/long-sloop.sh
diff --git a/tests/du/max-depth b/tests/du/max-depth.sh
similarity index 100%
rename from tests/du/max-depth
rename to tests/du/max-depth.sh
diff --git a/tests/du/move-dir-while-traversing b/tests/du/move-dir-while-traversing.sh
similarity index 100%
rename from tests/du/move-dir-while-traversing
rename to tests/du/move-dir-while-traversing.sh
diff --git a/tests/du/no-deref b/tests/du/no-deref.sh
similarity index 100%
rename from tests/du/no-deref
rename to tests/du/no-deref.sh
diff --git a/tests/du/no-x b/tests/du/no-x.sh
similarity index 100%
rename from tests/du/no-x
rename to tests/du/no-x.sh
diff --git a/tests/du/one-file-system b/tests/du/one-file-system.sh
similarity index 100%
rename from tests/du/one-file-system
rename to tests/du/one-file-system.sh
diff --git a/tests/du/restore-wd b/tests/du/restore-wd.sh
similarity index 100%
rename from tests/du/restore-wd
rename to tests/du/restore-wd.sh
diff --git a/tests/du/slash b/tests/du/slash.sh
similarity index 100%
rename from tests/du/slash
rename to tests/du/slash.sh
diff --git a/tests/du/slink b/tests/du/slink.sh
similarity index 100%
rename from tests/du/slink
rename to tests/du/slink.sh
diff --git a/tests/du/trailing-slash b/tests/du/trailing-slash.sh
similarity index 100%
rename from tests/du/trailing-slash
rename to tests/du/trailing-slash.sh
diff --git a/tests/du/two-args b/tests/du/two-args.sh
similarity index 100%
rename from tests/du/two-args
rename to tests/du/two-args.sh
diff --git a/tests/fmt/base b/tests/fmt/base.pl
similarity index 100%
rename from tests/fmt/base
rename to tests/fmt/base.pl
diff --git a/tests/fmt/goal-option b/tests/fmt/goal-option.sh
similarity index 100%
rename from tests/fmt/goal-option
rename to tests/fmt/goal-option.sh
diff --git a/tests/fmt/long-line b/tests/fmt/long-line.sh
similarity index 100%
rename from tests/fmt/long-line
rename to tests/fmt/long-line.sh
diff --git a/tests/id/gnu-zero-uids b/tests/id/gnu-zero-uids.sh
similarity index 100%
rename from tests/id/gnu-zero-uids
rename to tests/id/gnu-zero-uids.sh
diff --git a/tests/id/no-context b/tests/id/no-context.sh
similarity index 100%
rename from tests/id/no-context
rename to tests/id/no-context.sh
diff --git a/tests/install/basic-1 b/tests/install/basic-1.sh
similarity index 100%
rename from tests/install/basic-1
rename to tests/install/basic-1.sh
diff --git a/tests/install/create-leading b/tests/install/create-leading.sh
similarity index 100%
rename from tests/install/create-leading
rename to tests/install/create-leading.sh
diff --git a/tests/install/d-slashdot b/tests/install/d-slashdot.sh
similarity index 100%
rename from tests/install/d-slashdot
rename to tests/install/d-slashdot.sh
diff --git a/tests/install/install-C-root b/tests/install/install-C-root.sh
similarity index 100%
rename from tests/install/install-C-root
rename to tests/install/install-C-root.sh
diff --git a/tests/install/install-C-selinux b/tests/install/install-C-selinux.sh
similarity index 100%
rename from tests/install/install-C-selinux
rename to tests/install/install-C-selinux.sh
diff --git a/tests/install/install-C b/tests/install/install-C.sh
similarity index 100%
rename from tests/install/install-C
rename to tests/install/install-C.sh
diff --git a/tests/install/strip-program b/tests/install/strip-program.sh
similarity index 100%
rename from tests/install/strip-program
rename to tests/install/strip-program.sh
diff --git a/tests/install/trap b/tests/install/trap.sh
similarity index 100%
rename from tests/install/trap
rename to tests/install/trap.sh
diff --git a/tests/ln/backup-1 b/tests/ln/backup-1.sh
similarity index 100%
rename from tests/ln/backup-1
rename to tests/ln/backup-1.sh
diff --git a/tests/ln/hard-backup b/tests/ln/hard-backup.sh
similarity index 100%
rename from tests/ln/hard-backup
rename to tests/ln/hard-backup.sh
diff --git a/tests/ln/hard-to-sym b/tests/ln/hard-to-sym.sh
similarity index 100%
rename from tests/ln/hard-to-sym
rename to tests/ln/hard-to-sym.sh
diff --git a/tests/ln/misc b/tests/ln/misc.sh
similarity index 100%
rename from tests/ln/misc
rename to tests/ln/misc.sh
diff --git a/tests/ln/relative b/tests/ln/relative.sh
similarity index 100%
rename from tests/ln/relative
rename to tests/ln/relative.sh
diff --git a/tests/ln/sf-1 b/tests/ln/sf-1.sh
similarity index 100%
rename from tests/ln/sf-1
rename to tests/ln/sf-1.sh
diff --git a/tests/ln/slash-decorated-nonexistent-dest b/tests/ln/slash-decorated-nonexistent-dest.sh
similarity index 100%
rename from tests/ln/slash-decorated-nonexistent-dest
rename to tests/ln/slash-decorated-nonexistent-dest.sh
diff --git a/tests/ln/target-1 b/tests/ln/target-1.sh
similarity index 100%
rename from tests/ln/target-1
rename to tests/ln/target-1.sh
diff --git a/tests/ls/abmon-align b/tests/ls/abmon-align.sh
similarity index 100%
rename from tests/ls/abmon-align
rename to tests/ls/abmon-align.sh
diff --git a/tests/ls/block-size b/tests/ls/block-size.sh
similarity index 100%
rename from tests/ls/block-size
rename to tests/ls/block-size.sh
diff --git a/tests/ls/capability b/tests/ls/capability.sh
similarity index 100%
rename from tests/ls/capability
rename to tests/ls/capability.sh
diff --git a/tests/ls/color-clear-to-eol b/tests/ls/color-clear-to-eol.sh
similarity index 100%
rename from tests/ls/color-clear-to-eol
rename to tests/ls/color-clear-to-eol.sh
diff --git a/tests/ls/color-dtype-dir b/tests/ls/color-dtype-dir.sh
similarity index 100%
rename from tests/ls/color-dtype-dir
rename to tests/ls/color-dtype-dir.sh
diff --git a/tests/ls/color-norm b/tests/ls/color-norm.sh
similarity index 100%
rename from tests/ls/color-norm
rename to tests/ls/color-norm.sh
diff --git a/tests/ls/dangle b/tests/ls/dangle.sh
similarity index 100%
rename from tests/ls/dangle
rename to tests/ls/dangle.sh
diff --git a/tests/ls/dired b/tests/ls/dired.sh
similarity index 100%
rename from tests/ls/dired
rename to tests/ls/dired.sh
diff --git a/tests/ls/file-type b/tests/ls/file-type.sh
similarity index 100%
rename from tests/ls/file-type
rename to tests/ls/file-type.sh
diff --git a/tests/ls/follow-slink b/tests/ls/follow-slink.sh
similarity index 100%
rename from tests/ls/follow-slink
rename to tests/ls/follow-slink.sh
diff --git a/tests/ls/getxattr-speedup b/tests/ls/getxattr-speedup.sh
similarity index 100%
rename from tests/ls/getxattr-speedup
rename to tests/ls/getxattr-speedup.sh
diff --git a/tests/ls/infloop b/tests/ls/infloop.sh
similarity index 100%
rename from tests/ls/infloop
rename to tests/ls/infloop.sh
diff --git a/tests/ls/inode b/tests/ls/inode.sh
similarity index 100%
rename from tests/ls/inode
rename to tests/ls/inode.sh
diff --git a/tests/ls/m-option b/tests/ls/m-option.sh
similarity index 100%
rename from tests/ls/m-option
rename to tests/ls/m-option.sh
diff --git a/tests/ls/multihardlink b/tests/ls/multihardlink.sh
similarity index 100%
rename from tests/ls/multihardlink
rename to tests/ls/multihardlink.sh
diff --git a/tests/ls/nameless-uid b/tests/ls/nameless-uid.sh
similarity index 100%
rename from tests/ls/nameless-uid
rename to tests/ls/nameless-uid.sh
diff --git a/tests/ls/no-arg b/tests/ls/no-arg.sh
similarity index 100%
rename from tests/ls/no-arg
rename to tests/ls/no-arg.sh
diff --git a/tests/ls/no-cap b/tests/ls/no-cap.sh
similarity index 100%
rename from tests/ls/no-cap
rename to tests/ls/no-cap.sh
diff --git a/tests/ls/proc-selinux-segfault b/tests/ls/proc-selinux-segfault.sh
similarity index 100%
rename from tests/ls/proc-selinux-segfault
rename to tests/ls/proc-selinux-segfault.sh
diff --git a/tests/ls/readdir-mountpoint-inode b/tests/ls/readdir-mountpoint-inode.sh
similarity index 100%
rename from tests/ls/readdir-mountpoint-inode
rename to tests/ls/readdir-mountpoint-inode.sh
diff --git a/tests/ls/recursive b/tests/ls/recursive.sh
similarity index 100%
rename from tests/ls/recursive
rename to tests/ls/recursive.sh
diff --git a/tests/ls/root-rel-symlink-color b/tests/ls/root-rel-symlink-color.sh
similarity index 100%
rename from tests/ls/root-rel-symlink-color
rename to tests/ls/root-rel-symlink-color.sh
diff --git a/tests/ls/rt-1 b/tests/ls/rt-1.sh
similarity index 100%
rename from tests/ls/rt-1
rename to tests/ls/rt-1.sh
diff --git a/tests/ls/slink-acl b/tests/ls/slink-acl.sh
similarity index 100%
rename from tests/ls/slink-acl
rename to tests/ls/slink-acl.sh
diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype.sh
similarity index 100%
rename from tests/ls/stat-dtype
rename to tests/ls/stat-dtype.sh
diff --git a/tests/ls/stat-failed b/tests/ls/stat-failed.sh
similarity index 100%
rename from tests/ls/stat-failed
rename to tests/ls/stat-failed.sh
diff --git a/tests/ls/stat-free-color b/tests/ls/stat-free-color.sh
similarity index 100%
rename from tests/ls/stat-free-color
rename to tests/ls/stat-free-color.sh
diff --git a/tests/ls/stat-free-symlinks b/tests/ls/stat-free-symlinks.sh
similarity index 100%
rename from tests/ls/stat-free-symlinks
rename to tests/ls/stat-free-symlinks.sh
diff --git a/tests/ls/stat-vs-dirent b/tests/ls/stat-vs-dirent.sh
similarity index 100%
rename from tests/ls/stat-vs-dirent
rename to tests/ls/stat-vs-dirent.sh
diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash.sh
similarity index 100%
rename from tests/ls/symlink-slash
rename to tests/ls/symlink-slash.sh
diff --git a/tests/ls/time-style-diag b/tests/ls/time-style-diag.sh
similarity index 100%
rename from tests/ls/time-style-diag
rename to tests/ls/time-style-diag.sh
diff --git a/tests/ls/x-option b/tests/ls/x-option.sh
similarity index 100%
rename from tests/ls/x-option
rename to tests/ls/x-option.sh
diff --git a/tests/misc/arch b/tests/misc/arch.sh
similarity index 100%
rename from tests/misc/arch
rename to tests/misc/arch.sh
diff --git a/tests/misc/base64 b/tests/misc/base64.pl
similarity index 100%
rename from tests/misc/base64
rename to tests/misc/base64.pl
diff --git a/tests/misc/basename b/tests/misc/basename.pl
similarity index 100%
rename from tests/misc/basename
rename to tests/misc/basename.pl
diff --git a/tests/misc/cat-buf b/tests/misc/cat-buf.sh
similarity index 100%
rename from tests/misc/cat-buf
rename to tests/misc/cat-buf.sh
diff --git a/tests/misc/cat-proc b/tests/misc/cat-proc.sh
similarity index 100%
rename from tests/misc/cat-proc
rename to tests/misc/cat-proc.sh
diff --git a/tests/misc/chcon-fail b/tests/misc/chcon-fail.sh
similarity index 100%
rename from tests/misc/chcon-fail
rename to tests/misc/chcon-fail.sh
diff --git a/tests/misc/chcon b/tests/misc/chcon.sh
similarity index 100%
rename from tests/misc/chcon
rename to tests/misc/chcon.sh
diff --git a/tests/misc/chroot-credentials b/tests/misc/chroot-credentials.sh
similarity index 100%
rename from tests/misc/chroot-credentials
rename to tests/misc/chroot-credentials.sh
diff --git a/tests/misc/chroot-fail b/tests/misc/chroot-fail.sh
similarity index 100%
rename from tests/misc/chroot-fail
rename to tests/misc/chroot-fail.sh
diff --git a/tests/misc/close-stdout b/tests/misc/close-stdout.sh
similarity index 100%
rename from tests/misc/close-stdout
rename to tests/misc/close-stdout.sh
diff --git a/tests/misc/comm b/tests/misc/comm.pl
similarity index 100%
rename from tests/misc/comm
rename to tests/misc/comm.pl
diff --git a/tests/misc/csplit-1000 b/tests/misc/csplit-1000.sh
similarity index 100%
rename from tests/misc/csplit-1000
rename to tests/misc/csplit-1000.sh
diff --git a/tests/misc/csplit-heap b/tests/misc/csplit-heap.sh
similarity index 100%
rename from tests/misc/csplit-heap
rename to tests/misc/csplit-heap.sh
diff --git a/tests/misc/csplit b/tests/misc/csplit.sh
similarity index 100%
rename from tests/misc/csplit
rename to tests/misc/csplit.sh
diff --git a/tests/misc/cut b/tests/misc/cut.pl
similarity index 100%
rename from tests/misc/cut
rename to tests/misc/cut.pl
diff --git a/tests/misc/date-next-dow b/tests/misc/date-next-dow.pl
similarity index 100%
rename from tests/misc/date-next-dow
rename to tests/misc/date-next-dow.pl
diff --git a/tests/misc/date-sec b/tests/misc/date-sec.sh
similarity index 100%
rename from tests/misc/date-sec
rename to tests/misc/date-sec.sh
diff --git a/tests/misc/date b/tests/misc/date.pl
similarity index 100%
rename from tests/misc/date
rename to tests/misc/date.pl
diff --git a/tests/misc/dircolors b/tests/misc/dircolors.pl
similarity index 100%
rename from tests/misc/dircolors
rename to tests/misc/dircolors.pl
diff --git a/tests/misc/dirname b/tests/misc/dirname.pl
similarity index 100%
rename from tests/misc/dirname
rename to tests/misc/dirname.pl
diff --git a/tests/misc/env-null b/tests/misc/env-null.sh
similarity index 100%
rename from tests/misc/env-null
rename to tests/misc/env-null.sh
diff --git a/tests/misc/env b/tests/misc/env.sh
similarity index 100%
rename from tests/misc/env
rename to tests/misc/env.sh
diff --git a/tests/misc/expand b/tests/misc/expand.pl
similarity index 100%
rename from tests/misc/expand
rename to tests/misc/expand.pl
diff --git a/tests/misc/expr b/tests/misc/expr.pl
similarity index 100%
rename from tests/misc/expr
rename to tests/misc/expr.pl
diff --git a/tests/misc/factor b/tests/misc/factor.pl
similarity index 100%
rename from tests/misc/factor
rename to tests/misc/factor.pl
diff --git a/tests/misc/false-status b/tests/misc/false-status.sh
similarity index 100%
rename from tests/misc/false-status
rename to tests/misc/false-status.sh
diff --git a/tests/misc/fold b/tests/misc/fold.pl
similarity index 100%
rename from tests/misc/fold
rename to tests/misc/fold.pl
diff --git a/tests/misc/groups-dash b/tests/misc/groups-dash.sh
similarity index 100%
rename from tests/misc/groups-dash
rename to tests/misc/groups-dash.sh
diff --git a/tests/misc/groups-version b/tests/misc/groups-version.sh
similarity index 100%
rename from tests/misc/groups-version
rename to tests/misc/groups-version.sh
diff --git a/tests/misc/head-c b/tests/misc/head-c.sh
similarity index 100%
rename from tests/misc/head-c
rename to tests/misc/head-c.sh
diff --git a/tests/misc/head-elide-tail b/tests/misc/head-elide-tail.pl
similarity index 100%
rename from tests/misc/head-elide-tail
rename to tests/misc/head-elide-tail.pl
diff --git a/tests/misc/head-pos b/tests/misc/head-pos.sh
similarity index 100%
rename from tests/misc/head-pos
rename to tests/misc/head-pos.sh
diff --git a/tests/misc/head b/tests/misc/head.pl
similarity index 100%
rename from tests/misc/head
rename to tests/misc/head.pl
diff --git a/tests/misc/help-version b/tests/misc/help-version.sh
similarity index 100%
rename from tests/misc/help-version
rename to tests/misc/help-version.sh
diff --git a/tests/misc/id-context b/tests/misc/id-context.sh
similarity index 100%
rename from tests/misc/id-context
rename to tests/misc/id-context.sh
diff --git a/tests/misc/id-groups b/tests/misc/id-groups.sh
similarity index 100%
rename from tests/misc/id-groups
rename to tests/misc/id-groups.sh
diff --git a/tests/misc/id-setgid b/tests/misc/id-setgid.sh
similarity index 100%
rename from tests/misc/id-setgid
rename to tests/misc/id-setgid.sh
diff --git a/tests/misc/invalid-opt b/tests/misc/invalid-opt.pl
similarity index 100%
rename from tests/misc/invalid-opt
rename to tests/misc/invalid-opt.pl
diff --git a/tests/misc/join b/tests/misc/join.pl
similarity index 100%
rename from tests/misc/join
rename to tests/misc/join.pl
diff --git a/tests/misc/ls-misc b/tests/misc/ls-misc.pl
similarity index 100%
rename from tests/misc/ls-misc
rename to tests/misc/ls-misc.pl
diff --git a/tests/misc/ls-time b/tests/misc/ls-time.sh
similarity index 100%
rename from tests/misc/ls-time
rename to tests/misc/ls-time.sh
diff --git a/tests/misc/md5sum-bsd b/tests/misc/md5sum-bsd.sh
similarity index 100%
rename from tests/misc/md5sum-bsd
rename to tests/misc/md5sum-bsd.sh
diff --git a/tests/misc/md5sum-newline b/tests/misc/md5sum-newline.pl
similarity index 100%
rename from tests/misc/md5sum-newline
rename to tests/misc/md5sum-newline.pl
diff --git a/tests/misc/md5sum-parallel b/tests/misc/md5sum-parallel.sh
similarity index 100%
rename from tests/misc/md5sum-parallel
rename to tests/misc/md5sum-parallel.sh
diff --git a/tests/misc/md5sum b/tests/misc/md5sum.pl
similarity index 100%
rename from tests/misc/md5sum
rename to tests/misc/md5sum.pl
diff --git a/tests/misc/mknod b/tests/misc/mknod.sh
similarity index 100%
rename from tests/misc/mknod
rename to tests/misc/mknod.sh
diff --git a/tests/misc/mktemp b/tests/misc/mktemp.pl
similarity index 100%
rename from tests/misc/mktemp
rename to tests/misc/mktemp.pl
diff --git a/tests/misc/nice-fail b/tests/misc/nice-fail.sh
similarity index 100%
rename from tests/misc/nice-fail
rename to tests/misc/nice-fail.sh
diff --git a/tests/misc/nice b/tests/misc/nice.sh
similarity index 100%
rename from tests/misc/nice
rename to tests/misc/nice.sh
diff --git a/tests/misc/nl b/tests/misc/nl.sh
similarity index 100%
rename from tests/misc/nl
rename to tests/misc/nl.sh
diff --git a/tests/misc/nohup b/tests/misc/nohup.sh
similarity index 100%
rename from tests/misc/nohup
rename to tests/misc/nohup.sh
diff --git a/tests/misc/nproc-avail b/tests/misc/nproc-avail.sh
similarity index 100%
rename from tests/misc/nproc-avail
rename to tests/misc/nproc-avail.sh
diff --git a/tests/misc/nproc-positive b/tests/misc/nproc-positive.sh
similarity index 100%
rename from tests/misc/nproc-positive
rename to tests/misc/nproc-positive.sh
diff --git a/tests/misc/od-N b/tests/misc/od-N.sh
similarity index 100%
rename from tests/misc/od-N
rename to tests/misc/od-N.sh
diff --git a/tests/misc/od-float b/tests/misc/od-float.sh
similarity index 100%
rename from tests/misc/od-float
rename to tests/misc/od-float.sh
diff --git a/tests/misc/od-multiple-t b/tests/misc/od-multiple-t.sh
similarity index 100%
rename from tests/misc/od-multiple-t
rename to tests/misc/od-multiple-t.sh
diff --git a/tests/misc/od-x8 b/tests/misc/od-x8.sh
similarity index 100%
rename from tests/misc/od-x8
rename to tests/misc/od-x8.sh
diff --git a/tests/misc/od b/tests/misc/od.pl
similarity index 100%
rename from tests/misc/od
rename to tests/misc/od.pl
diff --git a/tests/misc/paste b/tests/misc/paste.pl
similarity index 100%
rename from tests/misc/paste
rename to tests/misc/paste.pl
diff --git a/tests/misc/pathchk1 b/tests/misc/pathchk1.sh
similarity index 100%
rename from tests/misc/pathchk1
rename to tests/misc/pathchk1.sh
diff --git a/tests/misc/pr b/tests/misc/pr.pl
similarity index 100%
rename from tests/misc/pr
rename to tests/misc/pr.pl
diff --git a/tests/misc/printenv b/tests/misc/printenv.sh
similarity index 100%
rename from tests/misc/printenv
rename to tests/misc/printenv.sh
diff --git a/tests/misc/printf-cov b/tests/misc/printf-cov.pl
similarity index 100%
rename from tests/misc/printf-cov
rename to tests/misc/printf-cov.pl
diff --git a/tests/misc/printf-hex b/tests/misc/printf-hex.sh
similarity index 100%
rename from tests/misc/printf-hex
rename to tests/misc/printf-hex.sh
diff --git a/tests/misc/printf-surprise b/tests/misc/printf-surprise.sh
similarity index 100%
rename from tests/misc/printf-surprise
rename to tests/misc/printf-surprise.sh
diff --git a/tests/misc/printf b/tests/misc/printf.sh
similarity index 100%
rename from tests/misc/printf
rename to tests/misc/printf.sh
diff --git a/tests/misc/ptx-overrun b/tests/misc/ptx-overrun.sh
similarity index 100%
rename from tests/misc/ptx-overrun
rename to tests/misc/ptx-overrun.sh
diff --git a/tests/misc/ptx b/tests/misc/ptx.pl
similarity index 100%
rename from tests/misc/ptx
rename to tests/misc/ptx.pl
diff --git a/tests/misc/pwd-long b/tests/misc/pwd-long.sh
similarity index 100%
rename from tests/misc/pwd-long
rename to tests/misc/pwd-long.sh
diff --git a/tests/misc/pwd-option b/tests/misc/pwd-option.sh
similarity index 100%
rename from tests/misc/pwd-option
rename to tests/misc/pwd-option.sh
diff --git a/tests/misc/readlink-fp-loop b/tests/misc/readlink-fp-loop.sh
similarity index 100%
rename from tests/misc/readlink-fp-loop
rename to tests/misc/readlink-fp-loop.sh
diff --git a/tests/misc/readlink-root b/tests/misc/readlink-root.sh
similarity index 100%
rename from tests/misc/readlink-root
rename to tests/misc/readlink-root.sh
diff --git a/tests/misc/realpath b/tests/misc/realpath.sh
similarity index 100%
rename from tests/misc/realpath
rename to tests/misc/realpath.sh
diff --git a/tests/misc/runcon-no-reorder b/tests/misc/runcon-no-reorder.sh
similarity index 100%
rename from tests/misc/runcon-no-reorder
rename to tests/misc/runcon-no-reorder.sh
diff --git a/tests/misc/selinux b/tests/misc/selinux.sh
similarity index 100%
rename from tests/misc/selinux
rename to tests/misc/selinux.sh
diff --git a/tests/misc/seq-long-double b/tests/misc/seq-long-double.sh
similarity index 100%
rename from tests/misc/seq-long-double
rename to tests/misc/seq-long-double.sh
diff --git a/tests/misc/seq b/tests/misc/seq.pl
similarity index 100%
rename from tests/misc/seq
rename to tests/misc/seq.pl
diff --git a/tests/misc/sha1sum-vec b/tests/misc/sha1sum-vec.pl
similarity index 100%
rename from tests/misc/sha1sum-vec
rename to tests/misc/sha1sum-vec.pl
diff --git a/tests/misc/sha1sum b/tests/misc/sha1sum.pl
similarity index 100%
rename from tests/misc/sha1sum
rename to tests/misc/sha1sum.pl
diff --git a/tests/misc/sha224sum b/tests/misc/sha224sum.pl
similarity index 100%
rename from tests/misc/sha224sum
rename to tests/misc/sha224sum.pl
diff --git a/tests/misc/sha256sum b/tests/misc/sha256sum.pl
similarity index 100%
rename from tests/misc/sha256sum
rename to tests/misc/sha256sum.pl
diff --git a/tests/misc/sha384sum b/tests/misc/sha384sum.pl
similarity index 100%
rename from tests/misc/sha384sum
rename to tests/misc/sha384sum.pl
diff --git a/tests/misc/sha512sum b/tests/misc/sha512sum.pl
similarity index 100%
rename from tests/misc/sha512sum
rename to tests/misc/sha512sum.pl
diff --git a/tests/misc/shred-exact b/tests/misc/shred-exact.sh
similarity index 100%
rename from tests/misc/shred-exact
rename to tests/misc/shred-exact.sh
diff --git a/tests/misc/shred-passes b/tests/misc/shred-passes.sh
similarity index 100%
rename from tests/misc/shred-passes
rename to tests/misc/shred-passes.sh
diff --git a/tests/misc/shred-remove b/tests/misc/shred-remove.sh
similarity index 100%
rename from tests/misc/shred-remove
rename to tests/misc/shred-remove.sh
diff --git a/tests/misc/shuf b/tests/misc/shuf.sh
similarity index 100%
rename from tests/misc/shuf
rename to tests/misc/shuf.sh
diff --git a/tests/misc/sort-NaN-infloop b/tests/misc/sort-NaN-infloop.sh
similarity index 100%
rename from tests/misc/sort-NaN-infloop
rename to tests/misc/sort-NaN-infloop.sh
diff --git a/tests/misc/sort-benchmark-random b/tests/misc/sort-benchmark-random.sh
similarity index 100%
rename from tests/misc/sort-benchmark-random
rename to tests/misc/sort-benchmark-random.sh
diff --git a/tests/misc/sort-compress-hang b/tests/misc/sort-compress-hang.sh
similarity index 100%
rename from tests/misc/sort-compress-hang
rename to tests/misc/sort-compress-hang.sh
diff --git a/tests/misc/sort-compress-proc b/tests/misc/sort-compress-proc.sh
similarity index 100%
rename from tests/misc/sort-compress-proc
rename to tests/misc/sort-compress-proc.sh
diff --git a/tests/misc/sort-compress b/tests/misc/sort-compress.sh
similarity index 100%
rename from tests/misc/sort-compress
rename to tests/misc/sort-compress.sh
diff --git a/tests/misc/sort-continue b/tests/misc/sort-continue.sh
similarity index 100%
rename from tests/misc/sort-continue
rename to tests/misc/sort-continue.sh
diff --git a/tests/misc/sort-debug-keys b/tests/misc/sort-debug-keys.sh
similarity index 100%
rename from tests/misc/sort-debug-keys
rename to tests/misc/sort-debug-keys.sh
diff --git a/tests/misc/sort-debug-warn b/tests/misc/sort-debug-warn.sh
similarity index 100%
rename from tests/misc/sort-debug-warn
rename to tests/misc/sort-debug-warn.sh
diff --git a/tests/misc/sort-discrim b/tests/misc/sort-discrim.sh
similarity index 100%
rename from tests/misc/sort-discrim
rename to tests/misc/sort-discrim.sh
diff --git a/tests/misc/sort-exit-early b/tests/misc/sort-exit-early.sh
similarity index 100%
rename from tests/misc/sort-exit-early
rename to tests/misc/sort-exit-early.sh
diff --git a/tests/misc/sort-files0-from b/tests/misc/sort-files0-from.pl
similarity index 100%
rename from tests/misc/sort-files0-from
rename to tests/misc/sort-files0-from.pl
diff --git a/tests/misc/sort-float b/tests/misc/sort-float.sh
similarity index 100%
rename from tests/misc/sort-float
rename to tests/misc/sort-float.sh
diff --git a/tests/misc/sort-merge-fdlimit b/tests/misc/sort-merge-fdlimit.sh
similarity index 100%
rename from tests/misc/sort-merge-fdlimit
rename to tests/misc/sort-merge-fdlimit.sh
diff --git a/tests/misc/sort-merge b/tests/misc/sort-merge.pl
similarity index 100%
rename from tests/misc/sort-merge
rename to tests/misc/sort-merge.pl
diff --git a/tests/misc/sort-month b/tests/misc/sort-month.sh
similarity index 100%
rename from tests/misc/sort-month
rename to tests/misc/sort-month.sh
diff --git a/tests/misc/sort-rand b/tests/misc/sort-rand.sh
similarity index 100%
rename from tests/misc/sort-rand
rename to tests/misc/sort-rand.sh
diff --git a/tests/misc/sort-spinlock-abuse b/tests/misc/sort-spinlock-abuse.sh
similarity index 100%
rename from tests/misc/sort-spinlock-abuse
rename to tests/misc/sort-spinlock-abuse.sh
diff --git a/tests/misc/sort-stale-thread-mem b/tests/misc/sort-stale-thread-mem.sh
similarity index 100%
rename from tests/misc/sort-stale-thread-mem
rename to tests/misc/sort-stale-thread-mem.sh
diff --git a/tests/misc/sort-u-FMR b/tests/misc/sort-u-FMR.sh
similarity index 100%
rename from tests/misc/sort-u-FMR
rename to tests/misc/sort-u-FMR.sh
diff --git a/tests/misc/sort-unique-segv b/tests/misc/sort-unique-segv.sh
similarity index 100%
rename from tests/misc/sort-unique-segv
rename to tests/misc/sort-unique-segv.sh
diff --git a/tests/misc/sort-unique b/tests/misc/sort-unique.sh
similarity index 100%
rename from tests/misc/sort-unique
rename to tests/misc/sort-unique.sh
diff --git a/tests/misc/sort-version b/tests/misc/sort-version.sh
similarity index 100%
rename from tests/misc/sort-version
rename to tests/misc/sort-version.sh
diff --git a/tests/misc/sort b/tests/misc/sort.pl
similarity index 100%
rename from tests/misc/sort
rename to tests/misc/sort.pl
diff --git a/tests/misc/stat-birthtime b/tests/misc/stat-birthtime.sh
similarity index 100%
rename from tests/misc/stat-birthtime
rename to tests/misc/stat-birthtime.sh
diff --git a/tests/misc/stat-fmt b/tests/misc/stat-fmt.sh
similarity index 100%
rename from tests/misc/stat-fmt
rename to tests/misc/stat-fmt.sh
diff --git a/tests/misc/stat-hyphen b/tests/misc/stat-hyphen.sh
similarity index 100%
rename from tests/misc/stat-hyphen
rename to tests/misc/stat-hyphen.sh
diff --git a/tests/misc/stat-mount b/tests/misc/stat-mount.sh
similarity index 100%
rename from tests/misc/stat-mount
rename to tests/misc/stat-mount.sh
diff --git a/tests/misc/stat-nanoseconds b/tests/misc/stat-nanoseconds.sh
similarity index 100%
rename from tests/misc/stat-nanoseconds
rename to tests/misc/stat-nanoseconds.sh
diff --git a/tests/misc/stat-printf b/tests/misc/stat-printf.pl
similarity index 100%
rename from tests/misc/stat-printf
rename to tests/misc/stat-printf.pl
diff --git a/tests/misc/stat-slash b/tests/misc/stat-slash.sh
similarity index 100%
rename from tests/misc/stat-slash
rename to tests/misc/stat-slash.sh
diff --git a/tests/misc/stdbuf b/tests/misc/stdbuf.sh
similarity index 100%
rename from tests/misc/stdbuf
rename to tests/misc/stdbuf.sh
diff --git a/tests/misc/stty-invalid b/tests/misc/stty-invalid.sh
similarity index 100%
rename from tests/misc/stty-invalid
rename to tests/misc/stty-invalid.sh
diff --git a/tests/misc/stty-pairs b/tests/misc/stty-pairs.sh
similarity index 100%
rename from tests/misc/stty-pairs
rename to tests/misc/stty-pairs.sh
diff --git a/tests/misc/stty-row-col b/tests/misc/stty-row-col.sh
similarity index 100%
rename from tests/misc/stty-row-col
rename to tests/misc/stty-row-col.sh
diff --git a/tests/misc/stty b/tests/misc/stty.sh
similarity index 100%
rename from tests/misc/stty
rename to tests/misc/stty.sh
diff --git a/tests/misc/sum-sysv b/tests/misc/sum-sysv.sh
similarity index 100%
rename from tests/misc/sum-sysv
rename to tests/misc/sum-sysv.sh
diff --git a/tests/misc/sum b/tests/misc/sum.pl
similarity index 100%
rename from tests/misc/sum
rename to tests/misc/sum.pl
diff --git a/tests/misc/tac-2-nonseekable b/tests/misc/tac-2-nonseekable.sh
similarity index 100%
rename from tests/misc/tac-2-nonseekable
rename to tests/misc/tac-2-nonseekable.sh
diff --git a/tests/misc/tac-continue b/tests/misc/tac-continue.sh
similarity index 100%
rename from tests/misc/tac-continue
rename to tests/misc/tac-continue.sh
diff --git a/tests/misc/tac b/tests/misc/tac.pl
similarity index 100%
rename from tests/misc/tac
rename to tests/misc/tac.pl
diff --git a/tests/misc/tail b/tests/misc/tail.pl
similarity index 100%
rename from tests/misc/tail
rename to tests/misc/tail.pl
diff --git a/tests/misc/tee-dash b/tests/misc/tee-dash.sh
similarity index 100%
rename from tests/misc/tee-dash
rename to tests/misc/tee-dash.sh
diff --git a/tests/misc/tee b/tests/misc/tee.sh
similarity index 100%
rename from tests/misc/tee
rename to tests/misc/tee.sh
diff --git a/tests/misc/test-diag b/tests/misc/test-diag.pl
similarity index 100%
rename from tests/misc/test-diag
rename to tests/misc/test-diag.pl
diff --git a/tests/misc/test b/tests/misc/test.pl
similarity index 100%
rename from tests/misc/test
rename to tests/misc/test.pl
diff --git a/tests/misc/timeout-group b/tests/misc/timeout-group.sh
similarity index 100%
rename from tests/misc/timeout-group
rename to tests/misc/timeout-group.sh
diff --git a/tests/misc/timeout-parameters b/tests/misc/timeout-parameters.sh
similarity index 100%
rename from tests/misc/timeout-parameters
rename to tests/misc/timeout-parameters.sh
diff --git a/tests/misc/timeout b/tests/misc/timeout.sh
similarity index 100%
rename from tests/misc/timeout
rename to tests/misc/timeout.sh
diff --git a/tests/misc/tr-case-class b/tests/misc/tr-case-class.sh
similarity index 100%
rename from tests/misc/tr-case-class
rename to tests/misc/tr-case-class.sh
diff --git a/tests/misc/tr b/tests/misc/tr.pl
similarity index 100%
rename from tests/misc/tr
rename to tests/misc/tr.pl
diff --git a/tests/misc/truncate-dangling-symlink b/tests/misc/truncate-dangling-symlink.sh
similarity index 100%
rename from tests/misc/truncate-dangling-symlink
rename to tests/misc/truncate-dangling-symlink.sh
diff --git a/tests/misc/truncate-dir-fail b/tests/misc/truncate-dir-fail.sh
similarity index 100%
rename from tests/misc/truncate-dir-fail
rename to tests/misc/truncate-dir-fail.sh
diff --git a/tests/misc/truncate-fail-diag b/tests/misc/truncate-fail-diag.sh
similarity index 100%
rename from tests/misc/truncate-fail-diag
rename to tests/misc/truncate-fail-diag.sh
diff --git a/tests/misc/truncate-fifo b/tests/misc/truncate-fifo.sh
similarity index 100%
rename from tests/misc/truncate-fifo
rename to tests/misc/truncate-fifo.sh
diff --git a/tests/misc/truncate-no-create-missing b/tests/misc/truncate-no-create-missing.sh
similarity index 100%
rename from tests/misc/truncate-no-create-missing
rename to tests/misc/truncate-no-create-missing.sh
diff --git a/tests/misc/truncate-overflow b/tests/misc/truncate-overflow.sh
similarity index 100%
rename from tests/misc/truncate-overflow
rename to tests/misc/truncate-overflow.sh
diff --git a/tests/misc/truncate-owned-by-other b/tests/misc/truncate-owned-by-other.sh
similarity index 100%
rename from tests/misc/truncate-owned-by-other
rename to tests/misc/truncate-owned-by-other.sh
diff --git a/tests/misc/truncate-parameters b/tests/misc/truncate-parameters.sh
similarity index 100%
rename from tests/misc/truncate-parameters
rename to tests/misc/truncate-parameters.sh
diff --git a/tests/misc/truncate-relative b/tests/misc/truncate-relative.sh
similarity index 100%
rename from tests/misc/truncate-relative
rename to tests/misc/truncate-relative.sh
diff --git a/tests/misc/tsort b/tests/misc/tsort.pl
similarity index 100%
rename from tests/misc/tsort
rename to tests/misc/tsort.pl
diff --git a/tests/misc/tty-eof b/tests/misc/tty-eof.pl
similarity index 100%
rename from tests/misc/tty-eof
rename to tests/misc/tty-eof.pl
diff --git a/tests/misc/unexpand b/tests/misc/unexpand.pl
similarity index 100%
rename from tests/misc/unexpand
rename to tests/misc/unexpand.pl
diff --git a/tests/misc/uniq-perf b/tests/misc/uniq-perf.sh
similarity index 100%
rename from tests/misc/uniq-perf
rename to tests/misc/uniq-perf.sh
diff --git a/tests/misc/uniq b/tests/misc/uniq.pl
similarity index 100%
rename from tests/misc/uniq
rename to tests/misc/uniq.pl
diff --git a/tests/misc/wc-files0-from b/tests/misc/wc-files0-from.pl
similarity index 100%
rename from tests/misc/wc-files0-from
rename to tests/misc/wc-files0-from.pl
diff --git a/tests/misc/wc-files0 b/tests/misc/wc-files0.sh
similarity index 100%
rename from tests/misc/wc-files0
rename to tests/misc/wc-files0.sh
diff --git a/tests/misc/wc-parallel b/tests/misc/wc-parallel.sh
similarity index 100%
rename from tests/misc/wc-parallel
rename to tests/misc/wc-parallel.sh
diff --git a/tests/misc/wc b/tests/misc/wc.pl
similarity index 100%
rename from tests/misc/wc
rename to tests/misc/wc.pl
diff --git a/tests/misc/xattr b/tests/misc/xattr.sh
similarity index 100%
rename from tests/misc/xattr
rename to tests/misc/xattr.sh
diff --git a/tests/misc/xstrtol b/tests/misc/xstrtol.pl
similarity index 100%
rename from tests/misc/xstrtol
rename to tests/misc/xstrtol.pl
diff --git a/tests/mkdir/p-1 b/tests/mkdir/p-1.sh
similarity index 100%
rename from tests/mkdir/p-1
rename to tests/mkdir/p-1.sh
diff --git a/tests/mkdir/p-2 b/tests/mkdir/p-2.sh
similarity index 100%
rename from tests/mkdir/p-2
rename to tests/mkdir/p-2.sh
diff --git a/tests/mkdir/p-3 b/tests/mkdir/p-3.sh
similarity index 100%
rename from tests/mkdir/p-3
rename to tests/mkdir/p-3.sh
diff --git a/tests/mkdir/p-slashdot b/tests/mkdir/p-slashdot.sh
similarity index 100%
rename from tests/mkdir/p-slashdot
rename to tests/mkdir/p-slashdot.sh
diff --git a/tests/mkdir/p-thru-slink b/tests/mkdir/p-thru-slink.sh
similarity index 100%
rename from tests/mkdir/p-thru-slink
rename to tests/mkdir/p-thru-slink.sh
diff --git a/tests/mkdir/p-v b/tests/mkdir/p-v.sh
similarity index 100%
rename from tests/mkdir/p-v
rename to tests/mkdir/p-v.sh
diff --git a/tests/mkdir/parents b/tests/mkdir/parents.sh
similarity index 100%
rename from tests/mkdir/parents
rename to tests/mkdir/parents.sh
diff --git a/tests/mkdir/perm b/tests/mkdir/perm.sh
similarity index 100%
rename from tests/mkdir/perm
rename to tests/mkdir/perm.sh
diff --git a/tests/mkdir/selinux b/tests/mkdir/selinux.sh
similarity index 100%
rename from tests/mkdir/selinux
rename to tests/mkdir/selinux.sh
diff --git a/tests/mkdir/special-1 b/tests/mkdir/special-1.sh
similarity index 100%
rename from tests/mkdir/special-1
rename to tests/mkdir/special-1.sh
diff --git a/tests/mkdir/t-slash b/tests/mkdir/t-slash.sh
similarity index 100%
rename from tests/mkdir/t-slash
rename to tests/mkdir/t-slash.sh
diff --git a/tests/mkdir/writable-under-readonly b/tests/mkdir/writable-under-readonly.sh
similarity index 100%
rename from tests/mkdir/writable-under-readonly
rename to tests/mkdir/writable-under-readonly.sh
diff --git a/tests/mv/acl b/tests/mv/acl.sh
similarity index 100%
rename from tests/mv/acl
rename to tests/mv/acl.sh
diff --git a/tests/mv/atomic b/tests/mv/atomic.sh
similarity index 100%
rename from tests/mv/atomic
rename to tests/mv/atomic.sh
diff --git a/tests/mv/atomic2 b/tests/mv/atomic2.sh
similarity index 100%
rename from tests/mv/atomic2
rename to tests/mv/atomic2.sh
diff --git a/tests/mv/backup-dir b/tests/mv/backup-dir.sh
similarity index 100%
rename from tests/mv/backup-dir
rename to tests/mv/backup-dir.sh
diff --git a/tests/mv/backup-is-src b/tests/mv/backup-is-src.sh
similarity index 100%
rename from tests/mv/backup-is-src
rename to tests/mv/backup-is-src.sh
diff --git a/tests/mv/childproof b/tests/mv/childproof.sh
similarity index 100%
rename from tests/mv/childproof
rename to tests/mv/childproof.sh
diff --git a/tests/mv/diag b/tests/mv/diag.sh
similarity index 100%
rename from tests/mv/diag
rename to tests/mv/diag.sh
diff --git a/tests/mv/dir-file b/tests/mv/dir-file.sh
similarity index 100%
rename from tests/mv/dir-file
rename to tests/mv/dir-file.sh
diff --git a/tests/mv/dir2dir b/tests/mv/dir2dir.sh
similarity index 100%
rename from tests/mv/dir2dir
rename to tests/mv/dir2dir.sh
diff --git a/tests/mv/dup-source b/tests/mv/dup-source.sh
similarity index 100%
rename from tests/mv/dup-source
rename to tests/mv/dup-source.sh
diff --git a/tests/mv/force b/tests/mv/force.sh
similarity index 100%
rename from tests/mv/force
rename to tests/mv/force.sh
diff --git a/tests/mv/hard-2 b/tests/mv/hard-2.sh
similarity index 100%
rename from tests/mv/hard-2
rename to tests/mv/hard-2.sh
diff --git a/tests/mv/hard-3 b/tests/mv/hard-3.sh
similarity index 100%
rename from tests/mv/hard-3
rename to tests/mv/hard-3.sh
diff --git a/tests/mv/hard-4 b/tests/mv/hard-4.sh
similarity index 100%
rename from tests/mv/hard-4
rename to tests/mv/hard-4.sh
diff --git a/tests/mv/hard-link-1 b/tests/mv/hard-link-1.sh
similarity index 100%
rename from tests/mv/hard-link-1
rename to tests/mv/hard-link-1.sh
diff --git a/tests/mv/hard-verbose b/tests/mv/hard-verbose.sh
similarity index 100%
rename from tests/mv/hard-verbose
rename to tests/mv/hard-verbose.sh
diff --git a/tests/mv/i-1 b/tests/mv/i-1.pl
similarity index 100%
rename from tests/mv/i-1
rename to tests/mv/i-1.pl
diff --git a/tests/mv/i-2 b/tests/mv/i-2.sh
similarity index 100%
rename from tests/mv/i-2
rename to tests/mv/i-2.sh
diff --git a/tests/mv/i-3 b/tests/mv/i-3.sh
similarity index 100%
rename from tests/mv/i-3
rename to tests/mv/i-3.sh
diff --git a/tests/mv/i-4 b/tests/mv/i-4.sh
similarity index 100%
rename from tests/mv/i-4
rename to tests/mv/i-4.sh
diff --git a/tests/mv/i-5 b/tests/mv/i-5.sh
similarity index 100%
rename from tests/mv/i-5
rename to tests/mv/i-5.sh
diff --git a/tests/mv/i-link-no b/tests/mv/i-link-no.sh
similarity index 100%
rename from tests/mv/i-link-no
rename to tests/mv/i-link-no.sh
diff --git a/tests/mv/into-self-2 b/tests/mv/into-self-2.sh
similarity index 100%
rename from tests/mv/into-self-2
rename to tests/mv/into-self-2.sh
diff --git a/tests/mv/into-self-3 b/tests/mv/into-self-3.sh
similarity index 100%
rename from tests/mv/into-self-3
rename to tests/mv/into-self-3.sh
diff --git a/tests/mv/into-self-4 b/tests/mv/into-self-4.sh
similarity index 100%
rename from tests/mv/into-self-4
rename to tests/mv/into-self-4.sh
diff --git a/tests/mv/into-self b/tests/mv/into-self.sh
similarity index 100%
rename from tests/mv/into-self
rename to tests/mv/into-self.sh
diff --git a/tests/mv/leak-fd b/tests/mv/leak-fd.sh
similarity index 100%
rename from tests/mv/leak-fd
rename to tests/mv/leak-fd.sh
diff --git a/tests/mv/mv-n b/tests/mv/mv-n.sh
similarity index 100%
rename from tests/mv/mv-n
rename to tests/mv/mv-n.sh
diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1.sh
similarity index 100%
rename from tests/mv/mv-special-1
rename to tests/mv/mv-special-1.sh
diff --git a/tests/mv/no-target-dir b/tests/mv/no-target-dir.sh
similarity index 100%
rename from tests/mv/no-target-dir
rename to tests/mv/no-target-dir.sh
diff --git a/tests/mv/part-fail b/tests/mv/part-fail.sh
similarity index 100%
rename from tests/mv/part-fail
rename to tests/mv/part-fail.sh
diff --git a/tests/mv/part-hardlink b/tests/mv/part-hardlink.sh
similarity index 100%
rename from tests/mv/part-hardlink
rename to tests/mv/part-hardlink.sh
diff --git a/tests/mv/part-rename b/tests/mv/part-rename.sh
similarity index 100%
rename from tests/mv/part-rename
rename to tests/mv/part-rename.sh
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink.sh
similarity index 100%
rename from tests/mv/part-symlink
rename to tests/mv/part-symlink.sh
diff --git a/tests/mv/partition-perm b/tests/mv/partition-perm.sh
similarity index 100%
rename from tests/mv/partition-perm
rename to tests/mv/partition-perm.sh
diff --git a/tests/mv/perm-1 b/tests/mv/perm-1.sh
similarity index 100%
rename from tests/mv/perm-1
rename to tests/mv/perm-1.sh
diff --git a/tests/mv/sticky-to-xpart b/tests/mv/sticky-to-xpart.sh
similarity index 100%
rename from tests/mv/sticky-to-xpart
rename to tests/mv/sticky-to-xpart.sh
diff --git a/tests/mv/symlink-onto-hardlink-to-self b/tests/mv/symlink-onto-hardlink-to-self.sh
similarity index 100%
rename from tests/mv/symlink-onto-hardlink-to-self
rename to tests/mv/symlink-onto-hardlink-to-self.sh
diff --git a/tests/mv/symlink-onto-hardlink b/tests/mv/symlink-onto-hardlink.sh
similarity index 100%
rename from tests/mv/symlink-onto-hardlink
rename to tests/mv/symlink-onto-hardlink.sh
diff --git a/tests/mv/to-symlink b/tests/mv/to-symlink.sh
similarity index 100%
rename from tests/mv/to-symlink
rename to tests/mv/to-symlink.sh
diff --git a/tests/mv/trailing-slash b/tests/mv/trailing-slash.sh
similarity index 100%
rename from tests/mv/trailing-slash
rename to tests/mv/trailing-slash.sh
diff --git a/tests/mv/update b/tests/mv/update.sh
similarity index 100%
rename from tests/mv/update
rename to tests/mv/update.sh
diff --git a/tests/pr/pr-tests b/tests/pr/pr-tests.pl
similarity index 100%
rename from tests/pr/pr-tests
rename to tests/pr/pr-tests.pl
diff --git a/tests/readlink/can-e b/tests/readlink/can-e.sh
similarity index 100%
rename from tests/readlink/can-e
rename to tests/readlink/can-e.sh
diff --git a/tests/readlink/can-f b/tests/readlink/can-f.sh
similarity index 100%
rename from tests/readlink/can-f
rename to tests/readlink/can-f.sh
diff --git a/tests/readlink/can-m b/tests/readlink/can-m.sh
similarity index 100%
rename from tests/readlink/can-m
rename to tests/readlink/can-m.sh
diff --git a/tests/readlink/rl-1 b/tests/readlink/rl-1.sh
similarity index 100%
rename from tests/readlink/rl-1
rename to tests/readlink/rl-1.sh
diff --git a/tests/rm/cycle b/tests/rm/cycle.sh
similarity index 100%
rename from tests/rm/cycle
rename to tests/rm/cycle.sh
diff --git a/tests/rm/d-1 b/tests/rm/d-1.sh
similarity index 100%
rename from tests/rm/d-1
rename to tests/rm/d-1.sh
diff --git a/tests/rm/d-2 b/tests/rm/d-2.sh
similarity index 100%
rename from tests/rm/d-2
rename to tests/rm/d-2.sh
diff --git a/tests/rm/d-3 b/tests/rm/d-3.sh
similarity index 100%
rename from tests/rm/d-3
rename to tests/rm/d-3.sh
diff --git a/tests/rm/dangling-symlink b/tests/rm/dangling-symlink.sh
similarity index 100%
rename from tests/rm/dangling-symlink
rename to tests/rm/dangling-symlink.sh
diff --git a/tests/rm/deep-1 b/tests/rm/deep-1.sh
similarity index 100%
rename from tests/rm/deep-1
rename to tests/rm/deep-1.sh
diff --git a/tests/rm/deep-2 b/tests/rm/deep-2.sh
similarity index 100%
rename from tests/rm/deep-2
rename to tests/rm/deep-2.sh
diff --git a/tests/rm/dir-no-w b/tests/rm/dir-no-w.sh
similarity index 100%
rename from tests/rm/dir-no-w
rename to tests/rm/dir-no-w.sh
diff --git a/tests/rm/dir-nonrecur b/tests/rm/dir-nonrecur.sh
similarity index 100%
rename from tests/rm/dir-nonrecur
rename to tests/rm/dir-nonrecur.sh
diff --git a/tests/rm/dot-rel b/tests/rm/dot-rel.sh
similarity index 100%
rename from tests/rm/dot-rel
rename to tests/rm/dot-rel.sh
diff --git a/tests/rm/empty-inacc b/tests/rm/empty-inacc.sh
similarity index 100%
rename from tests/rm/empty-inacc
rename to tests/rm/empty-inacc.sh
diff --git a/tests/rm/empty-name b/tests/rm/empty-name.pl
similarity index 100%
rename from tests/rm/empty-name
rename to tests/rm/empty-name.pl
diff --git a/tests/rm/ext3-perf b/tests/rm/ext3-perf.sh
similarity index 100%
rename from tests/rm/ext3-perf
rename to tests/rm/ext3-perf.sh
diff --git a/tests/rm/f-1 b/tests/rm/f-1.sh
similarity index 100%
rename from tests/rm/f-1
rename to tests/rm/f-1.sh
diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm.sh
similarity index 100%
rename from tests/rm/fail-2eperm
rename to tests/rm/fail-2eperm.sh
diff --git a/tests/rm/fail-eacces b/tests/rm/fail-eacces.sh
similarity index 100%
rename from tests/rm/fail-eacces
rename to tests/rm/fail-eacces.sh
diff --git a/tests/rm/hash b/tests/rm/hash.sh
similarity index 100%
rename from tests/rm/hash
rename to tests/rm/hash.sh
diff --git a/tests/rm/i-1 b/tests/rm/i-1.sh
similarity index 100%
rename from tests/rm/i-1
rename to tests/rm/i-1.sh
diff --git a/tests/rm/i-never b/tests/rm/i-never.sh
similarity index 100%
rename from tests/rm/i-never
rename to tests/rm/i-never.sh
diff --git a/tests/rm/i-no-r b/tests/rm/i-no-r.sh
similarity index 100%
rename from tests/rm/i-no-r
rename to tests/rm/i-no-r.sh
diff --git a/tests/rm/ignorable b/tests/rm/ignorable.sh
similarity index 100%
rename from tests/rm/ignorable
rename to tests/rm/ignorable.sh
diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible.sh
similarity index 100%
rename from tests/rm/inaccessible
rename to tests/rm/inaccessible.sh
diff --git a/tests/rm/interactive-always b/tests/rm/interactive-always.sh
similarity index 100%
rename from tests/rm/interactive-always
rename to tests/rm/interactive-always.sh
diff --git a/tests/rm/interactive-once b/tests/rm/interactive-once.sh
similarity index 100%
rename from tests/rm/interactive-once
rename to tests/rm/interactive-once.sh
diff --git a/tests/rm/ir-1 b/tests/rm/ir-1.sh
similarity index 100%
rename from tests/rm/ir-1
rename to tests/rm/ir-1.sh
diff --git a/tests/rm/isatty b/tests/rm/isatty.sh
similarity index 100%
rename from tests/rm/isatty
rename to tests/rm/isatty.sh
diff --git a/tests/rm/many-dir-entries-vs-OOM b/tests/rm/many-dir-entries-vs-OOM.sh
similarity index 100%
rename from tests/rm/many-dir-entries-vs-OOM
rename to tests/rm/many-dir-entries-vs-OOM.sh
diff --git a/tests/rm/no-give-up b/tests/rm/no-give-up.sh
similarity index 100%
rename from tests/rm/no-give-up
rename to tests/rm/no-give-up.sh
diff --git a/tests/rm/one-file-system b/tests/rm/one-file-system.sh
similarity index 100%
rename from tests/rm/one-file-system
rename to tests/rm/one-file-system.sh
diff --git a/tests/rm/one-file-system2 b/tests/rm/one-file-system2.sh
similarity index 100%
rename from tests/rm/one-file-system2
rename to tests/rm/one-file-system2.sh
diff --git a/tests/rm/r-1 b/tests/rm/r-1.sh
similarity index 100%
rename from tests/rm/r-1
rename to tests/rm/r-1.sh
diff --git a/tests/rm/r-2 b/tests/rm/r-2.sh
similarity index 100%
rename from tests/rm/r-2
rename to tests/rm/r-2.sh
diff --git a/tests/rm/r-3 b/tests/rm/r-3.sh
similarity index 100%
rename from tests/rm/r-3
rename to tests/rm/r-3.sh
diff --git a/tests/rm/r-4 b/tests/rm/r-4.sh
similarity index 100%
rename from tests/rm/r-4
rename to tests/rm/r-4.sh
diff --git a/tests/rm/read-only b/tests/rm/read-only.sh
similarity index 100%
rename from tests/rm/read-only
rename to tests/rm/read-only.sh
diff --git a/tests/rm/readdir-bug b/tests/rm/readdir-bug.sh
similarity index 100%
rename from tests/rm/readdir-bug
rename to tests/rm/readdir-bug.sh
diff --git a/tests/rm/rm1 b/tests/rm/rm1.sh
similarity index 100%
rename from tests/rm/rm1
rename to tests/rm/rm1.sh
diff --git a/tests/rm/rm2 b/tests/rm/rm2.sh
similarity index 100%
rename from tests/rm/rm2
rename to tests/rm/rm2.sh
diff --git a/tests/rm/rm3 b/tests/rm/rm3.sh
similarity index 100%
rename from tests/rm/rm3
rename to tests/rm/rm3.sh
diff --git a/tests/rm/rm4 b/tests/rm/rm4.sh
similarity index 100%
rename from tests/rm/rm4
rename to tests/rm/rm4.sh
diff --git a/tests/rm/rm5 b/tests/rm/rm5.sh
similarity index 100%
rename from tests/rm/rm5
rename to tests/rm/rm5.sh
diff --git a/tests/rm/sunos-1 b/tests/rm/sunos-1.sh
similarity index 100%
rename from tests/rm/sunos-1
rename to tests/rm/sunos-1.sh
diff --git a/tests/rm/unread2 b/tests/rm/unread2.sh
similarity index 100%
rename from tests/rm/unread2
rename to tests/rm/unread2.sh
diff --git a/tests/rm/unread3 b/tests/rm/unread3.sh
similarity index 100%
rename from tests/rm/unread3
rename to tests/rm/unread3.sh
diff --git a/tests/rm/unreadable b/tests/rm/unreadable.pl
similarity index 100%
rename from tests/rm/unreadable
rename to tests/rm/unreadable.pl
diff --git a/tests/rm/v-slash b/tests/rm/v-slash.sh
similarity index 100%
rename from tests/rm/v-slash
rename to tests/rm/v-slash.sh
diff --git a/tests/rmdir/fail-perm b/tests/rmdir/fail-perm.sh
similarity index 100%
rename from tests/rmdir/fail-perm
rename to tests/rmdir/fail-perm.sh
diff --git a/tests/rmdir/ignore b/tests/rmdir/ignore.sh
similarity index 100%
rename from tests/rmdir/ignore
rename to tests/rmdir/ignore.sh
diff --git a/tests/rmdir/t-slash b/tests/rmdir/t-slash.sh
similarity index 100%
rename from tests/rmdir/t-slash
rename to tests/rmdir/t-slash.sh
diff --git a/tests/split/additional-suffix b/tests/split/additional-suffix.sh
similarity index 100%
rename from tests/split/additional-suffix
rename to tests/split/additional-suffix.sh
diff --git a/tests/split/b-chunk b/tests/split/b-chunk.sh
similarity index 100%
rename from tests/split/b-chunk
rename to tests/split/b-chunk.sh
diff --git a/tests/split/fail b/tests/split/fail.sh
similarity index 100%
rename from tests/split/fail
rename to tests/split/fail.sh
diff --git a/tests/split/filter b/tests/split/filter.sh
similarity index 100%
rename from tests/split/filter
rename to tests/split/filter.sh
diff --git a/tests/split/guard-input b/tests/split/guard-input.sh
similarity index 100%
rename from tests/split/guard-input
rename to tests/split/guard-input.sh
diff --git a/tests/split/l-chunk b/tests/split/l-chunk.sh
similarity index 100%
rename from tests/split/l-chunk
rename to tests/split/l-chunk.sh
diff --git a/tests/split/lines b/tests/split/lines.sh
similarity index 100%
rename from tests/split/lines
rename to tests/split/lines.sh
diff --git a/tests/split/numeric b/tests/split/numeric.sh
similarity index 100%
rename from tests/split/numeric
rename to tests/split/numeric.sh
diff --git a/tests/split/r-chunk b/tests/split/r-chunk.sh
similarity index 100%
rename from tests/split/r-chunk
rename to tests/split/r-chunk.sh
diff --git a/tests/split/suffix-auto-length b/tests/split/suffix-auto-length.sh
similarity index 100%
rename from tests/split/suffix-auto-length
rename to tests/split/suffix-auto-length.sh
diff --git a/tests/split/suffix-length b/tests/split/suffix-length.sh
similarity index 100%
rename from tests/split/suffix-length
rename to tests/split/suffix-length.sh
diff --git a/tests/tail-2/F-vs-missing b/tests/tail-2/F-vs-missing.sh
similarity index 100%
rename from tests/tail-2/F-vs-missing
rename to tests/tail-2/F-vs-missing.sh
diff --git a/tests/tail-2/F-vs-rename b/tests/tail-2/F-vs-rename.sh
similarity index 100%
rename from tests/tail-2/F-vs-rename
rename to tests/tail-2/F-vs-rename.sh
diff --git a/tests/tail-2/append-only b/tests/tail-2/append-only.sh
similarity index 100%
rename from tests/tail-2/append-only
rename to tests/tail-2/append-only.sh
diff --git a/tests/tail-2/assert-2 b/tests/tail-2/assert-2.sh
similarity index 100%
rename from tests/tail-2/assert-2
rename to tests/tail-2/assert-2.sh
diff --git a/tests/tail-2/assert b/tests/tail-2/assert.sh
similarity index 100%
rename from tests/tail-2/assert
rename to tests/tail-2/assert.sh
diff --git a/tests/tail-2/big-4gb b/tests/tail-2/big-4gb.sh
similarity index 100%
rename from tests/tail-2/big-4gb
rename to tests/tail-2/big-4gb.sh
diff --git a/tests/tail-2/flush-initial b/tests/tail-2/flush-initial.sh
similarity index 100%
rename from tests/tail-2/flush-initial
rename to tests/tail-2/flush-initial.sh
diff --git a/tests/tail-2/follow-name b/tests/tail-2/follow-name.sh
similarity index 100%
rename from tests/tail-2/follow-name
rename to tests/tail-2/follow-name.sh
diff --git a/tests/tail-2/follow-stdin b/tests/tail-2/follow-stdin.sh
similarity index 100%
rename from tests/tail-2/follow-stdin
rename to tests/tail-2/follow-stdin.sh
diff --git a/tests/tail-2/infloop-1 b/tests/tail-2/infloop-1.sh
similarity index 100%
rename from tests/tail-2/infloop-1
rename to tests/tail-2/infloop-1.sh
diff --git a/tests/tail-2/inotify-hash-abuse b/tests/tail-2/inotify-hash-abuse.sh
similarity index 100%
rename from tests/tail-2/inotify-hash-abuse
rename to tests/tail-2/inotify-hash-abuse.sh
diff --git a/tests/tail-2/inotify-hash-abuse2 b/tests/tail-2/inotify-hash-abuse2.sh
similarity index 100%
rename from tests/tail-2/inotify-hash-abuse2
rename to tests/tail-2/inotify-hash-abuse2.sh
diff --git a/tests/tail-2/inotify-race b/tests/tail-2/inotify-race.sh
similarity index 100%
rename from tests/tail-2/inotify-race
rename to tests/tail-2/inotify-race.sh
diff --git a/tests/tail-2/inotify-rotate b/tests/tail-2/inotify-rotate.sh
similarity index 100%
rename from tests/tail-2/inotify-rotate
rename to tests/tail-2/inotify-rotate.sh
diff --git a/tests/tail-2/pid b/tests/tail-2/pid.sh
similarity index 100%
rename from tests/tail-2/pid
rename to tests/tail-2/pid.sh
diff --git a/tests/tail-2/pipe-f b/tests/tail-2/pipe-f.sh
similarity index 100%
rename from tests/tail-2/pipe-f
rename to tests/tail-2/pipe-f.sh
diff --git a/tests/tail-2/pipe-f2 b/tests/tail-2/pipe-f2.sh
similarity index 100%
rename from tests/tail-2/pipe-f2
rename to tests/tail-2/pipe-f2.sh
diff --git a/tests/tail-2/proc-ksyms b/tests/tail-2/proc-ksyms.sh
similarity index 100%
rename from tests/tail-2/proc-ksyms
rename to tests/tail-2/proc-ksyms.sh
diff --git a/tests/tail-2/start-middle b/tests/tail-2/start-middle.sh
similarity index 100%
rename from tests/tail-2/start-middle
rename to tests/tail-2/start-middle.sh
diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f.sh
similarity index 100%
rename from tests/tail-2/tail-n0f
rename to tests/tail-2/tail-n0f.sh
diff --git a/tests/tail-2/wait b/tests/tail-2/wait.sh
similarity index 100%
rename from tests/tail-2/wait
rename to tests/tail-2/wait.sh
diff --git a/tests/touch/60-seconds b/tests/touch/60-seconds.sh
similarity index 100%
rename from tests/touch/60-seconds
rename to tests/touch/60-seconds.sh
diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink.sh
similarity index 100%
rename from tests/touch/dangling-symlink
rename to tests/touch/dangling-symlink.sh
diff --git a/tests/touch/dir-1 b/tests/touch/dir-1.sh
similarity index 100%
rename from tests/touch/dir-1
rename to tests/touch/dir-1.sh
diff --git a/tests/touch/empty-file b/tests/touch/empty-file.sh
similarity index 100%
rename from tests/touch/empty-file
rename to tests/touch/empty-file.sh
diff --git a/tests/touch/fail-diag b/tests/touch/fail-diag.sh
similarity index 100%
rename from tests/touch/fail-diag
rename to tests/touch/fail-diag.sh
diff --git a/tests/touch/fifo b/tests/touch/fifo.sh
similarity index 100%
rename from tests/touch/fifo
rename to tests/touch/fifo.sh
diff --git a/tests/touch/no-create-missing b/tests/touch/no-create-missing.sh
similarity index 100%
rename from tests/touch/no-create-missing
rename to tests/touch/no-create-missing.sh
diff --git a/tests/touch/no-dereference b/tests/touch/no-dereference.sh
similarity index 100%
rename from tests/touch/no-dereference
rename to tests/touch/no-dereference.sh
diff --git a/tests/touch/no-rights b/tests/touch/no-rights.sh
similarity index 100%
rename from tests/touch/no-rights
rename to tests/touch/no-rights.sh
diff --git a/tests/touch/not-owner b/tests/touch/not-owner.sh
similarity index 100%
rename from tests/touch/not-owner
rename to tests/touch/not-owner.sh
diff --git a/tests/touch/now-owned-by-other b/tests/touch/now-owned-by-other.sh
similarity index 100%
rename from tests/touch/now-owned-by-other
rename to tests/touch/now-owned-by-other.sh
diff --git a/tests/touch/obsolescent b/tests/touch/obsolescent.sh
similarity index 100%
rename from tests/touch/obsolescent
rename to tests/touch/obsolescent.sh
diff --git a/tests/touch/read-only b/tests/touch/read-only.sh
similarity index 100%
rename from tests/touch/read-only
rename to tests/touch/read-only.sh
diff --git a/tests/touch/relative b/tests/touch/relative.sh
similarity index 100%
rename from tests/touch/relative
rename to tests/touch/relative.sh
diff --git a/tests/touch/trailing-slash b/tests/touch/trailing-slash.sh
similarity index 100%
rename from tests/touch/trailing-slash
rename to tests/touch/trailing-slash.sh
--
1.7.12.146.g16d26b1


>From 4af32c62fa58570a97d705fc0340704e9faa1a1f Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Thu, 30 Aug 2012 14:13:13 +0200
Subject: [PATCH 7/7] tests: get rid of the 'shell-or-perl' auxiliary script

It's now easier and faster to simply run the perl ans shell test
scripts directly with the appropriate interpreter and options.

* tests/shell-or-perl: Delete.
* tests/Makefile.am (EXTRA_DIST): Remove it.
(SH_LOG_COMPILER): Re-define to invoke the correct shell.
(PL_LOG_COMPILER): Re-define to invoke the correct perl
interpreter ...
(TESTSUITE_PERL_OPTIONS): ... with the correct options.
(XPL_LOG_COMPILER): Use those options instead of inlining
their expansion.
(LOG_COMPILER): Delete, no longer needed.
---
 tests/Makefile.am   |  22 +++++------
 tests/shell-or-perl | 109 ----------------------------------------------------
 2 files changed, 9 insertions(+), 122 deletions(-)
 delete mode 100644 tests/shell-or-perl

diff --git a/tests/Makefile.am b/tests/Makefile.am
index a547b11..bc3d308 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -53,22 +53,19 @@ else
 TESTSUITE_PERL = $(SHELL) $(srcdir)/no-perl
 endif

+# Options passed to the perl invocations running the perl test scripts.
+TESTSUITE_PERL_OPTIONS = -w -I$(srcdir) -MCoreutils -MCuSkip
 # '$f' is set by the Automake-generated test harness to the path of the
 # current test script stripped of VPATH components, and is used by the
-# shell-or-perl script to determine the name of the temporary files to be
-# used.  Note that $f is a shell variable, not a make macro, so the use of
-# '$$f' below is correct, and not a typo.
-LOG_COMPILER = \
-  $(SHELL) $(srcdir)/shell-or-perl \
-  --test-name "$$f" --srcdir '$(srcdir)' \
-  --shell '$(SHELL)' --perl '$(TESTSUITE_PERL)' --
-
-PL_LOG_COMPILER = $(LOG_COMPILER)
-SH_LOG_COMPILER = $(LOG_COMPILER)
+# CuTmpdir module to determine the name of the temporary files to be
+# used.  Note that $f is a shell variable, not a make macro, so the use
+# of '$$f' below is correct, and not a typo.
+TESTSUITE_PERL_OPTIONS += -M"CuTmpdir qw($$f)"

+SH_LOG_COMPILER = $(SHELL)
+PL_LOG_COMPILER = $(TESTSUITE_PERL) $(TESTSUITE_PERL_OPTIONS)
 # Perl scripts that must be run in tainted mode.
-XPL_LOG_COMPILER = \
-  $(TESTSUITE_PERL) -wT -I$(srcdir) -MCoreutils -MCuSkip -M"CuTmpdir qw($$f)"
+XPL_LOG_COMPILER = $(TESTSUITE_PERL) -T $(TESTSUITE_PERL_OPTIONS)

 # Note that the first lines are statements.  They ensure that environment
 # variables that can perturb tests are unset or set to expected values.
@@ -130,7 +127,6 @@ EXTRA_DIST =		\
   no-perl		\
   other-fs-tmpdir	\
   sample-test		\
-  shell-or-perl		\
   $(pr_data)

 root_tests =					\
diff --git a/tests/shell-or-perl b/tests/shell-or-perl
deleted file mode 100644
index 409db0e..0000000
--- a/tests/shell-or-perl
+++ /dev/null
@@ -1,109 +0,0 @@
-#! /bin/sh
-# Run a test script of the coreutils test scripts, picking up the right
-# interpreter (i.e., perl or the shell) and the right flags for it.
-#
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-# ---------------------------------- #
-#  Readonly variables and functions  #
-# ---------------------------------- #
-
-# Help to avoid typo-related bugs.
-set -u
-
-me=shell-or-perl
-
-fatal_ ()
-{
-  echo "$me: $*" >&2
-  # Exit with status '99' to inform the testsuite harness that an
-  # hard error occurred.
-  exit 99
-}
-
-print_help_ ()
-{
-  cat <<EOH
-Usage: $me [--help] [--srcdir DIR] [--shell SHELL-CMD] [--perl PERL-CMD]
-       [--test-name NAME-WITHOUT-VPATH] TEST-SCRIPT [ARGS..]
-EOH
-}
-
-# ---------------- #
-#  Option parsing  #
-# ---------------- #
-
-assign_optarg_to_var='
-  test $# -gt 1 || fatal_ "option '\''$1'\'' requires an argument"
-  eval "$var=\$2"
-  shift'
-
-srcdir=${srcdir-.}
-cu_PERL=${PERL-perl}
-cu_SHELL=/bin/sh # Getting $SHELL from the environment is dangerous.
-test_name=
-while test $# -gt 0; do
-  var=
-  case $1 in
-    --help) print_help_; exit $?;;
-    --shell) var=cu_SHELL;;
-    --perl) var=cu_PERL;;
-    --srcdir) var=srcdir;;
-    --test-name) var=test_name;;
-    --) shift; break;;
-    -*) fatal_ "unknown option '$1'";;
-    *) break;;
-  esac
-  test -z "$var" || eval "$assign_optarg_to_var"
-  shift
-done
-
-unset assign_optarg_to_var var
-
-case $# in
-  0) fatal_ "missing argument";;
-  *) test_script=$1; shift;;
-esac
-
-test -z "$test_name" && test_name=$test_script
-
-# --------------------- #
-#  Run the test script  #
-# --------------------- #
-
-test -f "$test_script" && test -r "$test_script" \
-  || fatal_ "test script '$test_script' does not exist, or isn't readable"
-
-read shebang_line < "$test_script" \
-  || fatal_ "cannot read from the test script '$test_script'"
-
-case $shebang_line in
-'#!/usr/bin/perl'*)
-  # The test is a perl script.
-  exec $cu_PERL -w -I"$srcdir" -MCoreutils -MCuSkip \
-                -M"CuTmpdir qw($test_name)" -- "$test_script" ${1+"$@"}
-  ;;
-*)
-  # Assume the test is a shell script.
-  exec $cu_SHELL "$test_script" ${1+"$@"}
-esac
-
-# ------------- #
-#  Not reached  #
-# ------------- #
-
-fatal_ "dead code reached"
--
1.7.12.146.g16d26b1


From MAILER-DAEMON Thu Aug 30 13:40:27 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T78jD-00023V-Cr
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 13:40:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58062)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T78jB-00023K-DS
	for coreutils@gnu.org; Thu, 30 Aug 2012 13:40:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T78j9-0007Ci-Ul
	for coreutils@gnu.org; Thu, 30 Aug 2012 13:40:25 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:46827)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T78j9-0007CC-NQ
	for coreutils@gnu.org; Thu, 30 Aug 2012 13:40:23 -0400
Received: by bkcjc3 with SMTP id jc3so940354bkc.0
	for <coreutils@gnu.org>; Thu, 30 Aug 2012 10:40:22 -0700 (PDT)
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=6MwwTZ4Sxl9Nc18LTmw5bP5YAaYPw1RNZSAb2XsPZWc=;
	b=XOwM6W+XdZD6ZtgPqO824b+X63wjbhGTDwdf3Yct1UJ4OMkhS5myFxr3pe2mSK2z7A
	SO4M92zXqdml1HS1zksxNVitVcj4lUNn4NzFvWQA0ai3Hkz4e3Zq4ab0gAu+HYVbtfwb
	2TvSDQg1Gk9C+NRuxe+A+gEyCyvGDwiG9mQTEQ6CXVOo4Ja6YBc7NlzgFLd0BIhlPqEf
	8lPFHOvHd/t0ZJzX56sbVx57TEQEubK9eqKs06H+Rr9mtABzMvy9zlNOwwB7eI7wZMLD
	guRnbJMdMNVULmobemKkaL0ikZZPZY5YDtKJghKtw6/Dyp3RtJyUQs4z7ABN3Z6I2ZwO
	HDJg==
Received: by 10.204.129.76 with SMTP id n12mr3177817bks.18.1346348422485;
	Thu, 30 Aug 2012 10:40:22 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hg13sm1943746bkc.7.2012.08.30.10.40.20
	(version=SSLv3 cipher=OTHER); Thu, 30 Aug 2012 10:40:21 -0700 (PDT)
Message-ID: <503FA581.5020505@gmail.com>
Date: Thu, 30 Aug 2012 19:40:17 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 3/7] build: require Automake >= 1.11.6
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<cover.1346327497.git.stefano.lattarini@gmail.com>
	<e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
	<878vcwxpzi.fsf@rho.meyering.net>
In-Reply-To: <878vcwxpzi.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 30 Aug 2012 17:40:26 -0000

On 08/30/2012 07:13 PM, Jim Meyering wrote:
> Stefano Lattarini wrote:
>> Now that we use AM_TESTS_ENVIRONMENT, we should require at least
>> Automake >= 1.11.2; but since all the Automake version until 1.11.5
>> are vulnerable to CVE-2012-3386:
>>
>>   <https://lists.gnu.org/archive/html/automake/2012-07/msg00023.html>
>>
>> it's even better to require 1.11.6.
>>
>> * configure.ac (AM_INIT_AUTOMAKE): Bump version requirement to 1.11.6.
>> * bootstrap.conf ($buildreq): Likewise.
> 
> Thanks.
> I'm about to push this series.
>
> The only non-grammar/typo change has been to s/6/2/ to this c-set.
> I prefer that because there is already a check in maint.mk
> for that CVE, and besides, we don't want to preclude the use of
> an automake that declares itself 1.11.2 yet that has the fix
> for that bug.
>
Makes sense.  Agreed.

> Here's the modified series.
> I'll wait for your ACK.
>
Seems good to me.

Thanks,
  Stefano


From MAILER-DAEMON Thu Aug 30 14:58:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T79wp-0002sP-OZ
	for mharc-coreutils@gnu.org; Thu, 30 Aug 2012 14:58:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44118)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T79wn-0002p8-0C
	for coreutils@gnu.org; Thu, 30 Aug 2012 14:58:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T79wm-0000R6-1m
	for coreutils@gnu.org; Thu, 30 Aug 2012 14:58:32 -0400
Received: from moutng.kundenserver.de ([212.227.17.10]:59808)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T79wl-0000Qs-OG
	for coreutils@gnu.org; Thu, 30 Aug 2012 14:58:31 -0400
Received: from [192.168.2.108] (p4FF77CCC.dip.t-dialin.net [79.247.124.204])
	by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis)
	id 0M9tYC-1Sw8Oy3MzY-00BEFN; Thu, 30 Aug 2012 20:58:29 +0200
Message-ID: <503FB7D3.7050607@bernhard-voelker.de>
Date: Thu, 30 Aug 2012 20:58:27 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 3/7] build: require Automake >= 1.11.6
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
In-Reply-To: <e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:VaUDcdsT02ZMSiBw1QhtT8ClvZDecupgNjdNtNQ0flx
	wLnzuSq+Wn0LxltOQK37bmOaRUnmxTogAWxge8qt1F8NhUc3tJ
	aZXMqlFVIbYH5iV/TrtJo7dDRfbDQd52GWsfK3rHjnRZc0EQvo
	42R4GewrEv+dr5fgFabNqjcZd5wpnUjz5TJTOl2OdrQFy1uFLJ
	sJ8sSseZySIUMbUdLbZcWqw+hXUlamNsCcHgVMtZQ4dR7r0Uj+
	RYo5WQGsRK7w4Zl1ow5tbyiZ1R25P9373iB049lXkfLZiMOnzD
	raniN338nZNbHmTrnsLabFOl9/pR5SXGdq0MWmmYUTDM57Cy4O
	8/PmVfjeWjW/YfIzpTfeY+VKaF8oaC0qoOhZkaqlk
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.17.10
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, 30 Aug 2012 18:58:33 -0000

On 08/30/2012 02:13 PM, Stefano Lattarini wrote:
> Now that we use AM_TESTS_ENVIRONMENT, we should require at least
> Automake >= 1.11.2; but since all the Automake version until 1.11.5
> are vulnerable to CVE-2012-3386:
> 
>   <https://lists.gnu.org/archive/html/automake/2012-07/msg00023.html>
> 
> it's even better to require 1.11.6.

I don't like this idea: I'm personally using OpenSuSE 12.1
(which is still the current version) which comes with 1.11.1.
To satisfy sc_vulnerable_makefile_CVE-2012-3386, I've patched
my /usr/share/automake-1.11/am/distdir.am.

So the question I'm putting forward is:
shouldn't COREUTILS be at least compileable on the latest
version of the major distributions?

I think a check like sc_vulnerable_makefile_CVE-2012-3386
is enough.

BTW: If you insist on this patch, then you also have to adapt
README-prereq.

Have a nice day,
Berny


From MAILER-DAEMON Fri Aug 31 03:19:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7LVl-0003s7-Fg
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 03:19:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60122)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7LVj-0003ry-GX
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:19:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7LVh-0004Co-VY
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:19:23 -0400
Received: from mx.meyering.net ([88.168.87.75]:36514)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7LVh-0004Ch-Jq
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:19:21 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 02AF36018C;
	Fri, 31 Aug 2012 09:19:20 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH 3/7] build: require Automake >= 1.11.6
In-Reply-To: <503FB7D3.7050607@bernhard-voelker.de> (Bernhard Voelker's
	message of "Thu, 30 Aug 2012 20:58:27 +0200")
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
	<503FB7D3.7050607@bernhard-voelker.de>
Date: Fri, 31 Aug 2012 09:19:19 +0200
Message-ID: <87oblrv894.fsf@rho.meyering.net>
Lines: 78
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: Stefano Lattarini <stefano.lattarini@gmail.com>, 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, 31 Aug 2012 07:19:24 -0000

Bernhard Voelker wrote:

> On 08/30/2012 02:13 PM, Stefano Lattarini wrote:
>> Now that we use AM_TESTS_ENVIRONMENT, we should require at least
>> Automake >= 1.11.2; but since all the Automake version until 1.11.5
>> are vulnerable to CVE-2012-3386:
>>
>>   <https://lists.gnu.org/archive/html/automake/2012-07/msg00023.html>
>>
>> it's even better to require 1.11.6.
>
> I don't like this idea: I'm personally using OpenSuSE 12.1
> (which is still the current version) which comes with 1.11.1.
> To satisfy sc_vulnerable_makefile_CVE-2012-3386, I've patched
> my /usr/share/automake-1.11/am/distdir.am.
>
> So the question I'm putting forward is:
> shouldn't COREUTILS be at least compileable on the latest
> version of the major distributions?

Hi Bernhard,

First, let's agree on terminology.  Anyone can compile
the tools on nearly any type of system, assuming they
start from a distribution tarball.  I think you are talking
about a different process: building from git cloned sources.
That is a different process altogether.

In a sense, I agree that it should be doable on most major
distributions, but you won't like the qualifying "but".
I think most major distributions should distribute much
newer versions of tools like autoconf, automake and gettext.
They are not like libraries.  I've been lobbying to update
these tools in older RHEL, with partial success.

I.e., I think upstream development should be tracking the
latest features of the latest tools.  In particular, while
autoconf and gettext are not evolving quickly these days,
automake *is*, and given the big return on investment in
non-recursive make (more efficient builds, day to day) and
the prospect of even cleaner/better Makefile.am files with the
upcoming automake-ng, we would be remiss not to take advantage
of contributions like those from Stefano.

However, even if your distribution chooses not to support this
aspect of development, you can easily work around that deficiency
by building all of the latest tools yourself and installing
them in a private "bin" directory early in your shell's search path.
This script automates the process for you, downloading all of the
latest tarballs, checking signatures (on all bug pkg-check, which
appears to have none), building, optionally running make check,
and installing:

  http://people.redhat.com/meyering/autotools-install

If you run it, be sure to heed this advice in its --help output:

    If you've already verified that your system/environment can build working
    versions of these tools, you can make this script complete in just a
    minute or two (rather than about an hour if you let all make check
    tests run) by invoking it like this:

        autotools-install --prefix=$HOME/autotools --skip-check


> I think a check like sc_vulnerable_makefile_CVE-2012-3386
> is enough.
>
> BTW: If you insist on this patch, then you also have to adapt
> README-prereq.

Good point.  Thanks.  I'm tempted to remove the build instructions from
README-prereq, and instead to include my autotools-install script under
script and referencing it.  WDYT?

I'd have to change autotools-install to add xz, and possibly to remove
(or make optional) libtool and pkg-config, since those packages are not
needed to build coreutils.


From MAILER-DAEMON Fri Aug 31 03:44:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7LuK-0003cD-EY
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 03:44:48 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33658)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T7LuI-0003b7-38
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:44:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T7LuD-0003WE-Fo
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:44:46 -0400
Received: from moutng.kundenserver.de ([212.227.126.171]:49700)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T7LuD-0003WA-5k
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:44:41 -0400
Received: from [192.168.2.108] (p4FF7586F.dip.t-dialin.net [79.247.88.111])
	by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis)
	id 0MHvgn-1TAvD12H7d-003b3v; Fri, 31 Aug 2012 09:44:38 +0200
Message-ID: <50406B65.8070105@bernhard-voelker.de>
Date: Fri, 31 Aug 2012 09:44:37 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:15.0) Gecko/20120825 Thunderbird/15.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 3/7] build: require Automake >= 1.11.6
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
	<503FB7D3.7050607@bernhard-voelker.de>
	<87oblrv894.fsf@rho.meyering.net>
In-Reply-To: <87oblrv894.fsf@rho.meyering.net>
Content-Type: multipart/mixed; boundary="------------090102020207090402060106"
X-Provags-ID: V02:K0:u9QPb5mrWNjagXkVAcnjZ14SUrDwPV/lSnbJkaDDX/A
	N2QBjh8q62fOV9DUSSHkhvJ2FgPxTtm7MQr5WK/B9M8UbLyXch
	RIwYYrUgrBPx0tam0hbDITy09kbg9zTgFv07MoI4Fx44unijzQ
	Vob2+MH1MWxTLnTMYrHetvcnb8mVsfwOBwginfTEfb3AhXxvv+
	IqI30E6I6IHQNKYMVBuR25/Kcu/Ns1K7hCsvQkynONXf5ILuGC
	vWZUVneFhsD2IJBBIbZmQUffo4I4AIjgoiSDfJvQi+f1X383UV
	LBtPx0mlUf9D73SNz+oodTc2vdeo/IAoa60K9A3fGFf5WUr55+
	PhD/gq9gAdxSB6Lzcm8JyhH+PEtZqppLOHILlSW+y
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.126.171
Cc: Stefano Lattarini <stefano.lattarini@gmail.com>, 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, 31 Aug 2012 07:44:47 -0000

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

On 08/31/2012 09:19 AM, Jim Meyering wrote:
> Bernhard Voelker wrote:
> 
>> On 08/30/2012 02:13 PM, Stefano Lattarini wrote:
>>> Now that we use AM_TESTS_ENVIRONMENT, we should require at least
>>> Automake >= 1.11.2; but since all the Automake version until 1.11.5
>>> are vulnerable to CVE-2012-3386:
>>>
>>>   <https://lists.gnu.org/archive/html/automake/2012-07/msg00023.html>
>>>
>>> it's even better to require 1.11.6.
>>
>> I don't like this idea: I'm personally using OpenSuSE 12.1
>> (which is still the current version) which comes with 1.11.1.
>> To satisfy sc_vulnerable_makefile_CVE-2012-3386, I've patched
>> my /usr/share/automake-1.11/am/distdir.am.
>>
>> So the question I'm putting forward is:
>> shouldn't COREUTILS be at least compileable on the latest
>> version of the major distributions?
> 
> Hi Bernhard,
> 
> First, let's agree on terminology.  Anyone can compile
> the tools on nearly any type of system, assuming they
> start from a distribution tarball.

Ok, that sounds good.

>  I think you are talking
> about a different process: building from git cloned sources.
> That is a different process altogether.
>
> In a sense, I agree that it should be doable on most major
> distributions, but you won't like the qualifying "but".
> I think most major distributions should distribute much
> newer versions of tools like autoconf, automake and gettext.
> They are not like libraries.  I've been lobbying to update
> these tools in older RHEL, with partial success.
>
> I.e., I think upstream development should be tracking the
> latest features of the latest tools.  In particular, while
> autoconf and gettext are not evolving quickly these days,
> automake *is*, and given the big return on investment in
> non-recursive make (more efficient builds, day to day) and
> the prospect of even cleaner/better Makefile.am files with the
> upcoming automake-ng, we would be remiss not to take advantage
> of contributions like those from Stefano.
>
> However, even if your distribution chooses not to support this
> aspect of development, you can easily work around that deficiency
> by building all of the latest tools yourself and installing
> them in a private "bin" directory early in your shell's search path.

Sorry, maybe I was a bit angry yesterday, because my git environment
didn't work anymore. Another problem was README-prereq, because the
version number of autoconf needed is not 2.62 but at least 2.64
- from coreutils' point of view ...but automake required even 2.68.

Finally, automake didn't install cleanly because it complained about
the missing symlink from ~/coreutils/deps/share/aclocal to
aclocal-1.11, urgh.

After finally getting autoconf+autmake working (and running bootstrap
etc in coreutils), a `make syntax-check` failed because of the
renaming of the test scripts.
The attached patch silenced the syntax-check (although I'm not sure if
I fixed sc_long_lines in the right way).


> This script automates the process for you, downloading all of the
> latest tarballs, checking signatures (on all bug pkg-check, which
> appears to have none), building, optionally running make check,
> and installing:
> 
>   http://people.redhat.com/meyering/autotools-install

Cool!

> If you run it, be sure to heed this advice in its --help output:
> 
>     If you've already verified that your system/environment can build working
>     versions of these tools, you can make this script complete in just a
>     minute or two (rather than about an hour if you let all make check
>     tests run) by invoking it like this:
> 
>         autotools-install --prefix=$HOME/autotools --skip-check
> 
> 
>> I think a check like sc_vulnerable_makefile_CVE-2012-3386
>> is enough.
>>
>> BTW: If you insist on this patch, then you also have to adapt
>> README-prereq.
> 
> Good point.  Thanks.  I'm tempted to remove the build instructions from
> README-prereq, and instead to include my autotools-install script under
> script and referencing it.  WDYT?

+1


> I'd have to change autotools-install to add xz, and possibly to remove
> (or make optional) libtool and pkg-config, since those packages are not
> needed to build coreutils.
> 

Have a nice day,
Berny

--------------090102020207090402060106
Content-Type: text/x-patch;
 name="fix-syntax-check.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="fix-syntax-check.patch"

diff --git a/cfg.mk b/cfg.mk
index 50fb13e..06bb63d 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -156,7 +156,7 @@ sc_check-AUTHORS:
 LINE_LEN_MAX = 80
 FILTER_LONG_LINES =						\
   /^[^:]*\.diff:[^:]*:@@ / d;					\
-  \|^[^:]*tests/misc/sha[0-9]*sum[-:]| d;			\
+  \|^[^:]*tests/misc/sha[0-9]*sum[^:]| d;			\
   \|^[^:]*tests/pr/|{ \|^[^:]*tests/pr/pr-tests:| !d; };
 sc_long_lines:
 	@files=$$($(VC_LIST_EXCEPT))					\
@@ -501,7 +501,7 @@ update-copyright-env = \
 
 # List syntax-check exemptions.
 exclude_file_name_regexp--sc_space_tab = \
-  ^(tests/pr/|tests/misc/nl$$|gl/.*\.diff$$)
+  ^(tests/pr/|tests/misc/nl\.sh$$|gl/.*\.diff$$)
 exclude_file_name_regexp--sc_bindtextdomain = ^(gl/.*|lib/euidaccess-stat)\.c$$
 exclude_file_name_regexp--sc_unmarked_diagnostics =    ^build-aux/cvsu$$
 exclude_file_name_regexp--sc_error_message_uppercase = ^build-aux/cvsu$$
@@ -521,7 +521,7 @@ exclude_file_name_regexp--sc_prohibit_always-defined_macros = \
 exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/pr/
 exclude_file_name_regexp--sc_program_name = ^(gl/.*|lib/euidaccess-stat)\.c$$
 exclude_file_name_regexp--sc_file_system = \
-  NEWS|^(tests/init\.cfg|src/df\.c|tests/df/df-P)$$
+  NEWS|^(tests/init\.cfg|src/df\.c|tests/df/df-P.sh)$$
 exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
   ^m4/stat-prog\.m4$$
 exclude_file_name_regexp--sc_prohibit_fail_0 = \
@@ -536,13 +536,13 @@ exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
 exclude_file_name_regexp--sc_preprocessor_indentation = \
   ^(gl/lib/rand-isaac\.[ch]|gl/tests/test-rand-isaac\.c)$$
 exclude_file_name_regexp--sc_prohibit_stat_st_blocks = \
-  ^(src/system\.h|tests/du/2g)$$
+  ^(src/system\.h|tests/du/2g\.sh)$$
 
 exclude_file_name_regexp--sc_prohibit_continued_string_alpha_in_column_1 = \
   ^src/(system\.h|od\.c|printf\.c)$$
 
 exclude_file_name_regexp--sc_prohibit_test_backticks = \
-  ^tests/(init\.sh|check\.mk|misc/stdbuf)$$
+  ^tests/(init\.sh|Makefile\.am|misc/stdbuf\.sh)$$
 
 # Exempt test.c, since it's nominally shared, and relatively static.
 exclude_file_name_regexp--sc_prohibit_operator_at_end_of_line = \
diff --git a/gnulib b/gnulib
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 68f693ff1db33bf24695f0f42c62e7801966fd06
+Subproject commit 68f693ff1db33bf24695f0f42c62e7801966fd06-dirty

--------------090102020207090402060106--


From MAILER-DAEMON Fri Aug 31 03:48:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7LxS-0003wI-TR
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 03:48:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48309)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <auerswal@unix-ag.uni-kl.de>) id 1T7LxM-0003up-VK
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:48:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <auerswal@unix-ag.uni-kl.de>) id 1T7LxL-0004lS-H9
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:47:56 -0400
Received: from mailgw1.uni-kl.de ([131.246.120.220]:44389)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <auerswal@unix-ag.uni-kl.de>) id 1T7LxL-0004lN-7G
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:47:55 -0400
Received: from sushi.unix-ag.uni-kl.de (sushi.unix-ag.uni-kl.de
	[IPv6:2001:638:208:ef34:0:ff:fe00:65])
	by mailgw1.uni-kl.de (8.14.3/8.14.3/Debian-9.4) with ESMTP id
	q7V7lpN9030282
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Fri, 31 Aug 2012 09:47:51 +0200
Received: from sushi.unix-ag.uni-kl.de (ip6-localhost [IPv6:::1])
	by sushi.unix-ag.uni-kl.de (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP
	id q7V7lpT5003650
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 31 Aug 2012 09:47:51 +0200
Received: (from auerswal@localhost)
	by sushi.unix-ag.uni-kl.de (8.14.3/8.14.3/Submit) id q7V7lpMD003649;
	Fri, 31 Aug 2012 09:47:51 +0200
Date: Fri, 31 Aug 2012 09:47:51 +0200
From: Erik Auerswald <auerswal@unix-ag.uni-kl.de>
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 3/7] build: require Automake >= 1.11.6
Message-ID: <20120831074751.GA3132@sushi.unix-ag.uni-kl.de>
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
	<503FB7D3.7050607@bernhard-voelker.de>
	<87oblrv894.fsf@rho.meyering.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <87oblrv894.fsf@rho.meyering.net>
User-Agent: Mutt/1.5.18 (2008-05-17)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 131.246.120.220
Cc: Bernhard Voelker <mail@bernhard-voelker.de>,
	Stefano Lattarini <stefano.lattarini@gmail.com>, 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, 31 Aug 2012 07:48:01 -0000

Hi Jim,

On Fri, Aug 31, 2012 at 09:19:19AM +0200, Jim Meyering wrote:
> Bernhard Voelker wrote:
> > On 08/30/2012 02:13 PM, Stefano Lattarini wrote:
> >> Now that we use AM_TESTS_ENVIRONMENT, we should require at least
> >> Automake >= 1.11.2; but since all the Automake version until 1.11.5
> >> are vulnerable to CVE-2012-3386:
> >>
> >>   <https://lists.gnu.org/archive/html/automake/2012-07/msg00023.html>
> >>
> >> it's even better to require 1.11.6.
> >
> > I don't like this idea: I'm personally using OpenSuSE 12.1
> > (which is still the current version) which comes with 1.11.1.
> > To satisfy sc_vulnerable_makefile_CVE-2012-3386, I've patched
> > my /usr/share/automake-1.11/am/distdir.am.
> >
> > So the question I'm putting forward is:
> > shouldn't COREUTILS be at least compileable on the latest
> > version of the major distributions?
> 
> First, let's agree on terminology.  Anyone can compile
> the tools on nearly any type of system, assuming they
> start from a distribution tarball.  I think you are talking
> about a different process: building from git cloned sources.
> That is a different process altogether.
> 
> In a sense, I agree that it should be doable on most major
> distributions, but you won't like the qualifying "but".
> I think most major distributions should distribute much
> newer versions of tools like autoconf, automake and gettext.
> They are not like libraries.  I've been lobbying to update
> these tools in older RHEL, with partial success.

It has happened that Debian Sid (unstable) did not have new enough
autotools to build coreutils from cloned git sources. That usually stops my
urge to contribute at that time. ;-)

Last time I checked Sid had new enough autotools, but this might well change
during the Wheezy freeze.

> However, even if your distribution chooses not to support this
> aspect of development, you can easily work around that deficiency
> by building all of the latest tools yourself and installing
> them in a private "bin" directory early in your shell's search path.

IMHO that additional hassle might discourage casual contributors.

Anyway, I don't even know _how_ old autotools 1.11.2 is, so I'm not
objecting to this actual requirement. I'd just like to raise awareness
of this aspect.

> This script automates the process for you, downloading all of the
> latest tarballs, checking signatures (on all bug pkg-check, which
> appears to have none), building, optionally running make check,
> and installing:
> 
>   http://people.redhat.com/meyering/autotools-install

Please consider the following patch to that script:

---8<------8<------8<------8<------8<------8<------8<------8<------8<---

--- autotools-install.orig      2012-08-31 09:26:20.000000000 +0200
+++ autotools-install   2012-08-31 09:28:46.000000000 +0200
@@ -22,7 +22,7 @@
 
 Options:
  --prefix=PREFIX    install tools under specified directory
- --skip-check       do not run "make check" (this can save 50+ min)
+ --skip-check       do not run \"make check\" (this can save 50+ min)
  --help             display this help and exit
 
 For example, to install programs into \$HOME/autotools/bin, run this command:
@@ -31,7 +31,7 @@
 
 If you've already verified that your system/environment can build working
 versions of these tools, you can make this script complete in just a
-minute or two (rather than about an hour if you let all "make check"
+minute or two (rather than about an hour if you let all \"make check\"
 tests run) by invoking it like this:
 
   $prog_name --prefix=\$HOME/autotools --skip-check

---8<------8<------8<------8<------8<------8<------8<------8<------8<---

> > I think a check like sc_vulnerable_makefile_CVE-2012-3386
> > is enough.
> >
> > BTW: If you insist on this patch, then you also have to adapt
> > README-prereq.
> 
> Good point.  Thanks.  I'm tempted to remove the build instructions from
> README-prereq, and instead to include my autotools-install script under
> script and referencing it.  WDYT?

I prefer written build instructions to a script. The script could be
offered as a help on distributions lacking current enough autotools.

Regards,
Erik


From MAILER-DAEMON Fri Aug 31 03:55:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7M54-0005AM-Hv
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 03:55:54 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55778)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7M50-00055R-5G
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:55:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7M4z-00075R-4r
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:55:49 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:40137)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7M4y-00072v-HL
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:55:48 -0400
Received: by mail-bk0-f41.google.com with SMTP id jc3so1149832bkc.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 00:55:48 -0700 (PDT)
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=bDmevIThTUBD7OBv9xE4JYkCE1yP9hmxTRNm+LKoNxc=;
	b=yimPiCwpDLXsDWhND/hMJ0SjCF2sqyrIdH7YwTmh1jdnzVaSYieX9GqVnu53LfnGwL
	haKw60MU++ZSJSupKnLhVTji/0m061guRtQ0BAJ88Iv7b8g4RLGYO4eHMrK6dM7fDT6l
	zzzPBkeGhAA1fzQ8+pTRheVUpLmtMPFM0DzIwYHOAJ+W4wRbdbAH+7aERj+wcDkKNQ/n
	ngPD7uqXEkpiYsURWgo1sYn+MBnEn/hyp7u6piIMGB3msSMl4dGVsnu54IUs2WjzxLf7
	7gXO7bhpqASyJSCCg2ixd+7HiBOs8fIlgkysg/XTAAgMHLAIb0vTwX4LBYQ7Z6BeTJwm
	pO8g==
Received: by 10.204.148.72 with SMTP id o8mr3652278bkv.103.1346399747944;
	Fri, 31 Aug 2012 00:55:47 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id j9sm2769581bkv.0.2012.08.31.00.55.46
	(version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 00:55:47 -0700 (PDT)
Message-ID: <50406DDD.9050900@gmail.com>
Date: Fri, 31 Aug 2012 09:55:09 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH 3/7] build: require Automake >= 1.11.6
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
	<503FB7D3.7050607@bernhard-voelker.de>
	<87oblrv894.fsf@rho.meyering.net>
	<50406B65.8070105@bernhard-voelker.de>
In-Reply-To: <50406B65.8070105@bernhard-voelker.de>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 31 Aug 2012 07:55:51 -0000

On 08/31/2012 09:44 AM, Bernhard Voelker wrote:
>
> Sorry, maybe I was a bit angry yesterday, because my git environment
> didn't work anymore. Another problem was README-prereq, because the
> version number of autoconf needed is not 2.62 but at least 2.64
> - from coreutils' point of view ...but automake required even 2.68.
>
No, the latest version 1.12.3 of Automake only requires Autoconf 2.62
in order to work (OTOH, the next major version will start requiring
2.65 or later).  Autoconf 2.69 (not 2.68!) is only required to
*bootstrap* Automake from the git repository, but tou don't need to
do that unless you want to develop automake (or experiment with the
development version for you own reasons -- hopefully not for use in
production code).

> Finally, automake didn't install cleanly because it complained about
> the missing symlink from ~/coreutils/deps/share/aclocal to
> aclocal-1.11, urgh.
>
Yes, a very annoying glitch in the build system for 1.11.x; it has
already been fixed in Automake 1.12 (where it was easily caught by
the presence of a new 'installcheck' target).  Sorry about that.

>
> [SNIP]
> 

> Have a nice day,
> Berny

Regards,
  Stefano


From MAILER-DAEMON Fri Aug 31 03:59:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7M8n-0005PX-3X
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 03:59:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56155)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7M8l-0005PP-Mo
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:59:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7M8k-0007rB-Pl
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:59:43 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:59477)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7M8k-0007r7-J2
	for coreutils@gnu.org; Fri, 31 Aug 2012 03:59:42 -0400
Received: by bkcjc3 with SMTP id jc3so1151449bkc.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 00:59:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer;
	bh=OBPoadgOUDCdWdUWiW2ViEceBIJdPsQMq1pLn5JD7Ss=;
	b=L46b5u4/+kbGLd5aXOUtjpf/7Kx/mlAhjvN1GquC6ndcCt7wUvDOR7swvyjmem3WVh
	UqXH/LGnWxX8aWAxIlEoBNZOHBgaK12zRGe8X9AFyy1Xr/hyeYtyK5dEQ+E7tmDObeK7
	eSSBx6e11HqOUfnoPn2Jhm1mKF5H7uxpn3Vj4CtX1+UZ39qulOanah3EKZWYQW45OnZc
	0IIVECnzID8DFIz9eMsyKsd6f/BkqZ2BxJYdBfzFDl/IgRaNACQDF3m7lmauZDyAAbyE
	UtFX/GlYNGM+lBEAiVNH5/TZU/QkWBHLtH+xn02ikM//YXP5r1ZAW+c+A6j2nUqf1LtH
	jGnw==
Received: by 10.204.129.23 with SMTP id m23mr3800367bks.28.1346399981666;
	Fri, 31 Aug 2012 00:59:41 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hs2sm2775942bkc.1.2012.08.31.00.59.40
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 00:59:40 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH] maint: fixup: don't distribute a non-existent file
Date: Fri, 31 Aug 2012 09:59:31 +0200
Message-Id: <d7b943e8cd2dfed1a68554b0f97dff677fe375e3.1346399951.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 07:59:44 -0000

* tests/Makefile.am (EXTRA_DIST): Drop 'check.mk', which has been
removed (being merged into 'tests/Makefile.am') by recent changes.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 tests/Makefile.am | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index bc3d308..d8dee57 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -116,7 +116,6 @@ EXTRA_DIST =		\
   Coreutils.pm		\
   CuSkip.pm		\
   CuTmpdir.pm		\
-  check.mk		\
   d_type-check		\
   envvar-check		\
   filefrag-extent-compare \
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 04:16:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7MPN-0007RB-7u
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 04:16:53 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37630)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7MPH-0007R2-Gs
	for coreutils@gnu.org; Fri, 31 Aug 2012 04:16:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7MPG-0004wX-9e
	for coreutils@gnu.org; Fri, 31 Aug 2012 04:16:47 -0400
Received: from mx.meyering.net ([88.168.87.75]:36669)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7MPF-0004wJ-Tv
	for coreutils@gnu.org; Fri, 31 Aug 2012 04:16:46 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id F0ABA60162;
	Fri, 31 Aug 2012 10:16:44 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH 3/7] build: require Automake >= 1.11.6
In-Reply-To: <50406B65.8070105@bernhard-voelker.de> (Bernhard Voelker's
	message of "Fri, 31 Aug 2012 09:44:37 +0200")
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
	<503FB7D3.7050607@bernhard-voelker.de>
	<87oblrv894.fsf@rho.meyering.net>
	<50406B65.8070105@bernhard-voelker.de>
Date: Fri, 31 Aug 2012 10:16:44 +0200
Message-ID: <874nnjv5lf.fsf@rho.meyering.net>
Lines: 112
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: Stefano Lattarini <stefano.lattarini@gmail.com>, 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, 31 Aug 2012 08:16:51 -0000

Bernhard Voelker wrote:
...
> After finally getting autoconf+autmake working (and running bootstrap
> etc in coreutils), a `make syntax-check` failed because of the

Thanks for the quick work and sorry I forgot to run
"make syntax-check" before pushing that.

> renaming of the test scripts.
> The attached patch silenced the syntax-check (although I'm not sure if
> I fixed sc_long_lines in the right way).
...
> diff --git a/cfg.mk b/cfg.mk
...
> -  \|^[^:]*tests/misc/sha[0-9]*sum[-:]| d;			\
> +  \|^[^:]*tests/misc/sha[0-9]*sum[^:]| d;			\
>    \|^[^:]*tests/pr/|{ \|^[^:]*tests/pr/pr-tests:| !d; };

I've adjusted the above, since we really do want to require
either ":" or "-" (file name delimiters in grep output):

    -  \|^[^:]*tests/misc/sha[0-9]*sum[^:]| d;                      \
    +  \|^[^:]*tests/misc/sha[0-9]*sum.*\.pl[-:]| d;                        \

>  	@files=$$($(VC_LIST_EXCEPT))					\
> @@ -501,7 +501,7 @@ update-copyright-env = \
>
>  # List syntax-check exemptions.
>  exclude_file_name_regexp--sc_space_tab = \
> -  ^(tests/pr/|tests/misc/nl$$|gl/.*\.diff$$)
> +  ^(tests/pr/|tests/misc/nl\.sh$$|gl/.*\.diff$$)
>  exclude_file_name_regexp--sc_bindtextdomain = ^(gl/.*|lib/euidaccess-stat)\.c$$
>  exclude_file_name_regexp--sc_unmarked_diagnostics =    ^build-aux/cvsu$$
>  exclude_file_name_regexp--sc_error_message_uppercase = ^build-aux/cvsu$$
> @@ -521,7 +521,7 @@ exclude_file_name_regexp--sc_prohibit_always-defined_macros = \
>  exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/pr/
>  exclude_file_name_regexp--sc_program_name = ^(gl/.*|lib/euidaccess-stat)\.c$$
>  exclude_file_name_regexp--sc_file_system = \
> -  NEWS|^(tests/init\.cfg|src/df\.c|tests/df/df-P)$$
> +  NEWS|^(tests/init\.cfg|src/df\.c|tests/df/df-P.sh)$$

I inserted a backslash here:

  +  NEWS|^(tests/init\.cfg|src/df\.c|tests/df/df-P\.sh)$$

I wrote the commit log for you, too.
Here's the result.  I'll wait for your ACK:

>From c1c92bcb29b95970a81c34a1f7354f39b6d942b4 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Fri, 31 Aug 2012 10:07:54 +0200
Subject: [PATCH] build: fix syntax-check rules broken by test-added .sh/pl
 suffixes

* cfg.mk: We exempt a few test files that would otherwise trigger
false-positive matches in syntax-check rules.  The recent change
that added a .sh or .pl suffix to each test script made it so
some of the exclusion regexps would no longer match.
Include the required \.sh suffix in each such regexp, too.
---
 cfg.mk | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 50fb13e..44a43f8 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -156,7 +156,7 @@ sc_check-AUTHORS:
 LINE_LEN_MAX = 80
 FILTER_LONG_LINES =						\
   /^[^:]*\.diff:[^:]*:@@ / d;					\
-  \|^[^:]*tests/misc/sha[0-9]*sum[-:]| d;			\
+  \|^[^:]*tests/misc/sha[0-9]*sum.*\.pl[-:]| d;			\
   \|^[^:]*tests/pr/|{ \|^[^:]*tests/pr/pr-tests:| !d; };
 sc_long_lines:
 	@files=$$($(VC_LIST_EXCEPT))					\
@@ -501,7 +501,7 @@ update-copyright-env = \

 # List syntax-check exemptions.
 exclude_file_name_regexp--sc_space_tab = \
-  ^(tests/pr/|tests/misc/nl$$|gl/.*\.diff$$)
+  ^(tests/pr/|tests/misc/nl\.sh$$|gl/.*\.diff$$)
 exclude_file_name_regexp--sc_bindtextdomain = ^(gl/.*|lib/euidaccess-stat)\.c$$
 exclude_file_name_regexp--sc_unmarked_diagnostics =    ^build-aux/cvsu$$
 exclude_file_name_regexp--sc_error_message_uppercase = ^build-aux/cvsu$$
@@ -521,7 +521,7 @@ exclude_file_name_regexp--sc_prohibit_always-defined_macros = \
 exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/pr/
 exclude_file_name_regexp--sc_program_name = ^(gl/.*|lib/euidaccess-stat)\.c$$
 exclude_file_name_regexp--sc_file_system = \
-  NEWS|^(tests/init\.cfg|src/df\.c|tests/df/df-P)$$
+  NEWS|^(tests/init\.cfg|src/df\.c|tests/df/df-P\.sh)$$
 exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
   ^m4/stat-prog\.m4$$
 exclude_file_name_regexp--sc_prohibit_fail_0 = \
@@ -536,13 +536,13 @@ exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
 exclude_file_name_regexp--sc_preprocessor_indentation = \
   ^(gl/lib/rand-isaac\.[ch]|gl/tests/test-rand-isaac\.c)$$
 exclude_file_name_regexp--sc_prohibit_stat_st_blocks = \
-  ^(src/system\.h|tests/du/2g)$$
+  ^(src/system\.h|tests/du/2g\.sh)$$

 exclude_file_name_regexp--sc_prohibit_continued_string_alpha_in_column_1 = \
   ^src/(system\.h|od\.c|printf\.c)$$

 exclude_file_name_regexp--sc_prohibit_test_backticks = \
-  ^tests/(init\.sh|check\.mk|misc/stdbuf)$$
+  ^tests/(init\.sh|Makefile\.am|misc/stdbuf\.sh)$$

 # Exempt test.c, since it's nominally shared, and relatively static.
 exclude_file_name_regexp--sc_prohibit_operator_at_end_of_line = \
--
1.7.12.146.g16d26b1


From MAILER-DAEMON Fri Aug 31 04:49:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7Mup-00049g-Jk
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 04:49:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42709)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Muk-00048q-7E
	for coreutils@gnu.org; Fri, 31 Aug 2012 04:49:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Mui-0005sV-OP
	for coreutils@gnu.org; Fri, 31 Aug 2012 04:49:18 -0400
Received: from mx.meyering.net ([88.168.87.75]:36745)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Mui-0005sO-DE
	for coreutils@gnu.org; Fri, 31 Aug 2012 04:49:16 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 60E4C600B2;
	Fri, 31 Aug 2012 10:49:15 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Erik Auerswald <auerswal@unix-ag.uni-kl.de>
Subject: Re: [PATCH 3/7] build: require Automake >= 1.11.6
In-Reply-To: <20120831074751.GA3132@sushi.unix-ag.uni-kl.de> (Erik Auerswald's
	message of "Fri, 31 Aug 2012 09:47:51 +0200")
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
	<503FB7D3.7050607@bernhard-voelker.de>
	<87oblrv894.fsf@rho.meyering.net>
	<20120831074751.GA3132@sushi.unix-ag.uni-kl.de>
Date: Fri, 31 Aug 2012 10:49:15 +0200
Message-ID: <87y5kvtpis.fsf@rho.meyering.net>
Lines: 115
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: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: Bernhard Voelker <mail@bernhard-voelker.de>,
	Stefano Lattarini <stefano.lattarini@gmail.com>, 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, 31 Aug 2012 08:49:22 -0000

Erik Auerswald wrote:
> On Fri, Aug 31, 2012 at 09:19:19AM +0200, Jim Meyering wrote:
>> Bernhard Voelker wrote:
>> > On 08/30/2012 02:13 PM, Stefano Lattarini wrote:
>> >> Now that we use AM_TESTS_ENVIRONMENT, we should require at least
>> >> Automake >=3D 1.11.2; but since all the Automake version until 1.11.5
>> >> are vulnerable to CVE-2012-3386:
>> >>
>> >>   <https://lists.gnu.org/archive/html/automake/2012-07/msg00023.html>
>> >>
>> >> it's even better to require 1.11.6.
>> >
>> > I don't like this idea: I'm personally using OpenSuSE 12.1
>> > (which is still the current version) which comes with 1.11.1.
>> > To satisfy sc_vulnerable_makefile_CVE-2012-3386, I've patched
>> > my /usr/share/automake-1.11/am/distdir.am.
>> >
>> > So the question I'm putting forward is:
>> > shouldn't COREUTILS be at least compileable on the latest
>> > version of the major distributions?
>>
>> First, let's agree on terminology.  Anyone can compile
>> the tools on nearly any type of system, assuming they
>> start from a distribution tarball.  I think you are talking
>> about a different process: building from git cloned sources.
>> That is a different process altogether.
>>
>> In a sense, I agree that it should be doable on most major
>> distributions, but you won't like the qualifying "but".
>> I think most major distributions should distribute much
>> newer versions of tools like autoconf, automake and gettext.
>> They are not like libraries.  I've been lobbying to update
>> these tools in older RHEL, with partial success.
>
> It has happened that Debian Sid (unstable) did not have new enough
> autotools to build coreutils from cloned git sources. That usually stops =
my
> urge to contribute at that time. ;-)
>
> Last time I checked Sid had new enough autotools, but this might well cha=
nge
> during the Wheezy freeze.
>
>> However, even if your distribution chooses not to support this
>> aspect of development, you can easily work around that deficiency
>> by building all of the latest tools yourself and installing
>> them in a private "bin" directory early in your shell's search path.
>
> IMHO that additional hassle might discourage casual contributors.
>
> Anyway, I don't even know _how_ old autotools 1.11.2 is,

1.11.2 was released on 22 Dec 2011.

> so I'm not
> objecting to this actual requirement. I'd just like to raise awareness
> of this aspect.

Thanks.  This is one of the reasons I've been using Fedora on my desktop
for the last 6+ years.  A new version of Fedora comes out every 6 months,
and upgrade is usually easy, so I can track most of the latest tools
without having to install things myself.

>> This script automates the process for you, downloading all of the
>> latest tarballs, checking signatures (on all bug pkg-check, which
>> appears to have none), building, optionally running make check,
>> and installing:
>>
>>   http://people.redhat.com/meyering/autotools-install
>
> Please consider the following patch to that script:

Thanks!
I'm about to add scripts/autotools-install to coreutils.
Yours will be the first c-set for that file.

> ---8<------8<------8<------8<------8<------8<------8<------8<------8<---
>
> --- autotools-install.orig      2012-08-31 09:26:20.000000000 +0200
> +++ autotools-install   2012-08-31 09:28:46.000000000 +0200
> @@ -22,7 +22,7 @@
>
>  Options:
>   --prefix=3DPREFIX    install tools under specified directory
> - --skip-check       do not run "make check" (this can save 50+ min)
> + --skip-check       do not run \"make check\" (this can save 50+ min)
>   --help             display this help and exit
>
>  For example, to install programs into \$HOME/autotools/bin, run this com=
mand:
> @@ -31,7 +31,7 @@
>
>  If you've already verified that your system/environment can build working
>  versions of these tools, you can make this script complete in just a
> -minute or two (rather than about an hour if you let all "make check"
> +minute or two (rather than about an hour if you let all \"make check\"
>  tests run) by invoking it like this:
>
>    $prog_name --prefix=3D\$HOME/autotools --skip-check
>
> ---8<------8<------8<------8<------8<------8<------8<------8<------8<---
>
>> > I think a check like sc_vulnerable_makefile_CVE-2012-3386
>> > is enough.
>> >
>> > BTW: If you insist on this patch, then you also have to adapt
>> > README-prereq.
>>
>> Good point.  Thanks.  I'm tempted to remove the build instructions from
>> README-prereq, and instead to include my autotools-install script under
>> script and referencing it.  WDYT?
>
> I prefer written build instructions to a script. The script could be
> offered as a help on distributions lacking current enough autotools.

In that case, I'm happy to retain those instructions.
I think P=E1draig also liked them.
Would one of you like to update README-prereq?


From MAILER-DAEMON Fri Aug 31 04:58:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7N3r-0006lS-AR
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 04:58:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35591)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7N3o-0006jM-1t
	for coreutils@gnu.org; Fri, 31 Aug 2012 04:58:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7N3j-0001CY-AI
	for coreutils@gnu.org; Fri, 31 Aug 2012 04:58:39 -0400
Received: from mx.meyering.net ([88.168.87.75]:36773)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7N3i-0001CM-V4
	for coreutils@gnu.org; Fri, 31 Aug 2012 04:58:35 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id DADA560108
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 10:58:33 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: coreutils@gnu.org
Subject: [PATCH] scripts: add autotools-install,
	for those stuck with outdated tools
Date: Fri, 31 Aug 2012 10:58:33 +0200
Message-ID: <87sjb3tp3a.fsf@rho.meyering.net>
Lines: 239
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 08:58:41 -0000

FYI, this adds the autotools-install script, formerly at:

    http://people.redhat.com/meyering/autotools-install

As the commit log says, it is a:

    New script, so you can always build
    from git-cloned sources, even when they require bleeding edge
    m4, autoconf, automake, etc.


>From c1495a1107871f451fd680d5c23b2c71af6e9971 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Fri, 31 Aug 2012 10:55:03 +0200
Subject: [PATCH] scripts: add autotools-install, for those stuck with
 outdated tools

* scripts/autotools-install: New script, so you can always build
from git-cloned sources, even when they require bleeding edge
m4, autoconf, automake, etc.
---
 scripts/autotools-install | 206 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 206 insertions(+)
 create mode 100755 scripts/autotools-install

diff --git a/scripts/autotools-install b/scripts/autotools-install
new file mode 100755
index 0000000..20d02ae
--- /dev/null
+++ b/scripts/autotools-install
@@ -0,0 +1,206 @@
+#!/bin/sh
+# Building coreutils from a git-cloned directory may require versions of
+# tools like autoconf, automake, gettext, etc. that are newer than the ones
+# provided by the distribution on which you want to build.  In that case,
+# you can use this script to bootstrap the "autotools" tool chain, starting
+# with m4 (prereq of autoconf), then autoconf, which a prereq of automake,
+# etc.  It also builds a few others, including gettext and pkg-config.
+# The results are installed in a directory whose --prefix you specify, and
+# it tells you how to update envvars like PATH and (if you use pkg-config)
+# PKG_CONFIG_PATH.
+
+# Written by Jim Meyering
+
+VERSION='2012-08-31 07:40' # UTC
+
+prog_name=`basename $0`
+die () { echo "$prog_name: $*" >&2; exit 1; }
+
+tarballs='
+  http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.1.tar.gz
+  ftp://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.gz
+  ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
+  http://ftp.gnu.org/gnu/automake/automake-1.12.3.tar.gz
+  ftp://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz
+  ftp://ftp.gnu.org/gnu/gettext/gettext-0.18.1.tar.gz
+'
+
+usage() {
+  echo >&2 "\
+Usage: $0 [OPTION]...
+Download, build, and install some tools.
+
+Options:
+ --prefix=PREFIX    install tools under specified directory
+ --skip-check       do not run "make check" (this can save 50+ min)
+ --help             display this help and exit
+
+For example, to install programs into \$HOME/autotools/bin, run this command:
+
+  $prog_name --prefix=\$HOME/autotools
+
+If you've already verified that your system/environment can build working
+versions of these tools, you can make this script complete in just a
+minute or two (rather than about an hour if you let all "make check"
+tests run) by invoking it like this:
+
+  $prog_name --prefix=\$HOME/autotools --skip-check
+
+"
+}
+
+# Get the public keys associated with each .sig file.
+# for i in *.sig; do k=$(gpgv $i 2>&1 | sed -n 's/.*key ID //p'); \
+# gpg --keyserver pgp.mit.edu --recv-key $k; done
+
+# Get the listed tarballs into the current directory.
+get_sources()
+{
+  case `wget --help` in
+    *'--no-cache'*)
+      WGET_COMMAND='wget -nv --no-cache';;
+    *'--cache=on/off'*)
+      WGET_COMMAND='wget -nv --cache=off';;
+    *'--non-verbose'*)
+      WGET_COMMAND='wget -nv';;
+    *)
+      die 'no wget program found; please install it and try again';;
+  esac
+
+  # Download the each tar-ball along with its signature, if there is one.
+  pkgs=
+  for t in $(echo $tarballs); do
+    base=$(basename $t)
+    pkgs="$pkgs $base"
+    test -f $base     || $WGET_COMMAND $t
+
+    # No signatures for some :-(
+    case $base in pkg-config*) continue;; esac
+
+    test -f $base.sig || $WGET_COMMAND $t.sig
+    # Verify each signature.
+    gpg --quiet --verify --trust-model=always   \
+        --trusted-key=32419B785D0CDCFC          \
+        --trusted-key=3859C03B2E236E47          \
+        --trusted-key=B93F60C6B5C4CE13          \
+        --trusted-key=F382AE19F4850180          \
+        --trusted-key=FC818E17429F96EA          \
+        $base.sig > /dev/null 2>&1              \
+      || echo "info: not verifying GPG signature for $base" 1>&2
+  done
+  printf 'ok\n' 1>&2
+  echo $pkgs
+}
+
+#################################################################
+set -e
+
+# Parse options.
+
+make_check=yes
+prefix=
+
+for option
+do
+  case $option in
+    --help) usage; exit;;
+    --skip-check) make_check=no;;
+    --prefix=*) prefix=`expr "$option" : '--prefix=\(.*\)'`;;
+    *) die "$option: unknown option";;
+  esac
+done
+
+test -n "$prefix" \
+  || die "you must specify a --prefix"
+
+case $prefix in
+  /*) ;;
+  *) die 'invalid prefix: '"$prefix"': it must be an absolute name';;
+esac
+
+# Don't run as root.
+# Make sure id -u succeeds.
+my_uid=`id -u`
+test $? = 0 || {
+  echo "$0: cannot run \`id -u'" 1>&2
+  (exit 1); exit 1
+}
+test $my_uid = 0 && die "please don't run this program as root"
+
+# Ensure that prefix is not /usr/bin or /bin, /sbin, etc.
+case $prefix in
+  /bin|/sbin|/usr/bin|/usr/sbin)
+    die "don't set PREFIX to a system directory";;
+  *) ;;
+esac
+
+# Create a build directory, then cd into it for the rest....
+tmpdir=.build-auto-tools
+mkdir -p $tmpdir
+cd $tmpdir
+
+pkgs=$(get_sources)
+
+export PATH=$prefix/bin:$PATH
+for pkg in $pkgs; do
+  echo building/installing $pkg...
+  dir=$(basename $pkg .tar.gz)
+  rm -rf dir
+  gzip -dc $pkg|tar xf -
+  cd $dir
+  ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix    > makerr-config  2>&1
+  make                                                  > makerr-build   2>&1
+  if test "$make_check" = yes; then
+    case $pkg in
+      automake*) expected_duration_minutes=40;;
+      autoconf*) expected_duration_minutes=15;;
+      libtool*) expected_duration_minutes=3;;
+      *);;
+    esac
+    test -n "$expected_duration_minutes" \
+      && echo "running 'make check' for $pkg; NB: this can take over" \
+              "$expected_duration_minutes minutes"
+    make check                                      > makerr-check   2>&1
+  fi
+  make install                                      > makerr-install 2>&1
+  echo done at $(date +%Y-%m-%d.%T)
+  cd ..
+done
+
+# Without checks (and with existing tarballs), it takes just one minute.
+# Including all checks, it takes nearly an hour on an AMD64/3400+
+
+case $PKG_CONFIG_PATH in
+  $prefix/lib/pkgconfig:/usr/lib/pkgconfig)
+    echo 'Good! your PKG_CONFIG_PATH envvar is already set';;
+  *) cat <<EOF;;
+**************************************************************************
+Be sure that PKG_CONFIG_PATH is set in your environment, e.g.,
+PKG_CONFIG_PATH=$prefix/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
+**************************************************************************
+EOF
+esac
+
+case $PATH in
+  "$prefix/bin:"*) echo 'Good! your PATH is fine';;
+  *) cat <<EOF;;
+**************************************************************************
+Be sure that "$prefix/bin" is earlier in your PATH than /bin, /usr/bin, etc.
+**************************************************************************
+EOF
+esac
+
+cat <<EOF
+**************************************************************************
+You may want to remove the tool build directory:
+rm -rf $tmpdir
+**************************************************************************
+EOF
+
+## Local Variables:
+## eval: (add-hook 'write-file-hooks 'time-stamp)
+## time-stamp-start: "VERSION='"
+## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
+## time-stamp-time-zone: "UTC"
+## time-stamp-end: "' # UTC"
+## End:
--
1.7.12.146.g16d26b1


From MAILER-DAEMON Fri Aug 31 05:14:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7NJH-0001AT-Bp
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 05:14:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56359)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T7NJB-0001AD-L3
	for coreutils@gnu.org; Fri, 31 Aug 2012 05:14:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T7NJA-0008Rl-Mr
	for coreutils@gnu.org; Fri, 31 Aug 2012 05:14:33 -0400
Received: from moutng.kundenserver.de ([212.227.17.10]:56994)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T7NJA-0008Ps-Cr
	for coreutils@gnu.org; Fri, 31 Aug 2012 05:14:32 -0400
Received: from [192.168.2.108] (p4FF7586F.dip.t-dialin.net [79.247.88.111])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0LmRp1-1ThGQ42eOZ-00aBma; Fri, 31 Aug 2012 11:14:20 +0200
Message-ID: <5040806A.1060202@bernhard-voelker.de>
Date: Fri, 31 Aug 2012 11:14:18 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:15.0) Gecko/20120825 Thunderbird/15.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 3/7] build: require Automake >= 1.11.6
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
	<503FB7D3.7050607@bernhard-voelker.de>
	<87oblrv894.fsf@rho.meyering.net>
	<50406B65.8070105@bernhard-voelker.de>
	<874nnjv5lf.fsf@rho.meyering.net>
In-Reply-To: <874nnjv5lf.fsf@rho.meyering.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:q0U68ibFmNQQEakJWkcn9Qn3J8EAghKnmz/4rfGdZrs
	L/rtagXD6k3YfZMu5oILwLhU6zlZQcPy/SHdUqusZv11J7R5LP
	r4eJnvtPcQiNcH7Kb84B/ei7TaajKvIfq/WzAeTXr9/+PPDV9b
	1c2gjoSPWOM4uVNn0kyFDbHHWUxQcCS+QngcZnuNkffoGsVI8P
	4yPdjCsva0QfUk4dEcokV5pZeRLou1Aed6eDbkc/7AfoJlfKDM
	Ruk4ix6xLSitgkD/X02sXWKjFQHAH2DdjtNtbLG8DzBMPZ/qjN
	dLJdtf/4pGDOONrPqPvx8mGI7pX95DYUljIWqksfhBC6WHFXP3
	zmtP7mgEwNCEndRAfihXb7TniVi/deJjMk7hcRzX3
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.17.10
Cc: Stefano Lattarini <stefano.lattarini@gmail.com>, 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, 31 Aug 2012 09:14:37 -0000


On 08/31/2012 10:16 AM, Jim Meyering wrote:
>  wrote the commit log for you, too.
> Here's the result.  I'll wait for your ACK:

Thanks for wrapping that into a patch.

I just noticed that there's still a stray

  grep: *.1: No such file or directory

in the output. That comes from sc_option_desc_uppercase.
What has changed re. the man files?

Other than that: +1

Have a nice day,
Berny


From MAILER-DAEMON Fri Aug 31 05:17:05 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7NLc-0001w5-W6
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 05:17:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39004)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7NLV-0001nK-F8
	for coreutils@gnu.org; Fri, 31 Aug 2012 05:17:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7NLO-00013i-Ru
	for coreutils@gnu.org; Fri, 31 Aug 2012 05:16:57 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:33831)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7NLO-00013a-Do
	for coreutils@gnu.org; Fri, 31 Aug 2012 05:16:50 -0400
Received: by bkcjc3 with SMTP id jc3so1188178bkc.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 02:16:49 -0700 (PDT)
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=81wb8q0DA8+sRzbJM+iDDhN3r/Z40pKlBxbREpf5S1w=;
	b=AT4a7lqG7A1scvWWAKavztJnu5E4xOReBfndxJvnlUoZziEaXODuEUo5Aza+gVBPwy
	uAM98oOArWhpszIZSlg2Tw1qW1+TDVnAJacpxbV+2pSXL3aS7/ZHytSgnkSRE0b38DZL
	eS6jfCtmkxGHtfCnTIcgwMzf3fE/IX2/46uJFSMr31EZiBaRyhS76Yw6obKL/zkaBpEF
	kwHqNyDMW9Sx/uTcIQiPV1eIKVqvdoWdg8aBxHzOe0JZ23WvjRcZI24EL+aWvieTCx6f
	j+0RTe0LhZpw6nfXq9RaDYrD/EeBQOv3pc74W0jEWq9m87thrNC+UhMr7Xq8jlTVjPo1
	M8qg==
Received: by 10.204.133.196 with SMTP id g4mr3860988bkt.89.1346404609508;
	Fri, 31 Aug 2012 02:16:49 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id m9sm2938203bkm.10.2012.08.31.02.16.47
	(version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 02:16:48 -0700 (PDT)
Message-ID: <504080FD.40508@gmail.com>
Date: Fri, 31 Aug 2012 11:16:45 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] scripts: add autotools-install, for those stuck with
	outdated tools
References: <87sjb3tp3a.fsf@rho.meyering.net>
In-Reply-To: <87sjb3tp3a.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 31 Aug 2012 09:17:04 -0000

On 08/31/2012 10:58 AM, Jim Meyering wrote:
> FYI, this adds the autotools-install script, formerly at:
> 
>     http://people.redhat.com/meyering/autotools-install
> 
> As the commit log says, it is a:
> 
>     New script, so you can always build
>     from git-cloned sources, even when they require bleeding edge
>     m4, autoconf, automake, etc.
> 
> 
> From c1495a1107871f451fd680d5c23b2c71af6e9971 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering@redhat.com>
> Date: Fri, 31 Aug 2012 10:55:03 +0200
> Subject: [PATCH] scripts: add autotools-install, for those stuck with
>  outdated tools
> 
> * scripts/autotools-install: New script, so you can always build
> from git-cloned sources, even when they require bleeding edge
> m4, autoconf, automake, etc.
> ---
>  scripts/autotools-install | 206 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 206 insertions(+)
>  create mode 100755 scripts/autotools-install
> 
> diff --git a/scripts/autotools-install b/scripts/autotools-install
> new file mode 100755
> index 0000000..20d02ae
> --- /dev/null
> +++ b/scripts/autotools-install
> @@ -0,0 +1,206 @@
> +#!/bin/sh
> +# Building coreutils from a git-cloned directory may require versions of
> +# tools like autoconf, automake, gettext, etc. that are newer than the ones
> +# provided by the distribution on which you want to build.  In that case,
> +# you can use this script to bootstrap the "autotools" tool chain, starting
> +# with m4 (prereq of autoconf), then autoconf, which a prereq of automake,
>
"which is a prereq of automake"

> +# etc.  It also builds a few others, including gettext and pkg-config.
> +# The results are installed in a directory whose --prefix you specify, and
> +# it tells you how to update envvars like PATH and (if you use pkg-config)
> +# PKG_CONFIG_PATH.
> +
> +# Written by Jim Meyering
> +
> +VERSION='2012-08-31 07:40' # UTC
> +
> +prog_name=`basename $0`
> +die () { echo "$prog_name: $*" >&2; exit 1; }
> +
> +tarballs='
> +  http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.1.tar.gz
> +  ftp://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.gz
> +  ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
> +  http://ftp.gnu.org/gnu/automake/automake-1.12.3.tar.gz
> +  ftp://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz
> +  ftp://ftp.gnu.org/gnu/gettext/gettext-0.18.1.tar.gz
> +'
> +
> +usage() {
> +  echo >&2 "\
> +Usage: $0 [OPTION]...
> +Download, build, and install some tools.
> +
> +Options:
> + --prefix=PREFIX    install tools under specified directory
> + --skip-check       do not run "make check" (this can save 50+ min)
> + --help             display this help and exit
> +
> +For example, to install programs into \$HOME/autotools/bin, run this command:
> +
> +  $prog_name --prefix=\$HOME/autotools
> +
> +If you've already verified that your system/environment can build working
> +versions of these tools, you can make this script complete in just a
> +minute or two (rather than about an hour if you let all "make check"
> +tests run) by invoking it like this:
> +
> +  $prog_name --prefix=\$HOME/autotools --skip-check
> +
> +"
> +}
> +
> +# Get the public keys associated with each .sig file.
> +# for i in *.sig; do k=$(gpgv $i 2>&1 | sed -n 's/.*key ID //p'); \
> +# gpg --keyserver pgp.mit.edu --recv-key $k; done
> +
> +# Get the listed tarballs into the current directory.
> +get_sources()
> +{
> +  case `wget --help` in
> +    *'--no-cache'*)
> +      WGET_COMMAND='wget -nv --no-cache';;
> +    *'--cache=on/off'*)
> +      WGET_COMMAND='wget -nv --cache=off';;
> +    *'--non-verbose'*)
> +      WGET_COMMAND='wget -nv';;
> +    *)
> +      die 'no wget program found; please install it and try again';;
> +  esac
> +
> +  # Download the each tar-ball along with its signature, if there is one.
> +  pkgs=
> +  for t in $(echo $tarballs); do
>
Since the rest of the script seems to suggest you want to remain portable
to non-POSIX Bourne shells (like Solaris 10 /bin/sh): you should use `...`
nor $(...), for command substitution.

> +    base=$(basename $t)
>
Ditto.

> +    pkgs="$pkgs $base"
> +    test -f $base     || $WGET_COMMAND $t
> +
> +    # No signatures for some :-(
> +    case $base in pkg-config*) continue;; esac
> +
> +    test -f $base.sig || $WGET_COMMAND $t.sig
> +    # Verify each signature.
> +    gpg --quiet --verify --trust-model=always   \
> +        --trusted-key=32419B785D0CDCFC          \
> +        --trusted-key=3859C03B2E236E47          \
> +        --trusted-key=B93F60C6B5C4CE13          \
> +        --trusted-key=F382AE19F4850180          \
> +        --trusted-key=FC818E17429F96EA          \
> +        $base.sig > /dev/null 2>&1              \
> +      || echo "info: not verifying GPG signature for $base" 1>&2
> +  done
> +  printf 'ok\n' 1>&2
> +  echo $pkgs
> +}
> +
> +#################################################################
> +set -e
> +
> +# Parse options.
> +
> +make_check=yes
> +prefix=
> +
> +for option
> +do
> +  case $option in
> +    --help) usage; exit;;
> +    --skip-check) make_check=no;;
> +    --prefix=*) prefix=`expr "$option" : '--prefix=\(.*\)'`;;
> +    *) die "$option: unknown option";;
> +  esac
> +done
> +
> +test -n "$prefix" \
> +  || die "you must specify a --prefix"
> +
> +case $prefix in
> +  /*) ;;
> +  *) die 'invalid prefix: '"$prefix"': it must be an absolute name';;
> +esac
> +
> +# Don't run as root.
> +# Make sure id -u succeeds.
> +my_uid=`id -u`
> +test $? = 0 || {
> +  echo "$0: cannot run \`id -u'" 1>&2
> +  (exit 1); exit 1
> +}
>
Simply use "die" instead?  Also, the GCS now suggest quoting 'like this',
not `like this'.

Oh, and since you are running with 'set -e', you wan to protect possible
failures in command substitution:

    my_uid=`id -u` && test -n "$my_id" || die "'id -u' failed"

Otherwise you might get bitten by this behaviour:

    $ bash -e -c 'x=`false`; echo OK'; echo $?
    1

> +test $my_uid = 0 && die "please don't run this program as root"
> +
> +# Ensure that prefix is not /usr/bin or /bin, /sbin, etc.
> +case $prefix in
> +  /bin|/sbin|/usr/bin|/usr/sbin)
> +    die "don't set PREFIX to a system directory";;
> +  *) ;;
> +esac
> +
> +# Create a build directory, then cd into it for the rest....
> +tmpdir=.build-auto-tools
> +mkdir -p $tmpdir
> +cd $tmpdir
> +
> +pkgs=$(get_sources)
> +
`...`, not $(...)

> +export PATH=$prefix/bin:$PATH
> +for pkg in $pkgs; do
> +  echo building/installing $pkg...
> +  dir=$(basename $pkg .tar.gz)
>
Ditto.

> +  rm -rf dir
>
s/dir/$dir/

> +  gzip -dc $pkg|tar xf -
> +  cd $dir
> +  ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix    > makerr-config  2>&1
> +  make                                                  > makerr-build   2>&1
>
Why this "creative formatting"?  Seems more confusing than useful, at least
for me.  More instances below.

> +  if test "$make_check" = yes; then
> +    case $pkg in
> +      automake*) expected_duration_minutes=40;;
> +      autoconf*) expected_duration_minutes=15;;
> +      libtool*) expected_duration_minutes=3;;
>
The libtool testsuite is truly so quick?  I seem to recall differently ....

> +      *);;
> +    esac
> +    test -n "$expected_duration_minutes" \
> +      && echo "running 'make check' for $pkg; NB: this can take over" \
> +              "$expected_duration_minutes minutes"
> +    make check                                      > makerr-check   2>&1
> +  fi
> +  make install                                      > makerr-install 2>&1
> +  echo done at $(date +%Y-%m-%d.%T)
>
`...`, not $(...)

> +  cd ..
> +done
> +
> +# Without checks (and with existing tarballs), it takes just one minute.
> +# Including all checks, it takes nearly an hour on an AMD64/3400+
> +
> +case $PKG_CONFIG_PATH in
> +  $prefix/lib/pkgconfig:/usr/lib/pkgconfig)
> +    echo 'Good! your PKG_CONFIG_PATH envvar is already set';;
> +  *) cat <<EOF;;
> +**************************************************************************
> +Be sure that PKG_CONFIG_PATH is set in your environment, e.g.,
> +PKG_CONFIG_PATH=$prefix/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
>
inconsistency with the value checked above (that lacked "/usr/share/pkgconfig").

> +**************************************************************************
> +EOF
> +esac
> +
> +case $PATH in
> +  "$prefix/bin:"*) echo 'Good! your PATH is fine';;
> +  *) cat <<EOF;;
> +**************************************************************************
> +Be sure that "$prefix/bin" is earlier in your PATH than /bin, /usr/bin, etc.
> +**************************************************************************
> +EOF
> +esac
> +
> +cat <<EOF
> +**************************************************************************
> +You may want to remove the tool build directory:
> +rm -rf $tmpdir
> +**************************************************************************
> +EOF
> +
> +## Local Variables:
> +## eval: (add-hook 'write-file-hooks 'time-stamp)
> +## time-stamp-start: "VERSION='"
> +## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
> +## time-stamp-time-zone: "UTC"
> +## time-stamp-end: "' # UTC"
> +## End:
> --
> 1.7.12.146.g16d26b1
> 

Regards,
  Stefano


From MAILER-DAEMON Fri Aug 31 05:57:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7NyI-0000lg-Ep
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 05:57:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36691)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Ny9-0000Sj-Lq
	for coreutils@gnu.org; Fri, 31 Aug 2012 05:56:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Ny3-0007Lo-PI
	for coreutils@gnu.org; Fri, 31 Aug 2012 05:56:53 -0400
Received: from mx.meyering.net ([88.168.87.75]:36918)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Ny3-0007Lh-HN
	for coreutils@gnu.org; Fri, 31 Aug 2012 05:56:47 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 9F0DE600B2;
	Fri, 31 Aug 2012 11:56:46 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] maint: fixup: don't distribute a non-existent file
In-Reply-To: <d7b943e8cd2dfed1a68554b0f97dff677fe375e3.1346399951.git.stefano.lattarini@gmail.com>
	(Stefano Lattarini's message of "Fri, 31 Aug 2012 09:59:31 +0200")
References: <d7b943e8cd2dfed1a68554b0f97dff677fe375e3.1346399951.git.stefano.lattarini@gmail.com>
Date: Fri, 31 Aug 2012 11:56:46 +0200
Message-ID: <87ligvtme9.fsf@rho.meyering.net>
Lines: 23
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 09:56:59 -0000

Stefano Lattarini wrote:
> * tests/Makefile.am (EXTRA_DIST): Drop 'check.mk', which has been
> removed (being merged into 'tests/Makefile.am') by recent changes.
>
> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
> ---
>  tests/Makefile.am | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index bc3d308..d8dee57 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -116,7 +116,6 @@ EXTRA_DIST =		\
>    Coreutils.pm		\
>    CuSkip.pm		\
>    CuTmpdir.pm		\
> -  check.mk		\

Thanks.  Applied, but without your Signed-off-by: line.
And I changed the one-line summary to this:

  maint: fixup: don't try to distribute a now-removed file


From MAILER-DAEMON Fri Aug 31 06:10:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7OBg-0002s5-4u
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 06:10:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39012)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OBa-0002qc-TJ
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:10:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OBU-0003TC-ST
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:10:46 -0400
Received: from mx.meyering.net ([88.168.87.75]:36956)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OBU-0003Rs-LL
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:10:40 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id F16E56000E;
	Fri, 31 Aug 2012 12:10:39 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Subject: Re: [PATCH 3/7] build: require Automake >= 1.11.6
In-Reply-To: <5040806A.1060202@bernhard-voelker.de> (Bernhard Voelker's
	message of "Fri, 31 Aug 2012 11:14:18 +0200")
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
	<503FB7D3.7050607@bernhard-voelker.de>
	<87oblrv894.fsf@rho.meyering.net>
	<50406B65.8070105@bernhard-voelker.de>
	<874nnjv5lf.fsf@rho.meyering.net>
	<5040806A.1060202@bernhard-voelker.de>
Date: Fri, 31 Aug 2012 12:10:39 +0200
Message-ID: <87ehmntlr4.fsf@rho.meyering.net>
Lines: 48
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: Stefano Lattarini <stefano.lattarini@gmail.com>, 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, 31 Aug 2012 10:10:50 -0000

Bernhard Voelker wrote:
> On 08/31/2012 10:16 AM, Jim Meyering wrote:
>>  wrote the commit log for you, too.
>> Here's the result.  I'll wait for your ACK:
>
> Thanks for wrapping that into a patch.
>
> I just noticed that there's still a stray
>
>   grep: *.1: No such file or directory

Well spotted.

> in the output. That comes from sc_option_desc_uppercase.
> What has changed re. the man files?

Here's the fix:

>From 56661fd87ad1bede1bb84cf3d36d410edd327301 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Fri, 31 Aug 2012 12:08:49 +0200
Subject: [PATCH] build: reenable just-moved/broken syntax-check rule

* cfg.mk (sc_option_desc_uppercase): Now that this rule lives in cfg.mk,
we must search man/*.1, not "*.1".
Reported by Bernhard Voelker.
---
 cfg.mk | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 44a43f8..c945ea6 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -173,9 +173,8 @@ sc_long_lines:
 ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
 .PHONY: sc_option_desc_uppercase
 sc_option_desc_uppercase:
-	@grep '^\\fB\\-' -A1 *.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' && \
-	    { echo 1>&2 '$@: found initial capitals in --help';   \
-	      exit 1; } || :;
+	@grep '^\\fB\\-' -A1 man/*.1 | LC_ALL=C grep '\.1.[A-Z][a-z]'	\
+	  && { echo 1>&2 '$@: found initial capitals in --help'; exit 1; } || :
 sc_option_desc_uppercase: $(dist_man1_MANS) \
                           $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT)) \
                           all_programs
--
1.7.12.146.g16d26b1


From MAILER-DAEMON Fri Aug 31 06:13:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7OEI-0003ui-1M
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 06:13:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39672)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7OEA-0003pj-DV
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:13:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7OE9-0004SR-5i
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:13:26 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:58094)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7OE8-0004SN-V8
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:13:25 -0400
Received: by bkcjc3 with SMTP id jc3so1217942bkc.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 03:13:24 -0700 (PDT)
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=+S55TMNLXk7mO44VDAsk+cyZuPzUPf8xk6Ekv6oF4Po=;
	b=nQDktGehLo6+vvO837vQt8eNN0+gljEK3AR9jm3rkxV7NEzbipeGER79R/WXr05r5g
	xUSSMFcd5wxehvuPFXD6Ra5MGiQT2GO6dAi/hz3ZxokkwtsdmwhAIcict49ylxYNvoIY
	3LMG0j6lEZxB0JGlqXPVYw3MNDCVTnzjE7lqy9oxaGBpgYTTmwNkFHOERwQUYwBxe8Jk
	yjgQvanMGdoDwJotwkXp3XCRZnppKiTODbdx25MgsRbesFQCpVaCcmx8RJUK0jLS2N5a
	FSFWW0uIgKlFymgtxoUVnrUcvxd8eU+JdlAJ+J/iFjvXRoRRny0uB06z+nJ56BwAZ2Hf
	iAyg==
Received: by 10.205.135.6 with SMTP id ie6mr3776748bkc.139.1346408003997;
	Fri, 31 Aug 2012 03:13:23 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hs2sm3095740bkc.1.2012.08.31.03.13.21
	(version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 03:13:22 -0700 (PDT)
Message-ID: <50408E3F.4080207@gmail.com>
Date: Fri, 31 Aug 2012 12:13:19 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] maint: fixup: don't distribute a non-existent file
References: <d7b943e8cd2dfed1a68554b0f97dff677fe375e3.1346399951.git.stefano.lattarini@gmail.com>
	<87ligvtme9.fsf@rho.meyering.net>
In-Reply-To: <87ligvtme9.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 31 Aug 2012 10:13:32 -0000

On 08/31/2012 11:56 AM, Jim Meyering wrote:
> Stefano Lattarini wrote:
>> * tests/Makefile.am (EXTRA_DIST): Drop 'check.mk', which has been
>> removed (being merged into 'tests/Makefile.am') by recent changes.
>>
>> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
>> ---
>>  tests/Makefile.am | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/tests/Makefile.am b/tests/Makefile.am
>> index bc3d308..d8dee57 100644
>> --- a/tests/Makefile.am
>> +++ b/tests/Makefile.am
>> @@ -116,7 +116,6 @@ EXTRA_DIST =		\
>>    Coreutils.pm		\
>>    CuSkip.pm		\
>>    CuTmpdir.pm		\
>> -  check.mk		\
> 
> Thanks.  Applied, but without your Signed-off-by: line.
>
Hmm.   But I see:

    $ git config --get format.signoff
    false

What's going wrong?

> And I changed the one-line summary to this:
> 
>   maint: fixup: don't try to distribute a now-removed file
>
Agreed, slightly better.

Thanks,
  Stefano


From MAILER-DAEMON Fri Aug 31 06:20:11 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7OKh-0004TP-FZ
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 06:20:11 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60119)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OKf-0004TG-Ij
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:20:10 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OKZ-0006lD-N4
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:20:09 -0400
Received: from mx.meyering.net ([88.168.87.75]:36983)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OKZ-0006hN-FE
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:20:03 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 558B56000E;
	Fri, 31 Aug 2012 12:20:01 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] maint: fixup: don't distribute a non-existent file
In-Reply-To: <50408E3F.4080207@gmail.com> (Stefano Lattarini's message of
	"Fri, 31 Aug 2012 12:13:19 +0200")
References: <d7b943e8cd2dfed1a68554b0f97dff677fe375e3.1346399951.git.stefano.lattarini@gmail.com>
	<87ligvtme9.fsf@rho.meyering.net> <50408E3F.4080207@gmail.com>
Date: Fri, 31 Aug 2012 12:20:01 +0200
Message-ID: <878vcvtlbi.fsf@rho.meyering.net>
Lines: 32
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 10:20:10 -0000

Stefano Lattarini wrote:

> On 08/31/2012 11:56 AM, Jim Meyering wrote:
>> Stefano Lattarini wrote:
>>> * tests/Makefile.am (EXTRA_DIST): Drop 'check.mk', which has been
>>> removed (being merged into 'tests/Makefile.am') by recent changes.
>>>
>>> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
>>> ---
>>>  tests/Makefile.am | 1 -
>>>  1 file changed, 1 deletion(-)
>>>
>>> diff --git a/tests/Makefile.am b/tests/Makefile.am
>>> index bc3d308..d8dee57 100644
>>> --- a/tests/Makefile.am
>>> +++ b/tests/Makefile.am
>>> @@ -116,7 +116,6 @@ EXTRA_DIST =		\
>>>    Coreutils.pm		\
>>>    CuSkip.pm		\
>>>    CuTmpdir.pm		\
>>> -  check.mk		\
>>
>> Thanks.  Applied, but without your Signed-off-by: line.
>>
> Hmm.   But I see:
>
>     $ git config --get format.signoff
>     false
>
> What's going wrong?

You're probably still using git-commit's -s option.


From MAILER-DAEMON Fri Aug 31 06:24:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7OOe-0004hl-J0
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 06:24:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60770)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7OOc-0004hV-EG
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:24:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7OOY-00084c-Jj
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:24:14 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:50849)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7OOY-00084S-CJ
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:24:10 -0400
Received: by bkcjc3 with SMTP id jc3so1223283bkc.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 03:24:09 -0700 (PDT)
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=cEkA4n5eT/4+2EZdlrXG7dXAcrogoQCLZ3jpUX4kNJM=;
	b=ns5dJc6yWzI2gbJzYBgItNlK8t1jZeytnLKV9lDgP2B61L5rC1pFp5OpG12fTDLiQd
	4E7Ze01fNr1X4ao61vuquoFQ1RjwpMMoXlsOXkYJCuETyQoM5JEIgXR79QYFROiuokf/
	n1XguwibyOgcy0cYBqPewhboNwsNPzB4fXOX4BC9ouVBdlmIBMFqzEI4uGQZjikyH9C0
	O2esnYV833p5rD0du+ogoelBRT5fDhxWip6w+2Hmak2WHQclfmg4Vvdk/lKLacAm6m2S
	+BH7B8FC38IjuxssAogRIC2qp8OVZNkkSIKX9JaQhgq4sj6t52QYaJ62UbpX2xLIKuZw
	LryA==
Received: by 10.204.129.16 with SMTP id m16mr3935306bks.136.1346408649556;
	Fri, 31 Aug 2012 03:24:09 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id j9sm3124182bkv.0.2012.08.31.03.24.08
	(version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 03:24:08 -0700 (PDT)
Message-ID: <504090C6.7090806@gmail.com>
Date: Fri, 31 Aug 2012 12:24:06 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] maint: fixup: don't distribute a non-existent file
References: <d7b943e8cd2dfed1a68554b0f97dff677fe375e3.1346399951.git.stefano.lattarini@gmail.com>
	<87ligvtme9.fsf@rho.meyering.net> <50408E3F.4080207@gmail.com>
	<878vcvtlbi.fsf@rho.meyering.net>
In-Reply-To: <878vcvtlbi.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 31 Aug 2012 10:24:15 -0000

On 08/31/2012 12:20 PM, Jim Meyering wrote:
> Stefano Lattarini wrote:
> 
> You're probably still using git-commit's -s option.
>
Ah, I thought that setting format.signoff to "false" would have
stripped the S-o-B lines for me.

So I also need this in my coreutils repo:

    $ git config alias.ci commit

Regards,
  Stefano


From MAILER-DAEMON Fri Aug 31 06:24:57 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7OPJ-0004w6-Uk
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 06:24:57 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60910)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OPD-0004tR-32
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:24:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OPB-0008J3-HJ
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:24:51 -0400
Received: from mx.meyering.net ([88.168.87.75]:37001)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OPB-0008Iy-9n
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:24:49 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id A08FB600B1;
	Fri, 31 Aug 2012 12:24:48 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 7/7] maint: get rid of obsolete script 'cvsu'
In-Reply-To: <56467889f5dbe817f8c9e3e17d411b6083d995fb.1346341298.git.stefano.lattarini@gmail.com>
	(Stefano Lattarini's message of "Thu, 30 Aug 2012 18:19:58 +0200")
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
	<cover.1346341298.git.stefano.lattarini@gmail.com>
	<56467889f5dbe817f8c9e3e17d411b6083d995fb.1346341298.git.stefano.lattarini@gmail.com>
Date: Fri, 31 Aug 2012 12:24:48 +0200
Message-ID: <873933tl3j.fsf@rho.meyering.net>
Lines: 47
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 10:24:56 -0000

Stefano Lattarini wrote:

> It was useful only back when coreutils used CVS as its version
> control system.
>
> * build-aux/cvsu: Delete.
> * Makefile.am (EXTRA_DIST): Remove it.
>
> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
> ---
>  Makefile.am    |   1 -
>  build-aux/cvsu | 512 ---------------------------------------------------------
>  2 files changed, 513 deletions(-)
>  delete mode 100755 build-aux/cvsu
>
> diff --git a/Makefile.am b/Makefile.am
> index 673c964..b47b1c1 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -49,7 +49,6 @@ EXTRA_DIST =				\
>    THANKStt.in				\
>    bootstrap				\
>    bootstrap.conf			\
> -  build-aux/cvsu			\
>    cfg.mk				\
>    dist-check.mk				\
>    maint.mk				\
> diff --git a/build-aux/cvsu b/build-aux/cvsu
> deleted file mode 100755

Thanks.  I'm amending that as follows:

  * cfg.mk: Remove the two exemptions for this removed file.

diff --git a/cfg.mk b/cfg.mk
index 92bbadc..1dbfe42 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -509,8 +509,6 @@ update-copyright-env = \
 exclude_file_name_regexp--sc_space_tab = \
   ^(tests/pr/|tests/misc/nl\.sh$$|gl/.*\.diff$$)
 exclude_file_name_regexp--sc_bindtextdomain = ^(gl/.*|lib/euidaccess-stat)\.c$$
-exclude_file_name_regexp--sc_unmarked_diagnostics =    ^build-aux/cvsu$$
-exclude_file_name_regexp--sc_error_message_uppercase = ^build-aux/cvsu$$
 exclude_file_name_regexp--sc_trailing_blank = ^tests/pr/
 exclude_file_name_regexp--sc_system_h_headers = \
   ^src/((system|copy)\.h|libstdbuf\.c)$$


From MAILER-DAEMON Fri Aug 31 06:28:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7OSH-0005AU-Cx
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 06:28:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54873)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T7OS2-000594-F7
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:28:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T7ORq-00016W-TG
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:27:46 -0400
Received: from moutng.kundenserver.de ([212.227.17.10]:54587)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mail@bernhard-voelker.de>) id 1T7ORq-000164-GB
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:27:34 -0400
Received: from [192.168.2.108] (p4FF7586F.dip.t-dialin.net [79.247.88.111])
	by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis)
	id 0MPbvB-1TC38v2qUD-004fq7; Fri, 31 Aug 2012 12:27:33 +0200
Message-ID: <50409193.1000006@bernhard-voelker.de>
Date: Fri, 31 Aug 2012 12:27:31 +0200
From: Bernhard Voelker <mail@bernhard-voelker.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:15.0) Gecko/20120825 Thunderbird/15.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 3/7] build: require Automake >= 1.11.6
References: <cover.1346327497.git.stefano.lattarini@gmail.com>
	<e55d9bae41d8c99df0a29dc61bea5ebea5bfd63c.1346327497.git.stefano.lattarini@gmail.com>
	<503FB7D3.7050607@bernhard-voelker.de>
	<87oblrv894.fsf@rho.meyering.net>
	<50406B65.8070105@bernhard-voelker.de>
	<874nnjv5lf.fsf@rho.meyering.net>
	<5040806A.1060202@bernhard-voelker.de>
	<87ehmntlr4.fsf@rho.meyering.net>
In-Reply-To: <87ehmntlr4.fsf@rho.meyering.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V02:K0:FaJr+PFRMHopkCtr7zabrtTsxwY/UUqJd4a9IitItxQ
	x9DQZHxHavg7kRPUsqeD3kQstBOvpmybpc67qiIcEJaTWJTd+J
	/bv4HoTU3R4jXvmRQEyQWTGzAXYyUwNr5vIiUoE9EYvGlQq2Lg
	YKYGTquNtmjLWo3eXsUg5z2JUiDapaprI0tP4xzKgci0AWnx9b
	0Ev9axNWx/6MVF54tuEyeXWoS5KqVsmrizvxFYrFIkNiSLgkEs
	s0NkrF9UkXVYztderJPA8+7AwTNYGmalmVEhYyVgS1ocYAKj81
	Xh21qpGLsKuPY+xbX4zpIOOChDoNeMu7sWWtajwvCHgRj6tdLO
	6OzWQba9Jv00aCoHE066GI+zKR70Tu5gIrX2urTz2
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 212.227.17.10
Cc: Stefano Lattarini <stefano.lattarini@gmail.com>, 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, 31 Aug 2012 10:28:00 -0000



On 08/31/2012 12:10 PM, Jim Meyering wrote:
> 
>> in the output. That comes from sc_option_desc_uppercase.
>> What has changed re. the man files?
>
> Here's the fix:

Thanks, works.

Have a nice day,
Berny


From MAILER-DAEMON Fri Aug 31 06:29:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7OTp-0005ME-Sb
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 06:29:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55442)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7OTo-0005M7-GH
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:29:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7OTm-0001RG-51
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:29:36 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:48955)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7OTl-0001PW-St
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:29:34 -0400
Received: by wibhq4 with SMTP id hq4so1062827wib.12
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 03:29:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer;
	bh=66MQxI61oXQirzgvouiPS50NMMthJIyRyNPbA2dpFRA=;
	b=Ojb/1dMh3wWGR4e9QTlJCH2xbhA++zBfXyxXkWDXVbsWWrTjvLYQ0u6QqgwLwJLwe2
	ZZuhqzHfyfC9pIL77166K6+fnYqnwJKvOrBLboIAhZcFtdsn9vQe2Ous5C6eS2ZWGvIk
	ngtf0iQV9szZnu9kZYvbz2FBXfXbu46FBt+FYHBf3Q6IEgntCBBE1fnpzE5RI17QZ7MO
	awy/jjcxy80MANZG/mQAfUlxaSxsDqZaz5NxDu77uSIVTPvjZALQWK2h1ykpmRl60AUN
	sBdeny/5XqiE3eK/xdYdxZkPw8coHtfZ7a1R1SLRvRang9wLEoGk0DJA6Fjlt+Rj56gT
	QrXA==
Received: by 10.180.104.197 with SMTP id gg5mr3691521wib.9.1346408973038;
	Fri, 31 Aug 2012 03:29:33 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id q4sm241564wix.9.2012.08.31.03.29.31
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 03:29:32 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH] maint: make required gettext version consistent
Date: Fri, 31 Aug 2012 12:29:22 +0200
Message-Id: <512e8cff175f89c633f7597657c16e21766e58bd.1346408939.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 10:29:37 -0000

* bootstrap.conf ($buildreq): Require gettext >= 0.18.1, consistently
with the call to AM_GNU_GETTEXT_VERSION in configure.ac.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 bootstrap.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 27b5302..535900d 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -312,7 +312,7 @@ autoconf   2.64
 automake   1.11.2
 autopoint  -
 bison      -
-gettext    0.17
+gettext    0.18.1
 git        1.4.4
 gperf      -
 gzip       -
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 06:31:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7OVB-0005Vj-4X
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 06:31:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50989)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OV9-0005VR-86
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:31:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OV8-0002A3-7z
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:30:59 -0400
Received: from mx.meyering.net ([88.168.87.75]:37018)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OV8-00029y-0X
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:30:58 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 33CE36011F;
	Fri, 31 Aug 2012 12:30:57 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 0/7] Minor cleanup and refactoring.
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com> (Stefano
	Lattarini's message of "Thu, 30 Aug 2012 18:19:51 +0200")
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
Date: Fri, 31 Aug 2012 12:30:57 +0200
Message-ID: <87wr0fs68u.fsf@rho.meyering.net>
Lines: 31
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 10:31:00 -0000

Stefano Lattarini wrote:
> Found these when trying to convert 'src/' to a non-recursive setup.
> I think they should be simple and uncontroversial enough to go into
> the repository ASAP.
>
> Thanks,
>   Stefano
>
> -*-*-*-
>
> Stefano Lattarini (7):
>   build: move definition of 'all_programs' in cfg.mk
>   build: some refactorings in cfg.mk
>   build: don't use foo_LDADD if there's no foo program
>   maint: remove unused variable in src/Makefile.am
>   maint: more uses of $(ASSORT)
>   build: don't use '$<' in non-suffix rules
>   maint: get rid of obsolete script 'cvsu'

Thanks.  I've begun looking at these.
I'm removing the Signed-off-by: lines from the log entries with this:
(and any empty lines at end of log)

  echo remove all SoB lines; git filter-branch --msg-filter \
  'grep -v "^ *Signed-off-by:"| perl -0777 -pe "s/\\n\\n+\$/\\n/"' HEAD~7..HEAD

The echo ... part is so that I know what I'm looking at
(or searching for) when I reuse a line from my shell's history.

That perl gibberish is an idiom that you might recognize from
a syntax-check in maint.mk.


From MAILER-DAEMON Fri Aug 31 06:31:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7OW4-0005au-B6
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 06:31:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51184)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OVz-0005ak-6q
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:31:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OVy-0002JY-4q
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:31:51 -0400
Received: from mx.meyering.net ([88.168.87.75]:37021)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OVx-0002JU-UH
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:31:50 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 5178A600B1;
	Fri, 31 Aug 2012 12:31:49 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] maint: make required gettext version consistent
In-Reply-To: <512e8cff175f89c633f7597657c16e21766e58bd.1346408939.git.stefano.lattarini@gmail.com>
	(Stefano Lattarini's message of "Fri, 31 Aug 2012 12:29:22 +0200")
References: <512e8cff175f89c633f7597657c16e21766e58bd.1346408939.git.stefano.lattarini@gmail.com>
Date: Fri, 31 Aug 2012 12:31:49 +0200
Message-ID: <87r4qns67e.fsf@rho.meyering.net>
Lines: 21
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 10:31:55 -0000

Stefano Lattarini wrote:
> * bootstrap.conf ($buildreq): Require gettext >= 0.18.1, consistently
> with the call to AM_GNU_GETTEXT_VERSION in configure.ac.
>
> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
> ---
>  bootstrap.conf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/bootstrap.conf b/bootstrap.conf
> index 27b5302..535900d 100644
> --- a/bootstrap.conf
> +++ b/bootstrap.conf
> @@ -312,7 +312,7 @@ autoconf   2.64
>  automake   1.11.2
>  autopoint  -
>  bison      -
> -gettext    0.17
> +gettext    0.18.1

Thanks.  Applied.


From MAILER-DAEMON Fri Aug 31 06:34:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7OYx-0005sn-0k
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 06:34:55 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37069)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OYv-0005sN-9a
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:34:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OYu-0002rX-Fo
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:34:53 -0400
Received: from mx.meyering.net ([88.168.87.75]:37034)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OYu-0002rP-9F
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:34:52 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 82F9F600B1;
	Fri, 31 Aug 2012 12:34:51 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] maint: make required gettext version consistent
In-Reply-To: <87r4qns67e.fsf@rho.meyering.net> (Jim Meyering's message of
	"Fri, 31 Aug 2012 12:31:49 +0200")
References: <512e8cff175f89c633f7597657c16e21766e58bd.1346408939.git.stefano.lattarini@gmail.com>
	<87r4qns67e.fsf@rho.meyering.net>
Date: Fri, 31 Aug 2012 12:34:51 +0200
Message-ID: <87ligvs62c.fsf@rho.meyering.net>
Lines: 24
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 10:34:54 -0000

Jim Meyering wrote:
> Stefano Lattarini wrote:
>> * bootstrap.conf ($buildreq): Require gettext >= 0.18.1, consistently
>> with the call to AM_GNU_GETTEXT_VERSION in configure.ac.
>>
>> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
>> ---
>>  bootstrap.conf | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/bootstrap.conf b/bootstrap.conf
>> index 27b5302..535900d 100644
>> --- a/bootstrap.conf
>> +++ b/bootstrap.conf
>> @@ -312,7 +312,7 @@ autoconf   2.64
>>  automake   1.11.2
>>  autopoint  -
>>  bison      -
>> -gettext    0.17
>> +gettext    0.18.1
>
> Thanks.  Applied.

I have also removed your Signed-off-by: line, again.


From MAILER-DAEMON Fri Aug 31 06:38:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7OcL-000685-GG
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 06:38:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37804)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7OcE-00066S-RZ
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:38:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7OcD-0004Ru-VO
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:38:18 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:39451)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7OcD-0004Rf-OM
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:38:17 -0400
Received: by bkcjc3 with SMTP id jc3so1229932bkc.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 03:38:16 -0700 (PDT)
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=X06c8kUpQIQcL9ckKH6rAZBoLy6sPEBPNMszp8fW13o=;
	b=F2oiOd2UtJORA4yhNu2CIHu9p6naIngvWGKc4uMMXSVgOLjgz5JJS9HiHFrOHSG9W3
	BDSsFb6HGRDWdaV7ru8t7a1IJFXfMe1XvGC2Upz24kTRtVt7/5pWAmtaReGI/kjpzxdh
	+T3UPY7KM8EKFDC2fieDcpUQUP5MEC6x3Wds5WgaziQjxiPi5uHOgKkr4s4qezkPEiRG
	OmYf5pUs/fmhMj/qko6fgc1Bnl8uPK8zHzo1fsLX4JSiOptxCuorfU3lG8NHrtcS+9m5
	iTuK8lqMNOaliH8KeWyfC7gL5WFovXnEFQptctuCfgHQ/UvYwC55ajIEbCpztjrbpF2p
	bL4Q==
Received: by 10.205.135.146 with SMTP id ig18mr3815853bkc.80.1346409496603;
	Fri, 31 Aug 2012 03:38:16 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id hg13sm3153429bkc.7.2012.08.31.03.38.15
	(version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 03:38:15 -0700 (PDT)
Message-ID: <50409415.70702@gmail.com>
Date: Fri, 31 Aug 2012 12:38:13 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] maint: make required gettext version consistent
References: <512e8cff175f89c633f7597657c16e21766e58bd.1346408939.git.stefano.lattarini@gmail.com>
	<87r4qns67e.fsf@rho.meyering.net> <87ligvs62c.fsf@rho.meyering.net>
In-Reply-To: <87ligvs62c.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 31 Aug 2012 10:38:23 -0000

On 08/31/2012 12:34 PM, Jim Meyering wrote:
> Jim Meyering wrote:
>> Stefano Lattarini wrote:
>>> * bootstrap.conf ($buildreq): Require gettext >= 0.18.1, consistently
>>> with the call to AM_GNU_GETTEXT_VERSION in configure.ac.
>>>
>>> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
>>> ---
>>>  bootstrap.conf | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/bootstrap.conf b/bootstrap.conf
>>> index 27b5302..535900d 100644
>>> --- a/bootstrap.conf
>>> +++ b/bootstrap.conf
>>> @@ -312,7 +312,7 @@ autoconf   2.64
>>>  automake   1.11.2
>>>  autopoint  -
>>>  bison      -
>>> -gettext    0.17
>>> +gettext    0.18.1
>>
>> Thanks.  Applied.
> 
> I have also removed your Signed-off-by: line, again.
>
Yes, I'll have to re-write all the pending commits that have a
S-o-B line before sending further patches ...  If you still
notice such a line in any new patch, feel free to just tell me
to re-send.

Sorry for the noise,
  Stefano


From MAILER-DAEMON Fri Aug 31 06:40:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7Oee-0006MM-R3
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 06:40:48 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54189)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Oec-0006KF-72
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:40:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OeZ-0005Jb-J3
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:40:46 -0400
Received: from mx.meyering.net ([88.168.87.75]:37046)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OeZ-0005JW-7x
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:40:43 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 33B2B600AE;
	Fri, 31 Aug 2012 12:40:42 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] maint: make required gettext version consistent
In-Reply-To: <50409415.70702@gmail.com> (Stefano Lattarini's message of "Fri, 
	31 Aug 2012 12:38:13 +0200")
References: <512e8cff175f89c633f7597657c16e21766e58bd.1346408939.git.stefano.lattarini@gmail.com>
	<87r4qns67e.fsf@rho.meyering.net> <87ligvs62c.fsf@rho.meyering.net>
	<50409415.70702@gmail.com>
Date: Fri, 31 Aug 2012 12:40:42 +0200
Message-ID: <87fw73s5sl.fsf@rho.meyering.net>
Lines: 39
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 10:40:47 -0000

Stefano Lattarini wrote:

> On 08/31/2012 12:34 PM, Jim Meyering wrote:
>> Jim Meyering wrote:
>>> Stefano Lattarini wrote:
>>>> * bootstrap.conf ($buildreq): Require gettext >= 0.18.1, consistently
>>>> with the call to AM_GNU_GETTEXT_VERSION in configure.ac.
>>>>
>>>> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
>>>> ---
>>>>  bootstrap.conf | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/bootstrap.conf b/bootstrap.conf
>>>> index 27b5302..535900d 100644
>>>> --- a/bootstrap.conf
>>>> +++ b/bootstrap.conf
>>>> @@ -312,7 +312,7 @@ autoconf   2.64
>>>>  automake   1.11.2
>>>>  autopoint  -
>>>>  bison      -
>>>> -gettext    0.17
>>>> +gettext    0.18.1
>>>
>>> Thanks.  Applied.
>>
>> I have also removed your Signed-off-by: line, again.
>>
> Yes, I'll have to re-write all the pending commits that have a
> S-o-B line before sending further patches ...  If you still
> notice such a line in any new patch, feel free to just tell me
> to re-send.
>
> Sorry for the noise,

No problem.  This has made me realize that the recent
scripts/git-hooks/commit-msg change that was suppose to prevent
these is not working.  I thought it would make "git am FILE"
fail whenever there is a Signed-off-by: line, but it does not.


From MAILER-DAEMON Fri Aug 31 06:53:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7OqT-0006v9-OI
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 06:53:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48886)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OqM-0006uj-IB
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:53:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OqI-0000Wy-II
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:52:54 -0400
Received: from mx.meyering.net ([88.168.87.75]:37077)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7OqI-0000Wo-B8
	for coreutils@gnu.org; Fri, 31 Aug 2012 06:52:50 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 2FC20600AE;
	Fri, 31 Aug 2012 12:52:49 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] maint: make required gettext version consistent
In-Reply-To: <87fw73s5sl.fsf@rho.meyering.net> (Jim Meyering's message of
	"Fri, 31 Aug 2012 12:40:42 +0200")
References: <512e8cff175f89c633f7597657c16e21766e58bd.1346408939.git.stefano.lattarini@gmail.com>
	<87r4qns67e.fsf@rho.meyering.net> <87ligvs62c.fsf@rho.meyering.net>
	<50409415.70702@gmail.com> <87fw73s5sl.fsf@rho.meyering.net>
Date: Fri, 31 Aug 2012 12:52:49 +0200
Message-ID: <87a9xbs58e.fsf@rho.meyering.net>
Lines: 35
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 10:53:00 -0000

Jim Meyering wrote:
...
> No problem.  This has made me realize that the recent
> scripts/git-hooks/commit-msg change that was suppose to prevent
> these is not working.  I thought it would make "git am FILE"
> fail whenever there is a Signed-off-by: line, but it does not.

And here's the cause/fix:

>From 4146ee681a06949c7cac700547f9808b3c1a2ac6 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Fri, 31 Aug 2012 12:52:08 +0200
Subject: [PATCH] scripts: make the new Signed-off-by: hook actually work

* scripts/git-hooks/commit-msg: Fix new test: we're searching a
multi-line buffer, so add the //m modifier.
---
 scripts/git-hooks/commit-msg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg
index f867331..56286d4 100755
--- a/scripts/git-hooks/commit-msg
+++ b/scripts/git-hooks/commit-msg
@@ -125,7 +125,7 @@ sub check_msg($$)
   $buf =~ m!https?://debbugs\.gnu\.org/(?:cgi/bugreport\.cgi\?bug=)?(\d+)!s
     and return "use shorter http://bugs.gnu.org/$1";

-  $buf =~ /^ *Signed-off-by:/i
+  $buf =~ /^ *Signed-off-by:/mi
     and return q(do not use "Signed-off-by:");

   return '';
--
1.7.12.146.g16d26b1


From MAILER-DAEMON Fri Aug 31 08:50:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7QgI-00037U-Qn
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 08:50:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55102)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7QgB-00036e-D9
	for coreutils@gnu.org; Fri, 31 Aug 2012 08:50:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Qg9-00077C-Or
	for coreutils@gnu.org; Fri, 31 Aug 2012 08:50:31 -0400
Received: from mx.meyering.net ([88.168.87.75]:37353)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Qg9-00076t-Du
	for coreutils@gnu.org; Fri, 31 Aug 2012 08:50:29 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 5C75460162;
	Fri, 31 Aug 2012 14:50:28 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH] scripts: add autotools-install,
	for those stuck with outdated tools
In-Reply-To: <504080FD.40508@gmail.com> (Stefano Lattarini's message of "Fri, 
	31 Aug 2012 11:16:45 +0200")
References: <87sjb3tp3a.fsf@rho.meyering.net> <504080FD.40508@gmail.com>
Date: Fri, 31 Aug 2012 14:50:28 +0200
Message-ID: <87y5kvql7v.fsf@rho.meyering.net>
Lines: 166
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 12:50:37 -0000

Stefano Lattarini wrote:
> On 08/31/2012 10:58 AM, Jim Meyering wrote:
>> FYI, this adds the autotools-install script, formerly at:
>>
>>     http://people.redhat.com/meyering/autotools-install
>>
>> As the commit log says, it is a:
>>
>>     New script, so you can always build
>>     from git-cloned sources, even when they require bleeding edge
>>     m4, autoconf, automake, etc.
>>
>>
>> From c1495a1107871f451fd680d5c23b2c71af6e9971 Mon Sep 17 00:00:00 2001
>> From: Jim Meyering <meyering@redhat.com>
>> Date: Fri, 31 Aug 2012 10:55:03 +0200
>> Subject: [PATCH] scripts: add autotools-install, for those stuck with
>>  outdated tools
>>
>> * scripts/autotools-install: New script, so you can always build
>> from git-cloned sources, even when they require bleeding edge
>> m4, autoconf, automake, etc.
>> ---
>>  scripts/autotools-install | 206 ++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 206 insertions(+)
>>  create mode 100755 scripts/autotools-install
>>
>> diff --git a/scripts/autotools-install b/scripts/autotools-install
>> new file mode 100755
>> index 0000000..20d02ae
>> --- /dev/null
>> +++ b/scripts/autotools-install
>> @@ -0,0 +1,206 @@

Thanks for all of the feedback.
I've gone ahead and committed it as-is, hoping
that you'll be willing to write the patch.
If not, no problem... I will.

>> +# Building coreutils from a git-cloned directory may require versions of
>> +# tools like autoconf, automake, gettext, etc. that are newer than the ones
>> +# provided by the distribution on which you want to build.  In that case,
>> +# you can use this script to bootstrap the "autotools" tool chain, starting
>> +# with m4 (prereq of autoconf), then autoconf, which a prereq of automake,
>>
> "which is a prereq of automake"

Good catch.  Thanks.

...
>> +
>> +  # Download the each tar-ball along with its signature, if there is one.
>> +  pkgs=
>> +  for t in $(echo $tarballs); do
>>
> Since the rest of the script seems to suggest you want to remain portable
> to non-POSIX Bourne shells (like Solaris 10 /bin/sh): you should use `...`
> nor $(...), for command substitution.
>
>> +    base=$(basename $t)
>>
> Ditto.
>
>> +    pkgs="$pkgs $base"
>> +    test -f $base     || $WGET_COMMAND $t
...
>> +# Don't run as root.
>> +# Make sure id -u succeeds.
>> +my_uid=`id -u`
>> +test $? = 0 || {
>> +  echo "$0: cannot run \`id -u'" 1>&2
>> +  (exit 1); exit 1
>> +}
>>
> Simply use "die" instead?  Also, the GCS now suggest quoting 'like this',
> not `like this'.

Definitely yes.  On both counts.
I suspect I added the die definition later and didn't
go back and find all places where it could then be used.

> Oh, and since you are running with 'set -e', you wan to protect possible
> failures in command substitution:
>
>     my_uid=`id -u` && test -n "$my_id" || die "'id -u' failed"
>
> Otherwise you might get bitten by this behaviour:
>
>     $ bash -e -c 'x=`false`; echo OK'; echo $?
>     1

Good catch.

...
>> +pkgs=$(get_sources)
>> +
> `...`, not $(...)

I'm inclined to push back, here, and leave it as $(...).
If we get problem reports, I'd be tempted to say "use bash",
or at worst, add code to reexec with a better shell.

>> +export PATH=$prefix/bin:$PATH
>> +for pkg in $pkgs; do
>> +  echo building/installing $pkg...
>> +  dir=$(basename $pkg .tar.gz)
>>
> Ditto.
>
>> +  rm -rf dir
>>
> s/dir/$dir/

Oh!  Good one.

>> +  gzip -dc $pkg|tar xf -
>> +  cd $dir
>> +  ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix    > makerr-config  2>&1
>> +  make                                                  > makerr-build   2>&1
>>
> Why this "creative formatting"?  Seems more confusing than useful, at least
> for me.  More instances below.

Fine by me to nuke it.

>> +  if test "$make_check" = yes; then
>> +    case $pkg in
>> +      automake*) expected_duration_minutes=40;;
>> +      autoconf*) expected_duration_minutes=15;;
>> +      libtool*) expected_duration_minutes=3;;
>>
> The libtool testsuite is truly so quick?  I seem to recall differently ....

I suspect that my numbers all come from back long ago,
(7-8 years ago) when I was using a single-core AMD64-based system.
I'll bet that back then the test suite was not as thorough.

>> +      *);;
>> +    esac
>> +    test -n "$expected_duration_minutes" \
>> +      && echo "running 'make check' for $pkg; NB: this can take over" \
>> +              "$expected_duration_minutes minutes"
>> +    make check                                      > makerr-check   2>&1
>> +  fi
>> +  make install                                      > makerr-install 2>&1
>> +  echo done at $(date +%Y-%m-%d.%T)
>>
> `...`, not $(...)
>
>> +  cd ..
>> +done
>> +
>> +# Without checks (and with existing tarballs), it takes just one minute.
>> +# Including all checks, it takes nearly an hour on an AMD64/3400+
>> +
>> +case $PKG_CONFIG_PATH in
>> +  $prefix/lib/pkgconfig:/usr/lib/pkgconfig)
>> +    echo 'Good! your PKG_CONFIG_PATH envvar is already set';;
>> +  *) cat <<EOF;;
>> +**************************************************************************
>> +Be sure that PKG_CONFIG_PATH is set in your environment, e.g.,
>> +PKG_CONFIG_PATH=$prefix/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
>>
> inconsistency with the value checked above (that lacked "/usr/share/pkgconfig").

A patch would be most welcome.


From MAILER-DAEMON Fri Aug 31 09:14:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7R3a-0000cH-Sp
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 09:14:42 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53951)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3T-0000b6-B9
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3S-0007XQ-5C
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:35 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:44278)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3R-0007V2-Un
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:34 -0400
Received: by weys10 with SMTP id s10so1802629wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 06:14:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer;
	bh=Xuis1AB7FrWGD7hv89MgwC8AxwXhCbyk0qKYhoE5f9g=;
	b=YamuI7y1cGNAPuBuWOSzOkGCaete31xtIf044KUtfpMoBWufmfBrT/kropZd2+n2an
	xpRud7hhVy4M8l3KmKkt7OKJdgggO9nSSo7RRhGCDED0rPNmht/FNItGYeNu0L1rs35j
	bwNq+h5zkxEJEw/ee3OIm38V6idxbAr9zXeL0m0uHXeNQ0c/wKZmXGEX40a3nweB3zrN
	yLvbvIN5eIg6XU1b/Z5GeA4WM8bZFVrfuSEbDHGG5qzDxNIDUa40oR2eceksVHnDSbZ6
	w8LnqH0/WGCfLzfCouzIk2ZkiSK4YbI6adc2KQdyysTJ+/KV/30xOjunvaJ6mc9ezVR+
	5obA==
Received: by 10.180.95.193 with SMTP id dm1mr4642964wib.10.1346418872632;
	Fri, 31 Aug 2012 06:14:32 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id ef5sm1392240wib.3.2012.08.31.06.14.30
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 06:14:31 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 0/6] Patches to avoid use of make recursion in the 'src/'
	subdir
Date: Fri, 31 Aug 2012 15:14:15 +0200
Message-Id: <cover.1346418798.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 13:14:41 -0000

These should go on the top of my other pending series "[PATCH 0/7] Minor
cleanup and refactoring":

    <http://lists.gnu.org/archive/html/coreutils/2012-08/msg00205.html>

Regards,
  Stefano

-*-*-*-

Stefano Lattarini (6):
  maint: add our 'bootstrap_post_import_hook' function
  build: refactor how lists of coreutils programs are defined
  build: don't use recursive make to build the 'src' subdirectory
  build: fix generation of manpages for programs not built by default
  maint: improve remake rules for maintainers
  maint: remove unused target 'install-root'

 .gitignore                         |   2 +
 Makefile.am                        |  23 +-
 bootstrap.conf                     |  15 +-
 build-aux/gen-lists-of-programs.sh | 187 ++++++++++
 cfg.mk                             |  13 +-
 configure.ac                       |  76 +---
 man/local.mk                       |  19 +-
 src/{Makefile.am => local.mk}      | 713 ++++++++++++++++---------------------
 tests/Makefile.am                  |   6 +-
 9 files changed, 562 insertions(+), 492 deletions(-)
 create mode 100755 build-aux/gen-lists-of-programs.sh
 rename src/{Makefile.am => local.mk} (42%)

-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 09:14:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7R3g-0000hw-2j
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 09:14:48 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53997)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3Y-0000bi-Mk
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3S-0007Yx-RI
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:40 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:38938)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3S-0007XO-JO
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:34 -0400
Received: by wgbdt14 with SMTP id dt14so1761325wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 06:14:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=grx8ZZNE/IutKRvXkVhtLHU1vNt6wI77x1C9VJ3cas8=;
	b=qYiSjbJSk2yIf9TgM8/Gtc+mTfkM2k82Hjd2FXU4smQ62kVDb4AYiZDpHUP1ArgX/L
	NRkOGrSyJi8DjNeNnK85hYdQYCN3aJFXFbDcXUe2rPZY2CdxP8Vi5Pmaoab8EvDdImTk
	v4WhAo1SPiMvCr1YqL4r5wrwZMqWGCI97+39JXUiJfjn3o5gfrTKJskNHr8O0Qql9P+C
	BGD6GLtJo9cH9URStaNUQB/7RSQagU11AVzYuSkSyJjBbe0YHDGZQ+A22F1RFY5mHT8R
	ZY1ex9Yl/kwVhwscGp1OpCpxEEvWa9KFbPXDGDjYNpXquDh/jHpByvHrF6Pne2px9sF7
	l8Jg==
Received: by 10.180.100.37 with SMTP id ev5mr4661707wib.5.1346418873900;
	Fri, 31 Aug 2012 06:14:33 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id ef5sm1392240wib.3.2012.08.31.06.14.32
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 06:14:33 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 1/6] maint: add our 'bootstrap_post_import_hook' function
Date: Fri, 31 Aug 2012 15:14:16 +0200
Message-Id: <bb947dea0db4a781d2855728aac6bc341a0dc3bf.1346418798.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346418798.git.stefano.lattarini@gmail.com>
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346418798.git.stefano.lattarini@gmail.com>
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 13:14:46 -0000

This is in preparation of future changes.

* bootstrap.conf (bootstrap_post_import_hook): New, will be executed
by bootstrap after gnulib-tool abut before the autotools.
Move creation of dummy ChangeLog into it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 bootstrap.conf | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 535900d..4fc4e67 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -324,8 +324,11 @@ tar        -
 xz         -
 "
 
-# Automake requires that ChangeLog exist.
-touch ChangeLog || exit 1
+bootstrap_post_import_hook ()
+{
+  # Automake requires that ChangeLog exist.
+  touch ChangeLog || exit 1
+}
 
 bootstrap_epilogue()
 {
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 09:14:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7R3h-0000lz-9E
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 09:14:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54061)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3b-0000dN-7H
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3a-0007cJ-4S
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:43 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:38938)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3Z-0007XO-Tr
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:42 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so1761325wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 06:14:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=UKyWG47s4gvoOaXGZCmTGbZ96sCiFPbvbmmFW/Ykp8k=;
	b=G+1O3kIHVkCBvS88E/7d1EPVRgGSpyS3xz8ucUde9QzdlA0XZECsfA5REhopc5JCIn
	P1WOZ5vrneQKIEVZ02VCj+bmbYnjYtm5C0O8Udze12JK/di525AWd8YNsGXdSuM1FjtQ
	yTnFJffXJF2uqFrx46rvKjZ6IiXDnmX5P0rW9CTNYtUWBA6cl/KlM2/etLQcWZ2ZQ3cM
	fmzWcqzvu8AkCjf8p7OEvR9uDjXzxKlJp47oymLJJXPDGDcF4mF/qg6vY5w7Bmm2Z1Ci
	4sVBRS78lkVBfIKJVc7xmXkWACK8UNCQlmXrYPdlRmczGlxTV/c6hS9pumYKNHJhZ9x+
	nTyQ==
Received: by 10.180.20.11 with SMTP id j11mr4632239wie.12.1346418881598;
	Fri, 31 Aug 2012 06:14:41 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id ef5sm1392240wib.3.2012.08.31.06.14.40
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 06:14:41 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 6/6] maint: remove unused target 'install-root'
Date: Fri, 31 Aug 2012 15:14:21 +0200
Message-Id: <bc37799ef9da12057ae86c169604a2715c50a6a2.1346418798.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346418798.git.stefano.lattarini@gmail.com>
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346418798.git.stefano.lattarini@gmail.com>
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 13:14:47 -0000

It was unneeded and broken since the removal of 'su' from GNU
coreutils, in commit v8.17-16-g928dd73 of 2012-06-06, "su: remove
program (util-linux is now the best source for it)".

* Makefile.am (install-root): Remove.
(ALL_RECURSIVE_TARGETS): Update.
---
 Makefile.am | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 2d5fdaa..8ae8650 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,10 +70,6 @@ $(srcdir)/src/cu-progs.mk: $(gen_progs_lists)
 	  && $(SHELL) $(gen_progs_lists) --automake >$@-t \
 	  && chmod a-w $@-t && mv -f $@-t $@
 
-ALL_RECURSIVE_TARGETS += install-root
-install-root:
-	cd src && $(MAKE) $@
-
 ACLOCAL_AMFLAGS = -I m4
 
 # Some tests always need root privileges, others need them only sometimes.
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 09:14:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7R3i-0000on-Dz
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 09:14:50 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54098)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3d-0000g6-2D
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3X-0007b1-MY
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:45 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:44343)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3X-0007Zs-GZ
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:39 -0400
Received: by mail-wi0-f171.google.com with SMTP id hq4so1191990wib.12
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 06:14:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=qDUj2h3xheKmP3o9R7BHXhWm3wHjGlWtBtdv7QaUh4M=;
	b=CIQfmD2Hp4H7ewAV7RKi82MT70N3OjSIeCG4GTKp82Bq/XgLBbLssPFVUxB8PeHNlB
	c6AjsXkVEFcKYrUsL1PGDVccQOdI3fuhzudzS5PDHLs+RDGLVH76+q9L1A0Y1ayW1ucH
	mBtJKkHz33ELx3lZ0gMA8nt6rLd//flknU05k+JyDKvku/RmLBgLRV/nwSVk055lcd5d
	mNkfUNqayefqu5kZRcOL676fuTmZ2RVaiMWy+LfSShw8rP/mspdSPEPcqCij/bziVTIm
	fUyy62bZJ67e04R6FwtRoo6wZYrquZXDiQZG17/lz1fBz94bTru2G9AEks4Spf7H2sH9
	ZqrA==
Received: by 10.181.13.208 with SMTP id fa16mr4635886wid.11.1346418879121;
	Fri, 31 Aug 2012 06:14:39 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id ef5sm1392240wib.3.2012.08.31.06.14.37
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 06:14:38 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 4/6] build: fix generation of manpages for programs not built
	by default
Date: Fri, 31 Aug 2012 15:14:19 +0200
Message-Id: <04018841680b11205d48c355fc21636c43ae87ff.1346418798.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346418798.git.stefano.lattarini@gmail.com>
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346418798.git.stefano.lattarini@gmail.com>
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 13:14:48 -0000

* src/local.mk (dist-hook): Don't use this to ensure all the
programs, even the ones disabled by default or by the user, are
built (doing so is required to generate the distributed manpages
are properly built).  This would build those programs too late
anyway, causing errors like:

    $ make dist
    make  dist-xz am__post_remove_distdir='@:'
    make[1]: Entering directory `~/src/coreutils'
      GEN      man/arch.1
    help2man: can't get '--help' info from man/arch.td/arch
    make[1]: *** [man/arch.1] Error 127
    make[1]: Leaving directory `~/src/coreutils'
    make: *** [dist] Error 2

Instead, ...
* man/local.mk (extra_man_x, extra_man_1): define these ...
($(extra_man_1)): ... and make this depend on $(all_programs).
(EXTRA_DIST): Adjust.
Adjust some comments as well.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 man/local.mk | 19 ++++++++++++-------
 src/local.mk |  5 -----
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/man/local.mk b/man/local.mk
index d42c982..80519af 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -25,13 +25,18 @@ MAINTAINERCLEANFILES += $(dist_man1_MANS)
 
 # The "$(VAR:%=dir/%.x)" idiom is not portable according to POSIX, but in
 # practice it works with several make implementation (GNU, BSD, CCS make
-# from Solaris 10, Sun distributed make).  In addition, since only
-# maintainers are expected to build release tarballs (and they should
-# use GNU make when doing so), it's not big deal if this won't work with
-# some dumber make implementation.
-EXTRA_DIST += \
-  $(NO_INSTALL_PROGS_DEFAULT:%=man/%.x) \
-  $(NO_INSTALL_PROGS_DEFAULT:%=man/%.1)
+# from Solaris 10, Sun distributed make).
+extra_man_x = $(NO_INSTALL_PROGS_DEFAULT:%=man/%.x)
+extra_man_1 = $(NO_INSTALL_PROGS_DEFAULT:%=man/%.1)
+
+EXTRA_DIST += $(extra_man_1) $(extra_man_x)
+
+# This is required because we have subtle inter-directory dependencies:
+# in order to generate all man pages, even those for which we don't
+# install a binary, require that all programs be built at distribution
+# time.  We can't use 'dist-hook' for this, since it would run too late:
+# the manpages must be generated before the distdir is created and filled.
+$(extra_man_1): $(all_programs)
 
 # Depend on this to get version number changes.
 mandep = .version
diff --git a/src/local.mk b/src/local.mk
index 45a6268..2446200 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -495,11 +495,6 @@ all_programs.list:
 	  | sed /libstdbuf/d \
 	  | $(ASSORT) -u
 
-# This is required because we have broken inter-directory dependencies:
-# in order to generate all man pages, even those for which we don't
-# install a binary, require that all programs be built at distribution time.
-dist-hook: $(all_programs)
-
 pm = progs-makefile
 pr = progs-readme
 # Ensure that the list of programs in README matches the list
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 09:14:51 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7R3j-0000tS-Jz
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 09:14:51 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54049)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3a-0000cN-U1
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3X-0007ah-1E
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:42 -0400
Received: from mail-wg0-f41.google.com ([74.125.82.41]:64452)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3W-0007aM-KO
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:38 -0400
Received: by wgbds1 with SMTP id ds1so750931wgb.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 06:14:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=FCcK++t7uwc8eptz+xFLWg9m0npUgfa26dpsob63Tx0=;
	b=KWP+zSz2dUrTqrx0oq0/q9r0V4aED16zLeSSRw1hcGlLJO21g3ZvjnerUP5pSDCLe1
	XM6gzhujNGRmCPw2t8vrLgHspY6NTGdv7PHRFim8+ovuOoV1AkgmgU8VAoEfmonmvN7a
	5mR00bAuBbdh2nmQr1JiDkyM7ICI78T1HcTgulMaJxl6cwVy9b/X9GzE3w00/SZazoNt
	7ahWL41Mcogh7ihIqo2aMyhIYz/9xCFV58qWun4NimsSCm92JXStNFaXVSxP6xKONY/t
	jI412eJXO1J7gpunW4F9ghntw3ieBJi9W+ltyx+9U5OLoicLOnLPbJWEblpQ20FnCEcX
	FXrg==
Received: by 10.216.194.223 with SMTP id m73mr5082260wen.144.1346418877822;
	Fri, 31 Aug 2012 06:14:37 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id ef5sm1392240wib.3.2012.08.31.06.14.35
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 06:14:37 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 3/6] build: don't use recursive make to build the 'src'
	subdirectory
Date: Fri, 31 Aug 2012 15:14:18 +0200
Message-Id: <a02c57ee0d09ac4332f726622a14893f1d3e704a.1346418798.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346418798.git.stefano.lattarini@gmail.com>
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346418798.git.stefano.lattarini@gmail.com>
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.41
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 13:14:49 -0000

* Makefile.am (SUBDIRS): Remove 'src'.  Ensure '.' is listed before
'tests' and 'gnulib-tests'.
(dist-hook): Adjust: we must now tweak the top-level Makefile.in
in $(distdir), not the one in the 'src/' subdir (which is gone).
(include): The '$(top_srcdir)/src/local.mk' file.
* build-aux/gen-lists-of-programs.sh: Adjust the generation of the
automake input fragment.
* tests/Makefile.am (.built-programs): Adjust.
* cfg.mk (all_programs): Remove this convenience rule; it's no
longer needed, now that we can rely directly on the contents of
$(all_programs).
(sc_option_desc_uppercase, check-programs-vs-x:): Adjust list
of prerequisites accordingly.
(all-progs-but-lbracket): Simplify definition accordingly.
* configure.ac ($OPTIONAL_BIN_PROGS): Adjust definition.
($OPTIONAL_PKGLIB_PROGS): Likewise.
($NO_INSTALL_PROGS_DEFAULT): Tweak definition, for consistency.
(AC_CONFIG_FILES): Remove 'src/Makefile'.
* src/Makefile.am: Rename ...
* src/local.mk: ... like this, with a lot of adjustments.  In
addition ...
(all_programs): ... remove this now-unneeded convenience target.
---
 Makefile.am                        |   5 +-
 build-aux/gen-lists-of-programs.sh |   7 +-
 cfg.mk                             |  13 +-
 configure.ac                       |  16 +-
 src/{Makefile.am => local.mk}      | 587 +++++++++++++++++++------------------
 tests/Makefile.am                  |   6 +-
 6 files changed, 322 insertions(+), 312 deletions(-)
 rename src/{Makefile.am => local.mk} (46%)

diff --git a/Makefile.am b/Makefile.am
index f3d6eda..6a56f68 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@
 
 ALL_RECURSIVE_TARGETS =
 
-SUBDIRS = lib src po tests gnulib-tests
+SUBDIRS = lib po . tests gnulib-tests
 
 changelog_etc =				\
   ChangeLog-2005			\
@@ -92,7 +92,7 @@ BUILT_SOURCES = .version
 # See the rm_subst comment for details.
 dist-hook: gen-ChangeLog
 	$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
-	$(AM_V_at)perl -pi -e '$(rm_subst)' $(distdir)/src/Makefile.in
+	$(AM_V_at)perl -pi -e '$(rm_subst)' $(distdir)/Makefile.in
 
 gen_start_date = 2008-02-08
 .PHONY: gen-ChangeLog
@@ -170,5 +170,6 @@ check-git-hook-script-sync:
 	rm -rf $$t;							\
 	test $$fail = 0
 
+include $(top_srcdir)/src/local.mk
 include $(top_srcdir)/doc/local.mk
 include $(top_srcdir)/man/local.mk
diff --git a/build-aux/gen-lists-of-programs.sh b/build-aux/gen-lists-of-programs.sh
index ec43ee8..f049b56 100755
--- a/build-aux/gen-lists-of-programs.sh
+++ b/build-aux/gen-lists-of-programs.sh
@@ -165,17 +165,18 @@ END
     ;;
   1,--automake|1,--for-automake)
     echo "## $msg"
+    progsdir=src
     echo no_install__progs =
     for p in $disabled_by_default_progs; do
-      echo no_install__progs += $p
+      echo no_install__progs += $progsdir/$p
     done
     echo build_if_possible__progs =
     for p in $build_if_possible_progs; do
-      echo build_if_possible__progs += $p
+      echo build_if_possible__progs += $progsdir/$p
     done
     echo default__progs =
     for p in $normal_progs; do
-      echo default__progs += $p
+      echo default__progs += $progsdir/$p
     done
     ;;
   *)
diff --git a/cfg.mk b/cfg.mk
index b5f4174..925682b 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -166,12 +166,6 @@ sc_long_lines:
 	  sed -e "s|^|$$file:|" -e '$(FILTER_LONG_LINES)';		\
 	done | grep . && { msg="$$halt" $(_sc_say_and_exit) } || :
 
-# TODO: remove once the build system in 'src/' is merged with the
-# top-level one.
-.PHONY: all_programs
-all_programs:
-	@cd ./src && $(MAKE) -s $@
-
 # Option descriptions should not start with a capital letter.
 # One could grep source directly as follows:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
@@ -184,7 +178,7 @@ sc_option_desc_uppercase:
 	      exit 1; } || :;
 sc_option_desc_uppercase: $(dist_man1_MANS) \
                           $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT)) \
-                          all_programs
+                          $(all_programs)
 
 # Ensure all man/*.[1x] files are present.
 ALL_RECURSIVE_TARGETS += sc_man_file_correlation
@@ -209,13 +203,12 @@ check-x-vs-1:
 
 # Writing a portable rule to generate a manpage like '[.1' would be
 # a nightmare.
-all-progs-but-lbracket = $(filter-out [, $(shell \
-      (cd ./src && MAKEFLAGS= ${MAKE} -s all_programs.list)))
+all-progs-but-lbracket = $(filter-out [,$(all_programs))
 
 # Ensure that for each .x file in the 'man/' subdirectory, there is a
 # corresponding coreutils program.
 .PHONY: check-programs-vs-x
-check-programs-vs-x: all_programs
+check-programs-vs-x: $(all_programs)
 	@status=0;					\
 	for p in dummy $(all-progs-but-lbracket); do	\
 	  test $$p = dummy && continue;			\
diff --git a/configure.ac b/configure.ac
index ca038c8..8c41d62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -433,14 +433,23 @@ MAN=`
     test x$p = x'@<:@' && continue
     echo "man/$p.1"
   done`
+
+NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
+OPTIONAL_PKGLIB_PROGS=`
+  for p in $optional_pkglib_progs; do echo src/$p; done`
+# Since this is AC_SUBST'd, Automake won't be able to perform rewrite
+# with $(EXEEXT) appending on it, so we have to do it ourselves.
+OPTIONAL_BIN_PROGS=`
+  for p in $optional_bin_progs; do echo "src/$p\$(EXEEXT)"; done`
+
 # Normalize whitespace.
 MAN=`echo $MAN`
+NO_INSTALL_PROGS_DEFAULT=`echo $NO_INSTALL_PROGS_DEFAULT`
+OPTIONAL_BIN_PROGS=`echo $OPTIONAL_BIN_PROGS`
+OPTIONAL_PKGLIB_PROGS=`echo $OPTIONAL_PKGLIB_PROGS`
 
-NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
 AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
-OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
 AC_SUBST([OPTIONAL_BIN_PROGS])
-OPTIONAL_PKGLIB_PROGS=`echo "$optional_pkglib_progs " | sed 's/ $//'`
 AC_SUBST([OPTIONAL_PKGLIB_PROGS])
 
 AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
@@ -459,7 +468,6 @@ AC_CONFIG_FILES(
   Makefile
   lib/Makefile
   po/Makefile.in
-  src/Makefile
   tests/Makefile
   gnulib-tests/Makefile
   )
diff --git a/src/Makefile.am b/src/local.mk
similarity index 46%
rename from src/Makefile.am
rename to src/local.mk
index 3b0ef65..45a6268 100644
--- a/src/Makefile.am
+++ b/src/local.mk
@@ -1,4 +1,5 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-
+# Make coreutils programs.                             -*-Makefile-*-
+# This is included by the top-level Makefile.am.
 
 ## Copyright (C) 1990-2012 Free Software Foundation, Inc.
 
@@ -21,42 +22,47 @@ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
 # the how and when they should be installed) is defined in this makefile
 # fragment, autogenerated by the 'gen-lists-of-programs.sh' auxiliary
 # script.
-include $(srcdir)/cu-progs.mk
+include $(srcdir)/src/cu-progs.mk
 
 EXTRA_PROGRAMS = \
-  $(no_install__progs) \
-  $(build_if_possible__progs) \
-  $(default__progs)
+   $(no_install__progs) \
+   $(build_if_possible__progs) \
+   $(default__progs)
 
 bin_PROGRAMS = $(OPTIONAL_BIN_PROGS)
 
-noinst_PROGRAMS = setuidgid getlimits
+noinst_PROGRAMS = src/setuidgid src/getlimits
 
 pkglibexec_PROGRAMS = $(OPTIONAL_PKGLIB_PROGS)
 
-noinst_HEADERS =	\
-  chown-core.h		\
-  copy.h		\
-  cp-hash.h		\
-  dircolors.h		\
-  fiemap.h		\
-  find-mount-point.h	\
-  fs.h			\
-  fs-is-local.h		\
-  group-list.h		\
-  ioblksize.h		\
-  ls.h			\
-  operand2sig.h		\
-  prog-fprintf.h	\
-  remove.h		\
-  system.h		\
-  wheel-size.h		\
-  wheel.h		\
-  uname.h
-
-EXTRA_DIST = dcgen dircolors.hin tac-pipe.c \
-  wheel-gen.pl extract-magic c99-to-c89.diff
-BUILT_SOURCES =
+noinst_HEADERS =		\
+  src/chown-core.h		\
+  src/copy.h			\
+  src/cp-hash.h			\
+  src/dircolors.h		\
+  src/fiemap.h			\
+  src/find-mount-point.h	\
+  src/fs.h			\
+  src/fs-is-local.h		\
+  src/group-list.h		\
+  src/ioblksize.h		\
+  src/ls.h			\
+  src/operand2sig.h		\
+  src/prog-fprintf.h		\
+  src/remove.h			\
+  src/system.h			\
+  src/wheel-size.h		\
+  src/wheel.h			\
+  src/uname.h
+
+EXTRA_DIST += 		\
+  src/dcgen 		\
+  src/dircolors.hin	\
+  src/tac-pipe.c	\
+  src/wheel-gen.pl	\
+  src/extract-magic	\
+  src/c99-to-c89.diff
+
 CLEANFILES = $(SCRIPTS)
 
 # Also remove these sometimes-built programs.
@@ -65,8 +71,8 @@ CLEANFILES += $(no_install__progs)
 
 AM_CPPFLAGS = -I$(top_srcdir)/lib
 
-noinst_LIBRARIES = libver.a
-nodist_libver_a_SOURCES = version.c version.h
+noinst_LIBRARIES = src/libver.a
+nodist_src_libver_a_SOURCES = src/version.c src/version.h
 
 # Tell the linker to omit references to unused shared libraries.
 AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
@@ -80,319 +86,324 @@ remove_ldadd =
 # must precede $(LIBINTL) in order to ensure we use GNU getopt.
 # But libcoreutils.a must also follow $(LIBINTL), since libintl uses
 # replacement functions defined in libcoreutils.a.
-LDADD = libver.a ../lib/libcoreutils.a $(LIBINTL) ../lib/libcoreutils.a
+LDADD = src/libver.a lib/libcoreutils.a $(LIBINTL) lib/libcoreutils.a
 
 # First, list all programs, to make listing per-program libraries easier.
 # See [ below.
-arch_LDADD = $(LDADD)
-base64_LDADD = $(LDADD)
-basename_LDADD = $(LDADD)
-cat_LDADD = $(LDADD)
-chcon_LDADD = $(LDADD)
-chgrp_LDADD = $(LDADD)
-chmod_LDADD = $(LDADD)
-chown_LDADD = $(LDADD)
-chroot_LDADD = $(LDADD)
-cksum_LDADD = $(LDADD)
-comm_LDADD = $(LDADD)
-nproc_LDADD = $(LDADD)
-cp_LDADD = $(LDADD)
-csplit_LDADD = $(LDADD)
-cut_LDADD = $(LDADD)
-date_LDADD = $(LDADD)
-dd_LDADD = $(LDADD)
-df_LDADD = $(LDADD)
+src_arch_LDADD = $(LDADD)
+src_base64_LDADD = $(LDADD)
+src_basename_LDADD = $(LDADD)
+src_cat_LDADD = $(LDADD)
+src_chcon_LDADD = $(LDADD)
+src_chgrp_LDADD = $(LDADD)
+src_chmod_LDADD = $(LDADD)
+src_chown_LDADD = $(LDADD)
+src_chroot_LDADD = $(LDADD)
+src_cksum_LDADD = $(LDADD)
+src_comm_LDADD = $(LDADD)
+src_nproc_LDADD = $(LDADD)
+src_cp_LDADD = $(LDADD)
+src_csplit_LDADD = $(LDADD)
+src_cut_LDADD = $(LDADD)
+src_date_LDADD = $(LDADD)
+src_dd_LDADD = $(LDADD)
+src_df_LDADD = $(LDADD)
 # See dir_LDADD below
-dircolors_LDADD = $(LDADD)
-dirname_LDADD = $(LDADD)
-du_LDADD = $(LDADD)
-echo_LDADD = $(LDADD)
-env_LDADD = $(LDADD)
-expand_LDADD = $(LDADD)
-expr_LDADD = $(LDADD)
-factor_LDADD = $(LDADD)
-false_LDADD = $(LDADD)
-fmt_LDADD = $(LDADD)
-fold_LDADD = $(LDADD)
-getlimits_LDADD = $(LDADD)
-ginstall_LDADD = $(LDADD)
-groups_LDADD = $(LDADD)
-head_LDADD = $(LDADD)
-hostid_LDADD = $(LDADD)
-hostname_LDADD = $(LDADD)
-id_LDADD = $(LDADD)
-join_LDADD = $(LDADD)
-kill_LDADD = $(LDADD)
-link_LDADD = $(LDADD)
-ln_LDADD = $(LDADD)
-logname_LDADD = $(LDADD)
-ls_LDADD = $(LDADD)
-md5sum_LDADD = $(LDADD)
-mkdir_LDADD = $(LDADD)
-mkfifo_LDADD = $(LDADD)
-mknod_LDADD = $(LDADD)
-mktemp_LDADD = $(LDADD)
-mv_LDADD = $(LDADD)
-nice_LDADD = $(LDADD)
-nl_LDADD = $(LDADD)
-nohup_LDADD = $(LDADD)
-od_LDADD = $(LDADD)
-paste_LDADD = $(LDADD)
-pathchk_LDADD = $(LDADD)
-pinky_LDADD = $(LDADD)
-pr_LDADD = $(LDADD)
-printenv_LDADD = $(LDADD)
-printf_LDADD = $(LDADD)
-ptx_LDADD = $(LDADD)
-pwd_LDADD = $(LDADD)
-readlink_LDADD = $(LDADD)
-realpath_LDADD = $(LDADD)
-rm_LDADD = $(LDADD)
-rmdir_LDADD = $(LDADD)
-runcon_LDADD = $(LDADD)
-seq_LDADD = $(LDADD)
-setuidgid_LDADD = $(LDADD)
-sha1sum_LDADD = $(LDADD)
-sha224sum_LDADD = $(LDADD)
-sha256sum_LDADD = $(LDADD)
-sha384sum_LDADD = $(LDADD)
-sha512sum_LDADD = $(LDADD)
-shred_LDADD = $(LDADD)
-shuf_LDADD = $(LDADD)
-sleep_LDADD = $(LDADD)
-sort_LDADD = $(LDADD)
-split_LDADD = $(LDADD)
-stat_LDADD = $(LDADD)
-stdbuf_LDADD = $(LDADD)
-stty_LDADD = $(LDADD)
-sum_LDADD = $(LDADD)
-sync_LDADD = $(LDADD)
-tac_LDADD = $(LDADD)
-tail_LDADD = $(LDADD)
-tee_LDADD = $(LDADD)
-test_LDADD = $(LDADD)
-timeout_LDADD = $(LDADD)
-touch_LDADD = $(LDADD)
-tr_LDADD = $(LDADD)
-true_LDADD = $(LDADD)
-truncate_LDADD = $(LDADD)
-tsort_LDADD = $(LDADD)
-tty_LDADD = $(LDADD)
-uname_LDADD = $(LDADD)
-unexpand_LDADD = $(LDADD)
-uniq_LDADD = $(LDADD)
-unlink_LDADD = $(LDADD)
-uptime_LDADD = $(LDADD)
-users_LDADD = $(LDADD)
+src_dircolors_LDADD = $(LDADD)
+src_dirname_LDADD = $(LDADD)
+src_du_LDADD = $(LDADD)
+src_echo_LDADD = $(LDADD)
+src_env_LDADD = $(LDADD)
+src_expand_LDADD = $(LDADD)
+src_expr_LDADD = $(LDADD)
+src_factor_LDADD = $(LDADD)
+src_false_LDADD = $(LDADD)
+src_fmt_LDADD = $(LDADD)
+src_fold_LDADD = $(LDADD)
+src_getlimits_LDADD = $(LDADD)
+src_ginstall_LDADD = $(LDADD)
+src_groups_LDADD = $(LDADD)
+src_head_LDADD = $(LDADD)
+src_hostid_LDADD = $(LDADD)
+src_hostname_LDADD = $(LDADD)
+src_id_LDADD = $(LDADD)
+src_join_LDADD = $(LDADD)
+src_kill_LDADD = $(LDADD)
+src_link_LDADD = $(LDADD)
+src_ln_LDADD = $(LDADD)
+src_logname_LDADD = $(LDADD)
+src_ls_LDADD = $(LDADD)
+src_md5sum_LDADD = $(LDADD)
+src_mkdir_LDADD = $(LDADD)
+src_mkfifo_LDADD = $(LDADD)
+src_mknod_LDADD = $(LDADD)
+src_mktemp_LDADD = $(LDADD)
+src_mv_LDADD = $(LDADD)
+src_nice_LDADD = $(LDADD)
+src_nl_LDADD = $(LDADD)
+src_nohup_LDADD = $(LDADD)
+src_od_LDADD = $(LDADD)
+src_paste_LDADD = $(LDADD)
+src_pathchk_LDADD = $(LDADD)
+src_pinky_LDADD = $(LDADD)
+src_pr_LDADD = $(LDADD)
+src_printenv_LDADD = $(LDADD)
+src_printf_LDADD = $(LDADD)
+src_ptx_LDADD = $(LDADD)
+src_pwd_LDADD = $(LDADD)
+src_readlink_LDADD = $(LDADD)
+src_realpath_LDADD = $(LDADD)
+src_rm_LDADD = $(LDADD)
+src_rmdir_LDADD = $(LDADD)
+src_runcon_LDADD = $(LDADD)
+src_seq_LDADD = $(LDADD)
+src_setuidgid_LDADD = $(LDADD)
+src_sha1sum_LDADD = $(LDADD)
+src_sha224sum_LDADD = $(LDADD)
+src_sha256sum_LDADD = $(LDADD)
+src_sha384sum_LDADD = $(LDADD)
+src_sha512sum_LDADD = $(LDADD)
+src_shred_LDADD = $(LDADD)
+src_shuf_LDADD = $(LDADD)
+src_sleep_LDADD = $(LDADD)
+src_sort_LDADD = $(LDADD)
+src_split_LDADD = $(LDADD)
+src_stat_LDADD = $(LDADD)
+src_stdbuf_LDADD = $(LDADD)
+src_stty_LDADD = $(LDADD)
+src_sum_LDADD = $(LDADD)
+src_sync_LDADD = $(LDADD)
+src_tac_LDADD = $(LDADD)
+src_tail_LDADD = $(LDADD)
+src_tee_LDADD = $(LDADD)
+src_test_LDADD = $(LDADD)
+src_timeout_LDADD = $(LDADD)
+src_touch_LDADD = $(LDADD)
+src_tr_LDADD = $(LDADD)
+src_true_LDADD = $(LDADD)
+src_truncate_LDADD = $(LDADD)
+src_tsort_LDADD = $(LDADD)
+src_tty_LDADD = $(LDADD)
+src_uname_LDADD = $(LDADD)
+src_unexpand_LDADD = $(LDADD)
+src_uniq_LDADD = $(LDADD)
+src_unlink_LDADD = $(LDADD)
+src_uptime_LDADD = $(LDADD)
+src_users_LDADD = $(LDADD)
 # See vdir_LDADD below
-wc_LDADD = $(LDADD)
-who_LDADD = $(LDADD)
-whoami_LDADD = $(LDADD)
-yes_LDADD = $(LDADD)
+src_wc_LDADD = $(LDADD)
+src_who_LDADD = $(LDADD)
+src_whoami_LDADD = $(LDADD)
+src_yes_LDADD = $(LDADD)
 
-# Synonyms.  Recall that Automake transliterates '[' to '_'.
-__LDADD = $(test_LDADD)
-dir_LDADD = $(ls_LDADD)
-vdir_LDADD = $(ls_LDADD)
+# Synonyms.  Recall that Automake transliterates '[' and '/' to '_'.
+src___LDADD = $(src_test_LDADD)
+src_dir_LDADD = $(src_ls_LDADD)
+src_vdir_LDADD = $(src_ls_LDADD)
 
-cp_LDADD += $(copy_ldadd)
-ginstall_LDADD += $(copy_ldadd)
-mv_LDADD += $(copy_ldadd)
+src_cp_LDADD += $(copy_ldadd)
+src_ginstall_LDADD += $(copy_ldadd)
+src_mv_LDADD += $(copy_ldadd)
 
-mv_LDADD += $(remove_ldadd)
-rm_LDADD += $(remove_ldadd)
+src_mv_LDADD += $(remove_ldadd)
+src_rm_LDADD += $(remove_ldadd)
 
 # for eaccess, euidaccess
 copy_ldadd += $(LIB_EACCESS)
 remove_ldadd += $(LIB_EACCESS)
-sort_LDADD += $(LIB_EACCESS)
-test_LDADD += $(LIB_EACCESS)
+src_sort_LDADD += $(LIB_EACCESS)
+src_test_LDADD += $(LIB_EACCESS)
 
 # for selinux use
 copy_ldadd += $(LIB_SELINUX)
-chcon_LDADD += $(LIB_SELINUX)
-ginstall_LDADD += $(LIB_SELINUX)
-id_LDADD += $(LIB_SELINUX)
-ls_LDADD += $(LIB_SELINUX)
-mkdir_LDADD += $(LIB_SELINUX)
-mkfifo_LDADD += $(LIB_SELINUX)
-mknod_LDADD += $(LIB_SELINUX)
-runcon_LDADD += $(LIB_SELINUX)
-stat_LDADD += $(LIB_SELINUX)
+src_chcon_LDADD += $(LIB_SELINUX)
+src_ginstall_LDADD += $(LIB_SELINUX)
+src_id_LDADD += $(LIB_SELINUX)
+src_ls_LDADD += $(LIB_SELINUX)
+src_mkdir_LDADD += $(LIB_SELINUX)
+src_mkfifo_LDADD += $(LIB_SELINUX)
+src_mknod_LDADD += $(LIB_SELINUX)
+src_runcon_LDADD += $(LIB_SELINUX)
+src_stat_LDADD += $(LIB_SELINUX)
 
 # for gettime, settime, utimecmp, utimens
 copy_ldadd += $(LIB_CLOCK_GETTIME)
-date_LDADD += $(LIB_CLOCK_GETTIME)
-ginstall_LDADD += $(LIB_CLOCK_GETTIME)
-ls_LDADD += $(LIB_CLOCK_GETTIME)
-pr_LDADD += $(LIB_CLOCK_GETTIME)
-timeout_LDADD += $(LIB_TIMER_TIME)
-touch_LDADD += $(LIB_CLOCK_GETTIME)
+src_date_LDADD += $(LIB_CLOCK_GETTIME)
+src_ginstall_LDADD += $(LIB_CLOCK_GETTIME)
+src_ls_LDADD += $(LIB_CLOCK_GETTIME)
+src_pr_LDADD += $(LIB_CLOCK_GETTIME)
+src_timeout_LDADD += $(LIB_TIMER_TIME)
+src_touch_LDADD += $(LIB_CLOCK_GETTIME)
 
 # for gethrxtime
-dd_LDADD += $(LIB_GETHRXTIME)
+src_dd_LDADD += $(LIB_GETHRXTIME)
 
 # for cap_get_file
-ls_LDADD += $(LIB_CAP)
+src_ls_LDADD += $(LIB_CAP)
 
 # for fdatasync
-dd_LDADD += $(LIB_FDATASYNC)
-shred_LDADD += $(LIB_FDATASYNC)
+src_dd_LDADD += $(LIB_FDATASYNC)
+src_shred_LDADD += $(LIB_FDATASYNC)
 
 # for xnanosleep
-sleep_LDADD += $(LIB_NANOSLEEP)
-sort_LDADD += $(LIB_NANOSLEEP)
-tail_LDADD += $(LIB_NANOSLEEP)
+src_sleep_LDADD += $(LIB_NANOSLEEP)
+src_sort_LDADD += $(LIB_NANOSLEEP)
+src_tail_LDADD += $(LIB_NANOSLEEP)
 
 # for various GMP functions
-expr_LDADD += $(LIB_GMP)
-factor_LDADD += $(LIB_GMP)
+src_expr_LDADD += $(LIB_GMP)
+src_factor_LDADD += $(LIB_GMP)
 
 # for getloadavg
-uptime_LDADD += $(GETLOADAVG_LIBS)
+src_uptime_LDADD += $(GETLOADAVG_LIBS)
 
 # for various ACL functions
 copy_ldadd += $(LIB_ACL)
-ls_LDADD += $(LIB_ACL)
+src_ls_LDADD += $(LIB_ACL)
 
 # for various xattr functions
 copy_ldadd += $(LIB_XATTR)
 
 # for print_unicode_char, proper_name_utf8
-cat_LDADD += $(LIBICONV)
-cp_LDADD += $(LIBICONV)
-df_LDADD += $(LIBICONV)
-du_LDADD += $(LIBICONV)
-getlimits_LDADD += $(LIBICONV)
-printf_LDADD += $(LIBICONV)
-ptx_LDADD += $(LIBICONV)
-realpath_LDADD += $(LIBICONV)
-split_LDADD += $(LIBICONV)
-stdbuf_LDADD += $(LIBICONV)
-timeout_LDADD += $(LIBICONV)
-truncate_LDADD += $(LIBICONV)
+src_cat_LDADD += $(LIBICONV)
+src_cp_LDADD += $(LIBICONV)
+src_df_LDADD += $(LIBICONV)
+src_du_LDADD += $(LIBICONV)
+src_getlimits_LDADD += $(LIBICONV)
+src_printf_LDADD += $(LIBICONV)
+src_ptx_LDADD += $(LIBICONV)
+src_realpath_LDADD += $(LIBICONV)
+src_split_LDADD += $(LIBICONV)
+src_stdbuf_LDADD += $(LIBICONV)
+src_timeout_LDADD += $(LIBICONV)
+src_truncate_LDADD += $(LIBICONV)
 
 # for canon_host
-pinky_LDADD += $(GETADDRINFO_LIB)
-who_LDADD += $(GETADDRINFO_LIB)
+src_pinky_LDADD += $(GETADDRINFO_LIB)
+src_who_LDADD += $(GETADDRINFO_LIB)
 
 # for gethostname, uname
-hostname_LDADD += $(GETHOSTNAME_LIB)
-uname_LDADD += $(GETHOSTNAME_LIB)
+src_hostname_LDADD += $(GETHOSTNAME_LIB)
+src_uname_LDADD += $(GETHOSTNAME_LIB)
 
 # for strsignal
-kill_LDADD += $(LIBTHREAD)
+src_kill_LDADD += $(LIBTHREAD)
 
 # for pthread
-sort_LDADD += $(LIB_PTHREAD)
+src_sort_LDADD += $(LIB_PTHREAD)
 
-$(PROGRAMS): ../lib/libcoreutils.a
+$(PROGRAMS): lib/libcoreutils.a
 
-# Get the release year from ../lib/version-etc.c.
+# Get the release year from lib/version-etc.c.
 RELEASE_YEAR = \
   `sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \
     $(top_srcdir)/lib/version-etc.c`
 
-copy_sources = copy.c cp-hash.c extent-scan.c extent-scan.h
+copy_sources = \
+  src/copy.c \
+  src/cp-hash.c \
+  src/extent-scan.c \
+  src/extent-scan.h
 
 # Use 'ginstall' in the definition of PROGRAMS and in dependencies to avoid
 # confusion with the 'install' target.  The install rule transforms 'ginstall'
 # to install before applying any user-specified name transformations.
 
 transform = s/ginstall/install/; $(program_transform_name)
-ginstall_SOURCES = install.c prog-fprintf.c $(copy_sources)
-
-# This is for the '[' program.  Automake transliterates '[' to '_'.
-__SOURCES = lbracket.c
-
-cp_SOURCES = cp.c $(copy_sources)
-dir_SOURCES = ls.c ls-dir.c
-vdir_SOURCES = ls.c ls-vdir.c
-id_SOURCES = id.c group-list.c
-groups_SOURCES = groups.c group-list.c
-ls_SOURCES = ls.c ls-ls.c
-ln_SOURCES = ln.c relpath.c relpath.h
-chown_SOURCES = chown.c chown-core.c
-chgrp_SOURCES = chgrp.c chown-core.c
-kill_SOURCES = kill.c operand2sig.c
-realpath_SOURCES = realpath.c relpath.c relpath.h
-timeout_SOURCES = timeout.c operand2sig.c
-
-mv_SOURCES = mv.c remove.c $(copy_sources)
-rm_SOURCES = rm.c remove.c
-
-mkdir_SOURCES = mkdir.c prog-fprintf.c
-rmdir_SOURCES = rmdir.c prog-fprintf.c
-
-df_SOURCES = df.c find-mount-point.c
-stat_SOURCES = stat.c find-mount-point.c
-
-uname_SOURCES = uname.c uname-uname.c
-arch_SOURCES = uname.c uname-arch.c
-
-md5sum_CPPFLAGS = -DHASH_ALGO_MD5=1 $(AM_CPPFLAGS)
-sha1sum_SOURCES = md5sum.c
-sha1sum_CPPFLAGS = -DHASH_ALGO_SHA1=1 $(AM_CPPFLAGS)
-sha224sum_SOURCES = md5sum.c
-sha224sum_CPPFLAGS = -DHASH_ALGO_SHA224=1 $(AM_CPPFLAGS)
-sha256sum_SOURCES = md5sum.c
-sha256sum_CPPFLAGS = -DHASH_ALGO_SHA256=1 $(AM_CPPFLAGS)
-sha384sum_SOURCES = md5sum.c
-sha384sum_CPPFLAGS = -DHASH_ALGO_SHA384=1 $(AM_CPPFLAGS)
-sha512sum_SOURCES = md5sum.c
-sha512sum_CPPFLAGS = -DHASH_ALGO_SHA512=1 $(AM_CPPFLAGS)
-
-ginstall_CPPFLAGS = -DENABLE_MATCHPATHCON=1 $(AM_CPPFLAGS)
+src_ginstall_SOURCES = src/install.c src/prog-fprintf.c $(copy_sources)
+
+# This is for the '[' program.  Automake transliterates '[' and '/' to '_'.
+src___SOURCES = src/lbracket.c
+
+src_cp_SOURCES = src/cp.c $(copy_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
+src_groups_SOURCES = src/groups.c src/group-list.c
+src_ls_SOURCES = src/ls.c src/ls-ls.c
+src_ln_SOURCES = src/ln.c src/relpath.c src/relpath.h
+src_chown_SOURCES = src/chown.c src/chown-core.c
+src_chgrp_SOURCES = src/chgrp.c src/chown-core.c
+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_rm_SOURCES = src/rm.c src/remove.c
+
+src_mkdir_SOURCES = src/mkdir.c src/prog-fprintf.c
+src_rmdir_SOURCES = src/rmdir.c src/prog-fprintf.c
+
+src_df_SOURCES = src/df.c src/find-mount-point.c
+src_stat_SOURCES = src/stat.c src/find-mount-point.c
+
+src_uname_SOURCES = src/uname.c src/uname-uname.c
+src_arch_SOURCES = src/uname.c src/uname-arch.c
+
+src_md5sum_CPPFLAGS = -DHASH_ALGO_MD5=1 $(AM_CPPFLAGS)
+src_sha1sum_SOURCES = src/md5sum.c
+src_sha1sum_CPPFLAGS = -DHASH_ALGO_SHA1=1 $(AM_CPPFLAGS)
+src_sha224sum_SOURCES = src/md5sum.c
+src_sha224sum_CPPFLAGS = -DHASH_ALGO_SHA224=1 $(AM_CPPFLAGS)
+src_sha256sum_SOURCES = src/md5sum.c
+src_sha256sum_CPPFLAGS = -DHASH_ALGO_SHA256=1 $(AM_CPPFLAGS)
+src_sha384sum_SOURCES = src/md5sum.c
+src_sha384sum_CPPFLAGS = -DHASH_ALGO_SHA384=1 $(AM_CPPFLAGS)
+src_sha512sum_SOURCES = src/md5sum.c
+src_sha512sum_CPPFLAGS = -DHASH_ALGO_SHA512=1 $(AM_CPPFLAGS)
+
+src_ginstall_CPPFLAGS = -DENABLE_MATCHPATHCON=1 $(AM_CPPFLAGS)
 
 # Ensure we don't link against libcoreutils.a as that lib is
 # not compiled with -fPIC which causes issues on 64 bit at least
-libstdbuf_so_LDADD =
+src_libstdbuf_so_LDADD =
 
 # Note libstdbuf is only compiled if GCC is available
 # (as per the check in configure.ac), so these flags should be available.
 # libtool is probably required to relax this dependency.
-libstdbuf_so_LDFLAGS = -shared
-libstdbuf_so_CFLAGS = -fPIC $(AM_CFLAGS)
+src_libstdbuf_so_LDFLAGS = -shared
+src_libstdbuf_so_CFLAGS = -fPIC $(AM_CFLAGS)
 
-BUILT_SOURCES += dircolors.h
-dircolors.h: dcgen dircolors.hin
+BUILT_SOURCES += src/dircolors.h
+src/dircolors.h: src/dcgen src/dircolors.hin
 	$(AM_V_GEN)rm -f $@ $@-t
-	$(AM_V_at)$(PERL) -w -- $(srcdir)/dcgen $(srcdir)/dircolors.hin > $@-t
+	$(AM_V_at)$(PERL) -w -- $(srcdir)/src/dcgen \
+	                        $(srcdir)/src/dircolors.hin > $@-t
 	$(AM_V_at)chmod a-w $@-t
 	$(AM_V_at)mv $@-t $@
 
 wheel_size = 5
 
-BUILT_SOURCES += wheel-size.h
-wheel-size.h: Makefile.am
+BUILT_SOURCES += src/wheel-size.h
+src/wheel-size.h: Makefile.am
 	$(AM_V_GEN)rm -f $@ $@-t
 	$(AM_V_at)echo '#define WHEEL_SIZE $(wheel_size)' > $@-t
 	$(AM_V_at)chmod a-w $@-t
 	$(AM_V_at)mv $@-t $@
 
-BUILT_SOURCES += wheel.h
-wheel.h: wheel-gen.pl Makefile.am
+BUILT_SOURCES += src/wheel.h
+src/wheel.h: src/wheel-gen.pl Makefile.am
 	$(AM_V_GEN)rm -f $@ $@-t
-	$(AM_V_at)$(srcdir)/wheel-gen.pl $(wheel_size) > $@-t
+	$(AM_V_at)$(srcdir)/src/wheel-gen.pl $(wheel_size) > $@-t
 	$(AM_V_at)chmod a-w $@-t
 	$(AM_V_at)mv $@-t $@
 
 # false exits nonzero even with --help or --version.
 # test doesn't support --help or --version.
 # Tell automake to exempt then from that installcheck test.
-AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = false test
+AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = src/false src/test
 
 # Compare fs.h with the list of file system names/magic-numbers in the
 # Linux statfs man page.  This target prints any new name/number pairs.
 # Also compare against /usr/include/linux/magic.h
-.PHONY: fs-magic-compare
-fs-magic-compare: fs-magic fs-kernel-magic fs-def
-	join -v1 -t@ fs-magic fs-def
-	join -v1 -t@ fs-kernel-magic fs-def
+.PHONY: src/fs-magic-compare
+src/fs-magic-compare: src/fs-magic src/fs-kernel-magic src/fs-def
+	join -v1 -t@ src/fs-magic src/fs-def
+	join -v1 -t@ src/fs-kernel-magic src/fs-def
 
-CLEANFILES += fs-def
-fs-def: fs.h
-	grep '^# *define ' fs.h | $(ASSORT) > $@-t && mv $@-t $@
+CLEANFILES += src/fs-def
+src/fs-def: src/fs.h
+	grep '^# *define ' src/fs.h | $(ASSORT) > $@-t && mv $@-t $@
 
 # Massage bits of the statfs man page and definitions from
 # /usr/include/linux/magic.h to be in a form consistent with what's in fs.h.
@@ -416,8 +427,8 @@ fs_normalize_perl_subst =			\
   -e 's/^/\043 define S_MAGIC_/;'		\
   -e 's,\s*/\* .*? \*/,,;'
 
-CLEANFILES += fs-magic
-fs-magic: Makefile
+CLEANFILES += src/fs-magic
+src/fs-magic: Makefile
 	man statfs \
 	  |perl -ne '/File system types:/.../Nobody kno/ and print'	\
 	  |grep 0x | perl -p						\
@@ -426,8 +437,8 @@ fs-magic: Makefile
 	  | $(ASSORT)							\
 	  > $@-t && mv $@-t $@
 
-CLEANFILES += fs-kernel-magic
-fs-kernel-magic: Makefile
+CLEANFILES += src/fs-kernel-magic
+src/fs-kernel-magic: Makefile
 	perl -ne '/^#define.*0x/ and print' /usr/include/linux/magic.h	\
 	  | perl -p							\
 	    $(fs_normalize_perl_subst)					\
@@ -435,52 +446,49 @@ fs-kernel-magic: Makefile
 	  | $(ASSORT)							\
 	  > $@-t && mv $@-t $@
 
-BUILT_SOURCES += fs-is-local.h
-fs-is-local.h: stat.c extract-magic
+BUILT_SOURCES += src/fs-is-local.h
+src/fs-is-local.h: src/stat.c src/extract-magic
 	$(AM_V_GEN)rm -f $@
-	$(AM_V_at)$(PERL) $(srcdir)/extract-magic --local $(srcdir)/stat.c \
-	  > $@t
+	$(AM_V_at)$(PERL) $(srcdir)/src/extract-magic \
+	                  --local $(srcdir)/src/stat.c > $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
 
-BUILT_SOURCES += fs.h
-fs.h: stat.c extract-magic
+BUILT_SOURCES += src/fs.h
+src/fs.h: src/stat.c src/extract-magic
 	$(AM_V_GEN)rm -f $@
-	$(AM_V_at)$(PERL) $(srcdir)/extract-magic $(srcdir)/stat.c > $@t
+	$(AM_V_at)$(PERL) $(srcdir)/src/extract-magic \
+	                  $(srcdir)/src/stat.c > $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
 
-BUILT_SOURCES += version.c
-version.c: Makefile
+BUILT_SOURCES += src/version.c
+src/version.c: Makefile
 	$(AM_V_GEN)rm -f $@
 	$(AM_V_at)printf '#include <config.h>\n' > $@t
 	$(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
 
-BUILT_SOURCES += version.h
-version.h: Makefile
+BUILT_SOURCES += src/version.h
+src/version.h: Makefile
 	$(AM_V_GEN)rm -f $@
 	$(AM_V_at)printf 'extern char const *Version;\n' > $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
 
-DISTCLEANFILES = version.c version.h
-MAINTAINERCLEANFILES = $(BUILT_SOURCES)
-
-# Sort in traditional ASCII order, regardless of the current locale;
-# otherwise we may get into trouble with distinct strings that the
-# current locale considers to be equal.
-ASSORT = LC_ALL=C sort
+DISTCLEANFILES += src/version.c src/version.h
+MAINTAINERCLEANFILES += $(BUILT_SOURCES)
 
 all_programs = \
     $(bin_PROGRAMS) \
     $(bin_SCRIPTS) \
-  $(EXTRA_PROGRAMS)
+    $(EXTRA_PROGRAMS)
 
 built_programs.list:
 	@echo $(bin_PROGRAMS) $(bin_SCRIPTS) | tr ' ' '\n' \
-	  | sed -e 's,$(EXEEXT)$$,,' | $(ASSORT) -u | tr '\n' ' '
+	  | sed -e 's,$(EXEEXT)$$,,' -e 's,^src/,,' \
+	  | $(ASSORT) -u | tr '\n' ' '
 
 all_programs.list:
 	@echo $(all_programs) | tr ' ' '\n' | sed -e 's,$(EXEEXT)$$,,' \
@@ -492,11 +500,6 @@ all_programs.list:
 # install a binary, require that all programs be built at distribution time.
 dist-hook: $(all_programs)
 
-# Ensure that all programs are built so we can for example
-# subsequently syntax check all man pages.
-.PHONY: all_programs
-all_programs: $(all_programs)
-
 pm = progs-makefile
 pr = progs-readme
 # Ensure that the list of programs in README matches the list
@@ -506,7 +509,10 @@ check: check-README check-duplicate-no-install
 check-README:
 	$(AM_V_GEN)rm -rf $(pr) $(pm)
 	$(AM_V_at)echo $(all_programs) \
-	 | tr -s ' ' '\n' | sed -e 's,$(EXEEXT)$$,,;s/ginstall/install/' \
+	 | tr -s ' ' '\n' \
+	 | sed -e 's,$(EXEEXT)$$,,' \
+	       -e 's,^src/,,' \
+	       -e 's/^ginstall$$/install/' \
 	 | sed /libstdbuf/d \
 	 | $(ASSORT) -u > $(pm) && \
 	sed -n '/^The programs .* are:/,/^[a-zA-Z]/p' $(top_srcdir)/README \
@@ -518,8 +524,8 @@ check-README:
 # entry, because if that were to happen, it *would* be installed
 # by default.
 .PHONY: check-duplicate-no-install
-check-duplicate-no-install: tr
-	$(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)'| ./tr ' ' '\n' | uniq -d`"
+check-duplicate-no-install: src/tr
+	$(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)' | tr ' ' '\n' | uniq -d`"
 
 # Ensure that the list of programs and author names is accurate.
 # We need a UTF8 locale.  If a lack of locale support or a missing
@@ -533,7 +539,8 @@ _sc_check-AUTHORS: $(all_programs)
 	    | grep ' Torbjorn '	> /dev/null		\
 	  && { echo "$@: skipping this check"; exit 0; }; \
 	rm -f $(au_actual) $(au_dotdot);		\
-	for i in `ls $(all_programs) | sed -e 's,$(EXEEXT)$$,,' \
+	for i in `ls $(all_programs)			\
+	    | sed -e 's,^src/,,' -e 's,$(EXEEXT)$$,,'	\
 	    | sed /libstdbuf/d				\
 	    | $(ASSORT) -u`; do				\
 	  test "$$i" = '[' && continue;			\
@@ -551,10 +558,10 @@ _sc_check-AUTHORS: $(all_programs)
 	sed -n '/^[^ ][^ ]*:/p' $(top_srcdir)/AUTHORS > $(au_dotdot) && \
 	diff $(au_actual) $(au_dotdot) && rm -f $(au_actual) $(au_dotdot)
 
-# Use the just-built ./ginstall, when not cross-compiling.
+# Use the just-built 'ginstall', when not cross-compiling.
 if CROSS_COMPILING
 cu_install_program = @INSTALL_PROGRAM@
 else
-cu_install_program = ./ginstall
+cu_install_program = src/ginstall
 endif
 INSTALL_PROGRAM = $(cu_install_program)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d8dee57..54f1e08 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -40,10 +40,10 @@ check: vc_exe_in_TESTS
 CLEANFILES =
 CLEANFILES += .built-programs
 check_DATA = .built-programs
-.built-programs: $(top_srcdir)/src/Makefile.am
-	$(AM_V_GEN)(cd $(top_builddir)/src				\
+.built-programs: $(top_srcdir)/Makefile.am
+	$(AM_V_GEN)(cd $(top_builddir)					\
             && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
-          > $@-t && mv $@-t $@
+          | sed s,^src/,, > $@-t && mv $@-t $@
 
 TEST_EXTENSIONS = .sh .pl .xpl
 
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 09:14:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7R3m-00011o-St
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 09:14:54 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54192)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3i-0000qW-S0
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3Y-0007bj-W9
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:50 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:44278)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3Y-0007V2-P2
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:40 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so1802629wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 06:14:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=R435uod90RIlFinPUFcdTfidSFKBtoz/kU3cD8trld4=;
	b=mvhW0EgyPEThVwdb2ZaUv4JbNSqwgnY8T2zXwKxBi8+3Ds4eS4yUGzVrUecM2k2yHI
	6FUN0tPjdfEzfTN4228+kua9NcO1R8twfHvpXiCuAavRM0lIeT8if61+OqmVRPzsJYcZ
	L5gnq2kElofGJypvnnjiTDLXshVkO0Bkvbm2Ki5//Gh/wgvOi5OXAFztX/uJIK+vdJ2M
	qBAuaqxYoA8P7i/kU82osI5OPHL8u89RZrBSNoM3RLV+XlJAd9zU+J8351FktGJZk0YI
	L/d/Oc2b5/CYI7NplDjwTzc67reG4EI0w/0Uy8z4p1mzJQ/xuxsmJUJAM5Kg6rIIyBlW
	COoA==
Received: by 10.216.134.97 with SMTP id r75mr5127618wei.127.1346418880389;
	Fri, 31 Aug 2012 06:14:40 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id ef5sm1392240wib.3.2012.08.31.06.14.39
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 06:14:39 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 5/6] maint: improve remake rules for maintainers
Date: Fri, 31 Aug 2012 15:14:20 +0200
Message-Id: <777c3e90e6febfbe15498b8c72efa167f9418386.1346418798.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346418798.git.stefano.lattarini@gmail.com>
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346418798.git.stefano.lattarini@gmail.com>
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 13:14:53 -0000

This is a follow up on today's former commit "build: refactor
how lists of coreutils programs are defined".

* Makefile.am ($(top_srcdir)/m4/cu-progs.m4,
$(srcdir)/src/cu-progs.mk): New, generate these files from the
'build-aux/gen-lists-of-programs.sh', the same way it's done
from the bootstrap script.
* bootstrap.conf (bootstrap_post_import_hook): Add comment about
the necessity to keep those new rules synced with the commands
here.  Enhance those commands so to that the generated files are
set read-only.
---
 Makefile.am    | 15 +++++++++++++++
 bootstrap.conf | 10 +++++++---
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 6a56f68..2d5fdaa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,6 +55,21 @@ EXTRA_DIST =				\
   maint.mk				\
   thanks-gen
 
+gen_progs_lists = $(top_srcdir)/build-aux/gen-lists-of-programs.sh
+
+# Keep these in sync with bootstrap.conf:bootstrap_post_import_hook().
+# Use '$(top_srcdir)/m4' and '$(srcdir)/src' for the benefit of non-GNU
+# makes: it is with those directories that 'cu-progs.m4' and 'cu-progs.mk'
+# appear in our dependencies.
+$(top_srcdir)/m4/cu-progs.m4: $(gen_progs_lists)
+	$(AM_V_GEN)rm -f $@ $@-t \
+	  && $(SHELL) $(gen_progs_lists) --autoconf >$@-t \
+	  && chmod a-w $@-t && mv -f $@-t $@
+$(srcdir)/src/cu-progs.mk: $(gen_progs_lists)
+	$(AM_V_GEN)rm -f $@ $@-t \
+	  && $(SHELL) $(gen_progs_lists) --automake >$@-t \
+	  && chmod a-w $@-t && mv -f $@-t $@
+
 ALL_RECURSIVE_TARGETS += install-root
 install-root:
 	cd src && $(MAKE) $@
diff --git a/bootstrap.conf b/bootstrap.conf
index 4ef3fc8..dc0ffb6 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -329,9 +329,13 @@ bootstrap_post_import_hook ()
   # Automake requires that ChangeLog exist.
   touch ChangeLog || return 1
   # List of coreutils programs.  See heading comments in the invoked
-  # script for more info.
-  build-aux/gen-lists-of-programs.sh --autoconf >m4/cu-progs.m4  || return 1
-  build-aux/gen-lists-of-programs.sh --automake >src/cu-progs.mk || return 1
+  # script for more info.  Keep this in sync with the rules in
+  (m4f=m4/cu-progs.m4 mkf=src/cu-progs.mk tmp=cu-progs.tmp \
+    && rm -f $m4f $mkf $tmp-1 $tmp-2 \
+    && build-aux/gen-lists-of-programs.sh --autoconf >$tmp-1 \
+    && build-aux/gen-lists-of-programs.sh --automake >$tmp-2 \
+    && chmod a-w $tmp-1 $tmp-2 \
+    && mv -f $tmp-1 $m4f && mv -f $tmp-2 $mkf)
 }
 
 bootstrap_epilogue()
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 09:14:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7R3q-00016N-35
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 09:14:58 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54092)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3c-0000g0-IC
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3U-0007a3-Uh
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:44 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:44343)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7R3U-0007Zs-LY
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:14:36 -0400
Received: by wibhq4 with SMTP id hq4so1191990wib.12
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 06:14:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=bHVqRsHSTig7RfGP3y7cIebwx5hv0OcZZVYxjmaIcns=;
	b=v02VqyeWZ/G28AXqIiFBV04V/WUVISfK4unt64Zs9kb7tiCzKk5Tq1nqVlch6hEbyR
	KAPS2rPSuLFl62oWLwyn1XV3KudfFDEZzAaUGvA/NxPS9vpm9eM85eyhatjS5FrZ6ISu
	xrxLtNoz9ITcTXkuTxYbLLtmqPqdBdEnyFDM2yCRZOTrT6AKVAfZJ4gedEVwnGM84uWv
	PleeTCxDMC1u7eIujne6hX93if+Px8D5YOWa0T11RKQiSnm2LxTBc+uRJ8wtYjf3XUoE
	o+wq+tVqAG+61UoO71FkHhYFlRv7H6zVLp3vLzbm1oK2cTse3b+XNbR8z6gNivNCwntt
	3/ig==
Received: by 10.180.98.138 with SMTP id ei10mr4684417wib.1.1346418875894;
	Fri, 31 Aug 2012 06:14:35 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id ef5sm1392240wib.3.2012.08.31.06.14.33
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 06:14:35 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 2/6] build: refactor how lists of coreutils programs are
	defined
Date: Fri, 31 Aug 2012 15:14:17 +0200
Message-Id: <e35eda37b4bd1cb264e4b45fa295079ae4101548.1346418798.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346418798.git.stefano.lattarini@gmail.com>
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346418798.git.stefano.lattarini@gmail.com>
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 13:14:56 -0000

This is in preparation of future changes.  Still, this patch
leaves the build system in a better shape; true, with more
indirections, but also with less convoluted and brittle hacks.

Unfortunately, this commit also makes some rebuild rules
incomplete; that will son be fixed by follow-up patches.

* build-aux/gen-lists-of-programs.sh: New, generates autoconf
and automake input fragments that define "lists" of all coreutils
programs, with further distinctions about how and when these
programs should be built (by default; if the system is capable
enough; only if the user ask for them explicitly).  This is
useful to avoid duplicating the definitions of these list among
several files (at least 'configure.ac' 'src/Makefile.am'); such
duplication had proved a source of inconsistencies and bugs in
the past.  And the pre-existing way to avoid such duplication,
as implemented in 'configure.ac' before this patch, was overly
complex and brittle.
* Makefile.am (EXTRA_DIST): Distribute the new script.
* bootstrap.conf (bootstrap_post_import_hook): Run the new script
to generate 'm4/cu-progs.m4' and 'src/cu-progs.mk'.
* .gitignore: Ignore those files.
* configure.ac: Include 'm4/cu-progs.m4', and decidedly simplify
most of the programs' lists definition and processing accordingly.
* src/Makefile.am: Similarly include 'src/cu-progs.mk', containing
definition of variables $(default__progs), $(no_install__progs)
and $(build_if_possible__progs). Accordingly ...
(no_install__progs, build_if_possible__progs): ... remove.
(EXTRA_DIST): Adjust definition.
Adjust a comment.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
 .gitignore                         |   2 +
 Makefile.am                        |   1 +
 bootstrap.conf                     |   6 +-
 build-aux/gen-lists-of-programs.sh | 186 +++++++++++++++++++++++++++++++++++++
 configure.ac                       |  62 ++-----------
 src/Makefile.am                    | 125 ++-----------------------
 6 files changed, 212 insertions(+), 170 deletions(-)
 create mode 100755 build-aux/gen-lists-of-programs.sh

diff --git a/.gitignore b/.gitignore
index aad59bd..56a9bf4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -96,6 +96,7 @@
 /m4/.cvsignore
 /m4/.gitignore
 /m4/codeset.m4
+/m4/cu-progs.m4
 /m4/fcntl-o.m4
 /m4/gettext.m4
 /m4/glibc2.m4
@@ -150,6 +151,7 @@
 /po/remove-potcdate.sed
 /po/remove-potcdate.sin
 /po/stamp-po
+/src/cu-progs.mk
 /src/version.c
 /src/version.h
 /stamp-h1
diff --git a/Makefile.am b/Makefile.am
index b47b1c1..f3d6eda 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,6 +49,7 @@ EXTRA_DIST =				\
   THANKStt.in				\
   bootstrap				\
   bootstrap.conf			\
+  build-aux/gen-lists-of-programs.sh	\
   cfg.mk				\
   dist-check.mk				\
   maint.mk				\
diff --git a/bootstrap.conf b/bootstrap.conf
index 4fc4e67..4ef3fc8 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -327,7 +327,11 @@ xz         -
 bootstrap_post_import_hook ()
 {
   # Automake requires that ChangeLog exist.
-  touch ChangeLog || exit 1
+  touch ChangeLog || return 1
+  # List of coreutils programs.  See heading comments in the invoked
+  # script for more info.
+  build-aux/gen-lists-of-programs.sh --autoconf >m4/cu-progs.m4  || return 1
+  build-aux/gen-lists-of-programs.sh --automake >src/cu-progs.mk || return 1
 }
 
 bootstrap_epilogue()
diff --git a/build-aux/gen-lists-of-programs.sh b/build-aux/gen-lists-of-programs.sh
new file mode 100755
index 0000000..ec43ee8
--- /dev/null
+++ b/build-aux/gen-lists-of-programs.sh
@@ -0,0 +1,186 @@
+#!/bin/sh
+# Generate lists of all coreutils programs, to be fed both to Autoconf
+# and Automake, and with further distinctions about how and when these
+# programs should be built.  This is useful to avoid duplicating the
+# definitions of these list among several files ('configure.ac' and
+# 'src/Makefile.am' at least); such duplication had proved a source of
+# inconsistencies and bugs in the past.
+
+set -u
+set -e
+
+# These are the names of programs that are not built nor installed
+# by default.  This list is *not* intended for programs like 'who',
+# 'nice', 'chroot', etc., that are built only when certain requisite
+# system features are detected.
+# Hence, if the user wants to install programs from this list anyway,
+# say A and B, he'll have to use "--enable-install-program=A,B" when
+# invoking configure.
+disabled_by_default_progs='
+    arch
+    hostname
+'
+
+# Programs that can be built only when certain requisite system
+# features are detected.  These prerequisites will be looked for
+# at configure runtime.
+build_if_possible_progs='
+    chroot
+    df
+    hostid
+    libstdbuf.so
+    nice
+    pinky
+    stdbuf
+    stty
+    uptime
+    users
+    who
+'
+
+# All the other programs, to be built by default, and that should
+# be buildable without problems on any target system.
+normal_progs='
+    [
+    base64
+    basename
+    cat
+    chcon
+    chgrp
+    chmod
+    chown
+    cksum
+    comm
+    cp
+    csplit
+    cut
+    date
+    dd
+    dir
+    dircolors
+    dirname
+    du
+    echo
+    env
+    expand
+    expr
+    factor
+    false
+    fmt
+    fold
+    ginstall
+    groups
+    head
+    id
+    join
+    kill
+    link
+    ln
+    logname
+    ls
+    md5sum
+    mkdir
+    mkfifo
+    mknod
+    mktemp
+    mv
+    nl
+    nproc
+    nohup
+    od
+    paste
+    pathchk
+    pr
+    printenv
+    printf
+    ptx
+    pwd
+    readlink
+    realpath
+    rm
+    rmdir
+    runcon
+    seq
+    sha1sum
+    sha224sum
+    sha256sum
+    sha384sum
+    sha512sum
+    shred
+    shuf
+    sleep
+    sort
+    split
+    stat
+    sum
+    sync
+    tac
+    tail
+    tee
+    test
+    timeout
+    touch
+    tr
+    true
+    truncate
+    tsort
+    tty
+    uname
+    unexpand
+    uniq
+    unlink
+    vdir
+    wc
+    whoami
+    yes
+'
+
+me=`echo "$0" | sed 's,.*/,,'`
+msg="Automatically generated by $me.  DO NOT EDIT BY HAND!"
+
+case $#,$1 in
+  1,--autoconf|1,--for-autoconf)
+    echo "dnl $msg"
+    for p in $normal_progs; do
+      test x"$p" = x"[" && p='@<:@'
+      echo "gl_ADD_PROG([optional_bin_progs], [$p])"
+    done
+    # Extra 'echo' to normalize whitespace.
+    echo "no_install_progs_default='`echo $disabled_by_default_progs`'"
+    sed 's/^ *//' <<END
+        # Given the name of a variable containing a space-separated
+        # list of install-by-default programs and the actual list
+        # do-not-install-by-default programs, modify the former variable
+        # to reflect any "do-install" and "don't-install" requests.
+        # That is, add any program specified via --enable-install-program,
+        # and remove any program specified via --enable-no-install-program.
+        # Note how the second argument below is a literal, with ","
+        # separators.  That is required due to the way the macro works,
+        # and since the corresponding ./configure option argument is
+        # comma-separated on input.
+        gl_INCLUDE_EXCLUDE_PROG([optional_bin_progs], [`\
+          echo $disabled_by_default_progs \
+                                    | sed 's/ /,/g'`])
+END
+    ;;
+  1,--automake|1,--for-automake)
+    echo "## $msg"
+    echo no_install__progs =
+    for p in $disabled_by_default_progs; do
+      echo no_install__progs += $p
+    done
+    echo build_if_possible__progs =
+    for p in $build_if_possible_progs; do
+      echo build_if_possible__progs += $p
+    done
+    echo default__progs =
+    for p in $normal_progs; do
+      echo default__progs += $p
+    done
+    ;;
+  *)
+    echo "$0: invalid usage" >&2; exit 2
+    ;;
+esac
+
+exit 0
diff --git a/configure.ac b/configure.ac
index 083fd34..ca038c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -407,55 +407,13 @@ if test "$elf_sys" = "yes" && \
 fi
 
 ############################################################################
-mk="$srcdir/src/Makefile.am"
-# Extract all literal names from the definition of $(EXTRA_PROGRAMS)
-# in $mk but don't expand the variable references.
-# Append each literal name to $optional_bin_progs.
-v=EXTRA_PROGRAMS
-for gl_i in `sed -n '/^'$v' =/,/[[^\]]$/p' $mk \
-    | sed 's/^  *//;/^\$.*/d;/^'$v' =/d' \
-    | tr -s '\\015\\012\\\\' '   '`; do
-  gl_ADD_PROG([optional_bin_progs], $gl_i)
-done
-
-# As above, extract literal names from the definition of $(no_install__progs)
-# in $mk but don't expand the variable references.
-v=no_install__progs
-t=`sed -n '/^'$v' =/,/[[^\]]$/p' $mk \
-    | sed 's/^  *//;/^\$.*/d;/^'$v' =/d' \
-    | tr -s '\\015\\012\\\\' '   '`
-# Remove any trailing space.
-no_install_progs_default=`echo "$t"|sed 's/ $//'`
-
-# Unfortunately, due to the way autoconf's AS_HELP_STRING works, the list
-# of default-not-installed programs, "arch hostname", must appear in two
-# places: in this file below, and in $mk.  Using "$no_install_progs_default"
-# below cannot work.  And we can't substitute the names into $mk because
-# automake needs the literals, too.
-# The compromise is to ensure that the space-separated list extracted
-# above matches the literal 2nd argument below.
-c="$srcdir/configure.ac"
-re='^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])'
-t=`sed -n '/'"$re"'/{s/'"$re"'/\1/;s/,/ /gp
-}' $c`
-case $t in
-  $no_install_progs_default) ;;
-  *) AC_MSG_ERROR([[internal error: g'l_INCLUDE_EXCLUDE_PROG's 2nd arg, $t,
-                   does not match the list of default-not-installed programs
-                   ($no_install_progs_default) also recorded in $mk]],
-                   1) ;;
-esac
 
-# Given the name of a variable containing a space-separated list of
-# install-by-default programs and the actual list do-not-install-by-default
-# programs, modify the former variable to reflect any "do-install" and
-# "don't-install" requests.
-# I.e., add any program name specified via --enable-install-program=..., and
-# remove any program name specified via --enable-no-install-program=...
-# Note how the second argument below is a literal, with "," separators.
-# That is required due to the way the macro works, and since the
-# corresponding ./configure option argument is comma-separated on input.
-gl_INCLUDE_EXCLUDE_PROG([optional_bin_progs], [arch,hostname])
+dnl Autogenerated by the 'gen-lists-of-programs.sh' auxiliary script.
+dnl Issue proper calls to the macros gl_INCLUDE_EXCLUDE_PROG and
+dnl gl_ADD_PROG (updating $optional_bin_progs), and generate the list
+dnl of coreutils programs to be built only upon explicit user request,
+dnl saving that list in the $no_install_progs_default shell variable.
+m4_include([m4/cu-progs.m4])
 
 # Now that we know which programs will actually be built up, figure out
 # which optional helper progs should be compiled.
@@ -478,19 +436,15 @@ MAN=`
 # Normalize whitespace.
 MAN=`echo $MAN`
 
+NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
+AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
 OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
 AC_SUBST([OPTIONAL_BIN_PROGS])
 OPTIONAL_PKGLIB_PROGS=`echo "$optional_pkglib_progs " | sed 's/ $//'`
 AC_SUBST([OPTIONAL_PKGLIB_PROGS])
-NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
-AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
 
 AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
 
-# Arrange to rerun configure whenever the file, src/Makefile.am,
-# containing the list of program names changes.
-CONFIG_STATUS_DEPENDENCIES='$(top_srcdir)/src/Makefile.am'
-AC_SUBST([CONFIG_STATUS_DEPENDENCIES])
 ############################################################################
 
 # As long as "grep 'PRI[diouxX]' po/*.pot" reports matches in
diff --git a/src/Makefile.am b/src/Makefile.am
index 9be3acf..3b0ef65 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,124 +15,18 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# These are the names of programs that are not installed by default.
-# This list is *not* intended for programs like who, nice, chroot, etc.,
-# that are built only when certain requisite system features are detected.
-# Hence, if you want to install programs from this list anyway, say A and B,
-# use --enable-install-program=A,B
-no_install__progs = \
-  arch hostname
-
-build_if_possible__progs = \
-  chroot	\
-  df		\
-  hostid	\
-  libstdbuf.so	\
-  nice		\
-  pinky		\
-  stdbuf	\
-  stty		\
-  uptime	\
-  users		\
-  who
-
 AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
 
+# The list of all programs (separated in different variables to express
+# the how and when they should be installed) is defined in this makefile
+# fragment, autogenerated by the 'gen-lists-of-programs.sh' auxiliary
+# script.
+include $(srcdir)/cu-progs.mk
+
 EXTRA_PROGRAMS = \
   $(no_install__progs) \
   $(build_if_possible__progs) \
-  [		\
-  base64	\
-  basename	\
-  cat		\
-  chcon		\
-  chgrp		\
-  chmod		\
-  chown		\
-  cksum		\
-  comm		\
-  cp		\
-  csplit	\
-  cut		\
-  date		\
-  dd		\
-  dir		\
-  dircolors	\
-  dirname	\
-  du		\
-  echo		\
-  env		\
-  expand	\
-  expr		\
-  factor	\
-  false		\
-  fmt		\
-  fold		\
-  ginstall	\
-  groups	\
-  head		\
-  id		\
-  join		\
-  kill		\
-  link		\
-  ln		\
-  logname	\
-  ls		\
-  md5sum	\
-  mkdir		\
-  mkfifo	\
-  mknod		\
-  mktemp	\
-  mv		\
-  nl		\
-  nproc		\
-  nohup		\
-  od		\
-  paste		\
-  pathchk	\
-  pr		\
-  printenv	\
-  printf	\
-  ptx		\
-  pwd		\
-  readlink	\
-  realpath	\
-  rm		\
-  rmdir		\
-  runcon	\
-  seq		\
-  sha1sum	\
-  sha224sum	\
-  sha256sum	\
-  sha384sum	\
-  sha512sum	\
-  shred		\
-  shuf		\
-  sleep		\
-  sort		\
-  split		\
-  stat		\
-  sum		\
-  sync		\
-  tac		\
-  tail		\
-  tee		\
-  test		\
-  timeout	\
-  touch		\
-  tr		\
-  true		\
-  truncate	\
-  tsort		\
-  tty		\
-  uname		\
-  unexpand	\
-  uniq		\
-  unlink	\
-  vdir		\
-  wc		\
-  whoami	\
-  yes
+  $(default__progs)
 
 bin_PROGRAMS = $(OPTIONAL_BIN_PROGS)
 
@@ -620,8 +514,9 @@ check-README:
 	$(AM_V_at)diff $(pm) $(pr) && rm -rf $(pr) $(pm)
 
 # Ensure that a by-default-not-installed program (listed in
-# $(no_install__progs) is not also listed in $(EXTRA_PROGRAMS), because
-# if that were to happen, it *would* be installed by default.
+# $(no_install__progs) is not also listed as another $(EXTRA_PROGRAMS)
+# entry, because if that were to happen, it *would* be installed
+# by default.
 .PHONY: check-duplicate-no-install
 check-duplicate-no-install: tr
 	$(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)'| ./tr ' ' '\n' | uniq -d`"
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 09:34:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7RMy-00054g-VF
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 09:34:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33422)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7RMs-00054Q-9K
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:34:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7RMr-0007ur-8t
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:34:38 -0400
Received: from mx.meyering.net ([88.168.87.75]:37463)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7RMr-0007ua-2M
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:34:37 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 2A6F2600B1;
	Fri, 31 Aug 2012 15:34:35 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 0/6] Patches to avoid use of make recursion in the 'src/'
	subdir
In-Reply-To: <cover.1346418798.git.stefano.lattarini@gmail.com> (Stefano
	Lattarini's message of "Fri, 31 Aug 2012 15:14:15 +0200")
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
Date: Fri, 31 Aug 2012 15:34:35 +0200
Message-ID: <87r4qnqj6c.fsf@rho.meyering.net>
Lines: 8
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 13:34:44 -0000

Stefano Lattarini wrote:
> These should go on the top of my other pending series "[PATCH 0/7] Minor
> cleanup and refactoring":
>
>     <http://lists.gnu.org/archive/html/coreutils/2012-08/msg00205.html>

Thanks!  Looking at these now.
FYI, I pushed that other series an hour ago.


From MAILER-DAEMON Fri Aug 31 09:35:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7RNN-0005Gf-4z
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 09:35:09 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48602)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7RNG-00059N-W0
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:35:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7RNF-00082J-R2
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:35:02 -0400
Received: from mx.meyering.net ([88.168.87.75]:37468)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7RNF-00080c-Kt
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:35:01 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id DDE296013B;
	Fri, 31 Aug 2012 15:35:00 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 0/7] Minor cleanup and refactoring.
In-Reply-To: <cover.1346341298.git.stefano.lattarini@gmail.com> (Stefano
	Lattarini's message of "Thu, 30 Aug 2012 18:19:51 +0200")
References: <cover.1346341298.git.stefano.lattarini@gmail.com>
Date: Fri, 31 Aug 2012 15:35:00 +0200
Message-ID: <87ligvqj5n.fsf@rho.meyering.net>
Lines: 6
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 13:35:07 -0000

Stefano Lattarini wrote:
> Found these when trying to convert 'src/' to a non-recursive setup.
> I think they should be simple and uncontroversial enough to go into
> the repository ASAP.

Thanks.  Pushed.


From MAILER-DAEMON Fri Aug 31 09:37:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7RPH-0005NB-K9
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 09:37:07 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48800)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7RP7-0005Ms-2i
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:37:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7RP3-0000n0-04
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:36:57 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:54301)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7RP2-0000mo-PW
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:36:52 -0400
Received: by bkcjc3 with SMTP id jc3so1319308bkc.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 06:36:51 -0700 (PDT)
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=vRFgqjSF/8NOlfate6ISoSp/tOZpq9GGxJg8SKfrapE=;
	b=qjp3mZ5hIq9TMh6mZaTpukAYcRQC8SZoFbqjAB6oQVn/gFpXDPNPqS5WQpbHcvSKNb
	qKe2YHP1YrWEqm5HHdnGc/P6/G2O2nRsJSwo398Ku6rdoRPhxnqLoefTSqycOpYb+M55
	bsQNo0XIubA3VHZOVHIhbWnkcW/EHnFyeWcQD8PB/B5R6NRtUi+TT5vfcfn9yec8ClrW
	9c8a/e9t7QaSz9eKk2nrLxItWCRW+VYOjgxW1Zpp3FqiVi/Ndg/HFarEIqiO+rLZgdoc
	qy1PtyZkOcgDqNvjjg+jICSZK9qfwJXLbPGcijR3XqlJxW+IUQ63FKDiPxefM8KD1UK8
	MQAA==
Received: by 10.204.152.27 with SMTP id e27mr4164380bkw.56.1346420211632;
	Fri, 31 Aug 2012 06:36:51 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id 14sm3553083bkq.12.2012.08.31.06.36.49
	(version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 06:36:50 -0700 (PDT)
Message-ID: <5040BDEE.7080503@gmail.com>
Date: Fri, 31 Aug 2012 15:36:46 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 0/6] Patches to avoid use of make recursion in the 'src/'
	subdir
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
	<87r4qnqj6c.fsf@rho.meyering.net>
In-Reply-To: <87r4qnqj6c.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 31 Aug 2012 13:37:06 -0000

On 08/31/2012 03:34 PM, Jim Meyering wrote:
> Stefano Lattarini wrote:
>> These should go on the top of my other pending series "[PATCH 0/7] Minor
>> cleanup and refactoring":
>>
>>     <http://lists.gnu.org/archive/html/coreutils/2012-08/msg00205.html>
> 
> Thanks!  Looking at these now.
> FYI, I pushed that other series an hour ago.
>
Ouch, some of them still have the S-o-B line!  Can you delete those, or
should I resend?

Stefano


From MAILER-DAEMON Fri Aug 31 09:41:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7RTk-0006T0-1k
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 09:41:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45827)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7RTZ-0006SU-8y
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:41:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7RTQ-0002UG-6R
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:41:33 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:39939)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7RTP-0002U7-RV
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:41:24 -0400
Received: by bkcjc3 with SMTP id jc3so1322071bkc.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 06:41:22 -0700 (PDT)
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=eLPRJXCadyzLEthkYIAn3Kjq4BZQ4Dwlh1IuxsWb4h4=;
	b=lhyi2nHul9JOquE/7kqcDwvvkf7Cu6Xj/NL+artOBKm0ROwCcrCKGYU225JWgbHURM
	Fcad3OfPi0a+TjBXLh0t3xK6Gxmi6slVemimlw0Tw4Wi5GHUM5ReEE0t7GZr6GqkcNQl
	1yeaf2GXmcr5irMnftAoeCf80eTrRWp8zgSkKW20zmRSF6rkJLFx4W6teuYy2ipyxH/1
	wYTb+2gNUMorlaVk0/B9jKnkENJMguSwN3PNeUoeQoF6rA1VrxjKvgQhHdtwGvwDjtUb
	D5t7CtdfptfPZEIorbRkeJEZA500SFCalNm2d7XrR93doP/GqBlBQ8+n7HdSCmFWa2Do
	mGUA==
Received: by 10.205.119.208 with SMTP id fv16mr4307303bkc.100.1346420482836;
	Fri, 31 Aug 2012 06:41:22 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id m9sm3563803bkm.10.2012.08.31.06.41.21
	(version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 06:41:22 -0700 (PDT)
Message-ID: <5040BEFE.200@gmail.com>
Date: Fri, 31 Aug 2012 15:41:18 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] scripts: add autotools-install, for those stuck with
	outdated tools
References: <87sjb3tp3a.fsf@rho.meyering.net> <504080FD.40508@gmail.com>
	<87y5kvql7v.fsf@rho.meyering.net>
In-Reply-To: <87y5kvql7v.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 31 Aug 2012 13:41:43 -0000

On 08/31/2012 02:50 PM, Jim Meyering wrote:
> 
> Thanks for all of the feedback.
> I've gone ahead and committed it as-is, hoping that you'll be willing to write
> the patch.
>
Here it is.  Note that it is partly untested, as the configuration of pkg-config
fails early on my system with:

    checking for Win32... no
    checking if internal glib should be used... no
    checking for pkg-config... pkg-config
    configure: error: pkg-config and "glib-2.0 >= 2.16" not found, please
      set GLIB_CFLAGS and GLIB_LIBS to the correct values or pass
      --with-internal-glib to configure

Should that option be passed by default maybe?

Regards,
  Stefano

-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----

>From 8dc60c6ec5b4e8f259e3753e2c54a50712c6bcb3 Mon Sep 17 00:00:00 2001
Message-Id: <8dc60c6ec5b4e8f259e3753e2c54a50712c6bcb3.1346419870.git.stefano.lattarini@gmail.com>
From: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Fri, 31 Aug 2012 15:27:10 +0200
Subject: [PATCH 1/2] scripts: style and portability fixes in
 'autotools-install'

* scripts/autotools-install: Here.
---
 scripts/autotools-install | 48 +++++++++++++++++++++++------------------------
 1 file changed, 23 insertions(+), 25 deletions(-)

diff --git a/scripts/autotools-install b/scripts/autotools-install
index e9e3151..422f0b1 100755
--- a/scripts/autotools-install
+++ b/scripts/autotools-install
@@ -3,8 +3,8 @@
 # tools like autoconf, automake, gettext, etc. that are newer than the ones
 # provided by the distribution on which you want to build.  In that case,
 # you can use this script to bootstrap the "autotools" tool chain, starting
-# with m4 (prereq of autoconf), then autoconf, which a prereq of automake,
-# etc.  It also builds a few others, including gettext and pkg-config.
+# with m4 (prereq of autoconf), then autoconf (prereq of automake), etc.
+# It also builds a few others, including gettext and pkg-config.
 # The results are installed in a directory whose --prefix you specify, and
 # it tells you how to update envvars like PATH and (if you use pkg-config)
 # PKG_CONFIG_PATH.
@@ -69,10 +69,10 @@ get_sources()

   # Download the each tar-ball along with its signature, if there is one.
   pkgs=
-  for t in $(echo $tarballs); do
-    base=$(basename $t)
+  for t in $tarballs; do
+    base=`basename $t`
     pkgs="$pkgs $base"
-    test -f $base     || $WGET_COMMAND $t
+    test -f $base || $WGET_COMMAND $t

     # No signatures for some :-(
     case $base in pkg-config*) continue;; esac
@@ -120,12 +120,8 @@ esac

 # Don't run as root.
 # Make sure id -u succeeds.
-my_uid=`id -u`
-test $? = 0 || {
-  echo "$0: cannot run \`id -u'" 1>&2
-  (exit 1); exit 1
-}
-test $my_uid = 0 && die "please don't run this program as root"
+my_uid=`id -u` && test -n "$my_uid" || die "'id -u' failed"
+test $my_uid -ne 0 || die "please don't run this program as root"

 # Ensure that prefix is not /usr/bin or /bin, /sbin, etc.
 case $prefix in
@@ -139,31 +135,33 @@ tmpdir=.build-auto-tools
 mkdir -p $tmpdir
 cd $tmpdir

-pkgs=$(get_sources)
+pkgs=`get_sources`

 export PATH=$prefix/bin:$PATH
 for pkg in $pkgs; do
   echo building/installing $pkg...
-  dir=$(basename $pkg .tar.gz)
-  rm -rf dir
-  gzip -dc $pkg|tar xf -
+  dir=`basename $pkg .tar.gz`
+  rm -rf $dir
+  gzip -dc $pkg | tar xf -
   cd $dir
-  ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix    > makerr-config  2>&1
-  make                                                  > makerr-build   2>&1
-  if test "$make_check" = yes; then
+  ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix >makerr-config 2>&1
+  make >makerr-build 2>&1
+  if test $make_check = yes; then
     case $pkg in
+      # FIXME: these are probably out-of-date.
       automake*) expected_duration_minutes=40;;
       autoconf*) expected_duration_minutes=15;;
       libtool*) expected_duration_minutes=3;;
       *);;
     esac
-    test -n "$expected_duration_minutes" \
-      && echo "running 'make check' for $pkg; NB: this can take over" \
-              "$expected_duration_minutes minutes"
-    make check                                      > makerr-check   2>&1
+    if test -n "$expected_duration_minutes"; then
+      echo "running 'make check' for $pkg; NB: this can take over" \
+           "$expected_duration_minutes minutes"
+    fi
+    make check >makerr-check 2>&1
   fi
-  make install                                      > makerr-install 2>&1
-  echo done at $(date +%Y-%m-%d.%T)
+  make install >makerr-install 2>&1
+  echo "done at `date +%Y-%m-%d.%T`"
   cd ..
 done

@@ -176,7 +174,7 @@ case $PKG_CONFIG_PATH in
   *) cat <<EOF;;
 **************************************************************************
 Be sure that PKG_CONFIG_PATH is set in your environment, e.g.,
-PKG_CONFIG_PATH=$prefix/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
+PKG_CONFIG_PATH=$prefix/lib/pkgconfig:/usr/lib/pkgconfig
 **************************************************************************
 EOF
 esac
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 09:49:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7Rb0-0007CD-0J
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 09:49:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55130)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7Rax-0007BC-0M
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:49:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7Rap-0004pw-6y
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:49:10 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:37118)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7Rap-0004pW-0c
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:49:03 -0400
Received: by weys10 with SMTP id s10so1824612wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 06:49:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer;
	bh=oe6PtnSvgloELYLQkWNzB8bKCq6yNonRXD3oUdG/gZU=;
	b=wur5D8Z2GyJfSwbDopIDASGaLfB8cHR8suATVfAW0UUHFjuZjTk/74bBGaIJgbF2gs
	123I3psdRRjoBS2586vPwgR3ydN2K4IaCucUapcoWQUtDJIk5f8FEzxLwhfRQ1d7v4gX
	ZwmE2ivQBnnxUKwb67uvHoNfYLY0RQkTMBE+/OZZLbCEc1UOV2ORpG9EJahxVRdQQD4j
	rt4zhbMYLSlwbL+/RooCJJWTsdqQ+PnrruXGny6lB9YNyBWnaHSDrUn/SCAYhq1pWi5p
	5I1wSRvWNxDFzeKFR0PrId+y5HSjCX9FdZQDQQUtbaQX62wzM4ny17BjnIY4vGNqlb0Q
	IoDw==
Received: by 10.216.197.140 with SMTP id t12mr4713317wen.84.1346420508227;
	Fri, 31 Aug 2012 06:41:48 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id fb20sm1558144wid.1.2012.08.31.06.41.46
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 06:41:47 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH] scripts: allow user-specified make program in
	'autotools-install'
Date: Fri, 31 Aug 2012 15:41:38 +0200
Message-Id: <f946676c77dbfaee400dbbed9fe9d2fab2ae6ad5.1346420487.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 13:49:12 -0000

* scripts/autotools-install: Here, honouring $MAKE.  This might be
useful on systems where the make implementation available in $PATH
by default is limited (Solaris) or broken (HP-UX).
---
 scripts/autotools-install | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/scripts/autotools-install b/scripts/autotools-install
index 422f0b1..a4af08b 100755
--- a/scripts/autotools-install
+++ b/scripts/autotools-install
@@ -13,6 +13,10 @@
 
 VERSION='2012-08-31 07:40' # UTC
 
+# For systems with limited/botched make (the case of most vendor makes!),
+# allow the user to override it.
+MAKE=${MAKE-make}
+
 prog_name=`basename $0`
 die () { echo "$prog_name: $*" >&2; exit 1; }
 
@@ -145,7 +149,7 @@ for pkg in $pkgs; do
   gzip -dc $pkg | tar xf -
   cd $dir
   ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix >makerr-config 2>&1
-  make >makerr-build 2>&1
+  $MAKE >makerr-build 2>&1
   if test $make_check = yes; then
     case $pkg in
       # FIXME: these are probably out-of-date.
@@ -158,9 +162,9 @@ for pkg in $pkgs; do
       echo "running 'make check' for $pkg; NB: this can take over" \
            "$expected_duration_minutes minutes"
     fi
-    make check >makerr-check 2>&1
+    $MAKE check >makerr-check 2>&1
   fi
-  make install >makerr-install 2>&1
+  $MAKE install >makerr-install 2>&1
   echo "done at `date +%Y-%m-%d.%T`"
   cd ..
 done
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 09:57:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7Riz-00086Y-LC
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 09:57:29 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40458)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Rip-00086K-Ej
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:57:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Rii-0008DY-6N
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:57:19 -0400
Received: from mx.meyering.net ([88.168.87.75]:37527)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Rig-0008AQ-0m
	for coreutils@gnu.org; Fri, 31 Aug 2012 09:57:12 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 0D3A06011F;
	Fri, 31 Aug 2012 15:57:09 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 0/6] Patches to avoid use of make recursion in the 'src/'
	subdir
In-Reply-To: <5040BDEE.7080503@gmail.com> (Stefano Lattarini's message of
	"Fri, 31 Aug 2012 15:36:46 +0200")
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
	<87r4qnqj6c.fsf@rho.meyering.net> <5040BDEE.7080503@gmail.com>
Date: Fri, 31 Aug 2012 15:57:09 +0200
Message-ID: <87fw73qi4q.fsf@rho.meyering.net>
Lines: 26
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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: Fri, 31 Aug 2012 13:57:28 -0000

--=-=-=
Content-Type: text/plain

Stefano Lattarini wrote:

> On 08/31/2012 03:34 PM, Jim Meyering wrote:
>> Stefano Lattarini wrote:
>>> These should go on the top of my other pending series "[PATCH 0/7] Minor
>>> cleanup and refactoring":
>>>
>>>     <http://lists.gnu.org/archive/html/coreutils/2012-08/msg00205.html>
>>
>> Thanks!  Looking at these now.
>> FYI, I pushed that other series an hour ago.
>>
> Ouch, some of them still have the S-o-B line!  Can you delete those, or
> should I resend?

No problem.  As I tried to apply them with "git am FILE",
the new commit hook complained and left me in the editor,
where I removed them.

However, 3/6 failed to apply.
It took a little effort to make it apply, so I'm attaching below
what I am now looking at.  FYI, I've just confirmed it passed "make check"
but not "make syntax-check".


--=-=-=
Content-Type: application/octet-stream
Content-Disposition: inline; filename=k
Content-Transfer-Encoding: base64

RnJvbSA5MDAzOTU3Yjg3NWVjZDMwYjJmZDk2NzdlMjY5M2M4NzdiMTkwMWMxIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBTdGVmYW5vIExhdHRhcmluaSA8c3RlZmFuby5sYXR0YXJpbmlA
Z21haWwuY29tPgpEYXRlOiBGcmksIDMxIEF1ZyAyMDEyIDE1OjE0OjE2ICswMjAwClN1YmplY3Q6
IFtQQVRDSCAxLzZdIG1haW50OiBhZGQgb3VyICdib290c3RyYXBfcG9zdF9pbXBvcnRfaG9vaycg
ZnVuY3Rpb24KClRoaXMgaXMgaW4gcHJlcGFyYXRpb24gb2YgZnV0dXJlIGNoYW5nZXMuCgoqIGJv
b3RzdHJhcC5jb25mIChib290c3RyYXBfcG9zdF9pbXBvcnRfaG9vayk6IE5ldywgd2lsbCBiZSBl
eGVjdXRlZApieSBib290c3RyYXAgYWZ0ZXIgZ251bGliLXRvb2wgYWJ1dCBiZWZvcmUgdGhlIGF1
dG90b29scy4KTW92ZSBjcmVhdGlvbiBvZiBkdW1teSBDaGFuZ2VMb2cgaW50byBpdC4KLS0tCiBi
b290c3RyYXAuY29uZiB8IDcgKysrKystLQogMSBmaWxlIGNoYW5nZWQsIDUgaW5zZXJ0aW9ucygr
KSwgMiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9ib290c3RyYXAuY29uZiBiL2Jvb3RzdHJh
cC5jb25mCmluZGV4IDUzNTkwMGQuLjRmYzRlNjcgMTAwNjQ0Ci0tLSBhL2Jvb3RzdHJhcC5jb25m
CisrKyBiL2Jvb3RzdHJhcC5jb25mCkBAIC0zMjQsOCArMzI0LDExIEBAIHRhciAgICAgICAgLQog
eHogICAgICAgICAtCiAiCgotIyBBdXRvbWFrZSByZXF1aXJlcyB0aGF0IENoYW5nZUxvZyBleGlz
dC4KLXRvdWNoIENoYW5nZUxvZyB8fCBleGl0IDEKK2Jvb3RzdHJhcF9wb3N0X2ltcG9ydF9ob29r
ICgpCit7CisgICMgQXV0b21ha2UgcmVxdWlyZXMgdGhhdCBDaGFuZ2VMb2cgZXhpc3QuCisgIHRv
dWNoIENoYW5nZUxvZyB8fCBleGl0IDEKK30KCiBib290c3RyYXBfZXBpbG9ndWUoKQogewotLSAK
MS43LjEyLjE0Ni5nMTZkMjZiMQoKCkZyb20gODBjODU4Y2EyY2M2NDRjZjNkYzYwYWU5NDc0OWEz
YWI4ZjAwMWQ5OSBNb24gU2VwIDE3IDAwOjAwOjAwIDIwMDEKRnJvbTogU3RlZmFubyBMYXR0YXJp
bmkgPHN0ZWZhbm8ubGF0dGFyaW5pQGdtYWlsLmNvbT4KRGF0ZTogRnJpLCAzMSBBdWcgMjAxMiAx
NToxNDoxNyArMDIwMApTdWJqZWN0OiBbUEFUQ0ggMi82XSBidWlsZDogcmVmYWN0b3IgaG93IGxp
c3RzIG9mIGNvcmV1dGlscyBwcm9ncmFtcyBhcmUKIGRlZmluZWQKClRoaXMgaXMgaW4gcHJlcGFy
YXRpb24gb2YgZnV0dXJlIGNoYW5nZXMuICBTdGlsbCwgdGhpcyBwYXRjaApsZWF2ZXMgdGhlIGJ1
aWxkIHN5c3RlbSBpbiBhIGJldHRlciBzaGFwZTsgdHJ1ZSwgd2l0aCBtb3JlCmluZGlyZWN0aW9u
cywgYnV0IGFsc28gd2l0aCBsZXNzIGNvbnZvbHV0ZWQgYW5kIGJyaXR0bGUgaGFja3MuCgpVbmZv
cnR1bmF0ZWx5LCB0aGlzIGNvbW1pdCBhbHNvIG1ha2VzIHNvbWUgcmVidWlsZCBydWxlcwppbmNv
bXBsZXRlOyB0aGF0IHdpbGwgc29uIGJlIGZpeGVkIGJ5IGZvbGxvdy11cCBwYXRjaGVzLgoKKiBi
dWlsZC1hdXgvZ2VuLWxpc3RzLW9mLXByb2dyYW1zLnNoOiBOZXcsIGdlbmVyYXRlcyBhdXRvY29u
ZgphbmQgYXV0b21ha2UgaW5wdXQgZnJhZ21lbnRzIHRoYXQgZGVmaW5lICJsaXN0cyIgb2YgYWxs
IGNvcmV1dGlscwpwcm9ncmFtcywgd2l0aCBmdXJ0aGVyIGRpc3RpbmN0aW9ucyBhYm91dCBob3cg
YW5kIHdoZW4gdGhlc2UKcHJvZ3JhbXMgc2hvdWxkIGJlIGJ1aWx0IChieSBkZWZhdWx0OyBpZiB0
aGUgc3lzdGVtIGlzIGNhcGFibGUKZW5vdWdoOyBvbmx5IGlmIHRoZSB1c2VyIGFzayBmb3IgdGhl
bSBleHBsaWNpdGx5KS4gIFRoaXMgaXMKdXNlZnVsIHRvIGF2b2lkIGR1cGxpY2F0aW5nIHRoZSBk
ZWZpbml0aW9ucyBvZiB0aGVzZSBsaXN0IGFtb25nCnNldmVyYWwgZmlsZXMgKGF0IGxlYXN0ICdj
b25maWd1cmUuYWMnICdzcmMvTWFrZWZpbGUuYW0nKTsgc3VjaApkdXBsaWNhdGlvbiBoYWQgcHJv
dmVkIGEgc291cmNlIG9mIGluY29uc2lzdGVuY2llcyBhbmQgYnVncyBpbgp0aGUgcGFzdC4gIEFu
ZCB0aGUgcHJlLWV4aXN0aW5nIHdheSB0byBhdm9pZCBzdWNoIGR1cGxpY2F0aW9uLAphcyBpbXBs
ZW1lbnRlZCBpbiAnY29uZmlndXJlLmFjJyBiZWZvcmUgdGhpcyBwYXRjaCwgd2FzIG92ZXJseQpj
b21wbGV4IGFuZCBicml0dGxlLgoqIE1ha2VmaWxlLmFtIChFWFRSQV9ESVNUKTogRGlzdHJpYnV0
ZSB0aGUgbmV3IHNjcmlwdC4KKiBib290c3RyYXAuY29uZiAoYm9vdHN0cmFwX3Bvc3RfaW1wb3J0
X2hvb2spOiBSdW4gdGhlIG5ldyBzY3JpcHQKdG8gZ2VuZXJhdGUgJ200L2N1LXByb2dzLm00JyBh
bmQgJ3NyYy9jdS1wcm9ncy5taycuCiogLmdpdGlnbm9yZTogSWdub3JlIHRob3NlIGZpbGVzLgoq
IGNvbmZpZ3VyZS5hYzogSW5jbHVkZSAnbTQvY3UtcHJvZ3MubTQnLCBhbmQgZGVjaWRlZGx5IHNp
bXBsaWZ5Cm1vc3Qgb2YgdGhlIHByb2dyYW1zJyBsaXN0cyBkZWZpbml0aW9uIGFuZCBwcm9jZXNz
aW5nIGFjY29yZGluZ2x5LgoqIHNyYy9NYWtlZmlsZS5hbTogU2ltaWxhcmx5IGluY2x1ZGUgJ3Ny
Yy9jdS1wcm9ncy5taycsIGNvbnRhaW5pbmcKZGVmaW5pdGlvbiBvZiB2YXJpYWJsZXMgJChkZWZh
dWx0X19wcm9ncyksICQobm9faW5zdGFsbF9fcHJvZ3MpCmFuZCAkKGJ1aWxkX2lmX3Bvc3NpYmxl
X19wcm9ncykuIEFjY29yZGluZ2x5IC4uLgoobm9faW5zdGFsbF9fcHJvZ3MsIGJ1aWxkX2lmX3Bv
c3NpYmxlX19wcm9ncyk6IC4uLiByZW1vdmUuCihFWFRSQV9ESVNUKTogQWRqdXN0IGRlZmluaXRp
b24uCkFkanVzdCBhIGNvbW1lbnQuCi0tLQogLmdpdGlnbm9yZSAgICAgICAgICAgICAgICAgICAg
ICAgICB8ICAgMiArCiBNYWtlZmlsZS5hbSAgICAgICAgICAgICAgICAgICAgICAgIHwgICAxICsK
IGJvb3RzdHJhcC5jb25mICAgICAgICAgICAgICAgICAgICAgfCAgIDYgKy0KIGJ1aWxkLWF1eC9n
ZW4tbGlzdHMtb2YtcHJvZ3JhbXMuc2ggfCAxODYgKysrKysrKysrKysrKysrKysrKysrKysrKysr
KysrKysrKysrKwogY29uZmlndXJlLmFjICAgICAgICAgICAgICAgICAgICAgICB8ICA2MiArKy0t
LS0tLS0tLS0tCiBzcmMvTWFrZWZpbGUuYW0gICAgICAgICAgICAgICAgICAgIHwgMTI1ICsrLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0KIDYgZmlsZXMgY2hhbmdlZCwgMjEyIGluc2VydGlvbnMoKyks
IDE3MCBkZWxldGlvbnMoLSkKIGNyZWF0ZSBtb2RlIDEwMDc1NSBidWlsZC1hdXgvZ2VuLWxpc3Rz
LW9mLXByb2dyYW1zLnNoCgpkaWZmIC0tZ2l0IGEvLmdpdGlnbm9yZSBiLy5naXRpZ25vcmUKaW5k
ZXggYWFkNTliZC4uNTZhOWJmNCAxMDA2NDQKLS0tIGEvLmdpdGlnbm9yZQorKysgYi8uZ2l0aWdu
b3JlCkBAIC05Niw2ICs5Niw3IEBACiAvbTQvLmN2c2lnbm9yZQogL200Ly5naXRpZ25vcmUKIC9t
NC9jb2Rlc2V0Lm00CisvbTQvY3UtcHJvZ3MubTQKIC9tNC9mY250bC1vLm00CiAvbTQvZ2V0dGV4
dC5tNAogL200L2dsaWJjMi5tNApAQCAtMTUwLDYgKzE1MSw3IEBACiAvcG8vcmVtb3ZlLXBvdGNk
YXRlLnNlZAogL3BvL3JlbW92ZS1wb3RjZGF0ZS5zaW4KIC9wby9zdGFtcC1wbworL3NyYy9jdS1w
cm9ncy5tawogL3NyYy92ZXJzaW9uLmMKIC9zcmMvdmVyc2lvbi5oCiAvc3RhbXAtaDEKZGlmZiAt
LWdpdCBhL01ha2VmaWxlLmFtIGIvTWFrZWZpbGUuYW0KaW5kZXggYjQ3YjFjMS4uZjNkNmVkYSAx
MDA2NDQKLS0tIGEvTWFrZWZpbGUuYW0KKysrIGIvTWFrZWZpbGUuYW0KQEAgLTQ5LDYgKzQ5LDcg
QEAgRVhUUkFfRElTVCA9CQkJCVwKICAgVEhBTktTdHQuaW4JCQkJXAogICBib290c3RyYXAJCQkJ
XAogICBib290c3RyYXAuY29uZgkJCVwKKyAgYnVpbGQtYXV4L2dlbi1saXN0cy1vZi1wcm9ncmFt
cy5zaAlcCiAgIGNmZy5tawkJCQlcCiAgIGRpc3QtY2hlY2subWsJCQkJXAogICBtYWludC5tawkJ
CQlcCmRpZmYgLS1naXQgYS9ib290c3RyYXAuY29uZiBiL2Jvb3RzdHJhcC5jb25mCmluZGV4IDRm
YzRlNjcuLjRlZjNmYzggMTAwNjQ0Ci0tLSBhL2Jvb3RzdHJhcC5jb25mCisrKyBiL2Jvb3RzdHJh
cC5jb25mCkBAIC0zMjcsNyArMzI3LDExIEBAIHh6ICAgICAgICAgLQogYm9vdHN0cmFwX3Bvc3Rf
aW1wb3J0X2hvb2sgKCkKIHsKICAgIyBBdXRvbWFrZSByZXF1aXJlcyB0aGF0IENoYW5nZUxvZyBl
eGlzdC4KLSAgdG91Y2ggQ2hhbmdlTG9nIHx8IGV4aXQgMQorICB0b3VjaCBDaGFuZ2VMb2cgfHwg
cmV0dXJuIDEKKyAgIyBMaXN0IG9mIGNvcmV1dGlscyBwcm9ncmFtcy4gIFNlZSBoZWFkaW5nIGNv
bW1lbnRzIGluIHRoZSBpbnZva2VkCisgICMgc2NyaXB0IGZvciBtb3JlIGluZm8uCisgIGJ1aWxk
LWF1eC9nZW4tbGlzdHMtb2YtcHJvZ3JhbXMuc2ggLS1hdXRvY29uZiA+bTQvY3UtcHJvZ3MubTQg
IHx8IHJldHVybiAxCisgIGJ1aWxkLWF1eC9nZW4tbGlzdHMtb2YtcHJvZ3JhbXMuc2ggLS1hdXRv
bWFrZSA+c3JjL2N1LXByb2dzLm1rIHx8IHJldHVybiAxCiB9CgogYm9vdHN0cmFwX2VwaWxvZ3Vl
KCkKZGlmZiAtLWdpdCBhL2J1aWxkLWF1eC9nZW4tbGlzdHMtb2YtcHJvZ3JhbXMuc2ggYi9idWls
ZC1hdXgvZ2VuLWxpc3RzLW9mLXByb2dyYW1zLnNoCm5ldyBmaWxlIG1vZGUgMTAwNzU1CmluZGV4
IDAwMDAwMDAuLmVjNDNlZTgKLS0tIC9kZXYvbnVsbAorKysgYi9idWlsZC1hdXgvZ2VuLWxpc3Rz
LW9mLXByb2dyYW1zLnNoCkBAIC0wLDAgKzEsMTg2IEBACisjIS9iaW4vc2gKKyMgR2VuZXJhdGUg
bGlzdHMgb2YgYWxsIGNvcmV1dGlscyBwcm9ncmFtcywgdG8gYmUgZmVkIGJvdGggdG8gQXV0b2Nv
bmYKKyMgYW5kIEF1dG9tYWtlLCBhbmQgd2l0aCBmdXJ0aGVyIGRpc3RpbmN0aW9ucyBhYm91dCBo
b3cgYW5kIHdoZW4gdGhlc2UKKyMgcHJvZ3JhbXMgc2hvdWxkIGJlIGJ1aWx0LiAgVGhpcyBpcyB1
c2VmdWwgdG8gYXZvaWQgZHVwbGljYXRpbmcgdGhlCisjIGRlZmluaXRpb25zIG9mIHRoZXNlIGxp
c3QgYW1vbmcgc2V2ZXJhbCBmaWxlcyAoJ2NvbmZpZ3VyZS5hYycgYW5kCisjICdzcmMvTWFrZWZp
bGUuYW0nIGF0IGxlYXN0KTsgc3VjaCBkdXBsaWNhdGlvbiBoYWQgcHJvdmVkIGEgc291cmNlIG9m
CisjIGluY29uc2lzdGVuY2llcyBhbmQgYnVncyBpbiB0aGUgcGFzdC4KKworc2V0IC11CitzZXQg
LWUKKworIyBUaGVzZSBhcmUgdGhlIG5hbWVzIG9mIHByb2dyYW1zIHRoYXQgYXJlIG5vdCBidWls
dCBub3IgaW5zdGFsbGVkCisjIGJ5IGRlZmF1bHQuICBUaGlzIGxpc3QgaXMgKm5vdCogaW50ZW5k
ZWQgZm9yIHByb2dyYW1zIGxpa2UgJ3dobycsCisjICduaWNlJywgJ2Nocm9vdCcsIGV0Yy4sIHRo
YXQgYXJlIGJ1aWx0IG9ubHkgd2hlbiBjZXJ0YWluIHJlcXVpc2l0ZQorIyBzeXN0ZW0gZmVhdHVy
ZXMgYXJlIGRldGVjdGVkLgorIyBIZW5jZSwgaWYgdGhlIHVzZXIgd2FudHMgdG8gaW5zdGFsbCBw
cm9ncmFtcyBmcm9tIHRoaXMgbGlzdCBhbnl3YXksCisjIHNheSBBIGFuZCBCLCBoZSdsbCBoYXZl
IHRvIHVzZSAiLS1lbmFibGUtaW5zdGFsbC1wcm9ncmFtPUEsQiIgd2hlbgorIyBpbnZva2luZyBj
b25maWd1cmUuCitkaXNhYmxlZF9ieV9kZWZhdWx0X3Byb2dzPScKKyAgICBhcmNoCisgICAgaG9z
dG5hbWUKKycKKworIyBQcm9ncmFtcyB0aGF0IGNhbiBiZSBidWlsdCBvbmx5IHdoZW4gY2VydGFp
biByZXF1aXNpdGUgc3lzdGVtCisjIGZlYXR1cmVzIGFyZSBkZXRlY3RlZC4gIFRoZXNlIHByZXJl
cXVpc2l0ZXMgd2lsbCBiZSBsb29rZWQgZm9yCisjIGF0IGNvbmZpZ3VyZSBydW50aW1lLgorYnVp
bGRfaWZfcG9zc2libGVfcHJvZ3M9JworICAgIGNocm9vdAorICAgIGRmCisgICAgaG9zdGlkCisg
ICAgbGlic3RkYnVmLnNvCisgICAgbmljZQorICAgIHBpbmt5CisgICAgc3RkYnVmCisgICAgc3R0
eQorICAgIHVwdGltZQorICAgIHVzZXJzCisgICAgd2hvCisnCisKKyMgQWxsIHRoZSBvdGhlciBw
cm9ncmFtcywgdG8gYmUgYnVpbHQgYnkgZGVmYXVsdCwgYW5kIHRoYXQgc2hvdWxkCisjIGJlIGJ1
aWxkYWJsZSB3aXRob3V0IHByb2JsZW1zIG9uIGFueSB0YXJnZXQgc3lzdGVtLgorbm9ybWFsX3By
b2dzPScKKyAgICBbCisgICAgYmFzZTY0CisgICAgYmFzZW5hbWUKKyAgICBjYXQKKyAgICBjaGNv
bgorICAgIGNoZ3JwCisgICAgY2htb2QKKyAgICBjaG93bgorICAgIGNrc3VtCisgICAgY29tbQor
ICAgIGNwCisgICAgY3NwbGl0CisgICAgY3V0CisgICAgZGF0ZQorICAgIGRkCisgICAgZGlyCisg
ICAgZGlyY29sb3JzCisgICAgZGlybmFtZQorICAgIGR1CisgICAgZWNobworICAgIGVudgorICAg
IGV4cGFuZAorICAgIGV4cHIKKyAgICBmYWN0b3IKKyAgICBmYWxzZQorICAgIGZtdAorICAgIGZv
bGQKKyAgICBnaW5zdGFsbAorICAgIGdyb3VwcworICAgIGhlYWQKKyAgICBpZAorICAgIGpvaW4K
KyAgICBraWxsCisgICAgbGluaworICAgIGxuCisgICAgbG9nbmFtZQorICAgIGxzCisgICAgbWQ1
c3VtCisgICAgbWtkaXIKKyAgICBta2ZpZm8KKyAgICBta25vZAorICAgIG1rdGVtcAorICAgIG12
CisgICAgbmwKKyAgICBucHJvYworICAgIG5vaHVwCisgICAgb2QKKyAgICBwYXN0ZQorICAgIHBh
dGhjaGsKKyAgICBwcgorICAgIHByaW50ZW52CisgICAgcHJpbnRmCisgICAgcHR4CisgICAgcHdk
CisgICAgcmVhZGxpbmsKKyAgICByZWFscGF0aAorICAgIHJtCisgICAgcm1kaXIKKyAgICBydW5j
b24KKyAgICBzZXEKKyAgICBzaGExc3VtCisgICAgc2hhMjI0c3VtCisgICAgc2hhMjU2c3VtCisg
ICAgc2hhMzg0c3VtCisgICAgc2hhNTEyc3VtCisgICAgc2hyZWQKKyAgICBzaHVmCisgICAgc2xl
ZXAKKyAgICBzb3J0CisgICAgc3BsaXQKKyAgICBzdGF0CisgICAgc3VtCisgICAgc3luYworICAg
IHRhYworICAgIHRhaWwKKyAgICB0ZWUKKyAgICB0ZXN0CisgICAgdGltZW91dAorICAgIHRvdWNo
CisgICAgdHIKKyAgICB0cnVlCisgICAgdHJ1bmNhdGUKKyAgICB0c29ydAorICAgIHR0eQorICAg
IHVuYW1lCisgICAgdW5leHBhbmQKKyAgICB1bmlxCisgICAgdW5saW5rCisgICAgdmRpcgorICAg
IHdjCisgICAgd2hvYW1pCisgICAgeWVzCisnCisKK21lPWBlY2hvICIkMCIgfCBzZWQgJ3MsLiov
LCwnYAorbXNnPSJBdXRvbWF0aWNhbGx5IGdlbmVyYXRlZCBieSAkbWUuICBETyBOT1QgRURJVCBC
WSBIQU5EISIKKworY2FzZSAkIywkMSBpbgorICAxLC0tYXV0b2NvbmZ8MSwtLWZvci1hdXRvY29u
ZikKKyAgICBlY2hvICJkbmwgJG1zZyIKKyAgICBmb3IgcCBpbiAkbm9ybWFsX3Byb2dzOyBkbwor
ICAgICAgdGVzdCB4IiRwIiA9IHgiWyIgJiYgcD0nQDw6QCcKKyAgICAgIGVjaG8gImdsX0FERF9Q
Uk9HKFtvcHRpb25hbF9iaW5fcHJvZ3NdLCBbJHBdKSIKKyAgICBkb25lCisgICAgIyBFeHRyYSAn
ZWNobycgdG8gbm9ybWFsaXplIHdoaXRlc3BhY2UuCisgICAgZWNobyAibm9faW5zdGFsbF9wcm9n
c19kZWZhdWx0PSdgZWNobyAkZGlzYWJsZWRfYnlfZGVmYXVsdF9wcm9nc2AnIgorICAgIHNlZCAn
cy9eICovLycgPDxFTkQKKyAgICAgICAgIyBHaXZlbiB0aGUgbmFtZSBvZiBhIHZhcmlhYmxlIGNv
bnRhaW5pbmcgYSBzcGFjZS1zZXBhcmF0ZWQKKyAgICAgICAgIyBsaXN0IG9mIGluc3RhbGwtYnkt
ZGVmYXVsdCBwcm9ncmFtcyBhbmQgdGhlIGFjdHVhbCBsaXN0CisgICAgICAgICMgZG8tbm90LWlu
c3RhbGwtYnktZGVmYXVsdCBwcm9ncmFtcywgbW9kaWZ5IHRoZSBmb3JtZXIgdmFyaWFibGUKKyAg
ICAgICAgIyB0byByZWZsZWN0IGFueSAiZG8taW5zdGFsbCIgYW5kICJkb24ndC1pbnN0YWxsIiBy
ZXF1ZXN0cy4KKyAgICAgICAgIyBUaGF0IGlzLCBhZGQgYW55IHByb2dyYW0gc3BlY2lmaWVkIHZp
YSAtLWVuYWJsZS1pbnN0YWxsLXByb2dyYW0sCisgICAgICAgICMgYW5kIHJlbW92ZSBhbnkgcHJv
Z3JhbSBzcGVjaWZpZWQgdmlhIC0tZW5hYmxlLW5vLWluc3RhbGwtcHJvZ3JhbS4KKyAgICAgICAg
IyBOb3RlIGhvdyB0aGUgc2Vjb25kIGFyZ3VtZW50IGJlbG93IGlzIGEgbGl0ZXJhbCwgd2l0aCAi
LCIKKyAgICAgICAgIyBzZXBhcmF0b3JzLiAgVGhhdCBpcyByZXF1aXJlZCBkdWUgdG8gdGhlIHdh
eSB0aGUgbWFjcm8gd29ya3MsCisgICAgICAgICMgYW5kIHNpbmNlIHRoZSBjb3JyZXNwb25kaW5n
IC4vY29uZmlndXJlIG9wdGlvbiBhcmd1bWVudCBpcworICAgICAgICAjIGNvbW1hLXNlcGFyYXRl
ZCBvbiBpbnB1dC4KKyAgICAgICAgZ2xfSU5DTFVERV9FWENMVURFX1BST0coW29wdGlvbmFsX2Jp
bl9wcm9nc10sIFtgXAorICAgICAgICAgIGVjaG8gJGRpc2FibGVkX2J5X2RlZmF1bHRfcHJvZ3Mg
XAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBzZWQgJ3MvIC8sL2cnYF0p
CitFTkQKKyAgICA7OworICAxLC0tYXV0b21ha2V8MSwtLWZvci1hdXRvbWFrZSkKKyAgICBlY2hv
ICIjIyAkbXNnIgorICAgIGVjaG8gbm9faW5zdGFsbF9fcHJvZ3MgPQorICAgIGZvciBwIGluICRk
aXNhYmxlZF9ieV9kZWZhdWx0X3Byb2dzOyBkbworICAgICAgZWNobyBub19pbnN0YWxsX19wcm9n
cyArPSAkcAorICAgIGRvbmUKKyAgICBlY2hvIGJ1aWxkX2lmX3Bvc3NpYmxlX19wcm9ncyA9Cisg
ICAgZm9yIHAgaW4gJGJ1aWxkX2lmX3Bvc3NpYmxlX3Byb2dzOyBkbworICAgICAgZWNobyBidWls
ZF9pZl9wb3NzaWJsZV9fcHJvZ3MgKz0gJHAKKyAgICBkb25lCisgICAgZWNobyBkZWZhdWx0X19w
cm9ncyA9CisgICAgZm9yIHAgaW4gJG5vcm1hbF9wcm9nczsgZG8KKyAgICAgIGVjaG8gZGVmYXVs
dF9fcHJvZ3MgKz0gJHAKKyAgICBkb25lCisgICAgOzsKKyAgKikKKyAgICBlY2hvICIkMDogaW52
YWxpZCB1c2FnZSIgPiYyOyBleGl0IDIKKyAgICA7OworZXNhYworCitleGl0IDAKZGlmZiAtLWdp
dCBhL2NvbmZpZ3VyZS5hYyBiL2NvbmZpZ3VyZS5hYwppbmRleCAwODNmZDM0Li5jYTAzOGM4IDEw
MDY0NAotLS0gYS9jb25maWd1cmUuYWMKKysrIGIvY29uZmlndXJlLmFjCkBAIC00MDcsNTUgKzQw
NywxMyBAQCBpZiB0ZXN0ICIkZWxmX3N5cyIgPSAieWVzIiAmJiBcCiBmaQoKICMjIyMjIyMjIyMj
IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj
IyMjIyMjIyMKLW1rPSIkc3JjZGlyL3NyYy9NYWtlZmlsZS5hbSIKLSMgRXh0cmFjdCBhbGwgbGl0
ZXJhbCBuYW1lcyBmcm9tIHRoZSBkZWZpbml0aW9uIG9mICQoRVhUUkFfUFJPR1JBTVMpCi0jIGlu
ICRtayBidXQgZG9uJ3QgZXhwYW5kIHRoZSB2YXJpYWJsZSByZWZlcmVuY2VzLgotIyBBcHBlbmQg
ZWFjaCBsaXRlcmFsIG5hbWUgdG8gJG9wdGlvbmFsX2Jpbl9wcm9ncy4KLXY9RVhUUkFfUFJPR1JB
TVMKLWZvciBnbF9pIGluIGBzZWQgLW4gJy9eJyR2JyA9LywvW1teXF1dJC9wJyAkbWsgXAotICAg
IHwgc2VkICdzL14gICovLzsvXlwkLiovZDsvXickdicgPS9kJyBcCi0gICAgfCB0ciAtcyAnXFww
MTVcXDAxMlxcXFwnICcgICAnYDsgZG8KLSAgZ2xfQUREX1BST0coW29wdGlvbmFsX2Jpbl9wcm9n
c10sICRnbF9pKQotZG9uZQotCi0jIEFzIGFib3ZlLCBleHRyYWN0IGxpdGVyYWwgbmFtZXMgZnJv
bSB0aGUgZGVmaW5pdGlvbiBvZiAkKG5vX2luc3RhbGxfX3Byb2dzKQotIyBpbiAkbWsgYnV0IGRv
bid0IGV4cGFuZCB0aGUgdmFyaWFibGUgcmVmZXJlbmNlcy4KLXY9bm9faW5zdGFsbF9fcHJvZ3MK
LXQ9YHNlZCAtbiAnL14nJHYnID0vLC9bW15cXV0kL3AnICRtayBcCi0gICAgfCBzZWQgJ3MvXiAg
Ki8vOy9eXCQuKi9kOy9eJyR2JyA9L2QnIFwKLSAgICB8IHRyIC1zICdcXDAxNVxcMDEyXFxcXCcg
JyAgICdgCi0jIFJlbW92ZSBhbnkgdHJhaWxpbmcgc3BhY2UuCi1ub19pbnN0YWxsX3Byb2dzX2Rl
ZmF1bHQ9YGVjaG8gIiR0InxzZWQgJ3MvICQvLydgCi0KLSMgVW5mb3J0dW5hdGVseSwgZHVlIHRv
IHRoZSB3YXkgYXV0b2NvbmYncyBBU19IRUxQX1NUUklORyB3b3JrcywgdGhlIGxpc3QKLSMgb2Yg
ZGVmYXVsdC1ub3QtaW5zdGFsbGVkIHByb2dyYW1zLCAiYXJjaCBob3N0bmFtZSIsIG11c3QgYXBw
ZWFyIGluIHR3bwotIyBwbGFjZXM6IGluIHRoaXMgZmlsZSBiZWxvdywgYW5kIGluICRtay4gIFVz
aW5nICIkbm9faW5zdGFsbF9wcm9nc19kZWZhdWx0IgotIyBiZWxvdyBjYW5ub3Qgd29yay4gIEFu
ZCB3ZSBjYW4ndCBzdWJzdGl0dXRlIHRoZSBuYW1lcyBpbnRvICRtayBiZWNhdXNlCi0jIGF1dG9t
YWtlIG5lZWRzIHRoZSBsaXRlcmFscywgdG9vLgotIyBUaGUgY29tcHJvbWlzZSBpcyB0byBlbnN1
cmUgdGhhdCB0aGUgc3BhY2Utc2VwYXJhdGVkIGxpc3QgZXh0cmFjdGVkCi0jIGFib3ZlIG1hdGNo
ZXMgdGhlIGxpdGVyYWwgMm5kIGFyZ3VtZW50IGJlbG93LgotYz0iJHNyY2Rpci9jb25maWd1cmUu
YWMiCi1yZT0nXmcnJ2xfSU5DTFVERV9FWENMVURFX1BST0coLiogW1xbXCguKlwpXF1dKScKLXQ9
YHNlZCAtbiAnLyciJHJlIicve3MvJyIkcmUiJy9cMS87cy8sLyAvZ3AKLX0nICRjYAotY2FzZSAk
dCBpbgotICAkbm9faW5zdGFsbF9wcm9nc19kZWZhdWx0KSA7OwotICAqKSBBQ19NU0dfRVJST1Io
W1tpbnRlcm5hbCBlcnJvcjogZydsX0lOQ0xVREVfRVhDTFVERV9QUk9HJ3MgMm5kIGFyZywgJHQs
Ci0gICAgICAgICAgICAgICAgICAgZG9lcyBub3QgbWF0Y2ggdGhlIGxpc3Qgb2YgZGVmYXVsdC1u
b3QtaW5zdGFsbGVkIHByb2dyYW1zCi0gICAgICAgICAgICAgICAgICAgKCRub19pbnN0YWxsX3By
b2dzX2RlZmF1bHQpIGFsc28gcmVjb3JkZWQgaW4gJG1rXV0sCi0gICAgICAgICAgICAgICAgICAg
MSkgOzsKLWVzYWMKCi0jIEdpdmVuIHRoZSBuYW1lIG9mIGEgdmFyaWFibGUgY29udGFpbmluZyBh
IHNwYWNlLXNlcGFyYXRlZCBsaXN0IG9mCi0jIGluc3RhbGwtYnktZGVmYXVsdCBwcm9ncmFtcyBh
bmQgdGhlIGFjdHVhbCBsaXN0IGRvLW5vdC1pbnN0YWxsLWJ5LWRlZmF1bHQKLSMgcHJvZ3JhbXMs
IG1vZGlmeSB0aGUgZm9ybWVyIHZhcmlhYmxlIHRvIHJlZmxlY3QgYW55ICJkby1pbnN0YWxsIiBh
bmQKLSMgImRvbid0LWluc3RhbGwiIHJlcXVlc3RzLgotIyBJLmUuLCBhZGQgYW55IHByb2dyYW0g
bmFtZSBzcGVjaWZpZWQgdmlhIC0tZW5hYmxlLWluc3RhbGwtcHJvZ3JhbT0uLi4sIGFuZAotIyBy
ZW1vdmUgYW55IHByb2dyYW0gbmFtZSBzcGVjaWZpZWQgdmlhIC0tZW5hYmxlLW5vLWluc3RhbGwt
cHJvZ3JhbT0uLi4KLSMgTm90ZSBob3cgdGhlIHNlY29uZCBhcmd1bWVudCBiZWxvdyBpcyBhIGxp
dGVyYWwsIHdpdGggIiwiIHNlcGFyYXRvcnMuCi0jIFRoYXQgaXMgcmVxdWlyZWQgZHVlIHRvIHRo
ZSB3YXkgdGhlIG1hY3JvIHdvcmtzLCBhbmQgc2luY2UgdGhlCi0jIGNvcnJlc3BvbmRpbmcgLi9j
b25maWd1cmUgb3B0aW9uIGFyZ3VtZW50IGlzIGNvbW1hLXNlcGFyYXRlZCBvbiBpbnB1dC4KLWds
X0lOQ0xVREVfRVhDTFVERV9QUk9HKFtvcHRpb25hbF9iaW5fcHJvZ3NdLCBbYXJjaCxob3N0bmFt
ZV0pCitkbmwgQXV0b2dlbmVyYXRlZCBieSB0aGUgJ2dlbi1saXN0cy1vZi1wcm9ncmFtcy5zaCcg
YXV4aWxpYXJ5IHNjcmlwdC4KK2RubCBJc3N1ZSBwcm9wZXIgY2FsbHMgdG8gdGhlIG1hY3JvcyBn
bF9JTkNMVURFX0VYQ0xVREVfUFJPRyBhbmQKK2RubCBnbF9BRERfUFJPRyAodXBkYXRpbmcgJG9w
dGlvbmFsX2Jpbl9wcm9ncyksIGFuZCBnZW5lcmF0ZSB0aGUgbGlzdAorZG5sIG9mIGNvcmV1dGls
cyBwcm9ncmFtcyB0byBiZSBidWlsdCBvbmx5IHVwb24gZXhwbGljaXQgdXNlciByZXF1ZXN0LAor
ZG5sIHNhdmluZyB0aGF0IGxpc3QgaW4gdGhlICRub19pbnN0YWxsX3Byb2dzX2RlZmF1bHQgc2hl
bGwgdmFyaWFibGUuCittNF9pbmNsdWRlKFttNC9jdS1wcm9ncy5tNF0pCgogIyBOb3cgdGhhdCB3
ZSBrbm93IHdoaWNoIHByb2dyYW1zIHdpbGwgYWN0dWFsbHkgYmUgYnVpbHQgdXAsIGZpZ3VyZSBv
dXQKICMgd2hpY2ggb3B0aW9uYWwgaGVscGVyIHByb2dzIHNob3VsZCBiZSBjb21waWxlZC4KQEAg
LTQ3OCwxOSArNDM2LDE1IEBAIE1BTj1gCiAjIE5vcm1hbGl6ZSB3aGl0ZXNwYWNlLgogTUFOPWBl
Y2hvICRNQU5gCgorTk9fSU5TVEFMTF9QUk9HU19ERUZBVUxUPSRub19pbnN0YWxsX3Byb2dzX2Rl
ZmF1bHQKK0FDX1NVQlNUKFtOT19JTlNUQUxMX1BST0dTX0RFRkFVTFRdKQogT1BUSU9OQUxfQklO
X1BST0dTPWBlY2hvICIkb3B0aW9uYWxfYmluX3Byb2dzICJ8c2VkICdzLyAvXCQoRVhFRVhUKSAv
ZztzLyAkLy8nYAogQUNfU1VCU1QoW09QVElPTkFMX0JJTl9QUk9HU10pCiBPUFRJT05BTF9QS0dM
SUJfUFJPR1M9YGVjaG8gIiRvcHRpb25hbF9wa2dsaWJfcHJvZ3MgIiB8IHNlZCAncy8gJC8vJ2AK
IEFDX1NVQlNUKFtPUFRJT05BTF9QS0dMSUJfUFJPR1NdKQotTk9fSU5TVEFMTF9QUk9HU19ERUZB
VUxUPSRub19pbnN0YWxsX3Byb2dzX2RlZmF1bHQKLUFDX1NVQlNUKFtOT19JTlNUQUxMX1BST0dT
X0RFRkFVTFRdKQoKIEFNX0NPTkRJVElPTkFMKFtDUk9TU19DT01QSUxJTkddLCBbdGVzdCAiJGNy
b3NzX2NvbXBpbGluZyIgPSB5ZXNdKQoKLSMgQXJyYW5nZSB0byByZXJ1biBjb25maWd1cmUgd2hl
bmV2ZXIgdGhlIGZpbGUsIHNyYy9NYWtlZmlsZS5hbSwKLSMgY29udGFpbmluZyB0aGUgbGlzdCBv
ZiBwcm9ncmFtIG5hbWVzIGNoYW5nZXMuCi1DT05GSUdfU1RBVFVTX0RFUEVOREVOQ0lFUz0nJCh0
b3Bfc3JjZGlyKS9zcmMvTWFrZWZpbGUuYW0nCi1BQ19TVUJTVChbQ09ORklHX1NUQVRVU19ERVBF
TkRFTkNJRVNdKQogIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj
IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIwoKICMgQXMgbG9uZyBhcyAiZ3JlcCAnUFJJ
W2Rpb3V4WF0nIHBvLyoucG90IiByZXBvcnRzIG1hdGNoZXMgaW4KZGlmZiAtLWdpdCBhL3NyYy9N
YWtlZmlsZS5hbSBiL3NyYy9NYWtlZmlsZS5hbQppbmRleCA5YmUzYWNmLi4zYjBlZjY1IDEwMDY0
NAotLS0gYS9zcmMvTWFrZWZpbGUuYW0KKysrIGIvc3JjL01ha2VmaWxlLmFtCkBAIC0xNSwxMjQg
KzE1LDE4IEBACiAjIyBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUg
R2VuZXJhbCBQdWJsaWMgTGljZW5zZQogIyMgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0uICBJZiBu
b3QsIHNlZSA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzLz4uCgotIyBUaGVzZSBhcmUgdGhl
IG5hbWVzIG9mIHByb2dyYW1zIHRoYXQgYXJlIG5vdCBpbnN0YWxsZWQgYnkgZGVmYXVsdC4KLSMg
VGhpcyBsaXN0IGlzICpub3QqIGludGVuZGVkIGZvciBwcm9ncmFtcyBsaWtlIHdobywgbmljZSwg
Y2hyb290LCBldGMuLAotIyB0aGF0IGFyZSBidWlsdCBvbmx5IHdoZW4gY2VydGFpbiByZXF1aXNp
dGUgc3lzdGVtIGZlYXR1cmVzIGFyZSBkZXRlY3RlZC4KLSMgSGVuY2UsIGlmIHlvdSB3YW50IHRv
IGluc3RhbGwgcHJvZ3JhbXMgZnJvbSB0aGlzIGxpc3QgYW55d2F5LCBzYXkgQSBhbmQgQiwKLSMg
dXNlIC0tZW5hYmxlLWluc3RhbGwtcHJvZ3JhbT1BLEIKLW5vX2luc3RhbGxfX3Byb2dzID0gXAot
ICBhcmNoIGhvc3RuYW1lCi0KLWJ1aWxkX2lmX3Bvc3NpYmxlX19wcm9ncyA9IFwKLSAgY2hyb290
CVwKLSAgZGYJCVwKLSAgaG9zdGlkCVwKLSAgbGlic3RkYnVmLnNvCVwKLSAgbmljZQkJXAotICBw
aW5reQkJXAotICBzdGRidWYJXAotICBzdHR5CQlcCi0gIHVwdGltZQlcCi0gIHVzZXJzCQlcCi0g
IHdobwotCiBBTV9DRkxBR1MgPSAkKFdBUk5fQ0ZMQUdTKSAkKFdFUlJPUl9DRkxBR1MpCgorIyBU
aGUgbGlzdCBvZiBhbGwgcHJvZ3JhbXMgKHNlcGFyYXRlZCBpbiBkaWZmZXJlbnQgdmFyaWFibGVz
IHRvIGV4cHJlc3MKKyMgdGhlIGhvdyBhbmQgd2hlbiB0aGV5IHNob3VsZCBiZSBpbnN0YWxsZWQp
IGlzIGRlZmluZWQgaW4gdGhpcyBtYWtlZmlsZQorIyBmcmFnbWVudCwgYXV0b2dlbmVyYXRlZCBi
eSB0aGUgJ2dlbi1saXN0cy1vZi1wcm9ncmFtcy5zaCcgYXV4aWxpYXJ5CisjIHNjcmlwdC4KK2lu
Y2x1ZGUgJChzcmNkaXIpL2N1LXByb2dzLm1rCisKIEVYVFJBX1BST0dSQU1TID0gXAogICAkKG5v
X2luc3RhbGxfX3Byb2dzKSBcCiAgICQoYnVpbGRfaWZfcG9zc2libGVfX3Byb2dzKSBcCi0gIFsJ
CVwKLSAgYmFzZTY0CVwKLSAgYmFzZW5hbWUJXAotICBjYXQJCVwKLSAgY2hjb24JCVwKLSAgY2hn
cnAJCVwKLSAgY2htb2QJCVwKLSAgY2hvd24JCVwKLSAgY2tzdW0JCVwKLSAgY29tbQkJXAotICBj
cAkJXAotICBjc3BsaXQJXAotICBjdXQJCVwKLSAgZGF0ZQkJXAotICBkZAkJXAotICBkaXIJCVwK
LSAgZGlyY29sb3JzCVwKLSAgZGlybmFtZQlcCi0gIGR1CQlcCi0gIGVjaG8JCVwKLSAgZW52CQlc
Ci0gIGV4cGFuZAlcCi0gIGV4cHIJCVwKLSAgZmFjdG9yCVwKLSAgZmFsc2UJCVwKLSAgZm10CQlc
Ci0gIGZvbGQJCVwKLSAgZ2luc3RhbGwJXAotICBncm91cHMJXAotICBoZWFkCQlcCi0gIGlkCQlc
Ci0gIGpvaW4JCVwKLSAga2lsbAkJXAotICBsaW5rCQlcCi0gIGxuCQlcCi0gIGxvZ25hbWUJXAot
ICBscwkJXAotICBtZDVzdW0JXAotICBta2RpcgkJXAotICBta2ZpZm8JXAotICBta25vZAkJXAot
ICBta3RlbXAJXAotICBtdgkJXAotICBubAkJXAotICBucHJvYwkJXAotICBub2h1cAkJXAotICBv
ZAkJXAotICBwYXN0ZQkJXAotICBwYXRoY2hrCVwKLSAgcHIJCVwKLSAgcHJpbnRlbnYJXAotICBw
cmludGYJXAotICBwdHgJCVwKLSAgcHdkCQlcCi0gIHJlYWRsaW5rCVwKLSAgcmVhbHBhdGgJXAot
ICBybQkJXAotICBybWRpcgkJXAotICBydW5jb24JXAotICBzZXEJCVwKLSAgc2hhMXN1bQlcCi0g
IHNoYTIyNHN1bQlcCi0gIHNoYTI1NnN1bQlcCi0gIHNoYTM4NHN1bQlcCi0gIHNoYTUxMnN1bQlc
Ci0gIHNocmVkCQlcCi0gIHNodWYJCVwKLSAgc2xlZXAJCVwKLSAgc29ydAkJXAotICBzcGxpdAkJ
XAotICBzdGF0CQlcCi0gIHN1bQkJXAotICBzeW5jCQlcCi0gIHRhYwkJXAotICB0YWlsCQlcCi0g
IHRlZQkJXAotICB0ZXN0CQlcCi0gIHRpbWVvdXQJXAotICB0b3VjaAkJXAotICB0cgkJXAotICB0
cnVlCQlcCi0gIHRydW5jYXRlCVwKLSAgdHNvcnQJCVwKLSAgdHR5CQlcCi0gIHVuYW1lCQlcCi0g
IHVuZXhwYW5kCVwKLSAgdW5pcQkJXAotICB1bmxpbmsJXAotICB2ZGlyCQlcCi0gIHdjCQlcCi0g
IHdob2FtaQlcCi0gIHllcworICAkKGRlZmF1bHRfX3Byb2dzKQoKIGJpbl9QUk9HUkFNUyA9ICQo
T1BUSU9OQUxfQklOX1BST0dTKQoKQEAgLTYyMCw4ICs1MTQsOSBAQCBjaGVjay1SRUFETUU6CiAJ
JChBTV9WX2F0KWRpZmYgJChwbSkgJChwcikgJiYgcm0gLXJmICQocHIpICQocG0pCgogIyBFbnN1
cmUgdGhhdCBhIGJ5LWRlZmF1bHQtbm90LWluc3RhbGxlZCBwcm9ncmFtIChsaXN0ZWQgaW4KLSMg
JChub19pbnN0YWxsX19wcm9ncykgaXMgbm90IGFsc28gbGlzdGVkIGluICQoRVhUUkFfUFJPR1JB
TVMpLCBiZWNhdXNlCi0jIGlmIHRoYXQgd2VyZSB0byBoYXBwZW4sIGl0ICp3b3VsZCogYmUgaW5z
dGFsbGVkIGJ5IGRlZmF1bHQuCisjICQobm9faW5zdGFsbF9fcHJvZ3MpIGlzIG5vdCBhbHNvIGxp
c3RlZCBhcyBhbm90aGVyICQoRVhUUkFfUFJPR1JBTVMpCisjIGVudHJ5LCBiZWNhdXNlIGlmIHRo
YXQgd2VyZSB0byBoYXBwZW4sIGl0ICp3b3VsZCogYmUgaW5zdGFsbGVkCisjIGJ5IGRlZmF1bHQu
CiAuUEhPTlk6IGNoZWNrLWR1cGxpY2F0ZS1uby1pbnN0YWxsCiBjaGVjay1kdXBsaWNhdGUtbm8t
aW5zdGFsbDogdHIKIAkkKEFNX1ZfR0VOKXRlc3QgLXogImBlY2hvICckKEVYVFJBX1BST0dSQU1T
KSd8IC4vdHIgJyAnICdcbicgfCB1bmlxIC1kYCIKLS0gCjEuNy4xMi4xNDYuZzE2ZDI2YjEKCgpG
cm9tIGQ2MzU4MzQ1Y2JlMDM1NmU5NzAyMjhjMjBiZDFmZjc2ODE4OWY3YjMgTW9uIFNlcCAxNyAw
MDowMDowMCAyMDAxCkZyb206IFN0ZWZhbm8gTGF0dGFyaW5pIDxzdGVmYW5vLmxhdHRhcmluaUBn
bWFpbC5jb20+CkRhdGU6IEZyaSwgMzEgQXVnIDIwMTIgMTU6NDg6MzIgKzAyMDAKU3ViamVjdDog
W1BBVENIIDMvNl0gYnVpbGQ6IGRvbid0IHVzZSByZWN1cnNpdmUgbWFrZSB0byBidWlsZCB0aGUg
J3NyYycKIHN1YmRpcmVjdG9yeQoKKiBNYWtlZmlsZS5hbSAoU1VCRElSUyk6IFJlbW92ZSAnc3Jj
Jy4gIEVuc3VyZSAnLicgaXMgbGlzdGVkIGJlZm9yZQondGVzdHMnIGFuZCAnZ251bGliLXRlc3Rz
Jy4KKGRpc3QtaG9vayk6IEFkanVzdDogd2UgbXVzdCBub3cgdHdlYWsgdGhlIHRvcC1sZXZlbCBN
YWtlZmlsZS5pbgppbiAkKGRpc3RkaXIpLCBub3QgdGhlIG9uZSBpbiB0aGUgJ3NyYy8nIHN1YmRp
ciAod2hpY2ggaXMgZ29uZSkuCihpbmNsdWRlKTogVGhlICckKHRvcF9zcmNkaXIpL3NyYy9sb2Nh
bC5taycgZmlsZS4KKiBidWlsZC1hdXgvZ2VuLWxpc3RzLW9mLXByb2dyYW1zLnNoOiBBZGp1c3Qg
dGhlIGdlbmVyYXRpb24gb2YgdGhlCmF1dG9tYWtlIGlucHV0IGZyYWdtZW50LgoqIHRlc3RzL01h
a2VmaWxlLmFtICguYnVpbHQtcHJvZ3JhbXMpOiBBZGp1c3QuCiogY2ZnLm1rIChhbGxfcHJvZ3Jh
bXMpOiBSZW1vdmUgdGhpcyBjb252ZW5pZW5jZSBydWxlOyBpdCdzIG5vCmxvbmdlciBuZWVkZWQs
IG5vdyB0aGF0IHdlIGNhbiByZWx5IGRpcmVjdGx5IG9uIHRoZSBjb250ZW50cyBvZgokKGFsbF9w
cm9ncmFtcykuCihzY19vcHRpb25fZGVzY191cHBlcmNhc2UsIGNoZWNrLXByb2dyYW1zLXZzLXg6
KTogQWRqdXN0IGxpc3QKb2YgcHJlcmVxdWlzaXRlcyBhY2NvcmRpbmdseS4KKGFsbC1wcm9ncy1i
dXQtbGJyYWNrZXQpOiBTaW1wbGlmeSBkZWZpbml0aW9uIGFjY29yZGluZ2x5LgoqIGNvbmZpZ3Vy
ZS5hYyAoJE9QVElPTkFMX0JJTl9QUk9HUyk6IEFkanVzdCBkZWZpbml0aW9uLgooJE9QVElPTkFM
X1BLR0xJQl9QUk9HUyk6IExpa2V3aXNlLgooJE5PX0lOU1RBTExfUFJPR1NfREVGQVVMVCk6IFR3
ZWFrIGRlZmluaXRpb24sIGZvciBjb25zaXN0ZW5jeS4KKEFDX0NPTkZJR19GSUxFUyk6IFJlbW92
ZSAnc3JjL01ha2VmaWxlJy4KKiBzcmMvTWFrZWZpbGUuYW06IFJlbmFtZSAuLi4KKiBzcmMvbG9j
YWwubWs6IC4uLiBsaWtlIHRoaXMsIHdpdGggYSBsb3Qgb2YgYWRqdXN0bWVudHMuICBJbgphZGRp
dGlvbiAuLi4KKGFsbF9wcm9ncmFtcyk6IC4uLiByZW1vdmUgdGhpcyBub3ctdW5uZWVkZWQgY29u
dmVuaWVuY2UgdGFyZ2V0LgotLS0KIE1ha2VmaWxlLmFtICAgICAgICAgICAgICAgICAgICAgICAg
fCAgIDUgKy0KIGJ1aWxkLWF1eC9nZW4tbGlzdHMtb2YtcHJvZ3JhbXMuc2ggfCAgIDcgKy0KIGNm
Zy5tayAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMTMgKy0KIGNvbmZpZ3VyZS5hYyAg
ICAgICAgICAgICAgICAgICAgICAgfCAgMTYgKy0KIHNyYy9NYWtlZmlsZS5hbSAgICAgICAgICAg
ICAgICAgICAgfCA1NjAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiBzcmMv
bG9jYWwubWsgICAgICAgICAgICAgICAgICAgICAgIHwgNTY3ICsrKysrKysrKysrKysrKysrKysr
KysrKysrKysrKysrKysrKysKIHRlc3RzL01ha2VmaWxlLmFtICAgICAgICAgICAgICAgICAgfCAg
IDYgKy0KIDcgZmlsZXMgY2hhbmdlZCwgNTkyIGluc2VydGlvbnMoKyksIDU4MiBkZWxldGlvbnMo
LSkKIGRlbGV0ZSBtb2RlIDEwMDY0NCBzcmMvTWFrZWZpbGUuYW0KIGNyZWF0ZSBtb2RlIDEwMDY0
NCBzcmMvbG9jYWwubWsKCmRpZmYgLS1naXQgYS9NYWtlZmlsZS5hbSBiL01ha2VmaWxlLmFtCmlu
ZGV4IGYzZDZlZGEuLjZhNTZmNjggMTAwNjQ0Ci0tLSBhL01ha2VmaWxlLmFtCisrKyBiL01ha2Vm
aWxlLmFtCkBAIC0xNyw3ICsxNyw3IEBACgogQUxMX1JFQ1VSU0lWRV9UQVJHRVRTID0KCi1TVUJE
SVJTID0gbGliIHNyYyBwbyB0ZXN0cyBnbnVsaWItdGVzdHMKK1NVQkRJUlMgPSBsaWIgcG8gLiB0
ZXN0cyBnbnVsaWItdGVzdHMKCiBjaGFuZ2Vsb2dfZXRjID0JCQkJXAogICBDaGFuZ2VMb2ctMjAw
NQkJCVwKQEAgLTkyLDcgKzkyLDcgQEAgQlVJTFRfU09VUkNFUyA9IC52ZXJzaW9uCiAjIFNlZSB0
aGUgcm1fc3Vic3QgY29tbWVudCBmb3IgZGV0YWlscy4KIGRpc3QtaG9vazogZ2VuLUNoYW5nZUxv
ZwogCSQoQU1fVl9HRU4pZWNobyAkKFZFUlNJT04pID4gJChkaXN0ZGlyKS8udGFyYmFsbC12ZXJz
aW9uCi0JJChBTV9WX2F0KXBlcmwgLXBpIC1lICckKHJtX3N1YnN0KScgJChkaXN0ZGlyKS9zcmMv
TWFrZWZpbGUuaW4KKwkkKEFNX1ZfYXQpcGVybCAtcGkgLWUgJyQocm1fc3Vic3QpJyAkKGRpc3Rk
aXIpL01ha2VmaWxlLmluCgogZ2VuX3N0YXJ0X2RhdGUgPSAyMDA4LTAyLTA4CiAuUEhPTlk6IGdl
bi1DaGFuZ2VMb2cKQEAgLTE3MCw1ICsxNzAsNiBAQCBjaGVjay1naXQtaG9vay1zY3JpcHQtc3lu
YzoKIAlybSAtcmYgJCR0OwkJCQkJCQlcCiAJdGVzdCAkJGZhaWwgPSAwCgoraW5jbHVkZSAkKHRv
cF9zcmNkaXIpL3NyYy9sb2NhbC5tawogaW5jbHVkZSAkKHRvcF9zcmNkaXIpL2RvYy9sb2NhbC5t
awogaW5jbHVkZSAkKHRvcF9zcmNkaXIpL21hbi9sb2NhbC5tawpkaWZmIC0tZ2l0IGEvYnVpbGQt
YXV4L2dlbi1saXN0cy1vZi1wcm9ncmFtcy5zaCBiL2J1aWxkLWF1eC9nZW4tbGlzdHMtb2YtcHJv
Z3JhbXMuc2gKaW5kZXggZWM0M2VlOC4uZjA0OWI1NiAxMDA3NTUKLS0tIGEvYnVpbGQtYXV4L2dl
bi1saXN0cy1vZi1wcm9ncmFtcy5zaAorKysgYi9idWlsZC1hdXgvZ2VuLWxpc3RzLW9mLXByb2dy
YW1zLnNoCkBAIC0xNjUsMTcgKzE2NSwxOCBAQCBFTkQKICAgICA7OwogICAxLC0tYXV0b21ha2V8
MSwtLWZvci1hdXRvbWFrZSkKICAgICBlY2hvICIjIyAkbXNnIgorICAgIHByb2dzZGlyPXNyYwog
ICAgIGVjaG8gbm9faW5zdGFsbF9fcHJvZ3MgPQogICAgIGZvciBwIGluICRkaXNhYmxlZF9ieV9k
ZWZhdWx0X3Byb2dzOyBkbwotICAgICAgZWNobyBub19pbnN0YWxsX19wcm9ncyArPSAkcAorICAg
ICAgZWNobyBub19pbnN0YWxsX19wcm9ncyArPSAkcHJvZ3NkaXIvJHAKICAgICBkb25lCiAgICAg
ZWNobyBidWlsZF9pZl9wb3NzaWJsZV9fcHJvZ3MgPQogICAgIGZvciBwIGluICRidWlsZF9pZl9w
b3NzaWJsZV9wcm9nczsgZG8KLSAgICAgIGVjaG8gYnVpbGRfaWZfcG9zc2libGVfX3Byb2dzICs9
ICRwCisgICAgICBlY2hvIGJ1aWxkX2lmX3Bvc3NpYmxlX19wcm9ncyArPSAkcHJvZ3NkaXIvJHAK
ICAgICBkb25lCiAgICAgZWNobyBkZWZhdWx0X19wcm9ncyA9CiAgICAgZm9yIHAgaW4gJG5vcm1h
bF9wcm9nczsgZG8KLSAgICAgIGVjaG8gZGVmYXVsdF9fcHJvZ3MgKz0gJHAKKyAgICAgIGVjaG8g
ZGVmYXVsdF9fcHJvZ3MgKz0gJHByb2dzZGlyLyRwCiAgICAgZG9uZQogICAgIDs7CiAgICopCmRp
ZmYgLS1naXQgYS9jZmcubWsgYi9jZmcubWsKaW5kZXggMWRiZmU0Mi4uYjU2ZTMyOSAxMDA2NDQK
LS0tIGEvY2ZnLm1rCisrKyBiL2NmZy5tawpAQCAtMTY2LDEyICsxNjYsNiBAQCBzY19sb25nX2xp
bmVzOgogCSAgc2VkIC1lICJzfF58JCRmaWxlOnwiIC1lICckKEZJTFRFUl9MT05HX0xJTkVTKSc7
CQlcCiAJZG9uZSB8IGdyZXAgLiAmJiB7IG1zZz0iJCRoYWx0IiAkKF9zY19zYXlfYW5kX2V4aXQp
IH0gfHwgOgoKLSMgVE9ETzogcmVtb3ZlIG9uY2UgdGhlIGJ1aWxkIHN5c3RlbSBpbiAnc3JjLycg
aXMgbWVyZ2VkIHdpdGggdGhlCi0jIHRvcC1sZXZlbCBvbmUuCi0uUEhPTlk6IGFsbF9wcm9ncmFt
cwotYWxsX3Byb2dyYW1zOgotCUBjZCAuL3NyYyAmJiAkKE1BS0UpIC1zICRACi0KICMgT3B0aW9u
IGRlc2NyaXB0aW9ucyBzaG91bGQgbm90IHN0YXJ0IHdpdGggYSBjYXBpdGFsIGxldHRlci4KICMg
T25lIGNvdWxkIGdyZXAgc291cmNlIGRpcmVjdGx5IGFzIGZvbGxvd3M6CiAjIGdyZXAgLUUgIiB7
Miw2fS0uKlteLl0gIFtBLVpdW2Etel0iICQkKCQoVkNfTElTVF9FWENFUFQpIHwgZ3JlcCAnXC5j
JCQnKQpAQCAtMTgzLDcgKzE3Nyw3IEBAIHNjX29wdGlvbl9kZXNjX3VwcGVyY2FzZToKIAkgICYm
IHsgZWNobyAxPiYyICckQDogZm91bmQgaW5pdGlhbCBjYXBpdGFscyBpbiAtLWhlbHAnOyBleGl0
IDE7IH0gfHwgOgogc2Nfb3B0aW9uX2Rlc2NfdXBwZXJjYXNlOiAkKGRpc3RfbWFuMV9NQU5TKSBc
CiAgICAgICAgICAgICAgICAgICAgICAgICAgICQocGF0c3Vic3QgJSxtYW4vJS4xLCQoTk9fSU5T
VEFMTF9QUk9HU19ERUZBVUxUKSkgXAotICAgICAgICAgICAgICAgICAgICAgICAgICBhbGxfcHJv
Z3JhbXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgJChhbGxfcHJvZ3JhbXMpCgogIyBFbnN1
cmUgYWxsIG1hbi8qLlsxeF0gZmlsZXMgYXJlIHByZXNlbnQuCiBBTExfUkVDVVJTSVZFX1RBUkdF
VFMgKz0gc2NfbWFuX2ZpbGVfY29ycmVsYXRpb24KQEAgLTIwOCwxMyArMjAyLDEyIEBAIGNoZWNr
LXgtdnMtMToKCiAjIFdyaXRpbmcgYSBwb3J0YWJsZSBydWxlIHRvIGdlbmVyYXRlIGEgbWFucGFn
ZSBsaWtlICdbLjEnIHdvdWxkIGJlCiAjIGEgbmlnaHRtYXJlLgotYWxsLXByb2dzLWJ1dC1sYnJh
Y2tldCA9ICQoZmlsdGVyLW91dCBbLCAkKHNoZWxsIFwKLSAgICAgIChjZCAuL3NyYyAmJiBNQUtF
RkxBR1M9ICR7TUFLRX0gLXMgYWxsX3Byb2dyYW1zLmxpc3QpKSkKK2FsbC1wcm9ncy1idXQtbGJy
YWNrZXQgPSAkKGZpbHRlci1vdXQgWywkKGFsbF9wcm9ncmFtcykpCgogIyBFbnN1cmUgdGhhdCBm
b3IgZWFjaCAueCBmaWxlIGluIHRoZSAnbWFuLycgc3ViZGlyZWN0b3J5LCB0aGVyZSBpcyBhCiAj
IGNvcnJlc3BvbmRpbmcgY29yZXV0aWxzIHByb2dyYW0uCiAuUEhPTlk6IGNoZWNrLXByb2dyYW1z
LXZzLXgKLWNoZWNrLXByb2dyYW1zLXZzLXg6IGFsbF9wcm9ncmFtcworY2hlY2stcHJvZ3JhbXMt
dnMteDogJChhbGxfcHJvZ3JhbXMpCiAJQHN0YXR1cz0wOwkJCQkJXAogCWZvciBwIGluIGR1bW15
ICQoYWxsLXByb2dzLWJ1dC1sYnJhY2tldCk7IGRvCVwKIAkgIHRlc3QgJCRwID0gZHVtbXkgJiYg
Y29udGludWU7CQkJXApkaWZmIC0tZ2l0IGEvY29uZmlndXJlLmFjIGIvY29uZmlndXJlLmFjCmlu
ZGV4IGNhMDM4YzguLjhjNDFkNjIgMTAwNjQ0Ci0tLSBhL2NvbmZpZ3VyZS5hYworKysgYi9jb25m
aWd1cmUuYWMKQEAgLTQzMywxNCArNDMzLDIzIEBAIE1BTj1gCiAgICAgdGVzdCB4JHAgPSB4J0A8
OkAnICYmIGNvbnRpbnVlCiAgICAgZWNobyAibWFuLyRwLjEiCiAgIGRvbmVgCisKK05PX0lOU1RB
TExfUFJPR1NfREVGQVVMVD0kbm9faW5zdGFsbF9wcm9nc19kZWZhdWx0CitPUFRJT05BTF9QS0dM
SUJfUFJPR1M9YAorICBmb3IgcCBpbiAkb3B0aW9uYWxfcGtnbGliX3Byb2dzOyBkbyBlY2hvIHNy
Yy8kcDsgZG9uZWAKKyMgU2luY2UgdGhpcyBpcyBBQ19TVUJTVCdkLCBBdXRvbWFrZSB3b24ndCBi
ZSBhYmxlIHRvIHBlcmZvcm0gcmV3cml0ZQorIyB3aXRoICQoRVhFRVhUKSBhcHBlbmRpbmcgb24g
aXQsIHNvIHdlIGhhdmUgdG8gZG8gaXQgb3Vyc2VsdmVzLgorT1BUSU9OQUxfQklOX1BST0dTPWAK
KyAgZm9yIHAgaW4gJG9wdGlvbmFsX2Jpbl9wcm9nczsgZG8gZWNobyAic3JjLyRwXCQoRVhFRVhU
KSI7IGRvbmVgCisKICMgTm9ybWFsaXplIHdoaXRlc3BhY2UuCiBNQU49YGVjaG8gJE1BTmAKK05P
X0lOU1RBTExfUFJPR1NfREVGQVVMVD1gZWNobyAkTk9fSU5TVEFMTF9QUk9HU19ERUZBVUxUYAor
T1BUSU9OQUxfQklOX1BST0dTPWBlY2hvICRPUFRJT05BTF9CSU5fUFJPR1NgCitPUFRJT05BTF9Q
S0dMSUJfUFJPR1M9YGVjaG8gJE9QVElPTkFMX1BLR0xJQl9QUk9HU2AKCi1OT19JTlNUQUxMX1BS
T0dTX0RFRkFVTFQ9JG5vX2luc3RhbGxfcHJvZ3NfZGVmYXVsdAogQUNfU1VCU1QoW05PX0lOU1RB
TExfUFJPR1NfREVGQVVMVF0pCi1PUFRJT05BTF9CSU5fUFJPR1M9YGVjaG8gIiRvcHRpb25hbF9i
aW5fcHJvZ3MgInxzZWQgJ3MvIC9cJChFWEVFWFQpIC9nO3MvICQvLydgCiBBQ19TVUJTVChbT1BU
SU9OQUxfQklOX1BST0dTXSkKLU9QVElPTkFMX1BLR0xJQl9QUk9HUz1gZWNobyAiJG9wdGlvbmFs
X3BrZ2xpYl9wcm9ncyAiIHwgc2VkICdzLyAkLy8nYAogQUNfU1VCU1QoW09QVElPTkFMX1BLR0xJ
Ql9QUk9HU10pCgogQU1fQ09ORElUSU9OQUwoW0NST1NTX0NPTVBJTElOR10sIFt0ZXN0ICIkY3Jv
c3NfY29tcGlsaW5nIiA9IHllc10pCkBAIC00NTksNyArNDY4LDYgQEAgQUNfQ09ORklHX0ZJTEVT
KAogICBNYWtlZmlsZQogICBsaWIvTWFrZWZpbGUKICAgcG8vTWFrZWZpbGUuaW4KLSAgc3JjL01h
a2VmaWxlCiAgIHRlc3RzL01ha2VmaWxlCiAgIGdudWxpYi10ZXN0cy9NYWtlZmlsZQogICApCmRp
ZmYgLS1naXQgYS9zcmMvTWFrZWZpbGUuYW0gYi9zcmMvTWFrZWZpbGUuYW0KZGVsZXRlZCBmaWxl
IG1vZGUgMTAwNjQ0CmluZGV4IDNiMGVmNjUuLjAwMDAwMDAKLS0tIGEvc3JjL01ha2VmaWxlLmFt
CisrKyAvZGV2L251bGwKQEAgLTEsNTYwICswLDAgQEAKLSMjIFByb2Nlc3MgdGhpcyBmaWxlIHdp
dGggYXV0b21ha2UgdG8gcHJvZHVjZSBNYWtlZmlsZS5pbiAtKi1NYWtlZmlsZS0qLQotCi0jIyBD
b3B5cmlnaHQgKEMpIDE5OTAtMjAxMiBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4KLQot
IyMgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0
IGFuZC9vciBtb2RpZnkKLSMjIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwg
UHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5Ci0jIyB0aGUgRnJlZSBTb2Z0d2FyZSBGb3Vu
ZGF0aW9uLCBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZSBMaWNlbnNlLCBvcgotIyMgKGF0IHlvdXIg
b3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4KLSMjCi0jIyBUaGlzIHByb2dyYW0gaXMgZGlzdHJp
YnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwKLSMjIGJ1dCBXSVRIT1VU
IEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mCi0jIyBN
RVJDSEFOVEFCSUxJVFkgb3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUg
dGhlCi0jIyBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLgotIyMK
LSMjIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1
YmxpYyBMaWNlbnNlCi0jIyBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbS4gIElmIG5vdCwgc2VlIDxo
dHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvPi4KLQotQU1fQ0ZMQUdTID0gJChXQVJOX0NGTEFH
UykgJChXRVJST1JfQ0ZMQUdTKQotCi0jIFRoZSBsaXN0IG9mIGFsbCBwcm9ncmFtcyAoc2VwYXJh
dGVkIGluIGRpZmZlcmVudCB2YXJpYWJsZXMgdG8gZXhwcmVzcwotIyB0aGUgaG93IGFuZCB3aGVu
IHRoZXkgc2hvdWxkIGJlIGluc3RhbGxlZCkgaXMgZGVmaW5lZCBpbiB0aGlzIG1ha2VmaWxlCi0j
IGZyYWdtZW50LCBhdXRvZ2VuZXJhdGVkIGJ5IHRoZSAnZ2VuLWxpc3RzLW9mLXByb2dyYW1zLnNo
JyBhdXhpbGlhcnkKLSMgc2NyaXB0LgotaW5jbHVkZSAkKHNyY2RpcikvY3UtcHJvZ3MubWsKLQot
RVhUUkFfUFJPR1JBTVMgPSBcCi0gICQobm9faW5zdGFsbF9fcHJvZ3MpIFwKLSAgJChidWlsZF9p
Zl9wb3NzaWJsZV9fcHJvZ3MpIFwKLSAgJChkZWZhdWx0X19wcm9ncykKLQotYmluX1BST0dSQU1T
ID0gJChPUFRJT05BTF9CSU5fUFJPR1MpCi0KLW5vaW5zdF9QUk9HUkFNUyA9IHNldHVpZGdpZCBn
ZXRsaW1pdHMKLQotcGtnbGliZXhlY19QUk9HUkFNUyA9ICQoT1BUSU9OQUxfUEtHTElCX1BST0dT
KQotCi1ub2luc3RfSEVBREVSUyA9CVwKLSAgY2hvd24tY29yZS5oCQlcCi0gIGNvcHkuaAkJXAot
ICBjcC1oYXNoLmgJCVwKLSAgZGlyY29sb3JzLmgJCVwKLSAgZmllbWFwLmgJCVwKLSAgZmluZC1t
b3VudC1wb2ludC5oCVwKLSAgZnMuaAkJCVwKLSAgZnMtaXMtbG9jYWwuaAkJXAotICBncm91cC1s
aXN0LmgJCVwKLSAgaW9ibGtzaXplLmgJCVwKLSAgbHMuaAkJCVwKLSAgb3BlcmFuZDJzaWcuaAkJ
XAotICBwcm9nLWZwcmludGYuaAlcCi0gIHJlbW92ZS5oCQlcCi0gIHN5c3RlbS5oCQlcCi0gIHdo
ZWVsLXNpemUuaAkJXAotICB3aGVlbC5oCQlcCi0gIHVuYW1lLmgKLQotRVhUUkFfRElTVCA9IGRj
Z2VuIGRpcmNvbG9ycy5oaW4gdGFjLXBpcGUuYyBcCi0gIHdoZWVsLWdlbi5wbCBleHRyYWN0LW1h
Z2ljIGM5OS10by1jODkuZGlmZgotQlVJTFRfU09VUkNFUyA9Ci1DTEVBTkZJTEVTID0gJChTQ1JJ
UFRTKQotCi0jIEFsc28gcmVtb3ZlIHRoZXNlIHNvbWV0aW1lcy1idWlsdCBwcm9ncmFtcy4KLSMg
Rm9yIGV4YW1wbGUsIGV2ZW4gd2hlbiBleGNsdWRlZCwgdGhleSdyZSBidWlsdCB2aWEgX3NjX2No
ZWNrLUFVVEhPUlMuCi1DTEVBTkZJTEVTICs9ICQobm9faW5zdGFsbF9fcHJvZ3MpCi0KLUFNX0NQ
UEZMQUdTID0gLUkkKHRvcF9zcmNkaXIpL2xpYgotCi1ub2luc3RfTElCUkFSSUVTID0gbGlidmVy
LmEKLW5vZGlzdF9saWJ2ZXJfYV9TT1VSQ0VTID0gdmVyc2lvbi5jIHZlcnNpb24uaAotCi0jIFRl
bGwgdGhlIGxpbmtlciB0byBvbWl0IHJlZmVyZW5jZXMgdG8gdW51c2VkIHNoYXJlZCBsaWJyYXJp
ZXMuCi1BTV9MREZMQUdTID0gJChJR05PUkVfVU5VU0VEX0xJQlJBUklFU19DRkxBR1MpCi0KLSMg
RXh0cmEgbGlicmFyaWVzIG5lZWRlZCBieSBtb3JlIHRoYW4gb25lIHByb2dyYW0uICBXaWxsIGJl
IHVwZGF0ZWQgbGF0ZXIuCi1jb3B5X2xkYWRkID0KLXJlbW92ZV9sZGFkZCA9Ci0KLSMgU29tZXRp
bWVzLCB0aGUgZXhwYW5zaW9uIG9mICQoTElCSU5UTCkgaW5jbHVkZXMgLWxjIHdoaWNoIG1heQot
IyBpbmNsdWRlIG1vZHVsZXMgZGVmaW5pbmcgdmFyaWFibGVzIGxpa2UgJ29wdGluZCcsIHNvIGxp
YmNvcmV1dGlscy5hCi0jIG11c3QgcHJlY2VkZSAkKExJQklOVEwpIGluIG9yZGVyIHRvIGVuc3Vy
ZSB3ZSB1c2UgR05VIGdldG9wdC4KLSMgQnV0IGxpYmNvcmV1dGlscy5hIG11c3QgYWxzbyBmb2xs
b3cgJChMSUJJTlRMKSwgc2luY2UgbGliaW50bCB1c2VzCi0jIHJlcGxhY2VtZW50IGZ1bmN0aW9u
cyBkZWZpbmVkIGluIGxpYmNvcmV1dGlscy5hLgotTERBREQgPSBsaWJ2ZXIuYSAuLi9saWIvbGli
Y29yZXV0aWxzLmEgJChMSUJJTlRMKSAuLi9saWIvbGliY29yZXV0aWxzLmEKLQotIyBGaXJzdCwg
bGlzdCBhbGwgcHJvZ3JhbXMsIHRvIG1ha2UgbGlzdGluZyBwZXItcHJvZ3JhbSBsaWJyYXJpZXMg
ZWFzaWVyLgotIyBTZWUgWyBiZWxvdy4KLWFyY2hfTERBREQgPSAkKExEQUREKQotYmFzZTY0X0xE
QUREID0gJChMREFERCkKLWJhc2VuYW1lX0xEQUREID0gJChMREFERCkKLWNhdF9MREFERCA9ICQo
TERBREQpCi1jaGNvbl9MREFERCA9ICQoTERBREQpCi1jaGdycF9MREFERCA9ICQoTERBREQpCi1j
aG1vZF9MREFERCA9ICQoTERBREQpCi1jaG93bl9MREFERCA9ICQoTERBREQpCi1jaHJvb3RfTERB
REQgPSAkKExEQUREKQotY2tzdW1fTERBREQgPSAkKExEQUREKQotY29tbV9MREFERCA9ICQoTERB
REQpCi1ucHJvY19MREFERCA9ICQoTERBREQpCi1jcF9MREFERCA9ICQoTERBREQpCi1jc3BsaXRf
TERBREQgPSAkKExEQUREKQotY3V0X0xEQUREID0gJChMREFERCkKLWRhdGVfTERBREQgPSAkKExE
QUREKQotZGRfTERBREQgPSAkKExEQUREKQotZGZfTERBREQgPSAkKExEQUREKQotIyBTZWUgZGly
X0xEQUREIGJlbG93Ci1kaXJjb2xvcnNfTERBREQgPSAkKExEQUREKQotZGlybmFtZV9MREFERCA9
ICQoTERBREQpCi1kdV9MREFERCA9ICQoTERBREQpCi1lY2hvX0xEQUREID0gJChMREFERCkKLWVu
dl9MREFERCA9ICQoTERBREQpCi1leHBhbmRfTERBREQgPSAkKExEQUREKQotZXhwcl9MREFERCA9
ICQoTERBREQpCi1mYWN0b3JfTERBREQgPSAkKExEQUREKQotZmFsc2VfTERBREQgPSAkKExEQURE
KQotZm10X0xEQUREID0gJChMREFERCkKLWZvbGRfTERBREQgPSAkKExEQUREKQotZ2V0bGltaXRz
X0xEQUREID0gJChMREFERCkKLWdpbnN0YWxsX0xEQUREID0gJChMREFERCkKLWdyb3Vwc19MREFE
RCA9ICQoTERBREQpCi1oZWFkX0xEQUREID0gJChMREFERCkKLWhvc3RpZF9MREFERCA9ICQoTERB
REQpCi1ob3N0bmFtZV9MREFERCA9ICQoTERBREQpCi1pZF9MREFERCA9ICQoTERBREQpCi1qb2lu
X0xEQUREID0gJChMREFERCkKLWtpbGxfTERBREQgPSAkKExEQUREKQotbGlua19MREFERCA9ICQo
TERBREQpCi1sbl9MREFERCA9ICQoTERBREQpCi1sb2duYW1lX0xEQUREID0gJChMREFERCkKLWxz
X0xEQUREID0gJChMREFERCkKLW1kNXN1bV9MREFERCA9ICQoTERBREQpCi1ta2Rpcl9MREFERCA9
ICQoTERBREQpCi1ta2ZpZm9fTERBREQgPSAkKExEQUREKQotbWtub2RfTERBREQgPSAkKExEQURE
KQotbWt0ZW1wX0xEQUREID0gJChMREFERCkKLW12X0xEQUREID0gJChMREFERCkKLW5pY2VfTERB
REQgPSAkKExEQUREKQotbmxfTERBREQgPSAkKExEQUREKQotbm9odXBfTERBREQgPSAkKExEQURE
KQotb2RfTERBREQgPSAkKExEQUREKQotcGFzdGVfTERBREQgPSAkKExEQUREKQotcGF0aGNoa19M
REFERCA9ICQoTERBREQpCi1waW5reV9MREFERCA9ICQoTERBREQpCi1wcl9MREFERCA9ICQoTERB
REQpCi1wcmludGVudl9MREFERCA9ICQoTERBREQpCi1wcmludGZfTERBREQgPSAkKExEQUREKQot
cHR4X0xEQUREID0gJChMREFERCkKLXB3ZF9MREFERCA9ICQoTERBREQpCi1yZWFkbGlua19MREFE
RCA9ICQoTERBREQpCi1yZWFscGF0aF9MREFERCA9ICQoTERBREQpCi1ybV9MREFERCA9ICQoTERB
REQpCi1ybWRpcl9MREFERCA9ICQoTERBREQpCi1ydW5jb25fTERBREQgPSAkKExEQUREKQotc2Vx
X0xEQUREID0gJChMREFERCkKLXNldHVpZGdpZF9MREFERCA9ICQoTERBREQpCi1zaGExc3VtX0xE
QUREID0gJChMREFERCkKLXNoYTIyNHN1bV9MREFERCA9ICQoTERBREQpCi1zaGEyNTZzdW1fTERB
REQgPSAkKExEQUREKQotc2hhMzg0c3VtX0xEQUREID0gJChMREFERCkKLXNoYTUxMnN1bV9MREFE
RCA9ICQoTERBREQpCi1zaHJlZF9MREFERCA9ICQoTERBREQpCi1zaHVmX0xEQUREID0gJChMREFE
RCkKLXNsZWVwX0xEQUREID0gJChMREFERCkKLXNvcnRfTERBREQgPSAkKExEQUREKQotc3BsaXRf
TERBREQgPSAkKExEQUREKQotc3RhdF9MREFERCA9ICQoTERBREQpCi1zdGRidWZfTERBREQgPSAk
KExEQUREKQotc3R0eV9MREFERCA9ICQoTERBREQpCi1zdW1fTERBREQgPSAkKExEQUREKQotc3lu
Y19MREFERCA9ICQoTERBREQpCi10YWNfTERBREQgPSAkKExEQUREKQotdGFpbF9MREFERCA9ICQo
TERBREQpCi10ZWVfTERBREQgPSAkKExEQUREKQotdGVzdF9MREFERCA9ICQoTERBREQpCi10aW1l
b3V0X0xEQUREID0gJChMREFERCkKLXRvdWNoX0xEQUREID0gJChMREFERCkKLXRyX0xEQUREID0g
JChMREFERCkKLXRydWVfTERBREQgPSAkKExEQUREKQotdHJ1bmNhdGVfTERBREQgPSAkKExEQURE
KQotdHNvcnRfTERBREQgPSAkKExEQUREKQotdHR5X0xEQUREID0gJChMREFERCkKLXVuYW1lX0xE
QUREID0gJChMREFERCkKLXVuZXhwYW5kX0xEQUREID0gJChMREFERCkKLXVuaXFfTERBREQgPSAk
KExEQUREKQotdW5saW5rX0xEQUREID0gJChMREFERCkKLXVwdGltZV9MREFERCA9ICQoTERBREQp
Ci11c2Vyc19MREFERCA9ICQoTERBREQpCi0jIFNlZSB2ZGlyX0xEQUREIGJlbG93Ci13Y19MREFE
RCA9ICQoTERBREQpCi13aG9fTERBREQgPSAkKExEQUREKQotd2hvYW1pX0xEQUREID0gJChMREFE
RCkKLXllc19MREFERCA9ICQoTERBREQpCi0KLSMgU3lub255bXMuICBSZWNhbGwgdGhhdCBBdXRv
bWFrZSB0cmFuc2xpdGVyYXRlcyAnWycgdG8gJ18nLgotX19MREFERCA9ICQodGVzdF9MREFERCkK
LWRpcl9MREFERCA9ICQobHNfTERBREQpCi12ZGlyX0xEQUREID0gJChsc19MREFERCkKLQotY3Bf
TERBREQgKz0gJChjb3B5X2xkYWRkKQotZ2luc3RhbGxfTERBREQgKz0gJChjb3B5X2xkYWRkKQot
bXZfTERBREQgKz0gJChjb3B5X2xkYWRkKQotCi1tdl9MREFERCArPSAkKHJlbW92ZV9sZGFkZCkK
LXJtX0xEQUREICs9ICQocmVtb3ZlX2xkYWRkKQotCi0jIGZvciBlYWNjZXNzLCBldWlkYWNjZXNz
Ci1jb3B5X2xkYWRkICs9ICQoTElCX0VBQ0NFU1MpCi1yZW1vdmVfbGRhZGQgKz0gJChMSUJfRUFD
Q0VTUykKLXNvcnRfTERBREQgKz0gJChMSUJfRUFDQ0VTUykKLXRlc3RfTERBREQgKz0gJChMSUJf
RUFDQ0VTUykKLQotIyBmb3Igc2VsaW51eCB1c2UKLWNvcHlfbGRhZGQgKz0gJChMSUJfU0VMSU5V
WCkKLWNoY29uX0xEQUREICs9ICQoTElCX1NFTElOVVgpCi1naW5zdGFsbF9MREFERCArPSAkKExJ
Ql9TRUxJTlVYKQotaWRfTERBREQgKz0gJChMSUJfU0VMSU5VWCkKLWxzX0xEQUREICs9ICQoTElC
X1NFTElOVVgpCi1ta2Rpcl9MREFERCArPSAkKExJQl9TRUxJTlVYKQotbWtmaWZvX0xEQUREICs9
ICQoTElCX1NFTElOVVgpCi1ta25vZF9MREFERCArPSAkKExJQl9TRUxJTlVYKQotcnVuY29uX0xE
QUREICs9ICQoTElCX1NFTElOVVgpCi1zdGF0X0xEQUREICs9ICQoTElCX1NFTElOVVgpCi0KLSMg
Zm9yIGdldHRpbWUsIHNldHRpbWUsIHV0aW1lY21wLCB1dGltZW5zCi1jb3B5X2xkYWRkICs9ICQo
TElCX0NMT0NLX0dFVFRJTUUpCi1kYXRlX0xEQUREICs9ICQoTElCX0NMT0NLX0dFVFRJTUUpCi1n
aW5zdGFsbF9MREFERCArPSAkKExJQl9DTE9DS19HRVRUSU1FKQotbHNfTERBREQgKz0gJChMSUJf
Q0xPQ0tfR0VUVElNRSkKLXByX0xEQUREICs9ICQoTElCX0NMT0NLX0dFVFRJTUUpCi10aW1lb3V0
X0xEQUREICs9ICQoTElCX1RJTUVSX1RJTUUpCi10b3VjaF9MREFERCArPSAkKExJQl9DTE9DS19H
RVRUSU1FKQotCi0jIGZvciBnZXRocnh0aW1lCi1kZF9MREFERCArPSAkKExJQl9HRVRIUlhUSU1F
KQotCi0jIGZvciBjYXBfZ2V0X2ZpbGUKLWxzX0xEQUREICs9ICQoTElCX0NBUCkKLQotIyBmb3Ig
ZmRhdGFzeW5jCi1kZF9MREFERCArPSAkKExJQl9GREFUQVNZTkMpCi1zaHJlZF9MREFERCArPSAk
KExJQl9GREFUQVNZTkMpCi0KLSMgZm9yIHhuYW5vc2xlZXAKLXNsZWVwX0xEQUREICs9ICQoTElC
X05BTk9TTEVFUCkKLXNvcnRfTERBREQgKz0gJChMSUJfTkFOT1NMRUVQKQotdGFpbF9MREFERCAr
PSAkKExJQl9OQU5PU0xFRVApCi0KLSMgZm9yIHZhcmlvdXMgR01QIGZ1bmN0aW9ucwotZXhwcl9M
REFERCArPSAkKExJQl9HTVApCi1mYWN0b3JfTERBREQgKz0gJChMSUJfR01QKQotCi0jIGZvciBn
ZXRsb2FkYXZnCi11cHRpbWVfTERBREQgKz0gJChHRVRMT0FEQVZHX0xJQlMpCi0KLSMgZm9yIHZh
cmlvdXMgQUNMIGZ1bmN0aW9ucwotY29weV9sZGFkZCArPSAkKExJQl9BQ0wpCi1sc19MREFERCAr
PSAkKExJQl9BQ0wpCi0KLSMgZm9yIHZhcmlvdXMgeGF0dHIgZnVuY3Rpb25zCi1jb3B5X2xkYWRk
ICs9ICQoTElCX1hBVFRSKQotCi0jIGZvciBwcmludF91bmljb2RlX2NoYXIsIHByb3Blcl9uYW1l
X3V0ZjgKLWNhdF9MREFERCArPSAkKExJQklDT05WKQotY3BfTERBREQgKz0gJChMSUJJQ09OVikK
LWRmX0xEQUREICs9ICQoTElCSUNPTlYpCi1kdV9MREFERCArPSAkKExJQklDT05WKQotZ2V0bGlt
aXRzX0xEQUREICs9ICQoTElCSUNPTlYpCi1wcmludGZfTERBREQgKz0gJChMSUJJQ09OVikKLXB0
eF9MREFERCArPSAkKExJQklDT05WKQotcmVhbHBhdGhfTERBREQgKz0gJChMSUJJQ09OVikKLXNw
bGl0X0xEQUREICs9ICQoTElCSUNPTlYpCi1zdGRidWZfTERBREQgKz0gJChMSUJJQ09OVikKLXRp
bWVvdXRfTERBREQgKz0gJChMSUJJQ09OVikKLXRydW5jYXRlX0xEQUREICs9ICQoTElCSUNPTlYp
Ci0KLSMgZm9yIGNhbm9uX2hvc3QKLXBpbmt5X0xEQUREICs9ICQoR0VUQUREUklORk9fTElCKQot
d2hvX0xEQUREICs9ICQoR0VUQUREUklORk9fTElCKQotCi0jIGZvciBnZXRob3N0bmFtZSwgdW5h
bWUKLWhvc3RuYW1lX0xEQUREICs9ICQoR0VUSE9TVE5BTUVfTElCKQotdW5hbWVfTERBREQgKz0g
JChHRVRIT1NUTkFNRV9MSUIpCi0KLSMgZm9yIHN0cnNpZ25hbAota2lsbF9MREFERCArPSAkKExJ
QlRIUkVBRCkKLQotIyBmb3IgcHRocmVhZAotc29ydF9MREFERCArPSAkKExJQl9QVEhSRUFEKQot
Ci0kKFBST0dSQU1TKTogLi4vbGliL2xpYmNvcmV1dGlscy5hCi0KLSMgR2V0IHRoZSByZWxlYXNl
IHllYXIgZnJvbSAuLi9saWIvdmVyc2lvbi1ldGMuYy4KLVJFTEVBU0VfWUVBUiA9IFwKLSAgYHNl
ZCAtbiAnLy4qQ09QWVJJR0hUX1lFQVIgPSBcKFswLTldWzAtOV1bMC05XVswLTldXCkgfTsvcy8v
XDEvcCcgXAotICAgICQodG9wX3NyY2RpcikvbGliL3ZlcnNpb24tZXRjLmNgCi0KLWNvcHlfc291
cmNlcyA9IGNvcHkuYyBjcC1oYXNoLmMgZXh0ZW50LXNjYW4uYyBleHRlbnQtc2Nhbi5oCi0KLSMg
VXNlICdnaW5zdGFsbCcgaW4gdGhlIGRlZmluaXRpb24gb2YgUFJPR1JBTVMgYW5kIGluIGRlcGVu
ZGVuY2llcyB0byBhdm9pZAotIyBjb25mdXNpb24gd2l0aCB0aGUgJ2luc3RhbGwnIHRhcmdldC4g
IFRoZSBpbnN0YWxsIHJ1bGUgdHJhbnNmb3JtcyAnZ2luc3RhbGwnCi0jIHRvIGluc3RhbGwgYmVm
b3JlIGFwcGx5aW5nIGFueSB1c2VyLXNwZWNpZmllZCBuYW1lIHRyYW5zZm9ybWF0aW9ucy4KLQot
dHJhbnNmb3JtID0gcy9naW5zdGFsbC9pbnN0YWxsLzsgJChwcm9ncmFtX3RyYW5zZm9ybV9uYW1l
KQotZ2luc3RhbGxfU09VUkNFUyA9IGluc3RhbGwuYyBwcm9nLWZwcmludGYuYyAkKGNvcHlfc291
cmNlcykKLQotIyBUaGlzIGlzIGZvciB0aGUgJ1snIHByb2dyYW0uICBBdXRvbWFrZSB0cmFuc2xp
dGVyYXRlcyAnWycgdG8gJ18nLgotX19TT1VSQ0VTID0gbGJyYWNrZXQuYwotCi1jcF9TT1VSQ0VT
ID0gY3AuYyAkKGNvcHlfc291cmNlcykKLWRpcl9TT1VSQ0VTID0gbHMuYyBscy1kaXIuYwotdmRp
cl9TT1VSQ0VTID0gbHMuYyBscy12ZGlyLmMKLWlkX1NPVVJDRVMgPSBpZC5jIGdyb3VwLWxpc3Qu
YwotZ3JvdXBzX1NPVVJDRVMgPSBncm91cHMuYyBncm91cC1saXN0LmMKLWxzX1NPVVJDRVMgPSBs
cy5jIGxzLWxzLmMKLWxuX1NPVVJDRVMgPSBsbi5jIHJlbHBhdGguYyByZWxwYXRoLmgKLWNob3du
X1NPVVJDRVMgPSBjaG93bi5jIGNob3duLWNvcmUuYwotY2hncnBfU09VUkNFUyA9IGNoZ3JwLmMg
Y2hvd24tY29yZS5jCi1raWxsX1NPVVJDRVMgPSBraWxsLmMgb3BlcmFuZDJzaWcuYwotcmVhbHBh
dGhfU09VUkNFUyA9IHJlYWxwYXRoLmMgcmVscGF0aC5jIHJlbHBhdGguaAotdGltZW91dF9TT1VS
Q0VTID0gdGltZW91dC5jIG9wZXJhbmQyc2lnLmMKLQotbXZfU09VUkNFUyA9IG12LmMgcmVtb3Zl
LmMgJChjb3B5X3NvdXJjZXMpCi1ybV9TT1VSQ0VTID0gcm0uYyByZW1vdmUuYwotCi1ta2Rpcl9T
T1VSQ0VTID0gbWtkaXIuYyBwcm9nLWZwcmludGYuYwotcm1kaXJfU09VUkNFUyA9IHJtZGlyLmMg
cHJvZy1mcHJpbnRmLmMKLQotZGZfU09VUkNFUyA9IGRmLmMgZmluZC1tb3VudC1wb2ludC5jCi1z
dGF0X1NPVVJDRVMgPSBzdGF0LmMgZmluZC1tb3VudC1wb2ludC5jCi0KLXVuYW1lX1NPVVJDRVMg
PSB1bmFtZS5jIHVuYW1lLXVuYW1lLmMKLWFyY2hfU09VUkNFUyA9IHVuYW1lLmMgdW5hbWUtYXJj
aC5jCi0KLW1kNXN1bV9DUFBGTEFHUyA9IC1ESEFTSF9BTEdPX01ENT0xICQoQU1fQ1BQRkxBR1Mp
Ci1zaGExc3VtX1NPVVJDRVMgPSBtZDVzdW0uYwotc2hhMXN1bV9DUFBGTEFHUyA9IC1ESEFTSF9B
TEdPX1NIQTE9MSAkKEFNX0NQUEZMQUdTKQotc2hhMjI0c3VtX1NPVVJDRVMgPSBtZDVzdW0uYwot
c2hhMjI0c3VtX0NQUEZMQUdTID0gLURIQVNIX0FMR09fU0hBMjI0PTEgJChBTV9DUFBGTEFHUykK
LXNoYTI1NnN1bV9TT1VSQ0VTID0gbWQ1c3VtLmMKLXNoYTI1NnN1bV9DUFBGTEFHUyA9IC1ESEFT
SF9BTEdPX1NIQTI1Nj0xICQoQU1fQ1BQRkxBR1MpCi1zaGEzODRzdW1fU09VUkNFUyA9IG1kNXN1
bS5jCi1zaGEzODRzdW1fQ1BQRkxBR1MgPSAtREhBU0hfQUxHT19TSEEzODQ9MSAkKEFNX0NQUEZM
QUdTKQotc2hhNTEyc3VtX1NPVVJDRVMgPSBtZDVzdW0uYwotc2hhNTEyc3VtX0NQUEZMQUdTID0g
LURIQVNIX0FMR09fU0hBNTEyPTEgJChBTV9DUFBGTEFHUykKLQotZ2luc3RhbGxfQ1BQRkxBR1Mg
PSAtREVOQUJMRV9NQVRDSFBBVEhDT049MSAkKEFNX0NQUEZMQUdTKQotCi0jIEVuc3VyZSB3ZSBk
b24ndCBsaW5rIGFnYWluc3QgbGliY29yZXV0aWxzLmEgYXMgdGhhdCBsaWIgaXMKLSMgbm90IGNv
bXBpbGVkIHdpdGggLWZQSUMgd2hpY2ggY2F1c2VzIGlzc3VlcyBvbiA2NCBiaXQgYXQgbGVhc3QK
LWxpYnN0ZGJ1Zl9zb19MREFERCA9Ci0KLSMgTm90ZSBsaWJzdGRidWYgaXMgb25seSBjb21waWxl
ZCBpZiBHQ0MgaXMgYXZhaWxhYmxlCi0jIChhcyBwZXIgdGhlIGNoZWNrIGluIGNvbmZpZ3VyZS5h
YyksIHNvIHRoZXNlIGZsYWdzIHNob3VsZCBiZSBhdmFpbGFibGUuCi0jIGxpYnRvb2wgaXMgcHJv
YmFibHkgcmVxdWlyZWQgdG8gcmVsYXggdGhpcyBkZXBlbmRlbmN5LgotbGlic3RkYnVmX3NvX0xE
RkxBR1MgPSAtc2hhcmVkCi1saWJzdGRidWZfc29fQ0ZMQUdTID0gLWZQSUMgJChBTV9DRkxBR1Mp
Ci0KLUJVSUxUX1NPVVJDRVMgKz0gZGlyY29sb3JzLmgKLWRpcmNvbG9ycy5oOiBkY2dlbiBkaXJj
b2xvcnMuaGluCi0JJChBTV9WX0dFTilybSAtZiAkQCAkQC10Ci0JJChBTV9WX2F0KSQoUEVSTCkg
LXcgLS0gJChzcmNkaXIpL2RjZ2VuICQoc3JjZGlyKS9kaXJjb2xvcnMuaGluID4gJEAtdAotCSQo
QU1fVl9hdCljaG1vZCBhLXcgJEAtdAotCSQoQU1fVl9hdCltdiAkQC10ICRACi0KLXdoZWVsX3Np
emUgPSA1Ci0KLUJVSUxUX1NPVVJDRVMgKz0gd2hlZWwtc2l6ZS5oCi13aGVlbC1zaXplLmg6IE1h
a2VmaWxlLmFtCi0JJChBTV9WX0dFTilybSAtZiAkQCAkQC10Ci0JJChBTV9WX2F0KWVjaG8gJyNk
ZWZpbmUgV0hFRUxfU0laRSAkKHdoZWVsX3NpemUpJyA+ICRALXQKLQkkKEFNX1ZfYXQpY2htb2Qg
YS13ICRALXQKLQkkKEFNX1ZfYXQpbXYgJEAtdCAkQAotCi1CVUlMVF9TT1VSQ0VTICs9IHdoZWVs
LmgKLXdoZWVsLmg6IHdoZWVsLWdlbi5wbCBNYWtlZmlsZS5hbQotCSQoQU1fVl9HRU4pcm0gLWYg
JEAgJEAtdAotCSQoQU1fVl9hdCkkKHNyY2Rpcikvd2hlZWwtZ2VuLnBsICQod2hlZWxfc2l6ZSkg
PiAkQC10Ci0JJChBTV9WX2F0KWNobW9kIGEtdyAkQC10Ci0JJChBTV9WX2F0KW12ICRALXQgJEAK
LQotIyBmYWxzZSBleGl0cyBub256ZXJvIGV2ZW4gd2l0aCAtLWhlbHAgb3IgLS12ZXJzaW9uLgot
IyB0ZXN0IGRvZXNuJ3Qgc3VwcG9ydCAtLWhlbHAgb3IgLS12ZXJzaW9uLgotIyBUZWxsIGF1dG9t
YWtlIHRvIGV4ZW1wdCB0aGVuIGZyb20gdGhhdCBpbnN0YWxsY2hlY2sgdGVzdC4KLUFNX0lOU1RB
TExDSEVDS19TVERfT1BUSU9OU19FWEVNUFQgPSBmYWxzZSB0ZXN0Ci0KLSMgQ29tcGFyZSBmcy5o
IHdpdGggdGhlIGxpc3Qgb2YgZmlsZSBzeXN0ZW0gbmFtZXMvbWFnaWMtbnVtYmVycyBpbiB0aGUK
LSMgTGludXggc3RhdGZzIG1hbiBwYWdlLiAgVGhpcyB0YXJnZXQgcHJpbnRzIGFueSBuZXcgbmFt
ZS9udW1iZXIgcGFpcnMuCi0jIEFsc28gY29tcGFyZSBhZ2FpbnN0IC91c3IvaW5jbHVkZS9saW51
eC9tYWdpYy5oCi0uUEhPTlk6IGZzLW1hZ2ljLWNvbXBhcmUKLWZzLW1hZ2ljLWNvbXBhcmU6IGZz
LW1hZ2ljIGZzLWtlcm5lbC1tYWdpYyBmcy1kZWYKLQlqb2luIC12MSAtdEAgZnMtbWFnaWMgZnMt
ZGVmCi0Jam9pbiAtdjEgLXRAIGZzLWtlcm5lbC1tYWdpYyBmcy1kZWYKLQotQ0xFQU5GSUxFUyAr
PSBmcy1kZWYKLWZzLWRlZjogZnMuaAotCWdyZXAgJ14jICpkZWZpbmUgJyBmcy5oIHwgJChBU1NP
UlQpID4gJEAtdCAmJiBtdiAkQC10ICRACi0KLSMgTWFzc2FnZSBiaXRzIG9mIHRoZSBzdGF0ZnMg
bWFuIHBhZ2UgYW5kIGRlZmluaXRpb25zIGZyb20KLSMgL3Vzci9pbmNsdWRlL2xpbnV4L21hZ2lj
LmggdG8gYmUgaW4gYSBmb3JtIGNvbnNpc3RlbnQgd2l0aCB3aGF0J3MgaW4gZnMuaC4KLWZzX25v
cm1hbGl6ZV9wZXJsX3N1YnN0ID0JCQlcCi0gIC1lICdzL01JTklYX1NVUEVSX01BR0lDXGIvTUlO
SVgvOycJCVwKLSAgLWUgJ3MvTUlOSVhfU1VQRVJfTUFHSUMyXGIvTUlOSVhfMzAvOycJXAotICAt
ZSAncy9NSU5JWDJfU1VQRVJfTUFHSUNcYi9NSU5JWF9WMi87JwlcCi0gIC1lICdzL01JTklYMl9T
VVBFUl9NQUdJQzJcYi9NSU5JWF9WMl8zMC87JwlcCi0gIC1lICdzL01JTklYM19TVVBFUl9NQUdJ
Q1xiL01JTklYX1YzLzsnCVwKLSAgLWUgJ3MvQ0lGU19NQUdJQ19OVU1CRVIvQ0lGUy87JwkJXAot
ICAtZSAncy8oX1NVUEVSKT9fTUFHSUMvLzsnCQkJXAotICAtZSAncy9ccysweChcUyspLyIgMHgi
IC4gdWMgJCQxL2U7JwkJXAotICAtZSAncy8oXHMrMHgpKFxYezN9KVxiLyQkezF9MCQkMi87JwkJ
XAotICAtZSAncy8oXHMrMHgpKFxYezZ9KVxiLyQkezF9MDAkJDIvOycJCVwKLSAgLWUgJ3MvKFxz
KzB4KShcWHs3fSlcYi8kJHsxfTAkJDIvOycJCVwKLSAgLWUgJ3MvXlxzKy8vOycJCQkJXAotICAt
ZSAncy9eXDA0M2RlZmluZVxzKy8vOycJCQlcCi0gIC1lICdzL15fKFhJQUZTKS8kJDEvOycJCQlc
Ci0gIC1lICdzL15VU0JERVZJQ0UvVVNCREVWRlMvOycJCQlcCi0gIC1lICdzL05URlNfU0IvTlRG
Uy87JwkJCQlcCi0gIC1lICdzL14vXDA0MyBkZWZpbmUgU19NQUdJQ18vOycJCVwKLSAgLWUgJ3Ms
XHMqL1wqIC4qPyBcKi8sLDsnCi0KLUNMRUFORklMRVMgKz0gZnMtbWFnaWMKLWZzLW1hZ2ljOiBN
YWtlZmlsZQotCW1hbiBzdGF0ZnMgXAotCSAgfHBlcmwgLW5lICcvRmlsZSBzeXN0ZW0gdHlwZXM6
Ly4uLi9Ob2JvZHkga25vLyBhbmQgcHJpbnQnCVwKLQkgIHxncmVwIDB4IHwgcGVybCAtcAkJCQkJ
CVwKLQkgICAgJChmc19ub3JtYWxpemVfcGVybF9zdWJzdCkJCQkJCVwKLQkgIHwgZ3JlcCAtRXYg
J1NfTUFHSUNfRVhUWzM0XXxTVEFDS19FTkQnCQkJXAotCSAgfCAkKEFTU09SVCkJCQkJCQkJXAot
CSAgPiAkQC10ICYmIG12ICRALXQgJEAKLQotQ0xFQU5GSUxFUyArPSBmcy1rZXJuZWwtbWFnaWMK
LWZzLWtlcm5lbC1tYWdpYzogTWFrZWZpbGUKLQlwZXJsIC1uZSAnL14jZGVmaW5lLioweC8gYW5k
IHByaW50JyAvdXNyL2luY2x1ZGUvbGludXgvbWFnaWMuaAlcCi0JICB8IHBlcmwgLXAJCQkJCQkJ
XAotCSAgICAkKGZzX25vcm1hbGl6ZV9wZXJsX3N1YnN0KQkJCQkJXAotCSAgfCBncmVwIC1FdiAn
U19NQUdJQ19FWFRbMzRdfFNUQUNLX0VORCcJCQlcCi0JICB8ICQoQVNTT1JUKQkJCQkJCQlcCi0J
ICA+ICRALXQgJiYgbXYgJEAtdCAkQAotCi1CVUlMVF9TT1VSQ0VTICs9IGZzLWlzLWxvY2FsLmgK
LWZzLWlzLWxvY2FsLmg6IHN0YXQuYyBleHRyYWN0LW1hZ2ljCi0JJChBTV9WX0dFTilybSAtZiAk
QAotCSQoQU1fVl9hdCkkKFBFUkwpICQoc3JjZGlyKS9leHRyYWN0LW1hZ2ljIC0tbG9jYWwgJChz
cmNkaXIpL3N0YXQuYyBcCi0JICA+ICRAdAotCSQoQU1fVl9hdCljaG1vZCBhLXcgJEB0Ci0JJChB
TV9WX2F0KW12ICRAdCAkQAotCi1CVUlMVF9TT1VSQ0VTICs9IGZzLmgKLWZzLmg6IHN0YXQuYyBl
eHRyYWN0LW1hZ2ljCi0JJChBTV9WX0dFTilybSAtZiAkQAotCSQoQU1fVl9hdCkkKFBFUkwpICQo
c3JjZGlyKS9leHRyYWN0LW1hZ2ljICQoc3JjZGlyKS9zdGF0LmMgPiAkQHQKLQkkKEFNX1ZfYXQp
Y2htb2QgYS13ICRAdAotCSQoQU1fVl9hdCltdiAkQHQgJEAKLQotQlVJTFRfU09VUkNFUyArPSB2
ZXJzaW9uLmMKLXZlcnNpb24uYzogTWFrZWZpbGUKLQkkKEFNX1ZfR0VOKXJtIC1mICRACi0JJChB
TV9WX2F0KXByaW50ZiAnI2luY2x1ZGUgPGNvbmZpZy5oPlxuJyA+ICRAdAotCSQoQU1fVl9hdClw
cmludGYgJ2NoYXIgY29uc3QgKlZlcnNpb24gPSAiJChQQUNLQUdFX1ZFUlNJT04pIjtcbicgPj4g
JEB0Ci0JJChBTV9WX2F0KWNobW9kIGEtdyAkQHQKLQkkKEFNX1ZfYXQpbXYgJEB0ICRACi0KLUJV
SUxUX1NPVVJDRVMgKz0gdmVyc2lvbi5oCi12ZXJzaW9uLmg6IE1ha2VmaWxlCi0JJChBTV9WX0dF
TilybSAtZiAkQAotCSQoQU1fVl9hdClwcmludGYgJ2V4dGVybiBjaGFyIGNvbnN0ICpWZXJzaW9u
O1xuJyA+ICRAdAotCSQoQU1fVl9hdCljaG1vZCBhLXcgJEB0Ci0JJChBTV9WX2F0KW12ICRAdCAk
QAotCi1ESVNUQ0xFQU5GSUxFUyA9IHZlcnNpb24uYyB2ZXJzaW9uLmgKLU1BSU5UQUlORVJDTEVB
TkZJTEVTID0gJChCVUlMVF9TT1VSQ0VTKQotCi0jIFNvcnQgaW4gdHJhZGl0aW9uYWwgQVNDSUkg
b3JkZXIsIHJlZ2FyZGxlc3Mgb2YgdGhlIGN1cnJlbnQgbG9jYWxlOwotIyBvdGhlcndpc2Ugd2Ug
bWF5IGdldCBpbnRvIHRyb3VibGUgd2l0aCBkaXN0aW5jdCBzdHJpbmdzIHRoYXQgdGhlCi0jIGN1
cnJlbnQgbG9jYWxlIGNvbnNpZGVycyB0byBiZSBlcXVhbC4KLUFTU09SVCA9IExDX0FMTD1DIHNv
cnQKLQotYWxsX3Byb2dyYW1zID0gXAotICAgICQoYmluX1BST0dSQU1TKSBcCi0gICAgJChiaW5f
U0NSSVBUUykgXAotICAkKEVYVFJBX1BST0dSQU1TKQotCi1idWlsdF9wcm9ncmFtcy5saXN0Ogot
CUBlY2hvICQoYmluX1BST0dSQU1TKSAkKGJpbl9TQ1JJUFRTKSB8IHRyICcgJyAnXG4nIFwKLQkg
IHwgc2VkIC1lICdzLCQoRVhFRVhUKSQkLCwnIHwgJChBU1NPUlQpIC11IHwgdHIgJ1xuJyAnICcK
LQotYWxsX3Byb2dyYW1zLmxpc3Q6Ci0JQGVjaG8gJChhbGxfcHJvZ3JhbXMpIHwgdHIgJyAnICdc
bicgfCBzZWQgLWUgJ3MsJChFWEVFWFQpJCQsLCcgXAotCSAgfCBzZWQgL2xpYnN0ZGJ1Zi9kIFwK
LQkgIHwgJChBU1NPUlQpIC11Ci0KLSMgVGhpcyBpcyByZXF1aXJlZCBiZWNhdXNlIHdlIGhhdmUg
YnJva2VuIGludGVyLWRpcmVjdG9yeSBkZXBlbmRlbmNpZXM6Ci0jIGluIG9yZGVyIHRvIGdlbmVy
YXRlIGFsbCBtYW4gcGFnZXMsIGV2ZW4gdGhvc2UgZm9yIHdoaWNoIHdlIGRvbid0Ci0jIGluc3Rh
bGwgYSBiaW5hcnksIHJlcXVpcmUgdGhhdCBhbGwgcHJvZ3JhbXMgYmUgYnVpbHQgYXQgZGlzdHJp
YnV0aW9uIHRpbWUuCi1kaXN0LWhvb2s6ICQoYWxsX3Byb2dyYW1zKQotCi0jIEVuc3VyZSB0aGF0
IGFsbCBwcm9ncmFtcyBhcmUgYnVpbHQgc28gd2UgY2FuIGZvciBleGFtcGxlCi0jIHN1YnNlcXVl
bnRseSBzeW50YXggY2hlY2sgYWxsIG1hbiBwYWdlcy4KLS5QSE9OWTogYWxsX3Byb2dyYW1zCi1h
bGxfcHJvZ3JhbXM6ICQoYWxsX3Byb2dyYW1zKQotCi1wbSA9IHByb2dzLW1ha2VmaWxlCi1wciA9
IHByb2dzLXJlYWRtZQotIyBFbnN1cmUgdGhhdCB0aGUgbGlzdCBvZiBwcm9ncmFtcyBpbiBSRUFE
TUUgbWF0Y2hlcyB0aGUgbGlzdAotIyBvZiBwcm9ncmFtcyB3ZSBjYW4gYnVpbGQuCi1jaGVjazog
Y2hlY2stUkVBRE1FIGNoZWNrLWR1cGxpY2F0ZS1uby1pbnN0YWxsCi0uUEhPTlk6IGNoZWNrLVJF
QURNRQotY2hlY2stUkVBRE1FOgotCSQoQU1fVl9HRU4pcm0gLXJmICQocHIpICQocG0pCi0JJChB
TV9WX2F0KWVjaG8gJChhbGxfcHJvZ3JhbXMpIFwKLQkgfCB0ciAtcyAnICcgJ1xuJyB8IHNlZCAt
ZSAncywkKEVYRUVYVCkkJCwsO3MvZ2luc3RhbGwvaW5zdGFsbC8nIFwKLQkgfCBzZWQgL2xpYnN0
ZGJ1Zi9kIFwKLQkgfCAkKEFTU09SVCkgLXUgPiAkKHBtKSAmJiBcCi0Jc2VkIC1uICcvXlRoZSBw
cm9ncmFtcyAuKiBhcmU6LywvXlthLXpBLVpdL3AnICQodG9wX3NyY2RpcikvUkVBRE1FIFwKLQkg
IHwgc2VkIC1uICcvXiAgICovcy8vL3AnIHwgdHIgLXMgJyAnICdcbicgPiAkKHByKQotCSQoQU1f
Vl9hdClkaWZmICQocG0pICQocHIpICYmIHJtIC1yZiAkKHByKSAkKHBtKQotCi0jIEVuc3VyZSB0
aGF0IGEgYnktZGVmYXVsdC1ub3QtaW5zdGFsbGVkIHByb2dyYW0gKGxpc3RlZCBpbgotIyAkKG5v
X2luc3RhbGxfX3Byb2dzKSBpcyBub3QgYWxzbyBsaXN0ZWQgYXMgYW5vdGhlciAkKEVYVFJBX1BS
T0dSQU1TKQotIyBlbnRyeSwgYmVjYXVzZSBpZiB0aGF0IHdlcmUgdG8gaGFwcGVuLCBpdCAqd291
bGQqIGJlIGluc3RhbGxlZAotIyBieSBkZWZhdWx0LgotLlBIT05ZOiBjaGVjay1kdXBsaWNhdGUt
bm8taW5zdGFsbAotY2hlY2stZHVwbGljYXRlLW5vLWluc3RhbGw6IHRyCi0JJChBTV9WX0dFTil0
ZXN0IC16ICJgZWNobyAnJChFWFRSQV9QUk9HUkFNUyknfCAuL3RyICcgJyAnXG4nIHwgdW5pcSAt
ZGAiCi0KLSMgRW5zdXJlIHRoYXQgdGhlIGxpc3Qgb2YgcHJvZ3JhbXMgYW5kIGF1dGhvciBuYW1l
cyBpcyBhY2N1cmF0ZS4KLSMgV2UgbmVlZCBhIFVURjggbG9jYWxlLiAgSWYgYSBsYWNrIG9mIGxv
Y2FsZSBzdXBwb3J0IG9yIGEgbWlzc2luZwotIyB0cmFuc2xhdGlvbiBpbmhpYml0cyBwcmludGlu
ZyBvZiBVVEYtOCBuYW1lcywganVzdCBza2lwIHRoaXMgdGVzdC4KLWF1X2RvdGRvdCA9IGF1dGhv
cnMtZG90ZG90Ci1hdV9hY3R1YWwgPSBhdXRob3JzLWFjdHVhbAotLlBIT05ZOiBfc2NfY2hlY2st
QVVUSE9SUwotX3NjX2NoZWNrLUFVVEhPUlM6ICQoYWxsX3Byb2dyYW1zKQotCUBsb2NhbGU9ZW5f
VVMuVVRGLTg7CQkJCVwKLQlMQ19BTEw9JCRsb2NhbGUgLi9jYXQgLS12ZXJzaW9uCQkJXAotCSAg
ICB8IGdyZXAgJyBUb3Jiam9ybiAnCT4gL2Rldi9udWxsCQlcCi0JICAmJiB7IGVjaG8gIiRAOiBz
a2lwcGluZyB0aGlzIGNoZWNrIjsgZXhpdCAwOyB9OyBcCi0Jcm0gLWYgJChhdV9hY3R1YWwpICQo
YXVfZG90ZG90KTsJCVwKLQlmb3IgaSBpbiBgbHMgJChhbGxfcHJvZ3JhbXMpIHwgc2VkIC1lICdz
LCQoRVhFRVhUKSQkLCwnIFwKLQkgICAgfCBzZWQgL2xpYnN0ZGJ1Zi9kCQkJCVwKLQkgICAgfCAk
KEFTU09SVCkgLXVgOyBkbwkJCQlcCi0JICB0ZXN0ICIkJGkiID0gJ1snICYmIGNvbnRpbnVlOwkJ
CVwKLQkgIGV4ZT0kJGk7CQkJCQlcCi0JICBpZiB0ZXN0ICIkJGkiID0gaW5zdGFsbDsgdGhlbgkJ
CVwKLQkgICAgZXhlPWdpbnN0YWxsOwkJCQlcCi0JICBlbGlmIHRlc3QgIiQkaSIgPSB0ZXN0OyB0
aGVuCQkJXAotCSAgICBleGU9J1snOwkJCQkJXAotCSAgZmk7CQkJCQkJXAotCSAgTENfQUxMPSQk
bG9jYWxlIC4vJCRleGUgLS12ZXJzaW9uCQlcCi0JICAgIHwgcGVybCAtMCAtcGkgLWUgJ3MvLFxu
LywgL2dtJwkJXAotCSAgICB8IHNlZCAtbiAtZSAnL1dyaXR0ZW4gYnkgL3sgcy8vJyIkJGkiJzog
LzsnCVwKLQkJICAtZSAncy8sKiBhbmQgLywgLzsgcy9cLiQkLy87IHA7IH0nOwlcCi0JZG9uZSA+
ICQoYXVfYWN0dWFsKSAmJgkJCQlcCi0Jc2VkIC1uICcvXlteIF1bXiBdKjovcCcgJCh0b3Bfc3Jj
ZGlyKS9BVVRIT1JTID4gJChhdV9kb3Rkb3QpICYmIFwKLQlkaWZmICQoYXVfYWN0dWFsKSAkKGF1
X2RvdGRvdCkgJiYgcm0gLWYgJChhdV9hY3R1YWwpICQoYXVfZG90ZG90KQotCi0jIFVzZSB0aGUg
anVzdC1idWlsdCAuL2dpbnN0YWxsLCB3aGVuIG5vdCBjcm9zcy1jb21waWxpbmcuCi1pZiBDUk9T
U19DT01QSUxJTkcKLWN1X2luc3RhbGxfcHJvZ3JhbSA9IEBJTlNUQUxMX1BST0dSQU1ACi1lbHNl
Ci1jdV9pbnN0YWxsX3Byb2dyYW0gPSAuL2dpbnN0YWxsCi1lbmRpZgotSU5TVEFMTF9QUk9HUkFN
ID0gJChjdV9pbnN0YWxsX3Byb2dyYW0pCmRpZmYgLS1naXQgYS9zcmMvbG9jYWwubWsgYi9zcmMv
bG9jYWwubWsKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNDVhNjI2OAotLS0g
L2Rldi9udWxsCisrKyBiL3NyYy9sb2NhbC5tawpAQCAtMCwwICsxLDU2NyBAQAorIyBNYWtlIGNv
cmV1dGlscyBwcm9ncmFtcy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0qLU1ha2VmaWxl
LSotCisjIFRoaXMgaXMgaW5jbHVkZWQgYnkgdGhlIHRvcC1sZXZlbCBNYWtlZmlsZS5hbS4KKwor
IyMgQ29weXJpZ2h0IChDKSAxOTkwLTIwMTIgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMu
CisKKyMjIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0
ZSBpdCBhbmQvb3IgbW9kaWZ5CisjIyBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5l
cmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieQorIyMgdGhlIEZyZWUgU29mdHdhcmUg
Rm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGUgTGljZW5zZSwgb3IKKyMjIChhdCB5
b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uCisjIworIyMgVGhpcyBwcm9ncmFtIGlzIGRp
c3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsCisjIyBidXQgV0lU
SE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZgor
IyMgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAg
U2VlIHRoZQorIyMgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4K
KyMjCisjIyBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJh
bCBQdWJsaWMgTGljZW5zZQorIyMgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0uICBJZiBub3QsIHNl
ZSA8aHR0cDovL3d3dy5nbnUub3JnL2xpY2Vuc2VzLz4uCisKK0FNX0NGTEFHUyA9ICQoV0FSTl9D
RkxBR1MpICQoV0VSUk9SX0NGTEFHUykKKworIyBUaGUgbGlzdCBvZiBhbGwgcHJvZ3JhbXMgKHNl
cGFyYXRlZCBpbiBkaWZmZXJlbnQgdmFyaWFibGVzIHRvIGV4cHJlc3MKKyMgdGhlIGhvdyBhbmQg
d2hlbiB0aGV5IHNob3VsZCBiZSBpbnN0YWxsZWQpIGlzIGRlZmluZWQgaW4gdGhpcyBtYWtlZmls
ZQorIyBmcmFnbWVudCwgYXV0b2dlbmVyYXRlZCBieSB0aGUgJ2dlbi1saXN0cy1vZi1wcm9ncmFt
cy5zaCcgYXV4aWxpYXJ5CisjIHNjcmlwdC4KK2luY2x1ZGUgJChzcmNkaXIpL3NyYy9jdS1wcm9n
cy5taworCitFWFRSQV9QUk9HUkFNUyA9IFwKKyAgICQobm9faW5zdGFsbF9fcHJvZ3MpIFwKKyAg
ICQoYnVpbGRfaWZfcG9zc2libGVfX3Byb2dzKSBcCisgICAkKGRlZmF1bHRfX3Byb2dzKQorCiti
aW5fUFJPR1JBTVMgPSAkKE9QVElPTkFMX0JJTl9QUk9HUykKKworbm9pbnN0X1BST0dSQU1TID0g
c3JjL3NldHVpZGdpZCBzcmMvZ2V0bGltaXRzCisKK3BrZ2xpYmV4ZWNfUFJPR1JBTVMgPSAkKE9Q
VElPTkFMX1BLR0xJQl9QUk9HUykKKworbm9pbnN0X0hFQURFUlMgPQkJXAorICBzcmMvY2hvd24t
Y29yZS5oCQlcCisgIHNyYy9jb3B5LmgJCQlcCisgIHNyYy9jcC1oYXNoLmgJCQlcCisgIHNyYy9k
aXJjb2xvcnMuaAkJXAorICBzcmMvZmllbWFwLmgJCQlcCisgIHNyYy9maW5kLW1vdW50LXBvaW50
LmgJXAorICBzcmMvZnMuaAkJCVwKKyAgc3JjL2ZzLWlzLWxvY2FsLmgJCVwKKyAgc3JjL2dyb3Vw
LWxpc3QuaAkJXAorICBzcmMvaW9ibGtzaXplLmgJCVwKKyAgc3JjL2xzLmgJCQlcCisgIHNyYy9v
cGVyYW5kMnNpZy5oCQlcCisgIHNyYy9wcm9nLWZwcmludGYuaAkJXAorICBzcmMvcmVtb3ZlLmgJ
CQlcCisgIHNyYy9zeXN0ZW0uaAkJCVwKKyAgc3JjL3doZWVsLXNpemUuaAkJXAorICBzcmMvd2hl
ZWwuaAkJCVwKKyAgc3JjL3VuYW1lLmgKKworRVhUUkFfRElTVCArPSAJCVwKKyAgc3JjL2RjZ2Vu
IAkJXAorICBzcmMvZGlyY29sb3JzLmhpbglcCisgIHNyYy90YWMtcGlwZS5jCVwKKyAgc3JjL3do
ZWVsLWdlbi5wbAlcCisgIHNyYy9leHRyYWN0LW1hZ2ljCVwKKyAgc3JjL2M5OS10by1jODkuZGlm
ZgorCitDTEVBTkZJTEVTID0gJChTQ1JJUFRTKQorCisjIEFsc28gcmVtb3ZlIHRoZXNlIHNvbWV0
aW1lcy1idWlsdCBwcm9ncmFtcy4KKyMgRm9yIGV4YW1wbGUsIGV2ZW4gd2hlbiBleGNsdWRlZCwg
dGhleSdyZSBidWlsdCB2aWEgX3NjX2NoZWNrLUFVVEhPUlMuCitDTEVBTkZJTEVTICs9ICQobm9f
aW5zdGFsbF9fcHJvZ3MpCisKK0FNX0NQUEZMQUdTID0gLUkkKHRvcF9zcmNkaXIpL2xpYgorCitu
b2luc3RfTElCUkFSSUVTID0gc3JjL2xpYnZlci5hCitub2Rpc3Rfc3JjX2xpYnZlcl9hX1NPVVJD
RVMgPSBzcmMvdmVyc2lvbi5jIHNyYy92ZXJzaW9uLmgKKworIyBUZWxsIHRoZSBsaW5rZXIgdG8g
b21pdCByZWZlcmVuY2VzIHRvIHVudXNlZCBzaGFyZWQgbGlicmFyaWVzLgorQU1fTERGTEFHUyA9
ICQoSUdOT1JFX1VOVVNFRF9MSUJSQVJJRVNfQ0ZMQUdTKQorCisjIEV4dHJhIGxpYnJhcmllcyBu
ZWVkZWQgYnkgbW9yZSB0aGFuIG9uZSBwcm9ncmFtLiAgV2lsbCBiZSB1cGRhdGVkIGxhdGVyLgor
Y29weV9sZGFkZCA9CityZW1vdmVfbGRhZGQgPQorCisjIFNvbWV0aW1lcywgdGhlIGV4cGFuc2lv
biBvZiAkKExJQklOVEwpIGluY2x1ZGVzIC1sYyB3aGljaCBtYXkKKyMgaW5jbHVkZSBtb2R1bGVz
IGRlZmluaW5nIHZhcmlhYmxlcyBsaWtlICdvcHRpbmQnLCBzbyBsaWJjb3JldXRpbHMuYQorIyBt
dXN0IHByZWNlZGUgJChMSUJJTlRMKSBpbiBvcmRlciB0byBlbnN1cmUgd2UgdXNlIEdOVSBnZXRv
cHQuCisjIEJ1dCBsaWJjb3JldXRpbHMuYSBtdXN0IGFsc28gZm9sbG93ICQoTElCSU5UTCksIHNp
bmNlIGxpYmludGwgdXNlcworIyByZXBsYWNlbWVudCBmdW5jdGlvbnMgZGVmaW5lZCBpbiBsaWJj
b3JldXRpbHMuYS4KK0xEQUREID0gc3JjL2xpYnZlci5hIGxpYi9saWJjb3JldXRpbHMuYSAkKExJ
QklOVEwpIGxpYi9saWJjb3JldXRpbHMuYQorCisjIEZpcnN0LCBsaXN0IGFsbCBwcm9ncmFtcywg
dG8gbWFrZSBsaXN0aW5nIHBlci1wcm9ncmFtIGxpYnJhcmllcyBlYXNpZXIuCisjIFNlZSBbIGJl
bG93Lgorc3JjX2FyY2hfTERBREQgPSAkKExEQUREKQorc3JjX2Jhc2U2NF9MREFERCA9ICQoTERB
REQpCitzcmNfYmFzZW5hbWVfTERBREQgPSAkKExEQUREKQorc3JjX2NhdF9MREFERCA9ICQoTERB
REQpCitzcmNfY2hjb25fTERBREQgPSAkKExEQUREKQorc3JjX2NoZ3JwX0xEQUREID0gJChMREFE
RCkKK3NyY19jaG1vZF9MREFERCA9ICQoTERBREQpCitzcmNfY2hvd25fTERBREQgPSAkKExEQURE
KQorc3JjX2Nocm9vdF9MREFERCA9ICQoTERBREQpCitzcmNfY2tzdW1fTERBREQgPSAkKExEQURE
KQorc3JjX2NvbW1fTERBREQgPSAkKExEQUREKQorc3JjX25wcm9jX0xEQUREID0gJChMREFERCkK
K3NyY19jcF9MREFERCA9ICQoTERBREQpCitzcmNfY3NwbGl0X0xEQUREID0gJChMREFERCkKK3Ny
Y19jdXRfTERBREQgPSAkKExEQUREKQorc3JjX2RhdGVfTERBREQgPSAkKExEQUREKQorc3JjX2Rk
X0xEQUREID0gJChMREFERCkKK3NyY19kZl9MREFERCA9ICQoTERBREQpCisjIFNlZSBkaXJfTERB
REQgYmVsb3cKK3NyY19kaXJjb2xvcnNfTERBREQgPSAkKExEQUREKQorc3JjX2Rpcm5hbWVfTERB
REQgPSAkKExEQUREKQorc3JjX2R1X0xEQUREID0gJChMREFERCkKK3NyY19lY2hvX0xEQUREID0g
JChMREFERCkKK3NyY19lbnZfTERBREQgPSAkKExEQUREKQorc3JjX2V4cGFuZF9MREFERCA9ICQo
TERBREQpCitzcmNfZXhwcl9MREFERCA9ICQoTERBREQpCitzcmNfZmFjdG9yX0xEQUREID0gJChM
REFERCkKK3NyY19mYWxzZV9MREFERCA9ICQoTERBREQpCitzcmNfZm10X0xEQUREID0gJChMREFE
RCkKK3NyY19mb2xkX0xEQUREID0gJChMREFERCkKK3NyY19nZXRsaW1pdHNfTERBREQgPSAkKExE
QUREKQorc3JjX2dpbnN0YWxsX0xEQUREID0gJChMREFERCkKK3NyY19ncm91cHNfTERBREQgPSAk
KExEQUREKQorc3JjX2hlYWRfTERBREQgPSAkKExEQUREKQorc3JjX2hvc3RpZF9MREFERCA9ICQo
TERBREQpCitzcmNfaG9zdG5hbWVfTERBREQgPSAkKExEQUREKQorc3JjX2lkX0xEQUREID0gJChM
REFERCkKK3NyY19qb2luX0xEQUREID0gJChMREFERCkKK3NyY19raWxsX0xEQUREID0gJChMREFE
RCkKK3NyY19saW5rX0xEQUREID0gJChMREFERCkKK3NyY19sbl9MREFERCA9ICQoTERBREQpCitz
cmNfbG9nbmFtZV9MREFERCA9ICQoTERBREQpCitzcmNfbHNfTERBREQgPSAkKExEQUREKQorc3Jj
X21kNXN1bV9MREFERCA9ICQoTERBREQpCitzcmNfbWtkaXJfTERBREQgPSAkKExEQUREKQorc3Jj
X21rZmlmb19MREFERCA9ICQoTERBREQpCitzcmNfbWtub2RfTERBREQgPSAkKExEQUREKQorc3Jj
X21rdGVtcF9MREFERCA9ICQoTERBREQpCitzcmNfbXZfTERBREQgPSAkKExEQUREKQorc3JjX25p
Y2VfTERBREQgPSAkKExEQUREKQorc3JjX25sX0xEQUREID0gJChMREFERCkKK3NyY19ub2h1cF9M
REFERCA9ICQoTERBREQpCitzcmNfb2RfTERBREQgPSAkKExEQUREKQorc3JjX3Bhc3RlX0xEQURE
ID0gJChMREFERCkKK3NyY19wYXRoY2hrX0xEQUREID0gJChMREFERCkKK3NyY19waW5reV9MREFE
RCA9ICQoTERBREQpCitzcmNfcHJfTERBREQgPSAkKExEQUREKQorc3JjX3ByaW50ZW52X0xEQURE
ID0gJChMREFERCkKK3NyY19wcmludGZfTERBREQgPSAkKExEQUREKQorc3JjX3B0eF9MREFERCA9
ICQoTERBREQpCitzcmNfcHdkX0xEQUREID0gJChMREFERCkKK3NyY19yZWFkbGlua19MREFERCA9
ICQoTERBREQpCitzcmNfcmVhbHBhdGhfTERBREQgPSAkKExEQUREKQorc3JjX3JtX0xEQUREID0g
JChMREFERCkKK3NyY19ybWRpcl9MREFERCA9ICQoTERBREQpCitzcmNfcnVuY29uX0xEQUREID0g
JChMREFERCkKK3NyY19zZXFfTERBREQgPSAkKExEQUREKQorc3JjX3NldHVpZGdpZF9MREFERCA9
ICQoTERBREQpCitzcmNfc2hhMXN1bV9MREFERCA9ICQoTERBREQpCitzcmNfc2hhMjI0c3VtX0xE
QUREID0gJChMREFERCkKK3NyY19zaGEyNTZzdW1fTERBREQgPSAkKExEQUREKQorc3JjX3NoYTM4
NHN1bV9MREFERCA9ICQoTERBREQpCitzcmNfc2hhNTEyc3VtX0xEQUREID0gJChMREFERCkKK3Ny
Y19zaHJlZF9MREFERCA9ICQoTERBREQpCitzcmNfc2h1Zl9MREFERCA9ICQoTERBREQpCitzcmNf
c2xlZXBfTERBREQgPSAkKExEQUREKQorc3JjX3NvcnRfTERBREQgPSAkKExEQUREKQorc3JjX3Nw
bGl0X0xEQUREID0gJChMREFERCkKK3NyY19zdGF0X0xEQUREID0gJChMREFERCkKK3NyY19zdGRi
dWZfTERBREQgPSAkKExEQUREKQorc3JjX3N0dHlfTERBREQgPSAkKExEQUREKQorc3JjX3N1bV9M
REFERCA9ICQoTERBREQpCitzcmNfc3luY19MREFERCA9ICQoTERBREQpCitzcmNfdGFjX0xEQURE
ID0gJChMREFERCkKK3NyY190YWlsX0xEQUREID0gJChMREFERCkKK3NyY190ZWVfTERBREQgPSAk
KExEQUREKQorc3JjX3Rlc3RfTERBREQgPSAkKExEQUREKQorc3JjX3RpbWVvdXRfTERBREQgPSAk
KExEQUREKQorc3JjX3RvdWNoX0xEQUREID0gJChMREFERCkKK3NyY190cl9MREFERCA9ICQoTERB
REQpCitzcmNfdHJ1ZV9MREFERCA9ICQoTERBREQpCitzcmNfdHJ1bmNhdGVfTERBREQgPSAkKExE
QUREKQorc3JjX3Rzb3J0X0xEQUREID0gJChMREFERCkKK3NyY190dHlfTERBREQgPSAkKExEQURE
KQorc3JjX3VuYW1lX0xEQUREID0gJChMREFERCkKK3NyY191bmV4cGFuZF9MREFERCA9ICQoTERB
REQpCitzcmNfdW5pcV9MREFERCA9ICQoTERBREQpCitzcmNfdW5saW5rX0xEQUREID0gJChMREFE
RCkKK3NyY191cHRpbWVfTERBREQgPSAkKExEQUREKQorc3JjX3VzZXJzX0xEQUREID0gJChMREFE
RCkKKyMgU2VlIHZkaXJfTERBREQgYmVsb3cKK3NyY193Y19MREFERCA9ICQoTERBREQpCitzcmNf
d2hvX0xEQUREID0gJChMREFERCkKK3NyY193aG9hbWlfTERBREQgPSAkKExEQUREKQorc3JjX3ll
c19MREFERCA9ICQoTERBREQpCisKKyMgU3lub255bXMuICBSZWNhbGwgdGhhdCBBdXRvbWFrZSB0
cmFuc2xpdGVyYXRlcyAnWycgYW5kICcvJyB0byAnXycuCitzcmNfX19MREFERCA9ICQoc3JjX3Rl
c3RfTERBREQpCitzcmNfZGlyX0xEQUREID0gJChzcmNfbHNfTERBREQpCitzcmNfdmRpcl9MREFE
RCA9ICQoc3JjX2xzX0xEQUREKQorCitzcmNfY3BfTERBREQgKz0gJChjb3B5X2xkYWRkKQorc3Jj
X2dpbnN0YWxsX0xEQUREICs9ICQoY29weV9sZGFkZCkKK3NyY19tdl9MREFERCArPSAkKGNvcHlf
bGRhZGQpCisKK3NyY19tdl9MREFERCArPSAkKHJlbW92ZV9sZGFkZCkKK3NyY19ybV9MREFERCAr
PSAkKHJlbW92ZV9sZGFkZCkKKworIyBmb3IgZWFjY2VzcywgZXVpZGFjY2VzcworY29weV9sZGFk
ZCArPSAkKExJQl9FQUNDRVNTKQorcmVtb3ZlX2xkYWRkICs9ICQoTElCX0VBQ0NFU1MpCitzcmNf
c29ydF9MREFERCArPSAkKExJQl9FQUNDRVNTKQorc3JjX3Rlc3RfTERBREQgKz0gJChMSUJfRUFD
Q0VTUykKKworIyBmb3Igc2VsaW51eCB1c2UKK2NvcHlfbGRhZGQgKz0gJChMSUJfU0VMSU5VWCkK
K3NyY19jaGNvbl9MREFERCArPSAkKExJQl9TRUxJTlVYKQorc3JjX2dpbnN0YWxsX0xEQUREICs9
ICQoTElCX1NFTElOVVgpCitzcmNfaWRfTERBREQgKz0gJChMSUJfU0VMSU5VWCkKK3NyY19sc19M
REFERCArPSAkKExJQl9TRUxJTlVYKQorc3JjX21rZGlyX0xEQUREICs9ICQoTElCX1NFTElOVVgp
CitzcmNfbWtmaWZvX0xEQUREICs9ICQoTElCX1NFTElOVVgpCitzcmNfbWtub2RfTERBREQgKz0g
JChMSUJfU0VMSU5VWCkKK3NyY19ydW5jb25fTERBREQgKz0gJChMSUJfU0VMSU5VWCkKK3NyY19z
dGF0X0xEQUREICs9ICQoTElCX1NFTElOVVgpCisKKyMgZm9yIGdldHRpbWUsIHNldHRpbWUsIHV0
aW1lY21wLCB1dGltZW5zCitjb3B5X2xkYWRkICs9ICQoTElCX0NMT0NLX0dFVFRJTUUpCitzcmNf
ZGF0ZV9MREFERCArPSAkKExJQl9DTE9DS19HRVRUSU1FKQorc3JjX2dpbnN0YWxsX0xEQUREICs9
ICQoTElCX0NMT0NLX0dFVFRJTUUpCitzcmNfbHNfTERBREQgKz0gJChMSUJfQ0xPQ0tfR0VUVElN
RSkKK3NyY19wcl9MREFERCArPSAkKExJQl9DTE9DS19HRVRUSU1FKQorc3JjX3RpbWVvdXRfTERB
REQgKz0gJChMSUJfVElNRVJfVElNRSkKK3NyY190b3VjaF9MREFERCArPSAkKExJQl9DTE9DS19H
RVRUSU1FKQorCisjIGZvciBnZXRocnh0aW1lCitzcmNfZGRfTERBREQgKz0gJChMSUJfR0VUSFJY
VElNRSkKKworIyBmb3IgY2FwX2dldF9maWxlCitzcmNfbHNfTERBREQgKz0gJChMSUJfQ0FQKQor
CisjIGZvciBmZGF0YXN5bmMKK3NyY19kZF9MREFERCArPSAkKExJQl9GREFUQVNZTkMpCitzcmNf
c2hyZWRfTERBREQgKz0gJChMSUJfRkRBVEFTWU5DKQorCisjIGZvciB4bmFub3NsZWVwCitzcmNf
c2xlZXBfTERBREQgKz0gJChMSUJfTkFOT1NMRUVQKQorc3JjX3NvcnRfTERBREQgKz0gJChMSUJf
TkFOT1NMRUVQKQorc3JjX3RhaWxfTERBREQgKz0gJChMSUJfTkFOT1NMRUVQKQorCisjIGZvciB2
YXJpb3VzIEdNUCBmdW5jdGlvbnMKK3NyY19leHByX0xEQUREICs9ICQoTElCX0dNUCkKK3NyY19m
YWN0b3JfTERBREQgKz0gJChMSUJfR01QKQorCisjIGZvciBnZXRsb2FkYXZnCitzcmNfdXB0aW1l
X0xEQUREICs9ICQoR0VUTE9BREFWR19MSUJTKQorCisjIGZvciB2YXJpb3VzIEFDTCBmdW5jdGlv
bnMKK2NvcHlfbGRhZGQgKz0gJChMSUJfQUNMKQorc3JjX2xzX0xEQUREICs9ICQoTElCX0FDTCkK
KworIyBmb3IgdmFyaW91cyB4YXR0ciBmdW5jdGlvbnMKK2NvcHlfbGRhZGQgKz0gJChMSUJfWEFU
VFIpCisKKyMgZm9yIHByaW50X3VuaWNvZGVfY2hhciwgcHJvcGVyX25hbWVfdXRmOAorc3JjX2Nh
dF9MREFERCArPSAkKExJQklDT05WKQorc3JjX2NwX0xEQUREICs9ICQoTElCSUNPTlYpCitzcmNf
ZGZfTERBREQgKz0gJChMSUJJQ09OVikKK3NyY19kdV9MREFERCArPSAkKExJQklDT05WKQorc3Jj
X2dldGxpbWl0c19MREFERCArPSAkKExJQklDT05WKQorc3JjX3ByaW50Zl9MREFERCArPSAkKExJ
QklDT05WKQorc3JjX3B0eF9MREFERCArPSAkKExJQklDT05WKQorc3JjX3JlYWxwYXRoX0xEQURE
ICs9ICQoTElCSUNPTlYpCitzcmNfc3BsaXRfTERBREQgKz0gJChMSUJJQ09OVikKK3NyY19zdGRi
dWZfTERBREQgKz0gJChMSUJJQ09OVikKK3NyY190aW1lb3V0X0xEQUREICs9ICQoTElCSUNPTlYp
CitzcmNfdHJ1bmNhdGVfTERBREQgKz0gJChMSUJJQ09OVikKKworIyBmb3IgY2Fub25faG9zdAor
c3JjX3Bpbmt5X0xEQUREICs9ICQoR0VUQUREUklORk9fTElCKQorc3JjX3dob19MREFERCArPSAk
KEdFVEFERFJJTkZPX0xJQikKKworIyBmb3IgZ2V0aG9zdG5hbWUsIHVuYW1lCitzcmNfaG9zdG5h
bWVfTERBREQgKz0gJChHRVRIT1NUTkFNRV9MSUIpCitzcmNfdW5hbWVfTERBREQgKz0gJChHRVRI
T1NUTkFNRV9MSUIpCisKKyMgZm9yIHN0cnNpZ25hbAorc3JjX2tpbGxfTERBREQgKz0gJChMSUJU
SFJFQUQpCisKKyMgZm9yIHB0aHJlYWQKK3NyY19zb3J0X0xEQUREICs9ICQoTElCX1BUSFJFQUQp
CisKKyQoUFJPR1JBTVMpOiBsaWIvbGliY29yZXV0aWxzLmEKKworIyBHZXQgdGhlIHJlbGVhc2Ug
eWVhciBmcm9tIGxpYi92ZXJzaW9uLWV0Yy5jLgorUkVMRUFTRV9ZRUFSID0gXAorICBgc2VkIC1u
ICcvLipDT1BZUklHSFRfWUVBUiA9IFwoWzAtOV1bMC05XVswLTldWzAtOV1cKSB9Oy9zLy9cMS9w
JyBcCisgICAgJCh0b3Bfc3JjZGlyKS9saWIvdmVyc2lvbi1ldGMuY2AKKworY29weV9zb3VyY2Vz
ID0gXAorICBzcmMvY29weS5jIFwKKyAgc3JjL2NwLWhhc2guYyBcCisgIHNyYy9leHRlbnQtc2Nh
bi5jIFwKKyAgc3JjL2V4dGVudC1zY2FuLmgKKworIyBVc2UgJ2dpbnN0YWxsJyBpbiB0aGUgZGVm
aW5pdGlvbiBvZiBQUk9HUkFNUyBhbmQgaW4gZGVwZW5kZW5jaWVzIHRvIGF2b2lkCisjIGNvbmZ1
c2lvbiB3aXRoIHRoZSAnaW5zdGFsbCcgdGFyZ2V0LiAgVGhlIGluc3RhbGwgcnVsZSB0cmFuc2Zv
cm1zICdnaW5zdGFsbCcKKyMgdG8gaW5zdGFsbCBiZWZvcmUgYXBwbHlpbmcgYW55IHVzZXItc3Bl
Y2lmaWVkIG5hbWUgdHJhbnNmb3JtYXRpb25zLgorCit0cmFuc2Zvcm0gPSBzL2dpbnN0YWxsL2lu
c3RhbGwvOyAkKHByb2dyYW1fdHJhbnNmb3JtX25hbWUpCitzcmNfZ2luc3RhbGxfU09VUkNFUyA9
IHNyYy9pbnN0YWxsLmMgc3JjL3Byb2ctZnByaW50Zi5jICQoY29weV9zb3VyY2VzKQorCisjIFRo
aXMgaXMgZm9yIHRoZSAnWycgcHJvZ3JhbS4gIEF1dG9tYWtlIHRyYW5zbGl0ZXJhdGVzICdbJyBh
bmQgJy8nIHRvICdfJy4KK3NyY19fX1NPVVJDRVMgPSBzcmMvbGJyYWNrZXQuYworCitzcmNfY3Bf
U09VUkNFUyA9IHNyYy9jcC5jICQoY29weV9zb3VyY2VzKQorc3JjX2Rpcl9TT1VSQ0VTID0gc3Jj
L2xzLmMgc3JjL2xzLWRpci5jCitzcmNfdmRpcl9TT1VSQ0VTID0gc3JjL2xzLmMgc3JjL2xzLXZk
aXIuYworc3JjX2lkX1NPVVJDRVMgPSBzcmMvaWQuYyBzcmMvZ3JvdXAtbGlzdC5jCitzcmNfZ3Jv
dXBzX1NPVVJDRVMgPSBzcmMvZ3JvdXBzLmMgc3JjL2dyb3VwLWxpc3QuYworc3JjX2xzX1NPVVJD
RVMgPSBzcmMvbHMuYyBzcmMvbHMtbHMuYworc3JjX2xuX1NPVVJDRVMgPSBzcmMvbG4uYyBzcmMv
cmVscGF0aC5jIHNyYy9yZWxwYXRoLmgKK3NyY19jaG93bl9TT1VSQ0VTID0gc3JjL2Nob3duLmMg
c3JjL2Nob3duLWNvcmUuYworc3JjX2NoZ3JwX1NPVVJDRVMgPSBzcmMvY2hncnAuYyBzcmMvY2hv
d24tY29yZS5jCitzcmNfa2lsbF9TT1VSQ0VTID0gc3JjL2tpbGwuYyBzcmMvb3BlcmFuZDJzaWcu
Yworc3JjX3JlYWxwYXRoX1NPVVJDRVMgPSBzcmMvcmVhbHBhdGguYyBzcmMvcmVscGF0aC5jIHNy
Yy9yZWxwYXRoLmgKK3NyY190aW1lb3V0X1NPVVJDRVMgPSBzcmMvdGltZW91dC5jIHNyYy9vcGVy
YW5kMnNpZy5jCisKK3NyY19tdl9TT1VSQ0VTID0gc3JjL212LmMgc3JjL3JlbW92ZS5jICQoY29w
eV9zb3VyY2VzKQorc3JjX3JtX1NPVVJDRVMgPSBzcmMvcm0uYyBzcmMvcmVtb3ZlLmMKKworc3Jj
X21rZGlyX1NPVVJDRVMgPSBzcmMvbWtkaXIuYyBzcmMvcHJvZy1mcHJpbnRmLmMKK3NyY19ybWRp
cl9TT1VSQ0VTID0gc3JjL3JtZGlyLmMgc3JjL3Byb2ctZnByaW50Zi5jCisKK3NyY19kZl9TT1VS
Q0VTID0gc3JjL2RmLmMgc3JjL2ZpbmQtbW91bnQtcG9pbnQuYworc3JjX3N0YXRfU09VUkNFUyA9
IHNyYy9zdGF0LmMgc3JjL2ZpbmQtbW91bnQtcG9pbnQuYworCitzcmNfdW5hbWVfU09VUkNFUyA9
IHNyYy91bmFtZS5jIHNyYy91bmFtZS11bmFtZS5jCitzcmNfYXJjaF9TT1VSQ0VTID0gc3JjL3Vu
YW1lLmMgc3JjL3VuYW1lLWFyY2guYworCitzcmNfbWQ1c3VtX0NQUEZMQUdTID0gLURIQVNIX0FM
R09fTUQ1PTEgJChBTV9DUFBGTEFHUykKK3NyY19zaGExc3VtX1NPVVJDRVMgPSBzcmMvbWQ1c3Vt
LmMKK3NyY19zaGExc3VtX0NQUEZMQUdTID0gLURIQVNIX0FMR09fU0hBMT0xICQoQU1fQ1BQRkxB
R1MpCitzcmNfc2hhMjI0c3VtX1NPVVJDRVMgPSBzcmMvbWQ1c3VtLmMKK3NyY19zaGEyMjRzdW1f
Q1BQRkxBR1MgPSAtREhBU0hfQUxHT19TSEEyMjQ9MSAkKEFNX0NQUEZMQUdTKQorc3JjX3NoYTI1
NnN1bV9TT1VSQ0VTID0gc3JjL21kNXN1bS5jCitzcmNfc2hhMjU2c3VtX0NQUEZMQUdTID0gLURI
QVNIX0FMR09fU0hBMjU2PTEgJChBTV9DUFBGTEFHUykKK3NyY19zaGEzODRzdW1fU09VUkNFUyA9
IHNyYy9tZDVzdW0uYworc3JjX3NoYTM4NHN1bV9DUFBGTEFHUyA9IC1ESEFTSF9BTEdPX1NIQTM4
ND0xICQoQU1fQ1BQRkxBR1MpCitzcmNfc2hhNTEyc3VtX1NPVVJDRVMgPSBzcmMvbWQ1c3VtLmMK
K3NyY19zaGE1MTJzdW1fQ1BQRkxBR1MgPSAtREhBU0hfQUxHT19TSEE1MTI9MSAkKEFNX0NQUEZM
QUdTKQorCitzcmNfZ2luc3RhbGxfQ1BQRkxBR1MgPSAtREVOQUJMRV9NQVRDSFBBVEhDT049MSAk
KEFNX0NQUEZMQUdTKQorCisjIEVuc3VyZSB3ZSBkb24ndCBsaW5rIGFnYWluc3QgbGliY29yZXV0
aWxzLmEgYXMgdGhhdCBsaWIgaXMKKyMgbm90IGNvbXBpbGVkIHdpdGggLWZQSUMgd2hpY2ggY2F1
c2VzIGlzc3VlcyBvbiA2NCBiaXQgYXQgbGVhc3QKK3NyY19saWJzdGRidWZfc29fTERBREQgPQor
CisjIE5vdGUgbGlic3RkYnVmIGlzIG9ubHkgY29tcGlsZWQgaWYgR0NDIGlzIGF2YWlsYWJsZQor
IyAoYXMgcGVyIHRoZSBjaGVjayBpbiBjb25maWd1cmUuYWMpLCBzbyB0aGVzZSBmbGFncyBzaG91
bGQgYmUgYXZhaWxhYmxlLgorIyBsaWJ0b29sIGlzIHByb2JhYmx5IHJlcXVpcmVkIHRvIHJlbGF4
IHRoaXMgZGVwZW5kZW5jeS4KK3NyY19saWJzdGRidWZfc29fTERGTEFHUyA9IC1zaGFyZWQKK3Ny
Y19saWJzdGRidWZfc29fQ0ZMQUdTID0gLWZQSUMgJChBTV9DRkxBR1MpCisKK0JVSUxUX1NPVVJD
RVMgKz0gc3JjL2RpcmNvbG9ycy5oCitzcmMvZGlyY29sb3JzLmg6IHNyYy9kY2dlbiBzcmMvZGly
Y29sb3JzLmhpbgorCSQoQU1fVl9HRU4pcm0gLWYgJEAgJEAtdAorCSQoQU1fVl9hdCkkKFBFUkwp
IC13IC0tICQoc3JjZGlyKS9zcmMvZGNnZW4gXAorCSAgICAgICAgICAgICAgICAgICAgICAgICQo
c3JjZGlyKS9zcmMvZGlyY29sb3JzLmhpbiA+ICRALXQKKwkkKEFNX1ZfYXQpY2htb2QgYS13ICRA
LXQKKwkkKEFNX1ZfYXQpbXYgJEAtdCAkQAorCit3aGVlbF9zaXplID0gNQorCitCVUlMVF9TT1VS
Q0VTICs9IHNyYy93aGVlbC1zaXplLmgKK3NyYy93aGVlbC1zaXplLmg6IE1ha2VmaWxlLmFtCisJ
JChBTV9WX0dFTilybSAtZiAkQCAkQC10CisJJChBTV9WX2F0KWVjaG8gJyNkZWZpbmUgV0hFRUxf
U0laRSAkKHdoZWVsX3NpemUpJyA+ICRALXQKKwkkKEFNX1ZfYXQpY2htb2QgYS13ICRALXQKKwkk
KEFNX1ZfYXQpbXYgJEAtdCAkQAorCitCVUlMVF9TT1VSQ0VTICs9IHNyYy93aGVlbC5oCitzcmMv
d2hlZWwuaDogc3JjL3doZWVsLWdlbi5wbCBNYWtlZmlsZS5hbQorCSQoQU1fVl9HRU4pcm0gLWYg
JEAgJEAtdAorCSQoQU1fVl9hdCkkKHNyY2Rpcikvc3JjL3doZWVsLWdlbi5wbCAkKHdoZWVsX3Np
emUpID4gJEAtdAorCSQoQU1fVl9hdCljaG1vZCBhLXcgJEAtdAorCSQoQU1fVl9hdCltdiAkQC10
ICRACisKKyMgZmFsc2UgZXhpdHMgbm9uemVybyBldmVuIHdpdGggLS1oZWxwIG9yIC0tdmVyc2lv
bi4KKyMgdGVzdCBkb2Vzbid0IHN1cHBvcnQgLS1oZWxwIG9yIC0tdmVyc2lvbi4KKyMgVGVsbCBh
dXRvbWFrZSB0byBleGVtcHQgdGhlbiBmcm9tIHRoYXQgaW5zdGFsbGNoZWNrIHRlc3QuCitBTV9J
TlNUQUxMQ0hFQ0tfU1REX09QVElPTlNfRVhFTVBUID0gc3JjL2ZhbHNlIHNyYy90ZXN0CisKKyMg
Q29tcGFyZSBmcy5oIHdpdGggdGhlIGxpc3Qgb2YgZmlsZSBzeXN0ZW0gbmFtZXMvbWFnaWMtbnVt
YmVycyBpbiB0aGUKKyMgTGludXggc3RhdGZzIG1hbiBwYWdlLiAgVGhpcyB0YXJnZXQgcHJpbnRz
IGFueSBuZXcgbmFtZS9udW1iZXIgcGFpcnMuCisjIEFsc28gY29tcGFyZSBhZ2FpbnN0IC91c3Iv
aW5jbHVkZS9saW51eC9tYWdpYy5oCisuUEhPTlk6IHNyYy9mcy1tYWdpYy1jb21wYXJlCitzcmMv
ZnMtbWFnaWMtY29tcGFyZTogc3JjL2ZzLW1hZ2ljIHNyYy9mcy1rZXJuZWwtbWFnaWMgc3JjL2Zz
LWRlZgorCWpvaW4gLXYxIC10QCBzcmMvZnMtbWFnaWMgc3JjL2ZzLWRlZgorCWpvaW4gLXYxIC10
QCBzcmMvZnMta2VybmVsLW1hZ2ljIHNyYy9mcy1kZWYKKworQ0xFQU5GSUxFUyArPSBzcmMvZnMt
ZGVmCitzcmMvZnMtZGVmOiBzcmMvZnMuaAorCWdyZXAgJ14jICpkZWZpbmUgJyBzcmMvZnMuaCB8
ICQoQVNTT1JUKSA+ICRALXQgJiYgbXYgJEAtdCAkQAorCisjIE1hc3NhZ2UgYml0cyBvZiB0aGUg
c3RhdGZzIG1hbiBwYWdlIGFuZCBkZWZpbml0aW9ucyBmcm9tCisjIC91c3IvaW5jbHVkZS9saW51
eC9tYWdpYy5oIHRvIGJlIGluIGEgZm9ybSBjb25zaXN0ZW50IHdpdGggd2hhdCdzIGluIGZzLmgu
Citmc19ub3JtYWxpemVfcGVybF9zdWJzdCA9CQkJXAorICAtZSAncy9NSU5JWF9TVVBFUl9NQUdJ
Q1xiL01JTklYLzsnCQlcCisgIC1lICdzL01JTklYX1NVUEVSX01BR0lDMlxiL01JTklYXzMwLzsn
CVwKKyAgLWUgJ3MvTUlOSVgyX1NVUEVSX01BR0lDXGIvTUlOSVhfVjIvOycJXAorICAtZSAncy9N
SU5JWDJfU1VQRVJfTUFHSUMyXGIvTUlOSVhfVjJfMzAvOycJXAorICAtZSAncy9NSU5JWDNfU1VQ
RVJfTUFHSUNcYi9NSU5JWF9WMy87JwlcCisgIC1lICdzL0NJRlNfTUFHSUNfTlVNQkVSL0NJRlMv
OycJCVwKKyAgLWUgJ3MvKF9TVVBFUik/X01BR0lDLy87JwkJCVwKKyAgLWUgJ3MvXHMrMHgoXFMr
KS8iIDB4IiAuIHVjICQkMS9lOycJCVwKKyAgLWUgJ3MvKFxzKzB4KShcWHszfSlcYi8kJHsxfTAk
JDIvOycJCVwKKyAgLWUgJ3MvKFxzKzB4KShcWHs2fSlcYi8kJHsxfTAwJCQyLzsnCQlcCisgIC1l
ICdzLyhccysweCkoXFh7N30pXGIvJCR7MX0wJCQyLzsnCQlcCisgIC1lICdzL15ccysvLzsnCQkJ
CVwKKyAgLWUgJ3MvXlwwNDNkZWZpbmVccysvLzsnCQkJXAorICAtZSAncy9eXyhYSUFGUykvJCQx
LzsnCQkJXAorICAtZSAncy9eVVNCREVWSUNFL1VTQkRFVkZTLzsnCQkJXAorICAtZSAncy9OVEZT
X1NCL05URlMvOycJCQkJXAorICAtZSAncy9eL1wwNDMgZGVmaW5lIFNfTUFHSUNfLzsnCQlcCisg
IC1lICdzLFxzKi9cKiAuKj8gXCovLCw7JworCitDTEVBTkZJTEVTICs9IHNyYy9mcy1tYWdpYwor
c3JjL2ZzLW1hZ2ljOiBNYWtlZmlsZQorCW1hbiBzdGF0ZnMgXAorCSAgfHBlcmwgLW5lICcvRmls
ZSBzeXN0ZW0gdHlwZXM6Ly4uLi9Ob2JvZHkga25vLyBhbmQgcHJpbnQnCVwKKwkgIHxncmVwIDB4
IHwgcGVybCAtcAkJCQkJCVwKKwkgICAgJChmc19ub3JtYWxpemVfcGVybF9zdWJzdCkJCQkJCVwK
KwkgIHwgZ3JlcCAtRXYgJ1NfTUFHSUNfRVhUWzM0XXxTVEFDS19FTkQnCQkJXAorCSAgfCAkKEFT
U09SVCkJCQkJCQkJXAorCSAgPiAkQC10ICYmIG12ICRALXQgJEAKKworQ0xFQU5GSUxFUyArPSBz
cmMvZnMta2VybmVsLW1hZ2ljCitzcmMvZnMta2VybmVsLW1hZ2ljOiBNYWtlZmlsZQorCXBlcmwg
LW5lICcvXiNkZWZpbmUuKjB4LyBhbmQgcHJpbnQnIC91c3IvaW5jbHVkZS9saW51eC9tYWdpYy5o
CVwKKwkgIHwgcGVybCAtcAkJCQkJCQlcCisJICAgICQoZnNfbm9ybWFsaXplX3Blcmxfc3Vic3Qp
CQkJCQlcCisJICB8IGdyZXAgLUV2ICdTX01BR0lDX0VYVFszNF18U1RBQ0tfRU5EJwkJCVwKKwkg
IHwgJChBU1NPUlQpCQkJCQkJCVwKKwkgID4gJEAtdCAmJiBtdiAkQC10ICRACisKK0JVSUxUX1NP
VVJDRVMgKz0gc3JjL2ZzLWlzLWxvY2FsLmgKK3NyYy9mcy1pcy1sb2NhbC5oOiBzcmMvc3RhdC5j
IHNyYy9leHRyYWN0LW1hZ2ljCisJJChBTV9WX0dFTilybSAtZiAkQAorCSQoQU1fVl9hdCkkKFBF
UkwpICQoc3JjZGlyKS9zcmMvZXh0cmFjdC1tYWdpYyBcCisJICAgICAgICAgICAgICAgICAgLS1s
b2NhbCAkKHNyY2Rpcikvc3JjL3N0YXQuYyA+ICRAdAorCSQoQU1fVl9hdCljaG1vZCBhLXcgJEB0
CisJJChBTV9WX2F0KW12ICRAdCAkQAorCitCVUlMVF9TT1VSQ0VTICs9IHNyYy9mcy5oCitzcmMv
ZnMuaDogc3JjL3N0YXQuYyBzcmMvZXh0cmFjdC1tYWdpYworCSQoQU1fVl9HRU4pcm0gLWYgJEAK
KwkkKEFNX1ZfYXQpJChQRVJMKSAkKHNyY2Rpcikvc3JjL2V4dHJhY3QtbWFnaWMgXAorCSAgICAg
ICAgICAgICAgICAgICQoc3JjZGlyKS9zcmMvc3RhdC5jID4gJEB0CisJJChBTV9WX2F0KWNobW9k
IGEtdyAkQHQKKwkkKEFNX1ZfYXQpbXYgJEB0ICRACisKK0JVSUxUX1NPVVJDRVMgKz0gc3JjL3Zl
cnNpb24uYworc3JjL3ZlcnNpb24uYzogTWFrZWZpbGUKKwkkKEFNX1ZfR0VOKXJtIC1mICRACisJ
JChBTV9WX2F0KXByaW50ZiAnI2luY2x1ZGUgPGNvbmZpZy5oPlxuJyA+ICRAdAorCSQoQU1fVl9h
dClwcmludGYgJ2NoYXIgY29uc3QgKlZlcnNpb24gPSAiJChQQUNLQUdFX1ZFUlNJT04pIjtcbicg
Pj4gJEB0CisJJChBTV9WX2F0KWNobW9kIGEtdyAkQHQKKwkkKEFNX1ZfYXQpbXYgJEB0ICRACisK
K0JVSUxUX1NPVVJDRVMgKz0gc3JjL3ZlcnNpb24uaAorc3JjL3ZlcnNpb24uaDogTWFrZWZpbGUK
KwkkKEFNX1ZfR0VOKXJtIC1mICRACisJJChBTV9WX2F0KXByaW50ZiAnZXh0ZXJuIGNoYXIgY29u
c3QgKlZlcnNpb247XG4nID4gJEB0CisJJChBTV9WX2F0KWNobW9kIGEtdyAkQHQKKwkkKEFNX1Zf
YXQpbXYgJEB0ICRACisKK0RJU1RDTEVBTkZJTEVTICs9IHNyYy92ZXJzaW9uLmMgc3JjL3ZlcnNp
b24uaAorTUFJTlRBSU5FUkNMRUFORklMRVMgKz0gJChCVUlMVF9TT1VSQ0VTKQorCithbGxfcHJv
Z3JhbXMgPSBcCisgICAgJChiaW5fUFJPR1JBTVMpIFwKKyAgICAkKGJpbl9TQ1JJUFRTKSBcCisg
ICAgJChFWFRSQV9QUk9HUkFNUykKKworYnVpbHRfcHJvZ3JhbXMubGlzdDoKKwlAZWNobyAkKGJp
bl9QUk9HUkFNUykgJChiaW5fU0NSSVBUUykgfCB0ciAnICcgJ1xuJyBcCisJICB8IHNlZCAtZSAn
cywkKEVYRUVYVCkkJCwsJyAtZSAncyxec3JjLywsJyBcCisJICB8ICQoQVNTT1JUKSAtdSB8IHRy
ICdcbicgJyAnCisKK2FsbF9wcm9ncmFtcy5saXN0OgorCUBlY2hvICQoYWxsX3Byb2dyYW1zKSB8
IHRyICcgJyAnXG4nIHwgc2VkIC1lICdzLCQoRVhFRVhUKSQkLCwnIFwKKwkgIHwgc2VkIC9saWJz
dGRidWYvZCBcCisJICB8ICQoQVNTT1JUKSAtdQorCisjIFRoaXMgaXMgcmVxdWlyZWQgYmVjYXVz
ZSB3ZSBoYXZlIGJyb2tlbiBpbnRlci1kaXJlY3RvcnkgZGVwZW5kZW5jaWVzOgorIyBpbiBvcmRl
ciB0byBnZW5lcmF0ZSBhbGwgbWFuIHBhZ2VzLCBldmVuIHRob3NlIGZvciB3aGljaCB3ZSBkb24n
dAorIyBpbnN0YWxsIGEgYmluYXJ5LCByZXF1aXJlIHRoYXQgYWxsIHByb2dyYW1zIGJlIGJ1aWx0
IGF0IGRpc3RyaWJ1dGlvbiB0aW1lLgorZGlzdC1ob29rOiAkKGFsbF9wcm9ncmFtcykKKworcG0g
PSBwcm9ncy1tYWtlZmlsZQorcHIgPSBwcm9ncy1yZWFkbWUKKyMgRW5zdXJlIHRoYXQgdGhlIGxp
c3Qgb2YgcHJvZ3JhbXMgaW4gUkVBRE1FIG1hdGNoZXMgdGhlIGxpc3QKKyMgb2YgcHJvZ3JhbXMg
d2UgY2FuIGJ1aWxkLgorY2hlY2s6IGNoZWNrLVJFQURNRSBjaGVjay1kdXBsaWNhdGUtbm8taW5z
dGFsbAorLlBIT05ZOiBjaGVjay1SRUFETUUKK2NoZWNrLVJFQURNRToKKwkkKEFNX1ZfR0VOKXJt
IC1yZiAkKHByKSAkKHBtKQorCSQoQU1fVl9hdCllY2hvICQoYWxsX3Byb2dyYW1zKSBcCisJIHwg
dHIgLXMgJyAnICdcbicgXAorCSB8IHNlZCAtZSAncywkKEVYRUVYVCkkJCwsJyBcCisJICAgICAg
IC1lICdzLF5zcmMvLCwnIFwKKwkgICAgICAgLWUgJ3MvXmdpbnN0YWxsJCQvaW5zdGFsbC8nIFwK
KwkgfCBzZWQgL2xpYnN0ZGJ1Zi9kIFwKKwkgfCAkKEFTU09SVCkgLXUgPiAkKHBtKSAmJiBcCisJ
c2VkIC1uICcvXlRoZSBwcm9ncmFtcyAuKiBhcmU6LywvXlthLXpBLVpdL3AnICQodG9wX3NyY2Rp
cikvUkVBRE1FIFwKKwkgIHwgc2VkIC1uICcvXiAgICovcy8vL3AnIHwgdHIgLXMgJyAnICdcbicg
PiAkKHByKQorCSQoQU1fVl9hdClkaWZmICQocG0pICQocHIpICYmIHJtIC1yZiAkKHByKSAkKHBt
KQorCisjIEVuc3VyZSB0aGF0IGEgYnktZGVmYXVsdC1ub3QtaW5zdGFsbGVkIHByb2dyYW0gKGxp
c3RlZCBpbgorIyAkKG5vX2luc3RhbGxfX3Byb2dzKSBpcyBub3QgYWxzbyBsaXN0ZWQgYXMgYW5v
dGhlciAkKEVYVFJBX1BST0dSQU1TKQorIyBlbnRyeSwgYmVjYXVzZSBpZiB0aGF0IHdlcmUgdG8g
aGFwcGVuLCBpdCAqd291bGQqIGJlIGluc3RhbGxlZAorIyBieSBkZWZhdWx0LgorLlBIT05ZOiBj
aGVjay1kdXBsaWNhdGUtbm8taW5zdGFsbAorY2hlY2stZHVwbGljYXRlLW5vLWluc3RhbGw6IHNy
Yy90cgorCSQoQU1fVl9HRU4pdGVzdCAteiAiYGVjaG8gJyQoRVhUUkFfUFJPR1JBTVMpJyB8IHRy
ICcgJyAnXG4nIHwgdW5pcSAtZGAiCisKKyMgRW5zdXJlIHRoYXQgdGhlIGxpc3Qgb2YgcHJvZ3Jh
bXMgYW5kIGF1dGhvciBuYW1lcyBpcyBhY2N1cmF0ZS4KKyMgV2UgbmVlZCBhIFVURjggbG9jYWxl
LiAgSWYgYSBsYWNrIG9mIGxvY2FsZSBzdXBwb3J0IG9yIGEgbWlzc2luZworIyB0cmFuc2xhdGlv
biBpbmhpYml0cyBwcmludGluZyBvZiBVVEYtOCBuYW1lcywganVzdCBza2lwIHRoaXMgdGVzdC4K
K2F1X2RvdGRvdCA9IGF1dGhvcnMtZG90ZG90CithdV9hY3R1YWwgPSBhdXRob3JzLWFjdHVhbAor
LlBIT05ZOiBfc2NfY2hlY2stQVVUSE9SUworX3NjX2NoZWNrLUFVVEhPUlM6ICQoYWxsX3Byb2dy
YW1zKQorCUBsb2NhbGU9ZW5fVVMuVVRGLTg7CQkJCVwKKwlMQ19BTEw9JCRsb2NhbGUgLi9jYXQg
LS12ZXJzaW9uCQkJXAorCSAgICB8IGdyZXAgJyBUb3Jiam9ybiAnCT4gL2Rldi9udWxsCQlcCisJ
ICAmJiB7IGVjaG8gIiRAOiBza2lwcGluZyB0aGlzIGNoZWNrIjsgZXhpdCAwOyB9OyBcCisJcm0g
LWYgJChhdV9hY3R1YWwpICQoYXVfZG90ZG90KTsJCVwKKwlmb3IgaSBpbiBgbHMgJChhbGxfcHJv
Z3JhbXMpCQkJXAorCSAgICB8IHNlZCAtZSAncyxec3JjLywsJyAtZSAncywkKEVYRUVYVCkkJCws
JwlcCisJICAgIHwgc2VkIC9saWJzdGRidWYvZAkJCQlcCisJICAgIHwgJChBU1NPUlQpIC11YDsg
ZG8JCQkJXAorCSAgdGVzdCAiJCRpIiA9ICdbJyAmJiBjb250aW51ZTsJCQlcCisJICBleGU9JCRp
OwkJCQkJXAorCSAgaWYgdGVzdCAiJCRpIiA9IGluc3RhbGw7IHRoZW4JCQlcCisJICAgIGV4ZT1n
aW5zdGFsbDsJCQkJXAorCSAgZWxpZiB0ZXN0ICIkJGkiID0gdGVzdDsgdGhlbgkJCVwKKwkgICAg
ZXhlPSdbJzsJCQkJCVwKKwkgIGZpOwkJCQkJCVwKKwkgIExDX0FMTD0kJGxvY2FsZSAuLyQkZXhl
IC0tdmVyc2lvbgkJXAorCSAgICB8IHBlcmwgLTAgLXBpIC1lICdzLyxcbi8sIC9nbScJCVwKKwkg
ICAgfCBzZWQgLW4gLWUgJy9Xcml0dGVuIGJ5IC97IHMvLyciJCRpIic6IC87JwlcCisJCSAgLWUg
J3MvLCogYW5kIC8sIC87IHMvXC4kJC8vOyBwOyB9JzsJXAorCWRvbmUgPiAkKGF1X2FjdHVhbCkg
JiYJCQkJXAorCXNlZCAtbiAnL15bXiBdW14gXSo6L3AnICQodG9wX3NyY2RpcikvQVVUSE9SUyA+
ICQoYXVfZG90ZG90KSAmJiBcCisJZGlmZiAkKGF1X2FjdHVhbCkgJChhdV9kb3Rkb3QpICYmIHJt
IC1mICQoYXVfYWN0dWFsKSAkKGF1X2RvdGRvdCkKKworIyBVc2UgdGhlIGp1c3QtYnVpbHQgJ2dp
bnN0YWxsJywgd2hlbiBub3QgY3Jvc3MtY29tcGlsaW5nLgoraWYgQ1JPU1NfQ09NUElMSU5HCitj
dV9pbnN0YWxsX3Byb2dyYW0gPSBASU5TVEFMTF9QUk9HUkFNQAorZWxzZQorY3VfaW5zdGFsbF9w
cm9ncmFtID0gc3JjL2dpbnN0YWxsCitlbmRpZgorSU5TVEFMTF9QUk9HUkFNID0gJChjdV9pbnN0
YWxsX3Byb2dyYW0pCmRpZmYgLS1naXQgYS90ZXN0cy9NYWtlZmlsZS5hbSBiL3Rlc3RzL01ha2Vm
aWxlLmFtCmluZGV4IGQ4ZGVlNTcuLjU0ZjFlMDggMTAwNjQ0Ci0tLSBhL3Rlc3RzL01ha2VmaWxl
LmFtCisrKyBiL3Rlc3RzL01ha2VmaWxlLmFtCkBAIC00MCwxMCArNDAsMTAgQEAgY2hlY2s6IHZj
X2V4ZV9pbl9URVNUUwogQ0xFQU5GSUxFUyA9CiBDTEVBTkZJTEVTICs9IC5idWlsdC1wcm9ncmFt
cwogY2hlY2tfREFUQSA9IC5idWlsdC1wcm9ncmFtcwotLmJ1aWx0LXByb2dyYW1zOiAkKHRvcF9z
cmNkaXIpL3NyYy9NYWtlZmlsZS5hbQotCSQoQU1fVl9HRU4pKGNkICQodG9wX2J1aWxkZGlyKS9z
cmMJCQkJXAorLmJ1aWx0LXByb2dyYW1zOiAkKHRvcF9zcmNkaXIpL01ha2VmaWxlLmFtCisJJChB
TV9WX0dFTikoY2QgJCh0b3BfYnVpbGRkaXIpCQkJCQlcCiAgICAgICAgICAgICAmJiBNQUtFRkxB
R1M9ICQoTUFLRSkgLXMgYnVpbHRfcHJvZ3JhbXMubGlzdCkJCVwKLSAgICAgICAgICA+ICRALXQg
JiYgbXYgJEAtdCAkQAorICAgICAgICAgIHwgc2VkIHMsXnNyYy8sLCA+ICRALXQgJiYgbXYgJEAt
dCAkQAoKIFRFU1RfRVhURU5TSU9OUyA9IC5zaCAucGwgLnhwbAoKLS0gCjEuNy4xMi4xNDYuZzE2
ZDI2YjEKCgpGcm9tIDRlNWU5YzlmYmIyN2U1NTNmYjcxMWFlMjBjNTM2Y2ZlNDkyY2MyYjUgTW9u
IFNlcCAxNyAwMDowMDowMCAyMDAxCkZyb206IFN0ZWZhbm8gTGF0dGFyaW5pIDxzdGVmYW5vLmxh
dHRhcmluaUBnbWFpbC5jb20+CkRhdGU6IEZyaSwgMzEgQXVnIDIwMTIgMTU6MTQ6MTkgKzAyMDAK
U3ViamVjdDogW1BBVENIIDQvNl0gYnVpbGQ6IGZpeCBnZW5lcmF0aW9uIG9mIG1hbnBhZ2VzIGZv
ciBwcm9ncmFtcyBub3QgYnVpbHQKIGJ5IGRlZmF1bHQKCiogc3JjL2xvY2FsLm1rIChkaXN0LWhv
b2spOiBEb24ndCB1c2UgdGhpcyB0byBlbnN1cmUgYWxsIHRoZQpwcm9ncmFtcywgZXZlbiB0aGUg
b25lcyBkaXNhYmxlZCBieSBkZWZhdWx0IG9yIGJ5IHRoZSB1c2VyLCBhcmUKYnVpbHQgKGRvaW5n
IHNvIGlzIHJlcXVpcmVkIHRvIGdlbmVyYXRlIHRoZSBkaXN0cmlidXRlZCBtYW5wYWdlcwphcmUg
cHJvcGVybHkgYnVpbHQpLiAgVGhpcyB3b3VsZCBidWlsZCB0aG9zZSBwcm9ncmFtcyB0b28gbGF0
ZQphbnl3YXksIGNhdXNpbmcgZXJyb3JzIGxpa2U6CgogICAgJCBtYWtlIGRpc3QKICAgIG1ha2Ug
IGRpc3QteHogYW1fX3Bvc3RfcmVtb3ZlX2Rpc3RkaXI9J0A6JwogICAgbWFrZVsxXTogRW50ZXJp
bmcgZGlyZWN0b3J5IGB+L3NyYy9jb3JldXRpbHMnCiAgICAgIEdFTiAgICAgIG1hbi9hcmNoLjEK
ICAgIGhlbHAybWFuOiBjYW4ndCBnZXQgJy0taGVscCcgaW5mbyBmcm9tIG1hbi9hcmNoLnRkL2Fy
Y2gKICAgIG1ha2VbMV06ICoqKiBbbWFuL2FyY2guMV0gRXJyb3IgMTI3CiAgICBtYWtlWzFdOiBM
ZWF2aW5nIGRpcmVjdG9yeSBgfi9zcmMvY29yZXV0aWxzJwogICAgbWFrZTogKioqIFtkaXN0XSBF
cnJvciAyCgpJbnN0ZWFkLCAuLi4KKiBtYW4vbG9jYWwubWsgKGV4dHJhX21hbl94LCBleHRyYV9t
YW5fMSk6IGRlZmluZSB0aGVzZSAuLi4KKCQoZXh0cmFfbWFuXzEpKTogLi4uIGFuZCBtYWtlIHRo
aXMgZGVwZW5kIG9uICQoYWxsX3Byb2dyYW1zKS4KKEVYVFJBX0RJU1QpOiBBZGp1c3QuCkFkanVz
dCBzb21lIGNvbW1lbnRzIGFzIHdlbGwuCi0tLQogbWFuL2xvY2FsLm1rIHwgMTkgKysrKysrKysr
KysrLS0tLS0tLQogc3JjL2xvY2FsLm1rIHwgIDUgLS0tLS0KIDIgZmlsZXMgY2hhbmdlZCwgMTIg
aW5zZXJ0aW9ucygrKSwgMTIgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvbWFuL2xvY2FsLm1r
IGIvbWFuL2xvY2FsLm1rCmluZGV4IGQ0MmM5ODIuLjgwNTE5YWYgMTAwNjQ0Ci0tLSBhL21hbi9s
b2NhbC5taworKysgYi9tYW4vbG9jYWwubWsKQEAgLTI1LDEzICsyNSwxOCBAQCBNQUlOVEFJTkVS
Q0xFQU5GSUxFUyArPSAkKGRpc3RfbWFuMV9NQU5TKQoKICMgVGhlICIkKFZBUjolPWRpci8lLngp
IiBpZGlvbSBpcyBub3QgcG9ydGFibGUgYWNjb3JkaW5nIHRvIFBPU0lYLCBidXQgaW4KICMgcHJh
Y3RpY2UgaXQgd29ya3Mgd2l0aCBzZXZlcmFsIG1ha2UgaW1wbGVtZW50YXRpb24gKEdOVSwgQlNE
LCBDQ1MgbWFrZQotIyBmcm9tIFNvbGFyaXMgMTAsIFN1biBkaXN0cmlidXRlZCBtYWtlKS4gIElu
IGFkZGl0aW9uLCBzaW5jZSBvbmx5Ci0jIG1haW50YWluZXJzIGFyZSBleHBlY3RlZCB0byBidWls
ZCByZWxlYXNlIHRhcmJhbGxzIChhbmQgdGhleSBzaG91bGQKLSMgdXNlIEdOVSBtYWtlIHdoZW4g
ZG9pbmcgc28pLCBpdCdzIG5vdCBiaWcgZGVhbCBpZiB0aGlzIHdvbid0IHdvcmsgd2l0aAotIyBz
b21lIGR1bWJlciBtYWtlIGltcGxlbWVudGF0aW9uLgotRVhUUkFfRElTVCArPSBcCi0gICQoTk9f
SU5TVEFMTF9QUk9HU19ERUZBVUxUOiU9bWFuLyUueCkgXAotICAkKE5PX0lOU1RBTExfUFJPR1Nf
REVGQVVMVDolPW1hbi8lLjEpCisjIGZyb20gU29sYXJpcyAxMCwgU3VuIGRpc3RyaWJ1dGVkIG1h
a2UpLgorZXh0cmFfbWFuX3ggPSAkKE5PX0lOU1RBTExfUFJPR1NfREVGQVVMVDolPW1hbi8lLngp
CitleHRyYV9tYW5fMSA9ICQoTk9fSU5TVEFMTF9QUk9HU19ERUZBVUxUOiU9bWFuLyUuMSkKKwor
RVhUUkFfRElTVCArPSAkKGV4dHJhX21hbl8xKSAkKGV4dHJhX21hbl94KQorCisjIFRoaXMgaXMg
cmVxdWlyZWQgYmVjYXVzZSB3ZSBoYXZlIHN1YnRsZSBpbnRlci1kaXJlY3RvcnkgZGVwZW5kZW5j
aWVzOgorIyBpbiBvcmRlciB0byBnZW5lcmF0ZSBhbGwgbWFuIHBhZ2VzLCBldmVuIHRob3NlIGZv
ciB3aGljaCB3ZSBkb24ndAorIyBpbnN0YWxsIGEgYmluYXJ5LCByZXF1aXJlIHRoYXQgYWxsIHBy
b2dyYW1zIGJlIGJ1aWx0IGF0IGRpc3RyaWJ1dGlvbgorIyB0aW1lLiAgV2UgY2FuJ3QgdXNlICdk
aXN0LWhvb2snIGZvciB0aGlzLCBzaW5jZSBpdCB3b3VsZCBydW4gdG9vIGxhdGU6CisjIHRoZSBt
YW5wYWdlcyBtdXN0IGJlIGdlbmVyYXRlZCBiZWZvcmUgdGhlIGRpc3RkaXIgaXMgY3JlYXRlZCBh
bmQgZmlsbGVkLgorJChleHRyYV9tYW5fMSk6ICQoYWxsX3Byb2dyYW1zKQoKICMgRGVwZW5kIG9u
IHRoaXMgdG8gZ2V0IHZlcnNpb24gbnVtYmVyIGNoYW5nZXMuCiBtYW5kZXAgPSAudmVyc2lvbgpk
aWZmIC0tZ2l0IGEvc3JjL2xvY2FsLm1rIGIvc3JjL2xvY2FsLm1rCmluZGV4IDQ1YTYyNjguLjI0
NDYyMDAgMTAwNjQ0Ci0tLSBhL3NyYy9sb2NhbC5taworKysgYi9zcmMvbG9jYWwubWsKQEAgLTQ5
NSwxMSArNDk1LDYgQEAgYWxsX3Byb2dyYW1zLmxpc3Q6CiAJICB8IHNlZCAvbGlic3RkYnVmL2Qg
XAogCSAgfCAkKEFTU09SVCkgLXUKCi0jIFRoaXMgaXMgcmVxdWlyZWQgYmVjYXVzZSB3ZSBoYXZl
IGJyb2tlbiBpbnRlci1kaXJlY3RvcnkgZGVwZW5kZW5jaWVzOgotIyBpbiBvcmRlciB0byBnZW5l
cmF0ZSBhbGwgbWFuIHBhZ2VzLCBldmVuIHRob3NlIGZvciB3aGljaCB3ZSBkb24ndAotIyBpbnN0
YWxsIGEgYmluYXJ5LCByZXF1aXJlIHRoYXQgYWxsIHByb2dyYW1zIGJlIGJ1aWx0IGF0IGRpc3Ry
aWJ1dGlvbiB0aW1lLgotZGlzdC1ob29rOiAkKGFsbF9wcm9ncmFtcykKLQogcG0gPSBwcm9ncy1t
YWtlZmlsZQogcHIgPSBwcm9ncy1yZWFkbWUKICMgRW5zdXJlIHRoYXQgdGhlIGxpc3Qgb2YgcHJv
Z3JhbXMgaW4gUkVBRE1FIG1hdGNoZXMgdGhlIGxpc3QKLS0gCjEuNy4xMi4xNDYuZzE2ZDI2YjEK
CgpGcm9tIDBjNjdjZDBmY2NjYzI5MDc5YWYzZWQzMDFiZjBjYjNkZDVlNDIxOWYgTW9uIFNlcCAx
NyAwMDowMDowMCAyMDAxCkZyb206IFN0ZWZhbm8gTGF0dGFyaW5pIDxzdGVmYW5vLmxhdHRhcmlu
aUBnbWFpbC5jb20+CkRhdGU6IEZyaSwgMzEgQXVnIDIwMTIgMTU6MTQ6MjAgKzAyMDAKU3ViamVj
dDogW1BBVENIIDUvNl0gbWFpbnQ6IGltcHJvdmUgcmVtYWtlIHJ1bGVzIGZvciBtYWludGFpbmVy
cwoKVGhpcyBpcyBhIGZvbGxvdyB1cCBvbiB0b2RheSdzIGZvcm1lciBjb21taXQgImJ1aWxkOiBy
ZWZhY3Rvcgpob3cgbGlzdHMgb2YgY29yZXV0aWxzIHByb2dyYW1zIGFyZSBkZWZpbmVkIi4KCiog
TWFrZWZpbGUuYW0gKCQodG9wX3NyY2RpcikvbTQvY3UtcHJvZ3MubTQsCiQoc3JjZGlyKS9zcmMv
Y3UtcHJvZ3MubWspOiBOZXcsIGdlbmVyYXRlIHRoZXNlIGZpbGVzIGZyb20gdGhlCididWlsZC1h
dXgvZ2VuLWxpc3RzLW9mLXByb2dyYW1zLnNoJywgdGhlIHNhbWUgd2F5IGl0J3MgZG9uZQpmcm9t
IHRoZSBib290c3RyYXAgc2NyaXB0LgoqIGJvb3RzdHJhcC5jb25mIChib290c3RyYXBfcG9zdF9p
bXBvcnRfaG9vayk6IEFkZCBjb21tZW50IGFib3V0CnRoZSBuZWNlc3NpdHkgdG8ga2VlcCB0aG9z
ZSBuZXcgcnVsZXMgc3luY2VkIHdpdGggdGhlIGNvbW1hbmRzCmhlcmUuICBFbmhhbmNlIHRob3Nl
IGNvbW1hbmRzIHNvIHRvIHRoYXQgdGhlIGdlbmVyYXRlZCBmaWxlcyBhcmUKc2V0IHJlYWQtb25s
eS4KLS0tCiBNYWtlZmlsZS5hbSAgICB8IDE1ICsrKysrKysrKysrKysrKwogYm9vdHN0cmFwLmNv
bmYgfCAxMCArKysrKysrLS0tCiAyIGZpbGVzIGNoYW5nZWQsIDIyIGluc2VydGlvbnMoKyksIDMg
ZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvTWFrZWZpbGUuYW0gYi9NYWtlZmlsZS5hbQppbmRl
eCA2YTU2ZjY4Li4yZDVmZGFhIDEwMDY0NAotLS0gYS9NYWtlZmlsZS5hbQorKysgYi9NYWtlZmls
ZS5hbQpAQCAtNTUsNiArNTUsMjEgQEAgRVhUUkFfRElTVCA9CQkJCVwKICAgbWFpbnQubWsJCQkJ
XAogICB0aGFua3MtZ2VuCgorZ2VuX3Byb2dzX2xpc3RzID0gJCh0b3Bfc3JjZGlyKS9idWlsZC1h
dXgvZ2VuLWxpc3RzLW9mLXByb2dyYW1zLnNoCisKKyMgS2VlcCB0aGVzZSBpbiBzeW5jIHdpdGgg
Ym9vdHN0cmFwLmNvbmY6Ym9vdHN0cmFwX3Bvc3RfaW1wb3J0X2hvb2soKS4KKyMgVXNlICckKHRv
cF9zcmNkaXIpL200JyBhbmQgJyQoc3JjZGlyKS9zcmMnIGZvciB0aGUgYmVuZWZpdCBvZiBub24t
R05VCisjIG1ha2VzOiBpdCBpcyB3aXRoIHRob3NlIGRpcmVjdG9yaWVzIHRoYXQgJ2N1LXByb2dz
Lm00JyBhbmQgJ2N1LXByb2dzLm1rJworIyBhcHBlYXIgaW4gb3VyIGRlcGVuZGVuY2llcy4KKyQo
dG9wX3NyY2RpcikvbTQvY3UtcHJvZ3MubTQ6ICQoZ2VuX3Byb2dzX2xpc3RzKQorCSQoQU1fVl9H
RU4pcm0gLWYgJEAgJEAtdCBcCisJICAmJiAkKFNIRUxMKSAkKGdlbl9wcm9nc19saXN0cykgLS1h
dXRvY29uZiA+JEAtdCBcCisJICAmJiBjaG1vZCBhLXcgJEAtdCAmJiBtdiAtZiAkQC10ICRACisk
KHNyY2Rpcikvc3JjL2N1LXByb2dzLm1rOiAkKGdlbl9wcm9nc19saXN0cykKKwkkKEFNX1ZfR0VO
KXJtIC1mICRAICRALXQgXAorCSAgJiYgJChTSEVMTCkgJChnZW5fcHJvZ3NfbGlzdHMpIC0tYXV0
b21ha2UgPiRALXQgXAorCSAgJiYgY2htb2QgYS13ICRALXQgJiYgbXYgLWYgJEAtdCAkQAorCiBB
TExfUkVDVVJTSVZFX1RBUkdFVFMgKz0gaW5zdGFsbC1yb290CiBpbnN0YWxsLXJvb3Q6CiAJY2Qg
c3JjICYmICQoTUFLRSkgJEAKZGlmZiAtLWdpdCBhL2Jvb3RzdHJhcC5jb25mIGIvYm9vdHN0cmFw
LmNvbmYKaW5kZXggNGVmM2ZjOC4uZGMwZmZiNiAxMDA2NDQKLS0tIGEvYm9vdHN0cmFwLmNvbmYK
KysrIGIvYm9vdHN0cmFwLmNvbmYKQEAgLTMyOSw5ICszMjksMTMgQEAgYm9vdHN0cmFwX3Bvc3Rf
aW1wb3J0X2hvb2sgKCkKICAgIyBBdXRvbWFrZSByZXF1aXJlcyB0aGF0IENoYW5nZUxvZyBleGlz
dC4KICAgdG91Y2ggQ2hhbmdlTG9nIHx8IHJldHVybiAxCiAgICMgTGlzdCBvZiBjb3JldXRpbHMg
cHJvZ3JhbXMuICBTZWUgaGVhZGluZyBjb21tZW50cyBpbiB0aGUgaW52b2tlZAotICAjIHNjcmlw
dCBmb3IgbW9yZSBpbmZvLgotICBidWlsZC1hdXgvZ2VuLWxpc3RzLW9mLXByb2dyYW1zLnNoIC0t
YXV0b2NvbmYgPm00L2N1LXByb2dzLm00ICB8fCByZXR1cm4gMQotICBidWlsZC1hdXgvZ2VuLWxp
c3RzLW9mLXByb2dyYW1zLnNoIC0tYXV0b21ha2UgPnNyYy9jdS1wcm9ncy5tayB8fCByZXR1cm4g
MQorICAjIHNjcmlwdCBmb3IgbW9yZSBpbmZvLiAgS2VlcCB0aGlzIGluIHN5bmMgd2l0aCB0aGUg
cnVsZXMgaW4KKyAgKG00Zj1tNC9jdS1wcm9ncy5tNCBta2Y9c3JjL2N1LXByb2dzLm1rIHRtcD1j
dS1wcm9ncy50bXAgXAorICAgICYmIHJtIC1mICRtNGYgJG1rZiAkdG1wLTEgJHRtcC0yIFwKKyAg
ICAmJiBidWlsZC1hdXgvZ2VuLWxpc3RzLW9mLXByb2dyYW1zLnNoIC0tYXV0b2NvbmYgPiR0bXAt
MSBcCisgICAgJiYgYnVpbGQtYXV4L2dlbi1saXN0cy1vZi1wcm9ncmFtcy5zaCAtLWF1dG9tYWtl
ID4kdG1wLTIgXAorICAgICYmIGNobW9kIGEtdyAkdG1wLTEgJHRtcC0yIFwKKyAgICAmJiBtdiAt
ZiAkdG1wLTEgJG00ZiAmJiBtdiAtZiAkdG1wLTIgJG1rZikKIH0KCiBib290c3RyYXBfZXBpbG9n
dWUoKQotLSAKMS43LjEyLjE0Ni5nMTZkMjZiMQoKCkZyb20gODgzNDIwZTdjMTc1Y2U3YjczNDQx
NDdhMjEwNWVmMzA5ODI0YmY3MSBNb24gU2VwIDE3IDAwOjAwOjAwIDIwMDEKRnJvbTogU3RlZmFu
byBMYXR0YXJpbmkgPHN0ZWZhbm8ubGF0dGFyaW5pQGdtYWlsLmNvbT4KRGF0ZTogRnJpLCAzMSBB
dWcgMjAxMiAxNToxNDoyMSArMDIwMApTdWJqZWN0OiBbUEFUQ0ggNi82XSBtYWludDogcmVtb3Zl
IHVudXNlZCB0YXJnZXQgJ2luc3RhbGwtcm9vdCcKCkl0IHdhcyB1bm5lZWRlZCBhbmQgYnJva2Vu
IHNpbmNlIHRoZSByZW1vdmFsIG9mICdzdScgZnJvbSBHTlUKY29yZXV0aWxzLCBpbiBjb21taXQg
djguMTctMTYtZzkyOGRkNzMgb2YgMjAxMi0wNi0wNiwgInN1OiByZW1vdmUKcHJvZ3JhbSAodXRp
bC1saW51eCBpcyBub3cgdGhlIGJlc3Qgc291cmNlIGZvciBpdCkiLgoKKiBNYWtlZmlsZS5hbSAo
aW5zdGFsbC1yb290KTogUmVtb3ZlLgooQUxMX1JFQ1VSU0lWRV9UQVJHRVRTKTogVXBkYXRlLgot
LS0KIE1ha2VmaWxlLmFtIHwgNCAtLS0tCiAxIGZpbGUgY2hhbmdlZCwgNCBkZWxldGlvbnMoLSkK
CmRpZmYgLS1naXQgYS9NYWtlZmlsZS5hbSBiL01ha2VmaWxlLmFtCmluZGV4IDJkNWZkYWEuLjhh
ZTg2NTAgMTAwNjQ0Ci0tLSBhL01ha2VmaWxlLmFtCisrKyBiL01ha2VmaWxlLmFtCkBAIC03MCwx
MCArNzAsNiBAQCAkKHNyY2Rpcikvc3JjL2N1LXByb2dzLm1rOiAkKGdlbl9wcm9nc19saXN0cykK
IAkgICYmICQoU0hFTEwpICQoZ2VuX3Byb2dzX2xpc3RzKSAtLWF1dG9tYWtlID4kQC10IFwKIAkg
ICYmIGNobW9kIGEtdyAkQC10ICYmIG12IC1mICRALXQgJEAKCi1BTExfUkVDVVJTSVZFX1RBUkdF
VFMgKz0gaW5zdGFsbC1yb290Ci1pbnN0YWxsLXJvb3Q6Ci0JY2Qgc3JjICYmICQoTUFLRSkgJEAK
LQogQUNMT0NBTF9BTUZMQUdTID0gLUkgbTQKCiAjIFNvbWUgdGVzdHMgYWx3YXlzIG5lZWQgcm9v
dCBwcml2aWxlZ2VzLCBvdGhlcnMgbmVlZCB0aGVtIG9ubHkgc29tZXRpbWVzLgotLSAKMS43LjEy
LjE0Ni5nMTZkMjZiMQoK
--=-=-=--


From MAILER-DAEMON Fri Aug 31 10:05:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7RqQ-0001Zl-8d
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 10:05:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48430)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7RqG-0001Ul-Vd
	for coreutils@gnu.org; Fri, 31 Aug 2012 10:05:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7RqB-0002jM-53
	for coreutils@gnu.org; Fri, 31 Aug 2012 10:05:00 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:39882)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7RqA-0002iv-UF
	for coreutils@gnu.org; Fri, 31 Aug 2012 10:04:55 -0400
Received: by bkcjc3 with SMTP id jc3so1335242bkc.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 07:04:54 -0700 (PDT)
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=f8nrsrsrgTtaWnUv1ykZ2t/z+g1L/0pXpEzAmtTGEQw=;
	b=EuuRINuIHDZKY/+/x6dO/2h1HrrzhvuuUtKmt5aPDDByZZObpSELLqURAFMON+Vp9+
	EUgvj6OvAmSZ69gBO+gTTgct7BATvpFBpLIykUQIgKeAXAGP9TVmApxllRPRrpaDz6FN
	ePYs/401F2yQtJ83awq8NhR4xck23Lp4gHzDxwFk7jLyrFYYztHCscI1axYrCW8pkDfI
	IHvcm5irpuK0NSOL+VSLmAyj0RLdwMGU7KfRgmedFPm5RHMDYKrfxDsPCMUBW7+yRXz/
	RbSPPle4F6elLcsSioZfrQ1ZS3TEBgtSUGZPDSKbGO+h5muj0rzE4RZTbgQI8iSa2H3u
	k4uA==
Received: by 10.204.128.65 with SMTP id j1mr4196583bks.93.1346421894020;
	Fri, 31 Aug 2012 07:04:54 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id gq2sm3611653bkc.13.2012.08.31.07.04.52
	(version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 07:04:53 -0700 (PDT)
Message-ID: <5040C481.3020301@gmail.com>
Date: Fri, 31 Aug 2012 16:04:49 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 0/6] Patches to avoid use of make recursion in the 'src/'
	subdir
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
	<87r4qnqj6c.fsf@rho.meyering.net> <5040BDEE.7080503@gmail.com>
	<87fw73qi4q.fsf@rho.meyering.net>
In-Reply-To: <87fw73qi4q.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 31 Aug 2012 14:05:09 -0000

On 08/31/2012 03:57 PM, Jim Meyering wrote:
> Stefano Lattarini wrote:
> 
>> On 08/31/2012 03:34 PM, Jim Meyering wrote:
>>> Stefano Lattarini wrote:
>>>> These should go on the top of my other pending series "[PATCH 0/7] Minor
>>>> cleanup and refactoring":
>>>>
>>>>     <http://lists.gnu.org/archive/html/coreutils/2012-08/msg00205.html>
>>>
>>> Thanks!  Looking at these now.
>>> FYI, I pushed that other series an hour ago.
>>>
>> Ouch, some of them still have the S-o-B line!  Can you delete those, or
>> should I resend?
> 
> No problem.  As I tried to apply them with "git am FILE",
> the new commit hook complained and left me in the editor,
> where I removed them.
> 
> However, 3/6 failed to apply.
>
Are you applying with "git am -3", right?  Otherwise, merge conflicts that
can be solved automatically won't be.

Anyway, I can resend the series (now rebased on latest master) if that
would make things easier ....

> It took a little effort to make it apply, so I'm attaching below
> what I am now looking at.  FYI, I've just confirmed it passed "make check"
> but not "make syntax-check".

Regards,
  Stefano


From MAILER-DAEMON Fri Aug 31 10:07:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7RsL-00020e-Rt
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 10:07:09 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48911)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7RsI-0001zV-57
	for coreutils@gnu.org; Fri, 31 Aug 2012 10:07:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7RsB-0004FV-5Z
	for coreutils@gnu.org; Fri, 31 Aug 2012 10:07:06 -0400
Received: from mx.meyering.net ([88.168.87.75]:37558)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7RsA-0004FK-Ks
	for coreutils@gnu.org; Fri, 31 Aug 2012 10:06:59 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 9233460108;
	Fri, 31 Aug 2012 16:06:57 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 0/6] Patches to avoid use of make recursion in the 'src/'
	subdir
In-Reply-To: <87fw73qi4q.fsf@rho.meyering.net> (Jim Meyering's message of
	"Fri, 31 Aug 2012 15:57:09 +0200")
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
	<87r4qnqj6c.fsf@rho.meyering.net> <5040BDEE.7080503@gmail.com>
	<87fw73qi4q.fsf@rho.meyering.net>
Date: Fri, 31 Aug 2012 16:06:57 +0200
Message-ID: <87a9xbqhoe.fsf@rho.meyering.net>
Lines: 510
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 14:07:08 -0000

Jim Meyering wrote:
> Stefano Lattarini wrote:
>
>> On 08/31/2012 03:34 PM, Jim Meyering wrote:
>>> Stefano Lattarini wrote:
>>>> These should go on the top of my other pending series "[PATCH 0/7] Minor
>>>> cleanup and refactoring":
>>>>
>>>>     <http://lists.gnu.org/archive/html/coreutils/2012-08/msg00205.html>
>>>
>>> Thanks!  Looking at these now.
>>> FYI, I pushed that other series an hour ago.
>>>
>> Ouch, some of them still have the S-o-B line!  Can you delete those, or
>> should I resend?
>
> No problem.  As I tried to apply them with "git am FILE",
> the new commit hook complained and left me in the editor,
> where I removed them.
>
> However, 3/6 failed to apply.
> It took a little effort to make it apply, so I'm attaching below
> what I am now looking at.  FYI, I've just confirmed it passed "make check"
> but not "make syntax-check".

Hmm... actually there are a few other problems.  See below.
If you don't mind fixing those and reposting, I would be grateful.
I'm stepping out for an hour or so.

Here's the output of this:

    make -j1 -k syntax-check

GFDL_version
0.04 GFDL_version
GPL_version
0.04 GPL_version
NEWS_two_empty_lines
0.01 NEWS_two_empty_lines
THANKS_in_duplicates
0.34 THANKS_in_duplicates
Wundef_boolean
0.30 Wundef_boolean
avoid_if_before_free
0.13 avoid_if_before_free
bindtextdomain
0.03 bindtextdomain
cast_of_alloca_return_value
0.04 cast_of_alloca_return_value
cast_of_argument_to_free
0.05 cast_of_argument_to_free
cast_of_x_alloc_return_value
0.04 cast_of_x_alloc_return_value
changelog
0.02 changelog
check-AUTHORS
make[1]: *** No rule to make target `Makefile.am', needed by `Makefile.in'.
make[1]: *** No rule to make target `../src/Makefile.am', needed by `../config.status'.
make[1]: Failed to remake makefile `Makefile'.
make[1]: Target `_sc_check-AUTHORS' not remade because of errors.
make: *** [sc_check-AUTHORS] Error 2
const_long_option
0.04 const_long_option
copyright_check
0.34 copyright_check
cross_check_PATH_usage_in_tests
0.00 cross_check_PATH_usage_in_tests
dd_O_FLAGS
0.03 dd_O_FLAGS
dd_max_sym_length
0.01 dd_max_sym_length
error_exit_success
0.03 error_exit_success
error_message_period
0.04 error_message_period
error_message_uppercase
0.04 error_message_uppercase
error_message_warn_fatal
0.04 error_message_warn_fatal
file_system
0.05 file_system
immutable_NEWS
0.01 immutable_NEWS
long_lines
2.33 long_lines
m4_quote_check
0.02 m4_quote_check
makefile_TAB_only_indentation
src/local.mk:371:	                        $(srcdir)/src/dircolors.hin > $@-t
src/local.mk:453:	                  --local $(srcdir)/src/stat.c > $@t
src/local.mk:461:	                  $(srcdir)/src/stat.c > $@t
maint.mk: found TAB-8-space indentation
make: *** [sc_makefile_TAB_only_indentation] Error 1
makefile_at_at_check
0.02 makefile_at_at_check
makefile_path_separator_check
0.02 makefile_path_separator_check
missing src/chroot.x
missing src/hostid.x
missing src/nice.x
missing src/who.x
missing src/users.x
missing src/pinky.x
missing src/uptime.x
missing src/stty.x
missing src/df.x
missing src/stdbuf.x
missing src/[.x
missing src/base64.x
missing src/basename.x
missing src/cat.x
missing src/chcon.x
missing src/chgrp.x
missing src/chmod.x
missing src/chown.x
missing src/cksum.x
missing src/comm.x
missing src/cp.x
missing src/csplit.x
missing src/cut.x
missing src/date.x
missing src/dd.x
missing src/dir.x
missing src/dircolors.x
missing src/dirname.x
missing src/du.x
missing src/echo.x
missing src/env.x
missing src/expand.x
missing src/expr.x
missing src/factor.x
missing src/false.x
missing src/fmt.x
missing src/fold.x
missing src/ginstall.x
missing src/groups.x
missing src/head.x
missing src/id.x
missing src/join.x
missing src/kill.x
missing src/link.x
missing src/ln.x
missing src/logname.x
missing src/ls.x
missing src/md5sum.x
missing src/mkdir.x
missing src/mkfifo.x
missing src/mknod.x
missing src/mktemp.x
missing src/mv.x
missing src/nl.x
missing src/nproc.x
missing src/nohup.x
missing src/od.x
missing src/paste.x
missing src/pathchk.x
missing src/pr.x
missing src/printenv.x
missing src/printf.x
missing src/ptx.x
missing src/pwd.x
missing src/readlink.x
missing src/realpath.x
missing src/rm.x
missing src/rmdir.x
missing src/runcon.x
missing src/seq.x
missing src/sha1sum.x
missing src/sha224sum.x
missing src/sha256sum.x
missing src/sha384sum.x
missing src/sha512sum.x
missing src/shred.x
missing src/shuf.x
missing src/sleep.x
missing src/sort.x
missing src/split.x
missing src/stat.x
missing src/sum.x
missing src/sync.x
missing src/tac.x
missing src/tail.x
missing src/tee.x
missing src/test.x
missing src/timeout.x
missing src/touch.x
missing src/tr.x
missing src/true.x
missing src/truncate.x
missing src/tsort.x
missing src/tty.x
missing src/uname.x
missing src/unexpand.x
missing src/uniq.x
missing src/unlink.x
missing src/vdir.x
missing src/wc.x
missing src/whoami.x
missing src/yes.x
missing src/arch.x
missing src/hostname.x
missing src/chroot.x
missing src/df.x
missing src/hostid.x
missing src/libstdbuf.so.x
missing src/nice.x
missing src/pinky.x
missing src/stdbuf.x
missing src/stty.x
missing src/uptime.x
missing src/users.x
missing src/who.x
missing src/[.x
missing src/base64.x
missing src/basename.x
missing src/cat.x
missing src/chcon.x
missing src/chgrp.x
missing src/chmod.x
missing src/chown.x
missing src/cksum.x
missing src/comm.x
missing src/cp.x
missing src/csplit.x
missing src/cut.x
missing src/date.x
missing src/dd.x
missing src/dir.x
missing src/dircolors.x
missing src/dirname.x
missing src/du.x
missing src/echo.x
missing src/env.x
missing src/expand.x
missing src/expr.x
missing src/factor.x
missing src/false.x
missing src/fmt.x
missing src/fold.x
missing src/ginstall.x
missing src/groups.x
missing src/head.x
missing src/id.x
missing src/join.x
missing src/kill.x
missing src/link.x
missing src/ln.x
missing src/logname.x
missing src/ls.x
missing src/md5sum.x
missing src/mkdir.x
missing src/mkfifo.x
missing src/mknod.x
missing src/mktemp.x
missing src/mv.x
missing src/nl.x
missing src/nproc.x
missing src/nohup.x
missing src/od.x
missing src/paste.x
missing src/pathchk.x
missing src/pr.x
missing src/printenv.x
missing src/printf.x
missing src/ptx.x
missing src/pwd.x
missing src/readlink.x
missing src/realpath.x
missing src/rm.x
missing src/rmdir.x
missing src/runcon.x
missing src/seq.x
missing src/sha1sum.x
missing src/sha224sum.x
missing src/sha256sum.x
missing src/sha384sum.x
missing src/sha512sum.x
missing src/shred.x
missing src/shuf.x
missing src/sleep.x
missing src/sort.x
missing src/split.x
missing src/stat.x
missing src/sum.x
missing src/sync.x
missing src/tac.x
missing src/tail.x
missing src/tee.x
missing src/test.x
missing src/timeout.x
missing src/touch.x
missing src/tr.x
missing src/true.x
missing src/truncate.x
missing src/tsort.x
missing src/tty.x
missing src/uname.x
missing src/unexpand.x
missing src/uniq.x
missing src/unlink.x
missing src/vdir.x
missing src/wc.x
missing src/whoami.x
missing src/yes.x
make: *** [check-programs-vs-x] Error 1
man_file_correlation
no_exec_perl_coreutils
0.02 no_exec_perl_coreutils
obsolete_symbols
0.04 obsolete_symbols
option_desc_uppercase
0.01 option_desc_uppercase
po_check
2.31 po_check
preprocessor_indentation
0.04 preprocessor_indentation
program_name
0.03 program_name
prohibit_HAVE_MBRTOWC
0.04 prohibit_HAVE_MBRTOWC
prohibit_S_IS_definition
0.04 prohibit_S_IS_definition
prohibit_always-defined_macros
0.45 prohibit_always-defined_macros
prohibit_always_true_header_tests
0.05 prohibit_always_true_header_tests
prohibit_argmatch_without_use
0.04 prohibit_argmatch_without_use
prohibit_assert_without_use
0.04 prohibit_assert_without_use
prohibit_atoi_atof
0.05 prohibit_atoi_atof
prohibit_backup_files
0.02 prohibit_backup_files
prohibit_c_ctype_without_use
0.04 prohibit_c_ctype_without_use
prohibit_canonicalize_without_use
0.04 prohibit_canonicalize_without_use
prohibit_cloexec_without_use
0.04 prohibit_cloexec_without_use
prohibit_close_stream_without_use
0.03 prohibit_close_stream_without_use
prohibit_continued_string_alpha_in_column_1
0.03 prohibit_continued_string_alpha_in_column_1
prohibit_cvs_keyword
0.04 prohibit_cvs_keyword
prohibit_defined_have_decl_tests
0.04 prohibit_defined_have_decl_tests
prohibit_dirent_without_use
0.03 prohibit_dirent_without_use
prohibit_doubled_word
0.45 prohibit_doubled_word
prohibit_emacs__indent_tabs_mode__setting
0.04 prohibit_emacs__indent_tabs_mode__setting
prohibit_empty_lines_at_EOF
0.03 prohibit_empty_lines_at_EOF
prohibit_error_without_use
0.04 prohibit_error_without_use
prohibit_fail_0
0.04 prohibit_fail_0
prohibit_framework_failure
0.04 prohibit_framework_failure
prohibit_getopt_without_use
0.04 prohibit_getopt_without_use
prohibit_hash_pjw_without_use
0.03 prohibit_hash_pjw_without_use
prohibit_hash_without_use
0.04 prohibit_hash_without_use
prohibit_have_config_h
0.04 prohibit_have_config_h
prohibit_ignore_value_without_use
0.04 prohibit_ignore_value_without_use
prohibit_intprops_without_use
0.03 prohibit_intprops_without_use
prohibit_inttostr_without_use
0.03 prohibit_inttostr_without_use
prohibit_jm_in_m4
0.02 prohibit_jm_in_m4
prohibit_long_options_without_use
0.04 prohibit_long_options_without_use
prohibit_magic_number_exit
0.05 prohibit_magic_number_exit
prohibit_man_see_also_period
0.02 prohibit_man_see_also_period
prohibit_openat_without_use
0.04 prohibit_openat_without_use
prohibit_operator_at_end_of_line
0.04 prohibit_operator_at_end_of_line
prohibit_path_max_allocation
0.04 prohibit_path_max_allocation
prohibit_perl_hash_quotes
0.05 prohibit_perl_hash_quotes
prohibit_posixver_without_use
0.04 prohibit_posixver_without_use
prohibit_quote_without_use
0.04 prohibit_quote_without_use
prohibit_quotearg_without_use
0.03 prohibit_quotearg_without_use
prohibit_readlink
0.04 prohibit_readlink
prohibit_reversed_compare_failure
0.04 prohibit_reversed_compare_failure
prohibit_root_dev_ino_without_use
0.04 prohibit_root_dev_ino_without_use
prohibit_safe_read_without_use
0.03 prohibit_safe_read_without_use
prohibit_same_without_use
0.04 prohibit_same_without_use
prohibit_short_facl_mode_spec
0.05 prohibit_short_facl_mode_spec
prohibit_signal_without_use
0.05 prohibit_signal_without_use
prohibit_sleep
0.04 prohibit_sleep
prohibit_stat_macro_address
0.04 prohibit_stat_macro_address
prohibit_stat_st_blocks
0.04 prohibit_stat_st_blocks
prohibit_stddef_without_use
0.04 prohibit_stddef_without_use
prohibit_stdio--_without_use
0.04 prohibit_stdio--_without_use
prohibit_stdio-safer_without_use
0.04 prohibit_stdio-safer_without_use
prohibit_strcmp
0.04 prohibit_strcmp
prohibit_strings_without_use
0.03 prohibit_strings_without_use
prohibit_strncmp
0.04 prohibit_strncmp
prohibit_strncpy
0.04 prohibit_strncpy
prohibit_tab_based_indentation
0.04 prohibit_tab_based_indentation
prohibit_test_backticks
0.03 prohibit_test_backticks
prohibit_test_calls_print_ver_with_irrelevant_argument
0.80 prohibit_test_calls_print_ver_with_irrelevant_argument
prohibit_test_double_equal
0.05 prohibit_test_double_equal
prohibit_test_minus_ao
0.04 prohibit_test_minus_ao
prohibit_undesirable_word_seq
1.94 prohibit_undesirable_word_seq
prohibit_verbose_version
0.04 prohibit_verbose_version
prohibit_verify_without_use
0.04 prohibit_verify_without_use
prohibit_xalloc_without_use
0.04 prohibit_xalloc_without_use
prohibit_xfreopen_without_use
0.03 prohibit_xfreopen_without_use
proper_name_utf8_requires_ICONV
Can't open src/Makefile.am: No such file or directory.
Can't open src/Makefile.am: No such file or directory.
Can't open src/Makefile.am: No such file or directory.
Can't open src/Makefile.am: No such file or directory.
Can't open src/Makefile.am: No such file or directory.
Can't open src/Makefile.am: No such file or directory.
Can't open src/Makefile.am: No such file or directory.
Can't open src/Makefile.am: No such file or directory.
Can't open src/Makefile.am: No such file or directory.
Can't open src/Makefile.am: No such file or directory.
Can't open src/Makefile.am: No such file or directory.
0.07 proper_name_utf8_requires_ICONV
redundant_const
0.04 redundant_const
require_config_h
0.02 require_config_h
require_config_h_first
0.24 require_config_h_first
require_stdio_safer
0.04 require_stdio_safer
require_test_exit_idiom
0.00 require_test_exit_idiom
root_tests
0.04 root_tests
some_programs_must_avoid_exit_failure
0.03 some_programs_must_avoid_exit_failure
space_before_open_paren
0.65 space_before_open_paren
space_tab
src/local.mk:58:EXTRA_DIST += 		\
src/local.mk:59:  src/dcgen 		\
maint.mk: found SPACE-TAB sequence; remove the SPACE
make: *** [sc_space_tab] Error 1
strftime_check
0.06 strftime_check
sun_os_names
0.05 sun_os_names
system_h_headers
0.04 system_h_headers
texinfo_acronym
0.02 texinfo_acronym
tight_scope
maint.mk: skipping sc_tight_scope
0.01 tight_scope
trailing_blank
0.06 trailing_blank
two_space_separator_in_usage
0.04 two_space_separator_in_usage
unmarked_diagnostics
0.04 unmarked_diagnostics
useless_cpp_parens
0.04 useless_cpp_parens
vulnerable_makefile_CVE-2009-4029
0.30 vulnerable_makefile_CVE-2009-4029
vulnerable_makefile_CVE-2012-3386
0.30 vulnerable_makefile_CVE-2012-3386
make: Target `syntax-check' not remade because of errors.


From MAILER-DAEMON Fri Aug 31 10:10:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7Rvh-0002ZG-F3
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 10:10:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51003)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7RvW-0002Yx-S7
	for coreutils@gnu.org; Fri, 31 Aug 2012 10:10:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7RvO-0005W1-Pw
	for coreutils@gnu.org; Fri, 31 Aug 2012 10:10:26 -0400
Received: from mx.meyering.net ([88.168.87.75]:37571)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7RvO-0005Vn-Iq
	for coreutils@gnu.org; Fri, 31 Aug 2012 10:10:18 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id E220B6013B;
	Fri, 31 Aug 2012 16:10:17 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 0/6] Patches to avoid use of make recursion in the 'src/'
	subdir
In-Reply-To: <5040C481.3020301@gmail.com> (Stefano Lattarini's message of
	"Fri, 31 Aug 2012 16:04:49 +0200")
References: <cover.1346418798.git.stefano.lattarini@gmail.com>
	<87r4qnqj6c.fsf@rho.meyering.net> <5040BDEE.7080503@gmail.com>
	<87fw73qi4q.fsf@rho.meyering.net> <5040C481.3020301@gmail.com>
Date: Fri, 31 Aug 2012 16:10:17 +0200
Message-ID: <873933qhiu.fsf@rho.meyering.net>
Lines: 49
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 14:10:36 -0000

Stefano Lattarini wrote:

> On 08/31/2012 03:57 PM, Jim Meyering wrote:
>> Stefano Lattarini wrote:
>>
>>> On 08/31/2012 03:34 PM, Jim Meyering wrote:
>>>> Stefano Lattarini wrote:
>>>>> These should go on the top of my other pending series "[PATCH 0/7] Minor
>>>>> cleanup and refactoring":
>>>>>
>>>>>     <http://lists.gnu.org/archive/html/coreutils/2012-08/msg00205.html>
>>>>
>>>> Thanks!  Looking at these now.
>>>> FYI, I pushed that other series an hour ago.
>>>>
>>> Ouch, some of them still have the S-o-B line!  Can you delete those, or
>>> should I resend?
>>
>> No problem.  As I tried to apply them with "git am FILE",
>> the new commit hook complained and left me in the editor,
>> where I removed them.
>>
>> However, 3/6 failed to apply.
>>
> Are you applying with "git am -3", right?  Otherwise, merge conflicts that
> can be solved automatically won't be.

Yes.  Here's what I hit with your original series

  $ git am -3 k
  Applying: maint: add our 'bootstrap_post_import_hook' function
  Applying: build: refactor how lists of coreutils programs are defined
  Applying: build: don't use recursive make to build the 'src' subdirectory
  fatal: sha1 information is lacking or useless (cfg.mk).
  Repository lacks necessary blobs to fall back on 3-way merge.
  Cannot fall back to three-way merge.
  Patch failed at 0003 build: don't use recursive make to build the 'src' subdirectory
  The copy of the patch that failed is found in:
     /h/j/w/co/cu/.git/rebase-apply/patch
  When you have resolved this problem, run "git am --resolved".
  If you prefer to skip this patch, run "git am --skip" instead.
  To restore the original branch and stop patching, run "git am --abort".

> Anyway, I can resend the series (now rebased on latest master) if that
> would make things easier ....

I worked around that problem, but as mentioned separately,
I'm seeing numerous make syntax-check problems, and for those
I would appreciate a re-spin.


From MAILER-DAEMON Fri Aug 31 11:47:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7TRS-0001fR-KT
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 11:47:30 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40667)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRM-0001eh-D4
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRL-0004P3-59
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:24 -0400
Received: from mail-wi0-f169.google.com ([209.85.212.169]:64111)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRK-0004Ou-V6
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:23 -0400
Received: by wibhm2 with SMTP id hm2so1350659wib.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 08:47:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
	bh=26FD8qLYe6Cr9F9ixshkRanTZnS7zh5j69PMOv0kvvY=;
	b=Go/qDJpvG8b5sui6tVsQC5IUp4vna8h6ROy8zbchB3ejIeIJvmfLu1aVldpNP6Sfu2
	bVU1W8IL5Iwnpi5u8c1ZSZ2jSS2v/HZ0APyItt09fcjEc29LnfxAmkPtQ+jt4Hj0mY4x
	lPLuXPM0QfqL5vF9N8eUhxc4YvtorXHbY4AVaZBTsf6S9wd1mfZb1hkOXLaJC0ae8hXS
	oI5oFH0b81/bfQtuuYhhAGcABc+fiYB/19Lra1/w1y9AKQF7RxYuPIufzgXhJBPxlYVi
	r0vJ+HnctBs7HgjjPqoQe6/DBb6L5phCi888GR1n4/sYd8YaKXMLnBanIW7j+rDuS5/6
	XxsQ==
Received: by 10.180.86.3 with SMTP id l3mr5525029wiz.16.1346428041978;
	Fri, 31 Aug 2012 08:47:21 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id q4sm1469213wix.9.2012.08.31.08.47.20
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 08:47:21 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH v2 0/9] Patches to avoid use of make recursion in the 'src/'
	subdir
Date: Fri, 31 Aug 2012 17:46:36 +0200
Message-Id: <cover.1346427900.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <87a9xbqhoe.fsf@rho.meyering.net>
References: <87a9xbqhoe.fsf@rho.meyering.net>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 15:47:29 -0000

On 08/31/2012 04:06 PM, Jim Meyering wrote:
>
> Hmm... actually there are a few other problems.  See below.
> If you don't mind fixing those and reposting, I would be grateful.
> I'm stepping out for an hour or so.
> 
Here is an updated series.  Notice that there is still one spurious
failure:

    proper_name_utf8_requires_ICONV
    Can't open src/Makefile.am: No such file or directory.
    Can't open src/Makefile.am: No such file or directory.
    ...
    Can't open src/Makefile.am: No such file or directory.
    0.19 proper_name_utf8_requires_ICONV

but that's due to a bug in the gnulib-provided 'maint.mk' AFAICS,
and I'm not going to fix it for the moment.

Regards,
  Stefano

-*-*-*-

Stefano Lattarini (9):
  maint: add our 'bootstrap_post_import_hook' function
  build: refactor how lists of coreutils programs are defined
  build: don't use recursive make to build the 'src' subdirectory
  build: fix generation of manpages for programs not built by default
  maint: improve remake rules for maintainers
  maint: remove unused target 'install-root'
  maint: fix and simplify maintainer checks
  maint: fix one stray reference to src/Makefile.am
  maint: update gitignore entries

 .gitignore                         |   2 +
 Makefile.am                        |  23 +-
 bootstrap.conf                     |  15 +-
 build-aux/gen-lists-of-programs.sh | 187 ++++++++++
 cfg.mk                             |  56 ++-
 configure.ac                       |  76 +---
 man/local.mk                       |  19 +-
 src/.gitignore                     |   1 +
 src/{Makefile.am => local.mk}      | 745 +++++++++++++++----------------------
 tests/Makefile.am                  |   6 +-
 10 files changed, 597 insertions(+), 533 deletions(-)
 create mode 100755 build-aux/gen-lists-of-programs.sh
 rename src/{Makefile.am => local.mk} (36%)

-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 11:47:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7TRT-0001gt-1M
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 11:47:31 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40677)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRN-0001ei-28
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRM-0004PD-6R
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:25 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:36296)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRM-0004P7-0M
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:24 -0400
Received: by weys10 with SMTP id s10so1900875wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 08:47:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=w0y6mYTt96aUjkiQ6NRV5oJfCUIbZjlAe5aKzjRFpe8=;
	b=cOvsuquZg8ppY9qQCe7dOEUNqiGdwGwbgV2I3/Jhgls5uVWuxgz1sIiZXBH1Q9yMeY
	ZCHTawzlKJrX8UW2Ag1rJBxAEogVkPHjL8QxsHpfX0gVgJwkef4CRx58r1u2F+D80GQM
	518kvAYWx/AYYS/wWfBkO6DX2R97nw6Q6rneS4DrLQui5mIe4qx2neFTHt9mFbhP+2WQ
	9e2dh5d639leaa6VHQzuS543lHbyOpvYT7A59tbIcwrXEoiOdy7qssSixlYO2itgwDo6
	ZmYk4Zobt89FEXZle5QmnibixvPEven3fMeNOYwM2G7838GxTy2TuDLBuKnkDiPyzUdn
	zi+Q==
Received: by 10.180.91.169 with SMTP id cf9mr5843135wib.1.1346428043229;
	Fri, 31 Aug 2012 08:47:23 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id q4sm1469213wix.9.2012.08.31.08.47.22
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 08:47:22 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH v2 1/9] maint: add our 'bootstrap_post_import_hook' function
Date: Fri, 31 Aug 2012 17:46:37 +0200
Message-Id: <940765bb45f68a85cd90e811d3705a49014d0bc1.1346427900.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <cover.1346427900.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 15:47:29 -0000

This is in preparation of future changes.

* bootstrap.conf (bootstrap_post_import_hook): New, will be executed
by bootstrap after gnulib-tool abut before the autotools.
Move creation of dummy ChangeLog into it.
---
 bootstrap.conf | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 535900d..4fc4e67 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -324,8 +324,11 @@ tar        -
 xz         -
 "
 
-# Automake requires that ChangeLog exist.
-touch ChangeLog || exit 1
+bootstrap_post_import_hook ()
+{
+  # Automake requires that ChangeLog exist.
+  touch ChangeLog || exit 1
+}
 
 bootstrap_epilogue()
 {
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 11:47:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7TRZ-0001nd-Bx
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 11:47:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40756)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRU-0001mj-Ln
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRQ-0004QS-Bq
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:32 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:61874)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRQ-0004QF-04
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:28 -0400
Received: by wgbdt14 with SMTP id dt14so1855664wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 08:47:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=zG7YEC1aVWfn5D5k5QJYC5T6tTPK6WHy6ZxW+C0yKkE=;
	b=WoHa1Wzr9ONDnLlAMuzIkr+gEnyBFUf5DB5ZdKsYOpck1b3L39PHkBj5L056w5vBNF
	WkGrlQ1m66PmGRiD533VGIK8iDwxN0fscRRcMzfL8u4j/lC8k1Kt1iq1dgO2endRwjx3
	Dph5/9BR8lWr4QM51iZZszZ0JbeCsCq+V6JcS4kTbBL6K+0AanGqd40bbTdequs7tuuq
	ab2ijT9VLnQFkFM1SrtMgBonfwlw1mwPZvCcavJA5UFYxG8iVO+eN2nI4LMwo6qoYI8D
	b/ApLWcctJNB0ZJ7RCWaXyZVEma/OMYX3f+Jf5ZBaSsMkhR+14vK8sJWO2ExF0rulwLo
	mu4w==
Received: by 10.180.75.209 with SMTP id e17mr5847692wiw.0.1346428047045;
	Fri, 31 Aug 2012 08:47:27 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id q4sm1469213wix.9.2012.08.31.08.47.24
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 08:47:26 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH v2 3/9] build: don't use recursive make to build the 'src'
	subdirectory
Date: Fri, 31 Aug 2012 17:46:39 +0200
Message-Id: <1096684ffff8df4bd5a515baf8d624a6987e35ac.1346427900.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <cover.1346427900.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 15:47:36 -0000

* Makefile.am (SUBDIRS): Remove 'src'.  Ensure '.' is listed before
'tests' and 'gnulib-tests'.
(dist-hook): Adjust: we must now tweak the top-level Makefile.in
in $(distdir), not the one in the 'src/' subdir (which is gone).
(include): The '$(top_srcdir)/src/local.mk' file.
* build-aux/gen-lists-of-programs.sh: Adjust the generation of the
automake input fragment.
* tests/Makefile.am (.built-programs): Adjust.
* cfg.mk (all_programs): Remove this convenience rule; it's no
longer needed, now that we can rely directly on the contents of
$(all_programs).
(sc_option_desc_uppercase, check-programs-vs-x:): Adjust list
of prerequisites accordingly.
(all-progs-but-lbracket): Simplify definition accordingly.
* configure.ac ($OPTIONAL_BIN_PROGS): Adjust definition.
($OPTIONAL_PKGLIB_PROGS): Likewise.
($NO_INSTALL_PROGS_DEFAULT): Tweak definition, for consistency.
(AC_CONFIG_FILES): Remove 'src/Makefile'.
* src/Makefile.am: Rename ...
* src/local.mk: ... like this, with a lot of adjustments.  In
addition ...
(all_programs): ... remove this now-unneeded convenience target.
---
 Makefile.am                        |   5 +-
 build-aux/gen-lists-of-programs.sh |   7 +-
 cfg.mk                             |  13 +-
 configure.ac                       |  16 +-
 src/{Makefile.am => local.mk}      | 587 +++++++++++++++++++------------------
 tests/Makefile.am                  |   6 +-
 6 files changed, 322 insertions(+), 312 deletions(-)
 rename src/{Makefile.am => local.mk} (46%)

diff --git a/Makefile.am b/Makefile.am
index f3d6eda..6a56f68 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@
 
 ALL_RECURSIVE_TARGETS =
 
-SUBDIRS = lib src po tests gnulib-tests
+SUBDIRS = lib po . tests gnulib-tests
 
 changelog_etc =				\
   ChangeLog-2005			\
@@ -92,7 +92,7 @@ BUILT_SOURCES = .version
 # See the rm_subst comment for details.
 dist-hook: gen-ChangeLog
 	$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
-	$(AM_V_at)perl -pi -e '$(rm_subst)' $(distdir)/src/Makefile.in
+	$(AM_V_at)perl -pi -e '$(rm_subst)' $(distdir)/Makefile.in
 
 gen_start_date = 2008-02-08
 .PHONY: gen-ChangeLog
@@ -170,5 +170,6 @@ check-git-hook-script-sync:
 	rm -rf $$t;							\
 	test $$fail = 0
 
+include $(top_srcdir)/src/local.mk
 include $(top_srcdir)/doc/local.mk
 include $(top_srcdir)/man/local.mk
diff --git a/build-aux/gen-lists-of-programs.sh b/build-aux/gen-lists-of-programs.sh
index ec43ee8..f049b56 100755
--- a/build-aux/gen-lists-of-programs.sh
+++ b/build-aux/gen-lists-of-programs.sh
@@ -165,17 +165,18 @@ END
     ;;
   1,--automake|1,--for-automake)
     echo "## $msg"
+    progsdir=src
     echo no_install__progs =
     for p in $disabled_by_default_progs; do
-      echo no_install__progs += $p
+      echo no_install__progs += $progsdir/$p
     done
     echo build_if_possible__progs =
     for p in $build_if_possible_progs; do
-      echo build_if_possible__progs += $p
+      echo build_if_possible__progs += $progsdir/$p
     done
     echo default__progs =
     for p in $normal_progs; do
-      echo default__progs += $p
+      echo default__progs += $progsdir/$p
     done
     ;;
   *)
diff --git a/cfg.mk b/cfg.mk
index 1dbfe42..b56e329 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -166,12 +166,6 @@ sc_long_lines:
 	  sed -e "s|^|$$file:|" -e '$(FILTER_LONG_LINES)';		\
 	done | grep . && { msg="$$halt" $(_sc_say_and_exit) } || :
 
-# TODO: remove once the build system in 'src/' is merged with the
-# top-level one.
-.PHONY: all_programs
-all_programs:
-	@cd ./src && $(MAKE) -s $@
-
 # Option descriptions should not start with a capital letter.
 # One could grep source directly as follows:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
@@ -183,7 +177,7 @@ sc_option_desc_uppercase:
 	  && { echo 1>&2 '$@: found initial capitals in --help'; exit 1; } || :
 sc_option_desc_uppercase: $(dist_man1_MANS) \
                           $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT)) \
-                          all_programs
+                          $(all_programs)
 
 # Ensure all man/*.[1x] files are present.
 ALL_RECURSIVE_TARGETS += sc_man_file_correlation
@@ -208,13 +202,12 @@ check-x-vs-1:
 
 # Writing a portable rule to generate a manpage like '[.1' would be
 # a nightmare.
-all-progs-but-lbracket = $(filter-out [, $(shell \
-      (cd ./src && MAKEFLAGS= ${MAKE} -s all_programs.list)))
+all-progs-but-lbracket = $(filter-out [,$(all_programs))
 
 # Ensure that for each .x file in the 'man/' subdirectory, there is a
 # corresponding coreutils program.
 .PHONY: check-programs-vs-x
-check-programs-vs-x: all_programs
+check-programs-vs-x: $(all_programs)
 	@status=0;					\
 	for p in dummy $(all-progs-but-lbracket); do	\
 	  test $$p = dummy && continue;			\
diff --git a/configure.ac b/configure.ac
index ca038c8..8c41d62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -433,14 +433,23 @@ MAN=`
     test x$p = x'@<:@' && continue
     echo "man/$p.1"
   done`
+
+NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
+OPTIONAL_PKGLIB_PROGS=`
+  for p in $optional_pkglib_progs; do echo src/$p; done`
+# Since this is AC_SUBST'd, Automake won't be able to perform rewrite
+# with $(EXEEXT) appending on it, so we have to do it ourselves.
+OPTIONAL_BIN_PROGS=`
+  for p in $optional_bin_progs; do echo "src/$p\$(EXEEXT)"; done`
+
 # Normalize whitespace.
 MAN=`echo $MAN`
+NO_INSTALL_PROGS_DEFAULT=`echo $NO_INSTALL_PROGS_DEFAULT`
+OPTIONAL_BIN_PROGS=`echo $OPTIONAL_BIN_PROGS`
+OPTIONAL_PKGLIB_PROGS=`echo $OPTIONAL_PKGLIB_PROGS`
 
-NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
 AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
-OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
 AC_SUBST([OPTIONAL_BIN_PROGS])
-OPTIONAL_PKGLIB_PROGS=`echo "$optional_pkglib_progs " | sed 's/ $//'`
 AC_SUBST([OPTIONAL_PKGLIB_PROGS])
 
 AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
@@ -459,7 +468,6 @@ AC_CONFIG_FILES(
   Makefile
   lib/Makefile
   po/Makefile.in
-  src/Makefile
   tests/Makefile
   gnulib-tests/Makefile
   )
diff --git a/src/Makefile.am b/src/local.mk
similarity index 46%
rename from src/Makefile.am
rename to src/local.mk
index 3b0ef65..45a6268 100644
--- a/src/Makefile.am
+++ b/src/local.mk
@@ -1,4 +1,5 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-
+# Make coreutils programs.                             -*-Makefile-*-
+# This is included by the top-level Makefile.am.
 
 ## Copyright (C) 1990-2012 Free Software Foundation, Inc.
 
@@ -21,42 +22,47 @@ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
 # the how and when they should be installed) is defined in this makefile
 # fragment, autogenerated by the 'gen-lists-of-programs.sh' auxiliary
 # script.
-include $(srcdir)/cu-progs.mk
+include $(srcdir)/src/cu-progs.mk
 
 EXTRA_PROGRAMS = \
-  $(no_install__progs) \
-  $(build_if_possible__progs) \
-  $(default__progs)
+   $(no_install__progs) \
+   $(build_if_possible__progs) \
+   $(default__progs)
 
 bin_PROGRAMS = $(OPTIONAL_BIN_PROGS)
 
-noinst_PROGRAMS = setuidgid getlimits
+noinst_PROGRAMS = src/setuidgid src/getlimits
 
 pkglibexec_PROGRAMS = $(OPTIONAL_PKGLIB_PROGS)
 
-noinst_HEADERS =	\
-  chown-core.h		\
-  copy.h		\
-  cp-hash.h		\
-  dircolors.h		\
-  fiemap.h		\
-  find-mount-point.h	\
-  fs.h			\
-  fs-is-local.h		\
-  group-list.h		\
-  ioblksize.h		\
-  ls.h			\
-  operand2sig.h		\
-  prog-fprintf.h	\
-  remove.h		\
-  system.h		\
-  wheel-size.h		\
-  wheel.h		\
-  uname.h
-
-EXTRA_DIST = dcgen dircolors.hin tac-pipe.c \
-  wheel-gen.pl extract-magic c99-to-c89.diff
-BUILT_SOURCES =
+noinst_HEADERS =		\
+  src/chown-core.h		\
+  src/copy.h			\
+  src/cp-hash.h			\
+  src/dircolors.h		\
+  src/fiemap.h			\
+  src/find-mount-point.h	\
+  src/fs.h			\
+  src/fs-is-local.h		\
+  src/group-list.h		\
+  src/ioblksize.h		\
+  src/ls.h			\
+  src/operand2sig.h		\
+  src/prog-fprintf.h		\
+  src/remove.h			\
+  src/system.h			\
+  src/wheel-size.h		\
+  src/wheel.h			\
+  src/uname.h
+
+EXTRA_DIST += 		\
+  src/dcgen 		\
+  src/dircolors.hin	\
+  src/tac-pipe.c	\
+  src/wheel-gen.pl	\
+  src/extract-magic	\
+  src/c99-to-c89.diff
+
 CLEANFILES = $(SCRIPTS)
 
 # Also remove these sometimes-built programs.
@@ -65,8 +71,8 @@ CLEANFILES += $(no_install__progs)
 
 AM_CPPFLAGS = -I$(top_srcdir)/lib
 
-noinst_LIBRARIES = libver.a
-nodist_libver_a_SOURCES = version.c version.h
+noinst_LIBRARIES = src/libver.a
+nodist_src_libver_a_SOURCES = src/version.c src/version.h
 
 # Tell the linker to omit references to unused shared libraries.
 AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
@@ -80,319 +86,324 @@ remove_ldadd =
 # must precede $(LIBINTL) in order to ensure we use GNU getopt.
 # But libcoreutils.a must also follow $(LIBINTL), since libintl uses
 # replacement functions defined in libcoreutils.a.
-LDADD = libver.a ../lib/libcoreutils.a $(LIBINTL) ../lib/libcoreutils.a
+LDADD = src/libver.a lib/libcoreutils.a $(LIBINTL) lib/libcoreutils.a
 
 # First, list all programs, to make listing per-program libraries easier.
 # See [ below.
-arch_LDADD = $(LDADD)
-base64_LDADD = $(LDADD)
-basename_LDADD = $(LDADD)
-cat_LDADD = $(LDADD)
-chcon_LDADD = $(LDADD)
-chgrp_LDADD = $(LDADD)
-chmod_LDADD = $(LDADD)
-chown_LDADD = $(LDADD)
-chroot_LDADD = $(LDADD)
-cksum_LDADD = $(LDADD)
-comm_LDADD = $(LDADD)
-nproc_LDADD = $(LDADD)
-cp_LDADD = $(LDADD)
-csplit_LDADD = $(LDADD)
-cut_LDADD = $(LDADD)
-date_LDADD = $(LDADD)
-dd_LDADD = $(LDADD)
-df_LDADD = $(LDADD)
+src_arch_LDADD = $(LDADD)
+src_base64_LDADD = $(LDADD)
+src_basename_LDADD = $(LDADD)
+src_cat_LDADD = $(LDADD)
+src_chcon_LDADD = $(LDADD)
+src_chgrp_LDADD = $(LDADD)
+src_chmod_LDADD = $(LDADD)
+src_chown_LDADD = $(LDADD)
+src_chroot_LDADD = $(LDADD)
+src_cksum_LDADD = $(LDADD)
+src_comm_LDADD = $(LDADD)
+src_nproc_LDADD = $(LDADD)
+src_cp_LDADD = $(LDADD)
+src_csplit_LDADD = $(LDADD)
+src_cut_LDADD = $(LDADD)
+src_date_LDADD = $(LDADD)
+src_dd_LDADD = $(LDADD)
+src_df_LDADD = $(LDADD)
 # See dir_LDADD below
-dircolors_LDADD = $(LDADD)
-dirname_LDADD = $(LDADD)
-du_LDADD = $(LDADD)
-echo_LDADD = $(LDADD)
-env_LDADD = $(LDADD)
-expand_LDADD = $(LDADD)
-expr_LDADD = $(LDADD)
-factor_LDADD = $(LDADD)
-false_LDADD = $(LDADD)
-fmt_LDADD = $(LDADD)
-fold_LDADD = $(LDADD)
-getlimits_LDADD = $(LDADD)
-ginstall_LDADD = $(LDADD)
-groups_LDADD = $(LDADD)
-head_LDADD = $(LDADD)
-hostid_LDADD = $(LDADD)
-hostname_LDADD = $(LDADD)
-id_LDADD = $(LDADD)
-join_LDADD = $(LDADD)
-kill_LDADD = $(LDADD)
-link_LDADD = $(LDADD)
-ln_LDADD = $(LDADD)
-logname_LDADD = $(LDADD)
-ls_LDADD = $(LDADD)
-md5sum_LDADD = $(LDADD)
-mkdir_LDADD = $(LDADD)
-mkfifo_LDADD = $(LDADD)
-mknod_LDADD = $(LDADD)
-mktemp_LDADD = $(LDADD)
-mv_LDADD = $(LDADD)
-nice_LDADD = $(LDADD)
-nl_LDADD = $(LDADD)
-nohup_LDADD = $(LDADD)
-od_LDADD = $(LDADD)
-paste_LDADD = $(LDADD)
-pathchk_LDADD = $(LDADD)
-pinky_LDADD = $(LDADD)
-pr_LDADD = $(LDADD)
-printenv_LDADD = $(LDADD)
-printf_LDADD = $(LDADD)
-ptx_LDADD = $(LDADD)
-pwd_LDADD = $(LDADD)
-readlink_LDADD = $(LDADD)
-realpath_LDADD = $(LDADD)
-rm_LDADD = $(LDADD)
-rmdir_LDADD = $(LDADD)
-runcon_LDADD = $(LDADD)
-seq_LDADD = $(LDADD)
-setuidgid_LDADD = $(LDADD)
-sha1sum_LDADD = $(LDADD)
-sha224sum_LDADD = $(LDADD)
-sha256sum_LDADD = $(LDADD)
-sha384sum_LDADD = $(LDADD)
-sha512sum_LDADD = $(LDADD)
-shred_LDADD = $(LDADD)
-shuf_LDADD = $(LDADD)
-sleep_LDADD = $(LDADD)
-sort_LDADD = $(LDADD)
-split_LDADD = $(LDADD)
-stat_LDADD = $(LDADD)
-stdbuf_LDADD = $(LDADD)
-stty_LDADD = $(LDADD)
-sum_LDADD = $(LDADD)
-sync_LDADD = $(LDADD)
-tac_LDADD = $(LDADD)
-tail_LDADD = $(LDADD)
-tee_LDADD = $(LDADD)
-test_LDADD = $(LDADD)
-timeout_LDADD = $(LDADD)
-touch_LDADD = $(LDADD)
-tr_LDADD = $(LDADD)
-true_LDADD = $(LDADD)
-truncate_LDADD = $(LDADD)
-tsort_LDADD = $(LDADD)
-tty_LDADD = $(LDADD)
-uname_LDADD = $(LDADD)
-unexpand_LDADD = $(LDADD)
-uniq_LDADD = $(LDADD)
-unlink_LDADD = $(LDADD)
-uptime_LDADD = $(LDADD)
-users_LDADD = $(LDADD)
+src_dircolors_LDADD = $(LDADD)
+src_dirname_LDADD = $(LDADD)
+src_du_LDADD = $(LDADD)
+src_echo_LDADD = $(LDADD)
+src_env_LDADD = $(LDADD)
+src_expand_LDADD = $(LDADD)
+src_expr_LDADD = $(LDADD)
+src_factor_LDADD = $(LDADD)
+src_false_LDADD = $(LDADD)
+src_fmt_LDADD = $(LDADD)
+src_fold_LDADD = $(LDADD)
+src_getlimits_LDADD = $(LDADD)
+src_ginstall_LDADD = $(LDADD)
+src_groups_LDADD = $(LDADD)
+src_head_LDADD = $(LDADD)
+src_hostid_LDADD = $(LDADD)
+src_hostname_LDADD = $(LDADD)
+src_id_LDADD = $(LDADD)
+src_join_LDADD = $(LDADD)
+src_kill_LDADD = $(LDADD)
+src_link_LDADD = $(LDADD)
+src_ln_LDADD = $(LDADD)
+src_logname_LDADD = $(LDADD)
+src_ls_LDADD = $(LDADD)
+src_md5sum_LDADD = $(LDADD)
+src_mkdir_LDADD = $(LDADD)
+src_mkfifo_LDADD = $(LDADD)
+src_mknod_LDADD = $(LDADD)
+src_mktemp_LDADD = $(LDADD)
+src_mv_LDADD = $(LDADD)
+src_nice_LDADD = $(LDADD)
+src_nl_LDADD = $(LDADD)
+src_nohup_LDADD = $(LDADD)
+src_od_LDADD = $(LDADD)
+src_paste_LDADD = $(LDADD)
+src_pathchk_LDADD = $(LDADD)
+src_pinky_LDADD = $(LDADD)
+src_pr_LDADD = $(LDADD)
+src_printenv_LDADD = $(LDADD)
+src_printf_LDADD = $(LDADD)
+src_ptx_LDADD = $(LDADD)
+src_pwd_LDADD = $(LDADD)
+src_readlink_LDADD = $(LDADD)
+src_realpath_LDADD = $(LDADD)
+src_rm_LDADD = $(LDADD)
+src_rmdir_LDADD = $(LDADD)
+src_runcon_LDADD = $(LDADD)
+src_seq_LDADD = $(LDADD)
+src_setuidgid_LDADD = $(LDADD)
+src_sha1sum_LDADD = $(LDADD)
+src_sha224sum_LDADD = $(LDADD)
+src_sha256sum_LDADD = $(LDADD)
+src_sha384sum_LDADD = $(LDADD)
+src_sha512sum_LDADD = $(LDADD)
+src_shred_LDADD = $(LDADD)
+src_shuf_LDADD = $(LDADD)
+src_sleep_LDADD = $(LDADD)
+src_sort_LDADD = $(LDADD)
+src_split_LDADD = $(LDADD)
+src_stat_LDADD = $(LDADD)
+src_stdbuf_LDADD = $(LDADD)
+src_stty_LDADD = $(LDADD)
+src_sum_LDADD = $(LDADD)
+src_sync_LDADD = $(LDADD)
+src_tac_LDADD = $(LDADD)
+src_tail_LDADD = $(LDADD)
+src_tee_LDADD = $(LDADD)
+src_test_LDADD = $(LDADD)
+src_timeout_LDADD = $(LDADD)
+src_touch_LDADD = $(LDADD)
+src_tr_LDADD = $(LDADD)
+src_true_LDADD = $(LDADD)
+src_truncate_LDADD = $(LDADD)
+src_tsort_LDADD = $(LDADD)
+src_tty_LDADD = $(LDADD)
+src_uname_LDADD = $(LDADD)
+src_unexpand_LDADD = $(LDADD)
+src_uniq_LDADD = $(LDADD)
+src_unlink_LDADD = $(LDADD)
+src_uptime_LDADD = $(LDADD)
+src_users_LDADD = $(LDADD)
 # See vdir_LDADD below
-wc_LDADD = $(LDADD)
-who_LDADD = $(LDADD)
-whoami_LDADD = $(LDADD)
-yes_LDADD = $(LDADD)
+src_wc_LDADD = $(LDADD)
+src_who_LDADD = $(LDADD)
+src_whoami_LDADD = $(LDADD)
+src_yes_LDADD = $(LDADD)
 
-# Synonyms.  Recall that Automake transliterates '[' to '_'.
-__LDADD = $(test_LDADD)
-dir_LDADD = $(ls_LDADD)
-vdir_LDADD = $(ls_LDADD)
+# Synonyms.  Recall that Automake transliterates '[' and '/' to '_'.
+src___LDADD = $(src_test_LDADD)
+src_dir_LDADD = $(src_ls_LDADD)
+src_vdir_LDADD = $(src_ls_LDADD)
 
-cp_LDADD += $(copy_ldadd)
-ginstall_LDADD += $(copy_ldadd)
-mv_LDADD += $(copy_ldadd)
+src_cp_LDADD += $(copy_ldadd)
+src_ginstall_LDADD += $(copy_ldadd)
+src_mv_LDADD += $(copy_ldadd)
 
-mv_LDADD += $(remove_ldadd)
-rm_LDADD += $(remove_ldadd)
+src_mv_LDADD += $(remove_ldadd)
+src_rm_LDADD += $(remove_ldadd)
 
 # for eaccess, euidaccess
 copy_ldadd += $(LIB_EACCESS)
 remove_ldadd += $(LIB_EACCESS)
-sort_LDADD += $(LIB_EACCESS)
-test_LDADD += $(LIB_EACCESS)
+src_sort_LDADD += $(LIB_EACCESS)
+src_test_LDADD += $(LIB_EACCESS)
 
 # for selinux use
 copy_ldadd += $(LIB_SELINUX)
-chcon_LDADD += $(LIB_SELINUX)
-ginstall_LDADD += $(LIB_SELINUX)
-id_LDADD += $(LIB_SELINUX)
-ls_LDADD += $(LIB_SELINUX)
-mkdir_LDADD += $(LIB_SELINUX)
-mkfifo_LDADD += $(LIB_SELINUX)
-mknod_LDADD += $(LIB_SELINUX)
-runcon_LDADD += $(LIB_SELINUX)
-stat_LDADD += $(LIB_SELINUX)
+src_chcon_LDADD += $(LIB_SELINUX)
+src_ginstall_LDADD += $(LIB_SELINUX)
+src_id_LDADD += $(LIB_SELINUX)
+src_ls_LDADD += $(LIB_SELINUX)
+src_mkdir_LDADD += $(LIB_SELINUX)
+src_mkfifo_LDADD += $(LIB_SELINUX)
+src_mknod_LDADD += $(LIB_SELINUX)
+src_runcon_LDADD += $(LIB_SELINUX)
+src_stat_LDADD += $(LIB_SELINUX)
 
 # for gettime, settime, utimecmp, utimens
 copy_ldadd += $(LIB_CLOCK_GETTIME)
-date_LDADD += $(LIB_CLOCK_GETTIME)
-ginstall_LDADD += $(LIB_CLOCK_GETTIME)
-ls_LDADD += $(LIB_CLOCK_GETTIME)
-pr_LDADD += $(LIB_CLOCK_GETTIME)
-timeout_LDADD += $(LIB_TIMER_TIME)
-touch_LDADD += $(LIB_CLOCK_GETTIME)
+src_date_LDADD += $(LIB_CLOCK_GETTIME)
+src_ginstall_LDADD += $(LIB_CLOCK_GETTIME)
+src_ls_LDADD += $(LIB_CLOCK_GETTIME)
+src_pr_LDADD += $(LIB_CLOCK_GETTIME)
+src_timeout_LDADD += $(LIB_TIMER_TIME)
+src_touch_LDADD += $(LIB_CLOCK_GETTIME)
 
 # for gethrxtime
-dd_LDADD += $(LIB_GETHRXTIME)
+src_dd_LDADD += $(LIB_GETHRXTIME)
 
 # for cap_get_file
-ls_LDADD += $(LIB_CAP)
+src_ls_LDADD += $(LIB_CAP)
 
 # for fdatasync
-dd_LDADD += $(LIB_FDATASYNC)
-shred_LDADD += $(LIB_FDATASYNC)
+src_dd_LDADD += $(LIB_FDATASYNC)
+src_shred_LDADD += $(LIB_FDATASYNC)
 
 # for xnanosleep
-sleep_LDADD += $(LIB_NANOSLEEP)
-sort_LDADD += $(LIB_NANOSLEEP)
-tail_LDADD += $(LIB_NANOSLEEP)
+src_sleep_LDADD += $(LIB_NANOSLEEP)
+src_sort_LDADD += $(LIB_NANOSLEEP)
+src_tail_LDADD += $(LIB_NANOSLEEP)
 
 # for various GMP functions
-expr_LDADD += $(LIB_GMP)
-factor_LDADD += $(LIB_GMP)
+src_expr_LDADD += $(LIB_GMP)
+src_factor_LDADD += $(LIB_GMP)
 
 # for getloadavg
-uptime_LDADD += $(GETLOADAVG_LIBS)
+src_uptime_LDADD += $(GETLOADAVG_LIBS)
 
 # for various ACL functions
 copy_ldadd += $(LIB_ACL)
-ls_LDADD += $(LIB_ACL)
+src_ls_LDADD += $(LIB_ACL)
 
 # for various xattr functions
 copy_ldadd += $(LIB_XATTR)
 
 # for print_unicode_char, proper_name_utf8
-cat_LDADD += $(LIBICONV)
-cp_LDADD += $(LIBICONV)
-df_LDADD += $(LIBICONV)
-du_LDADD += $(LIBICONV)
-getlimits_LDADD += $(LIBICONV)
-printf_LDADD += $(LIBICONV)
-ptx_LDADD += $(LIBICONV)
-realpath_LDADD += $(LIBICONV)
-split_LDADD += $(LIBICONV)
-stdbuf_LDADD += $(LIBICONV)
-timeout_LDADD += $(LIBICONV)
-truncate_LDADD += $(LIBICONV)
+src_cat_LDADD += $(LIBICONV)
+src_cp_LDADD += $(LIBICONV)
+src_df_LDADD += $(LIBICONV)
+src_du_LDADD += $(LIBICONV)
+src_getlimits_LDADD += $(LIBICONV)
+src_printf_LDADD += $(LIBICONV)
+src_ptx_LDADD += $(LIBICONV)
+src_realpath_LDADD += $(LIBICONV)
+src_split_LDADD += $(LIBICONV)
+src_stdbuf_LDADD += $(LIBICONV)
+src_timeout_LDADD += $(LIBICONV)
+src_truncate_LDADD += $(LIBICONV)
 
 # for canon_host
-pinky_LDADD += $(GETADDRINFO_LIB)
-who_LDADD += $(GETADDRINFO_LIB)
+src_pinky_LDADD += $(GETADDRINFO_LIB)
+src_who_LDADD += $(GETADDRINFO_LIB)
 
 # for gethostname, uname
-hostname_LDADD += $(GETHOSTNAME_LIB)
-uname_LDADD += $(GETHOSTNAME_LIB)
+src_hostname_LDADD += $(GETHOSTNAME_LIB)
+src_uname_LDADD += $(GETHOSTNAME_LIB)
 
 # for strsignal
-kill_LDADD += $(LIBTHREAD)
+src_kill_LDADD += $(LIBTHREAD)
 
 # for pthread
-sort_LDADD += $(LIB_PTHREAD)
+src_sort_LDADD += $(LIB_PTHREAD)
 
-$(PROGRAMS): ../lib/libcoreutils.a
+$(PROGRAMS): lib/libcoreutils.a
 
-# Get the release year from ../lib/version-etc.c.
+# Get the release year from lib/version-etc.c.
 RELEASE_YEAR = \
   `sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \
     $(top_srcdir)/lib/version-etc.c`
 
-copy_sources = copy.c cp-hash.c extent-scan.c extent-scan.h
+copy_sources = \
+  src/copy.c \
+  src/cp-hash.c \
+  src/extent-scan.c \
+  src/extent-scan.h
 
 # Use 'ginstall' in the definition of PROGRAMS and in dependencies to avoid
 # confusion with the 'install' target.  The install rule transforms 'ginstall'
 # to install before applying any user-specified name transformations.
 
 transform = s/ginstall/install/; $(program_transform_name)
-ginstall_SOURCES = install.c prog-fprintf.c $(copy_sources)
-
-# This is for the '[' program.  Automake transliterates '[' to '_'.
-__SOURCES = lbracket.c
-
-cp_SOURCES = cp.c $(copy_sources)
-dir_SOURCES = ls.c ls-dir.c
-vdir_SOURCES = ls.c ls-vdir.c
-id_SOURCES = id.c group-list.c
-groups_SOURCES = groups.c group-list.c
-ls_SOURCES = ls.c ls-ls.c
-ln_SOURCES = ln.c relpath.c relpath.h
-chown_SOURCES = chown.c chown-core.c
-chgrp_SOURCES = chgrp.c chown-core.c
-kill_SOURCES = kill.c operand2sig.c
-realpath_SOURCES = realpath.c relpath.c relpath.h
-timeout_SOURCES = timeout.c operand2sig.c
-
-mv_SOURCES = mv.c remove.c $(copy_sources)
-rm_SOURCES = rm.c remove.c
-
-mkdir_SOURCES = mkdir.c prog-fprintf.c
-rmdir_SOURCES = rmdir.c prog-fprintf.c
-
-df_SOURCES = df.c find-mount-point.c
-stat_SOURCES = stat.c find-mount-point.c
-
-uname_SOURCES = uname.c uname-uname.c
-arch_SOURCES = uname.c uname-arch.c
-
-md5sum_CPPFLAGS = -DHASH_ALGO_MD5=1 $(AM_CPPFLAGS)
-sha1sum_SOURCES = md5sum.c
-sha1sum_CPPFLAGS = -DHASH_ALGO_SHA1=1 $(AM_CPPFLAGS)
-sha224sum_SOURCES = md5sum.c
-sha224sum_CPPFLAGS = -DHASH_ALGO_SHA224=1 $(AM_CPPFLAGS)
-sha256sum_SOURCES = md5sum.c
-sha256sum_CPPFLAGS = -DHASH_ALGO_SHA256=1 $(AM_CPPFLAGS)
-sha384sum_SOURCES = md5sum.c
-sha384sum_CPPFLAGS = -DHASH_ALGO_SHA384=1 $(AM_CPPFLAGS)
-sha512sum_SOURCES = md5sum.c
-sha512sum_CPPFLAGS = -DHASH_ALGO_SHA512=1 $(AM_CPPFLAGS)
-
-ginstall_CPPFLAGS = -DENABLE_MATCHPATHCON=1 $(AM_CPPFLAGS)
+src_ginstall_SOURCES = src/install.c src/prog-fprintf.c $(copy_sources)
+
+# This is for the '[' program.  Automake transliterates '[' and '/' to '_'.
+src___SOURCES = src/lbracket.c
+
+src_cp_SOURCES = src/cp.c $(copy_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
+src_groups_SOURCES = src/groups.c src/group-list.c
+src_ls_SOURCES = src/ls.c src/ls-ls.c
+src_ln_SOURCES = src/ln.c src/relpath.c src/relpath.h
+src_chown_SOURCES = src/chown.c src/chown-core.c
+src_chgrp_SOURCES = src/chgrp.c src/chown-core.c
+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_rm_SOURCES = src/rm.c src/remove.c
+
+src_mkdir_SOURCES = src/mkdir.c src/prog-fprintf.c
+src_rmdir_SOURCES = src/rmdir.c src/prog-fprintf.c
+
+src_df_SOURCES = src/df.c src/find-mount-point.c
+src_stat_SOURCES = src/stat.c src/find-mount-point.c
+
+src_uname_SOURCES = src/uname.c src/uname-uname.c
+src_arch_SOURCES = src/uname.c src/uname-arch.c
+
+src_md5sum_CPPFLAGS = -DHASH_ALGO_MD5=1 $(AM_CPPFLAGS)
+src_sha1sum_SOURCES = src/md5sum.c
+src_sha1sum_CPPFLAGS = -DHASH_ALGO_SHA1=1 $(AM_CPPFLAGS)
+src_sha224sum_SOURCES = src/md5sum.c
+src_sha224sum_CPPFLAGS = -DHASH_ALGO_SHA224=1 $(AM_CPPFLAGS)
+src_sha256sum_SOURCES = src/md5sum.c
+src_sha256sum_CPPFLAGS = -DHASH_ALGO_SHA256=1 $(AM_CPPFLAGS)
+src_sha384sum_SOURCES = src/md5sum.c
+src_sha384sum_CPPFLAGS = -DHASH_ALGO_SHA384=1 $(AM_CPPFLAGS)
+src_sha512sum_SOURCES = src/md5sum.c
+src_sha512sum_CPPFLAGS = -DHASH_ALGO_SHA512=1 $(AM_CPPFLAGS)
+
+src_ginstall_CPPFLAGS = -DENABLE_MATCHPATHCON=1 $(AM_CPPFLAGS)
 
 # Ensure we don't link against libcoreutils.a as that lib is
 # not compiled with -fPIC which causes issues on 64 bit at least
-libstdbuf_so_LDADD =
+src_libstdbuf_so_LDADD =
 
 # Note libstdbuf is only compiled if GCC is available
 # (as per the check in configure.ac), so these flags should be available.
 # libtool is probably required to relax this dependency.
-libstdbuf_so_LDFLAGS = -shared
-libstdbuf_so_CFLAGS = -fPIC $(AM_CFLAGS)
+src_libstdbuf_so_LDFLAGS = -shared
+src_libstdbuf_so_CFLAGS = -fPIC $(AM_CFLAGS)
 
-BUILT_SOURCES += dircolors.h
-dircolors.h: dcgen dircolors.hin
+BUILT_SOURCES += src/dircolors.h
+src/dircolors.h: src/dcgen src/dircolors.hin
 	$(AM_V_GEN)rm -f $@ $@-t
-	$(AM_V_at)$(PERL) -w -- $(srcdir)/dcgen $(srcdir)/dircolors.hin > $@-t
+	$(AM_V_at)$(PERL) -w -- $(srcdir)/src/dcgen \
+	                        $(srcdir)/src/dircolors.hin > $@-t
 	$(AM_V_at)chmod a-w $@-t
 	$(AM_V_at)mv $@-t $@
 
 wheel_size = 5
 
-BUILT_SOURCES += wheel-size.h
-wheel-size.h: Makefile.am
+BUILT_SOURCES += src/wheel-size.h
+src/wheel-size.h: Makefile.am
 	$(AM_V_GEN)rm -f $@ $@-t
 	$(AM_V_at)echo '#define WHEEL_SIZE $(wheel_size)' > $@-t
 	$(AM_V_at)chmod a-w $@-t
 	$(AM_V_at)mv $@-t $@
 
-BUILT_SOURCES += wheel.h
-wheel.h: wheel-gen.pl Makefile.am
+BUILT_SOURCES += src/wheel.h
+src/wheel.h: src/wheel-gen.pl Makefile.am
 	$(AM_V_GEN)rm -f $@ $@-t
-	$(AM_V_at)$(srcdir)/wheel-gen.pl $(wheel_size) > $@-t
+	$(AM_V_at)$(srcdir)/src/wheel-gen.pl $(wheel_size) > $@-t
 	$(AM_V_at)chmod a-w $@-t
 	$(AM_V_at)mv $@-t $@
 
 # false exits nonzero even with --help or --version.
 # test doesn't support --help or --version.
 # Tell automake to exempt then from that installcheck test.
-AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = false test
+AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = src/false src/test
 
 # Compare fs.h with the list of file system names/magic-numbers in the
 # Linux statfs man page.  This target prints any new name/number pairs.
 # Also compare against /usr/include/linux/magic.h
-.PHONY: fs-magic-compare
-fs-magic-compare: fs-magic fs-kernel-magic fs-def
-	join -v1 -t@ fs-magic fs-def
-	join -v1 -t@ fs-kernel-magic fs-def
+.PHONY: src/fs-magic-compare
+src/fs-magic-compare: src/fs-magic src/fs-kernel-magic src/fs-def
+	join -v1 -t@ src/fs-magic src/fs-def
+	join -v1 -t@ src/fs-kernel-magic src/fs-def
 
-CLEANFILES += fs-def
-fs-def: fs.h
-	grep '^# *define ' fs.h | $(ASSORT) > $@-t && mv $@-t $@
+CLEANFILES += src/fs-def
+src/fs-def: src/fs.h
+	grep '^# *define ' src/fs.h | $(ASSORT) > $@-t && mv $@-t $@
 
 # Massage bits of the statfs man page and definitions from
 # /usr/include/linux/magic.h to be in a form consistent with what's in fs.h.
@@ -416,8 +427,8 @@ fs_normalize_perl_subst =			\
   -e 's/^/\043 define S_MAGIC_/;'		\
   -e 's,\s*/\* .*? \*/,,;'
 
-CLEANFILES += fs-magic
-fs-magic: Makefile
+CLEANFILES += src/fs-magic
+src/fs-magic: Makefile
 	man statfs \
 	  |perl -ne '/File system types:/.../Nobody kno/ and print'	\
 	  |grep 0x | perl -p						\
@@ -426,8 +437,8 @@ fs-magic: Makefile
 	  | $(ASSORT)							\
 	  > $@-t && mv $@-t $@
 
-CLEANFILES += fs-kernel-magic
-fs-kernel-magic: Makefile
+CLEANFILES += src/fs-kernel-magic
+src/fs-kernel-magic: Makefile
 	perl -ne '/^#define.*0x/ and print' /usr/include/linux/magic.h	\
 	  | perl -p							\
 	    $(fs_normalize_perl_subst)					\
@@ -435,52 +446,49 @@ fs-kernel-magic: Makefile
 	  | $(ASSORT)							\
 	  > $@-t && mv $@-t $@
 
-BUILT_SOURCES += fs-is-local.h
-fs-is-local.h: stat.c extract-magic
+BUILT_SOURCES += src/fs-is-local.h
+src/fs-is-local.h: src/stat.c src/extract-magic
 	$(AM_V_GEN)rm -f $@
-	$(AM_V_at)$(PERL) $(srcdir)/extract-magic --local $(srcdir)/stat.c \
-	  > $@t
+	$(AM_V_at)$(PERL) $(srcdir)/src/extract-magic \
+	                  --local $(srcdir)/src/stat.c > $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
 
-BUILT_SOURCES += fs.h
-fs.h: stat.c extract-magic
+BUILT_SOURCES += src/fs.h
+src/fs.h: src/stat.c src/extract-magic
 	$(AM_V_GEN)rm -f $@
-	$(AM_V_at)$(PERL) $(srcdir)/extract-magic $(srcdir)/stat.c > $@t
+	$(AM_V_at)$(PERL) $(srcdir)/src/extract-magic \
+	                  $(srcdir)/src/stat.c > $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
 
-BUILT_SOURCES += version.c
-version.c: Makefile
+BUILT_SOURCES += src/version.c
+src/version.c: Makefile
 	$(AM_V_GEN)rm -f $@
 	$(AM_V_at)printf '#include <config.h>\n' > $@t
 	$(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
 
-BUILT_SOURCES += version.h
-version.h: Makefile
+BUILT_SOURCES += src/version.h
+src/version.h: Makefile
 	$(AM_V_GEN)rm -f $@
 	$(AM_V_at)printf 'extern char const *Version;\n' > $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
 
-DISTCLEANFILES = version.c version.h
-MAINTAINERCLEANFILES = $(BUILT_SOURCES)
-
-# Sort in traditional ASCII order, regardless of the current locale;
-# otherwise we may get into trouble with distinct strings that the
-# current locale considers to be equal.
-ASSORT = LC_ALL=C sort
+DISTCLEANFILES += src/version.c src/version.h
+MAINTAINERCLEANFILES += $(BUILT_SOURCES)
 
 all_programs = \
     $(bin_PROGRAMS) \
     $(bin_SCRIPTS) \
-  $(EXTRA_PROGRAMS)
+    $(EXTRA_PROGRAMS)
 
 built_programs.list:
 	@echo $(bin_PROGRAMS) $(bin_SCRIPTS) | tr ' ' '\n' \
-	  | sed -e 's,$(EXEEXT)$$,,' | $(ASSORT) -u | tr '\n' ' '
+	  | sed -e 's,$(EXEEXT)$$,,' -e 's,^src/,,' \
+	  | $(ASSORT) -u | tr '\n' ' '
 
 all_programs.list:
 	@echo $(all_programs) | tr ' ' '\n' | sed -e 's,$(EXEEXT)$$,,' \
@@ -492,11 +500,6 @@ all_programs.list:
 # install a binary, require that all programs be built at distribution time.
 dist-hook: $(all_programs)
 
-# Ensure that all programs are built so we can for example
-# subsequently syntax check all man pages.
-.PHONY: all_programs
-all_programs: $(all_programs)
-
 pm = progs-makefile
 pr = progs-readme
 # Ensure that the list of programs in README matches the list
@@ -506,7 +509,10 @@ check: check-README check-duplicate-no-install
 check-README:
 	$(AM_V_GEN)rm -rf $(pr) $(pm)
 	$(AM_V_at)echo $(all_programs) \
-	 | tr -s ' ' '\n' | sed -e 's,$(EXEEXT)$$,,;s/ginstall/install/' \
+	 | tr -s ' ' '\n' \
+	 | sed -e 's,$(EXEEXT)$$,,' \
+	       -e 's,^src/,,' \
+	       -e 's/^ginstall$$/install/' \
 	 | sed /libstdbuf/d \
 	 | $(ASSORT) -u > $(pm) && \
 	sed -n '/^The programs .* are:/,/^[a-zA-Z]/p' $(top_srcdir)/README \
@@ -518,8 +524,8 @@ check-README:
 # entry, because if that were to happen, it *would* be installed
 # by default.
 .PHONY: check-duplicate-no-install
-check-duplicate-no-install: tr
-	$(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)'| ./tr ' ' '\n' | uniq -d`"
+check-duplicate-no-install: src/tr
+	$(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)' | tr ' ' '\n' | uniq -d`"
 
 # Ensure that the list of programs and author names is accurate.
 # We need a UTF8 locale.  If a lack of locale support or a missing
@@ -533,7 +539,8 @@ _sc_check-AUTHORS: $(all_programs)
 	    | grep ' Torbjorn '	> /dev/null		\
 	  && { echo "$@: skipping this check"; exit 0; }; \
 	rm -f $(au_actual) $(au_dotdot);		\
-	for i in `ls $(all_programs) | sed -e 's,$(EXEEXT)$$,,' \
+	for i in `ls $(all_programs)			\
+	    | sed -e 's,^src/,,' -e 's,$(EXEEXT)$$,,'	\
 	    | sed /libstdbuf/d				\
 	    | $(ASSORT) -u`; do				\
 	  test "$$i" = '[' && continue;			\
@@ -551,10 +558,10 @@ _sc_check-AUTHORS: $(all_programs)
 	sed -n '/^[^ ][^ ]*:/p' $(top_srcdir)/AUTHORS > $(au_dotdot) && \
 	diff $(au_actual) $(au_dotdot) && rm -f $(au_actual) $(au_dotdot)
 
-# Use the just-built ./ginstall, when not cross-compiling.
+# Use the just-built 'ginstall', when not cross-compiling.
 if CROSS_COMPILING
 cu_install_program = @INSTALL_PROGRAM@
 else
-cu_install_program = ./ginstall
+cu_install_program = src/ginstall
 endif
 INSTALL_PROGRAM = $(cu_install_program)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d8dee57..54f1e08 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -40,10 +40,10 @@ check: vc_exe_in_TESTS
 CLEANFILES =
 CLEANFILES += .built-programs
 check_DATA = .built-programs
-.built-programs: $(top_srcdir)/src/Makefile.am
-	$(AM_V_GEN)(cd $(top_builddir)/src				\
+.built-programs: $(top_srcdir)/Makefile.am
+	$(AM_V_GEN)(cd $(top_builddir)					\
             && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
-          > $@-t && mv $@-t $@
+          | sed s,^src/,, > $@-t && mv $@-t $@
 
 TEST_EXTENSIONS = .sh .pl .xpl
 
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 11:47:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7TRZ-0001o1-GH
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 11:47:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40711)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRR-0001eu-PB
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRO-0004Pw-Az
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:29 -0400
Received: from mail-wg0-f41.google.com ([74.125.82.41]:51148)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRO-0004Pa-0L
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:26 -0400
Received: by wgbds1 with SMTP id ds1so836213wgb.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 08:47:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=X4XY6Ida5TekXx8ZFbXkZp7i24bBxiiBCObaxPItUiM=;
	b=uJeXWiWRzNzBqXW3lCsc9M0wX3IF8RVSvDFfg6Pn5sNrtbPjlvyUAamGBwas3cC5FG
	kkwEnsToNei14ISbKa08j+66sNebemzCcsAGy20c5CpyYxZeSvcj2tDPR1UXHTQbkzqk
	nFM9BtbosBfA3jxz5pBgO0ZThmJ78LnnC1czVs9Uc8qAQk1BnxGtLWYr00z7BTwqFkdn
	qQRTiSRFC0z6BCH+IcAgokgPMAh4NY2GZIspOM6rHUh+xv4CBWvHOuO9HY55GhfRJ2AH
	XppUxI4J3MBIV18RCV0qnHsi6q0VHYps4XvpDF4743JwiSic2lmVGeZPtxaRznvKBhdV
	ujAg==
Received: by 10.216.123.69 with SMTP id u47mr5251038weh.89.1346428044908;
	Fri, 31 Aug 2012 08:47:24 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id q4sm1469213wix.9.2012.08.31.08.47.23
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 08:47:24 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH v2 2/9] build: refactor how lists of coreutils programs are
	defined
Date: Fri, 31 Aug 2012 17:46:38 +0200
Message-Id: <7f14d80067973b2e9d02a9b30ecadaf4a161a0ba.1346427900.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <cover.1346427900.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.41
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 15:47:36 -0000

This is in preparation of future changes.  Still, this patch
leaves the build system in a better shape; true, with more
indirections, but also with less convoluted and brittle hacks.

Unfortunately, this commit also makes some rebuild rules
incomplete; that will son be fixed by follow-up patches.

* build-aux/gen-lists-of-programs.sh: New, generates autoconf
and automake input fragments that define "lists" of all coreutils
programs, with further distinctions about how and when these
programs should be built (by default; if the system is capable
enough; only if the user ask for them explicitly).  This is
useful to avoid duplicating the definitions of these list among
several files (at least 'configure.ac' 'src/Makefile.am'); such
duplication had proved a source of inconsistencies and bugs in
the past.  And the pre-existing way to avoid such duplication,
as implemented in 'configure.ac' before this patch, was overly
complex and brittle.
* Makefile.am (EXTRA_DIST): Distribute the new script.
* bootstrap.conf (bootstrap_post_import_hook): Run the new script
to generate 'm4/cu-progs.m4' and 'src/cu-progs.mk'.
* .gitignore: Ignore those files.
* configure.ac: Include 'm4/cu-progs.m4', and decidedly simplify
most of the programs' lists definition and processing accordingly.
* src/Makefile.am: Similarly include 'src/cu-progs.mk', containing
definition of variables $(default__progs), $(no_install__progs)
and $(build_if_possible__progs). Accordingly ...
(no_install__progs, build_if_possible__progs): ... remove.
(EXTRA_DIST): Adjust definition.
Adjust a comment.
---
 .gitignore                         |   2 +
 Makefile.am                        |   1 +
 bootstrap.conf                     |   6 +-
 build-aux/gen-lists-of-programs.sh | 186 +++++++++++++++++++++++++++++++++++++
 configure.ac                       |  62 ++-----------
 src/Makefile.am                    | 125 ++-----------------------
 6 files changed, 212 insertions(+), 170 deletions(-)
 create mode 100755 build-aux/gen-lists-of-programs.sh

diff --git a/.gitignore b/.gitignore
index aad59bd..56a9bf4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -96,6 +96,7 @@
 /m4/.cvsignore
 /m4/.gitignore
 /m4/codeset.m4
+/m4/cu-progs.m4
 /m4/fcntl-o.m4
 /m4/gettext.m4
 /m4/glibc2.m4
@@ -150,6 +151,7 @@
 /po/remove-potcdate.sed
 /po/remove-potcdate.sin
 /po/stamp-po
+/src/cu-progs.mk
 /src/version.c
 /src/version.h
 /stamp-h1
diff --git a/Makefile.am b/Makefile.am
index b47b1c1..f3d6eda 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,6 +49,7 @@ EXTRA_DIST =				\
   THANKStt.in				\
   bootstrap				\
   bootstrap.conf			\
+  build-aux/gen-lists-of-programs.sh	\
   cfg.mk				\
   dist-check.mk				\
   maint.mk				\
diff --git a/bootstrap.conf b/bootstrap.conf
index 4fc4e67..4ef3fc8 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -327,7 +327,11 @@ xz         -
 bootstrap_post_import_hook ()
 {
   # Automake requires that ChangeLog exist.
-  touch ChangeLog || exit 1
+  touch ChangeLog || return 1
+  # List of coreutils programs.  See heading comments in the invoked
+  # script for more info.
+  build-aux/gen-lists-of-programs.sh --autoconf >m4/cu-progs.m4  || return 1
+  build-aux/gen-lists-of-programs.sh --automake >src/cu-progs.mk || return 1
 }
 
 bootstrap_epilogue()
diff --git a/build-aux/gen-lists-of-programs.sh b/build-aux/gen-lists-of-programs.sh
new file mode 100755
index 0000000..ec43ee8
--- /dev/null
+++ b/build-aux/gen-lists-of-programs.sh
@@ -0,0 +1,186 @@
+#!/bin/sh
+# Generate lists of all coreutils programs, to be fed both to Autoconf
+# and Automake, and with further distinctions about how and when these
+# programs should be built.  This is useful to avoid duplicating the
+# definitions of these list among several files ('configure.ac' and
+# 'src/Makefile.am' at least); such duplication had proved a source of
+# inconsistencies and bugs in the past.
+
+set -u
+set -e
+
+# These are the names of programs that are not built nor installed
+# by default.  This list is *not* intended for programs like 'who',
+# 'nice', 'chroot', etc., that are built only when certain requisite
+# system features are detected.
+# Hence, if the user wants to install programs from this list anyway,
+# say A and B, he'll have to use "--enable-install-program=A,B" when
+# invoking configure.
+disabled_by_default_progs='
+    arch
+    hostname
+'
+
+# Programs that can be built only when certain requisite system
+# features are detected.  These prerequisites will be looked for
+# at configure runtime.
+build_if_possible_progs='
+    chroot
+    df
+    hostid
+    libstdbuf.so
+    nice
+    pinky
+    stdbuf
+    stty
+    uptime
+    users
+    who
+'
+
+# All the other programs, to be built by default, and that should
+# be buildable without problems on any target system.
+normal_progs='
+    [
+    base64
+    basename
+    cat
+    chcon
+    chgrp
+    chmod
+    chown
+    cksum
+    comm
+    cp
+    csplit
+    cut
+    date
+    dd
+    dir
+    dircolors
+    dirname
+    du
+    echo
+    env
+    expand
+    expr
+    factor
+    false
+    fmt
+    fold
+    ginstall
+    groups
+    head
+    id
+    join
+    kill
+    link
+    ln
+    logname
+    ls
+    md5sum
+    mkdir
+    mkfifo
+    mknod
+    mktemp
+    mv
+    nl
+    nproc
+    nohup
+    od
+    paste
+    pathchk
+    pr
+    printenv
+    printf
+    ptx
+    pwd
+    readlink
+    realpath
+    rm
+    rmdir
+    runcon
+    seq
+    sha1sum
+    sha224sum
+    sha256sum
+    sha384sum
+    sha512sum
+    shred
+    shuf
+    sleep
+    sort
+    split
+    stat
+    sum
+    sync
+    tac
+    tail
+    tee
+    test
+    timeout
+    touch
+    tr
+    true
+    truncate
+    tsort
+    tty
+    uname
+    unexpand
+    uniq
+    unlink
+    vdir
+    wc
+    whoami
+    yes
+'
+
+me=`echo "$0" | sed 's,.*/,,'`
+msg="Automatically generated by $me.  DO NOT EDIT BY HAND!"
+
+case $#,$1 in
+  1,--autoconf|1,--for-autoconf)
+    echo "dnl $msg"
+    for p in $normal_progs; do
+      test x"$p" = x"[" && p='@<:@'
+      echo "gl_ADD_PROG([optional_bin_progs], [$p])"
+    done
+    # Extra 'echo' to normalize whitespace.
+    echo "no_install_progs_default='`echo $disabled_by_default_progs`'"
+    sed 's/^ *//' <<END
+        # Given the name of a variable containing a space-separated
+        # list of install-by-default programs and the actual list
+        # do-not-install-by-default programs, modify the former variable
+        # to reflect any "do-install" and "don't-install" requests.
+        # That is, add any program specified via --enable-install-program,
+        # and remove any program specified via --enable-no-install-program.
+        # Note how the second argument below is a literal, with ","
+        # separators.  That is required due to the way the macro works,
+        # and since the corresponding ./configure option argument is
+        # comma-separated on input.
+        gl_INCLUDE_EXCLUDE_PROG([optional_bin_progs], [`\
+          echo $disabled_by_default_progs \
+                                    | sed 's/ /,/g'`])
+END
+    ;;
+  1,--automake|1,--for-automake)
+    echo "## $msg"
+    echo no_install__progs =
+    for p in $disabled_by_default_progs; do
+      echo no_install__progs += $p
+    done
+    echo build_if_possible__progs =
+    for p in $build_if_possible_progs; do
+      echo build_if_possible__progs += $p
+    done
+    echo default__progs =
+    for p in $normal_progs; do
+      echo default__progs += $p
+    done
+    ;;
+  *)
+    echo "$0: invalid usage" >&2; exit 2
+    ;;
+esac
+
+exit 0
diff --git a/configure.ac b/configure.ac
index 083fd34..ca038c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -407,55 +407,13 @@ if test "$elf_sys" = "yes" && \
 fi
 
 ############################################################################
-mk="$srcdir/src/Makefile.am"
-# Extract all literal names from the definition of $(EXTRA_PROGRAMS)
-# in $mk but don't expand the variable references.
-# Append each literal name to $optional_bin_progs.
-v=EXTRA_PROGRAMS
-for gl_i in `sed -n '/^'$v' =/,/[[^\]]$/p' $mk \
-    | sed 's/^  *//;/^\$.*/d;/^'$v' =/d' \
-    | tr -s '\\015\\012\\\\' '   '`; do
-  gl_ADD_PROG([optional_bin_progs], $gl_i)
-done
-
-# As above, extract literal names from the definition of $(no_install__progs)
-# in $mk but don't expand the variable references.
-v=no_install__progs
-t=`sed -n '/^'$v' =/,/[[^\]]$/p' $mk \
-    | sed 's/^  *//;/^\$.*/d;/^'$v' =/d' \
-    | tr -s '\\015\\012\\\\' '   '`
-# Remove any trailing space.
-no_install_progs_default=`echo "$t"|sed 's/ $//'`
-
-# Unfortunately, due to the way autoconf's AS_HELP_STRING works, the list
-# of default-not-installed programs, "arch hostname", must appear in two
-# places: in this file below, and in $mk.  Using "$no_install_progs_default"
-# below cannot work.  And we can't substitute the names into $mk because
-# automake needs the literals, too.
-# The compromise is to ensure that the space-separated list extracted
-# above matches the literal 2nd argument below.
-c="$srcdir/configure.ac"
-re='^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])'
-t=`sed -n '/'"$re"'/{s/'"$re"'/\1/;s/,/ /gp
-}' $c`
-case $t in
-  $no_install_progs_default) ;;
-  *) AC_MSG_ERROR([[internal error: g'l_INCLUDE_EXCLUDE_PROG's 2nd arg, $t,
-                   does not match the list of default-not-installed programs
-                   ($no_install_progs_default) also recorded in $mk]],
-                   1) ;;
-esac
 
-# Given the name of a variable containing a space-separated list of
-# install-by-default programs and the actual list do-not-install-by-default
-# programs, modify the former variable to reflect any "do-install" and
-# "don't-install" requests.
-# I.e., add any program name specified via --enable-install-program=..., and
-# remove any program name specified via --enable-no-install-program=...
-# Note how the second argument below is a literal, with "," separators.
-# That is required due to the way the macro works, and since the
-# corresponding ./configure option argument is comma-separated on input.
-gl_INCLUDE_EXCLUDE_PROG([optional_bin_progs], [arch,hostname])
+dnl Autogenerated by the 'gen-lists-of-programs.sh' auxiliary script.
+dnl Issue proper calls to the macros gl_INCLUDE_EXCLUDE_PROG and
+dnl gl_ADD_PROG (updating $optional_bin_progs), and generate the list
+dnl of coreutils programs to be built only upon explicit user request,
+dnl saving that list in the $no_install_progs_default shell variable.
+m4_include([m4/cu-progs.m4])
 
 # Now that we know which programs will actually be built up, figure out
 # which optional helper progs should be compiled.
@@ -478,19 +436,15 @@ MAN=`
 # Normalize whitespace.
 MAN=`echo $MAN`
 
+NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
+AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
 OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
 AC_SUBST([OPTIONAL_BIN_PROGS])
 OPTIONAL_PKGLIB_PROGS=`echo "$optional_pkglib_progs " | sed 's/ $//'`
 AC_SUBST([OPTIONAL_PKGLIB_PROGS])
-NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
-AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
 
 AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
 
-# Arrange to rerun configure whenever the file, src/Makefile.am,
-# containing the list of program names changes.
-CONFIG_STATUS_DEPENDENCIES='$(top_srcdir)/src/Makefile.am'
-AC_SUBST([CONFIG_STATUS_DEPENDENCIES])
 ############################################################################
 
 # As long as "grep 'PRI[diouxX]' po/*.pot" reports matches in
diff --git a/src/Makefile.am b/src/Makefile.am
index 9be3acf..3b0ef65 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,124 +15,18 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# These are the names of programs that are not installed by default.
-# This list is *not* intended for programs like who, nice, chroot, etc.,
-# that are built only when certain requisite system features are detected.
-# Hence, if you want to install programs from this list anyway, say A and B,
-# use --enable-install-program=A,B
-no_install__progs = \
-  arch hostname
-
-build_if_possible__progs = \
-  chroot	\
-  df		\
-  hostid	\
-  libstdbuf.so	\
-  nice		\
-  pinky		\
-  stdbuf	\
-  stty		\
-  uptime	\
-  users		\
-  who
-
 AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
 
+# The list of all programs (separated in different variables to express
+# the how and when they should be installed) is defined in this makefile
+# fragment, autogenerated by the 'gen-lists-of-programs.sh' auxiliary
+# script.
+include $(srcdir)/cu-progs.mk
+
 EXTRA_PROGRAMS = \
   $(no_install__progs) \
   $(build_if_possible__progs) \
-  [		\
-  base64	\
-  basename	\
-  cat		\
-  chcon		\
-  chgrp		\
-  chmod		\
-  chown		\
-  cksum		\
-  comm		\
-  cp		\
-  csplit	\
-  cut		\
-  date		\
-  dd		\
-  dir		\
-  dircolors	\
-  dirname	\
-  du		\
-  echo		\
-  env		\
-  expand	\
-  expr		\
-  factor	\
-  false		\
-  fmt		\
-  fold		\
-  ginstall	\
-  groups	\
-  head		\
-  id		\
-  join		\
-  kill		\
-  link		\
-  ln		\
-  logname	\
-  ls		\
-  md5sum	\
-  mkdir		\
-  mkfifo	\
-  mknod		\
-  mktemp	\
-  mv		\
-  nl		\
-  nproc		\
-  nohup		\
-  od		\
-  paste		\
-  pathchk	\
-  pr		\
-  printenv	\
-  printf	\
-  ptx		\
-  pwd		\
-  readlink	\
-  realpath	\
-  rm		\
-  rmdir		\
-  runcon	\
-  seq		\
-  sha1sum	\
-  sha224sum	\
-  sha256sum	\
-  sha384sum	\
-  sha512sum	\
-  shred		\
-  shuf		\
-  sleep		\
-  sort		\
-  split		\
-  stat		\
-  sum		\
-  sync		\
-  tac		\
-  tail		\
-  tee		\
-  test		\
-  timeout	\
-  touch		\
-  tr		\
-  true		\
-  truncate	\
-  tsort		\
-  tty		\
-  uname		\
-  unexpand	\
-  uniq		\
-  unlink	\
-  vdir		\
-  wc		\
-  whoami	\
-  yes
+  $(default__progs)
 
 bin_PROGRAMS = $(OPTIONAL_BIN_PROGS)
 
@@ -620,8 +514,9 @@ check-README:
 	$(AM_V_at)diff $(pm) $(pr) && rm -rf $(pr) $(pm)
 
 # Ensure that a by-default-not-installed program (listed in
-# $(no_install__progs) is not also listed in $(EXTRA_PROGRAMS), because
-# if that were to happen, it *would* be installed by default.
+# $(no_install__progs) is not also listed as another $(EXTRA_PROGRAMS)
+# entry, because if that were to happen, it *would* be installed
+# by default.
 .PHONY: check-duplicate-no-install
 check-duplicate-no-install: tr
 	$(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)'| ./tr ' ' '\n' | uniq -d`"
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 11:47:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7TRb-0001t1-31
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 11:47:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40810)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRX-0001n8-T8
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRV-0004Sc-MQ
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:35 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:34333)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRV-0004SN-Cr
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:33 -0400
Received: by wibhq4 with SMTP id hq4so1346421wib.12
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 08:47:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references:mime-version:content-type
	:content-transfer-encoding;
	bh=gyrFpEFgqj/GP4wrWQoWyD3KSU1kxm/g64M1IZLrP9M=;
	b=eeg0byw6/hEa5rNLr7NdtPsOSlQhLdOyXxyagNLCt7RdwF9c5OwHOnO5Etqj5Dw5dk
	KfgQhabOM4rBhBYcx/hSb50oHsWyyf0T66jLs7hvXFwaEHva20Sjb4r0lD7wLq+Nn6W8
	x8sMO+0YA0E7JHIE9/Elsv0kIHR2WLZ9MXCfa7Y+DzmEfEjCEUDpWjrTRck2NJZLqVJt
	eJ02gso2EwWaLvJ9zsBFc/xIwhVVMYre54BHZ90EWnpCR7zVPFV9+NPHs3ydAgTTOY2+
	qiFVqxym8in45uTU7k8TghfydO+UV7k3X3rRTWghYSj57MxmTcYZwsXkTS67JCqLMn8m
	RvjA==
Received: by 10.180.100.131 with SMTP id ey3mr5520511wib.15.1346428052534;
	Fri, 31 Aug 2012 08:47:32 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id q4sm1469213wix.9.2012.08.31.08.47.31
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 08:47:31 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: =?UTF-8?q?=5BPATCH=20v2=207/9=5D=20maint=3A=20fix=20and=20simplify=20maintainer=20checks?=
Date: Fri, 31 Aug 2012 17:46:43 +0200
Message-Id: <bbbba1daa1a73d172b2395f09c087a5ce066a28c.1346427900.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <cover.1346427900.git.stefano.lattarini@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 15:47:37 -0000

Some of them can be simplified after the previous changes, some
of them have been downright broken them, and need fixing.

* src/local.mk: Adjust some comments.
(EXTRA_DIST): Avoid SPACE-TAB sequences.
(src/dircolors.h, src/fs.h src/fs-is-local.h): Avoid 8-SPACES
indentation.
(_sc_check-AUTHORS): Move ...
* cfg.mk (sc_check-AUTHORS): ... here (superseding the old rule
with the same name, that was only a recursive invocation to it).
Adjust the paths of the invoked coreutils programs, to account
for the fact that this rule now runs in the top-level build dir,
not in the 'src/' subdir.  Other minor cosmetic adjustments.
(ALL_RECURSIVE_TARGETS): Remove 'sc_option_desc_uppercase' and
'sc_man_file_correlation', since they no longer entails any
recursive make invocation.
(sc_option_desc_uppercase): Remove dependency from $(all_programs):
it isn't actually needed.
(check-programs-vs-x): Likewise.  Also, fix heading comments to
truly reflect what this check does.
(all-progs-but-lbracket): Strip the 'src/' prefix from each entry
in the list of programs; this avoids a spurious failure in the
'check-programs-vs-x' recipe.
(.PHONY): No need to list targets 'sc_man_file_correlation' and
'sc_option_desc_uppercase': they are automatically declared phony
by 'maint.mk', being recognized as syntax checks.

xxx
---
 cfg.mk       | 49 ++++++++++++++++++++++++++++++++++++-------------
 src/local.mk | 44 +++++++-------------------------------------
 2 files changed, 43 insertions(+), 50 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index b56e329..780e6a8 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -145,9 +145,37 @@ sc_sun_os_names:
 	  { echo '$(ME): found misuse of Sun OS version numbers' 1>&2;	\
 	    exit 1; } || :
 
-ALL_RECURSIVE_TARGETS += sc_check-AUTHORS
 sc_check-AUTHORS:
-	@$(MAKE) -s -C src _sc_check-AUTHORS
+# Ensure that the list of programs and author names is accurate.
+# We need a UTF8 locale.  If a lack of locale support or a missing
+# translation inhibits printing of UTF-8 names, just skip this test.
+au_dotdot = authors-dotdot
+au_actual = authors-actual
+sc_check-AUTHORS: $(all_programs)
+	@locale=en_US.UTF-8;				\
+	LC_ALL=$$locale ./src/cat --version		\
+	    | grep ' Torbjorn '	> /dev/null		\
+	  && { echo "$@: skipping this check"; exit 0; }; \
+	rm -f $(au_actual) $(au_dotdot);		\
+	for i in `ls $(all_programs)			\
+	    | sed -e 's,^src/,,' -e 's,$(EXEEXT)$$,,'	\
+	    | sed /libstdbuf/d				\
+	    | $(ASSORT) -u`; do				\
+	  test "$$i" = '[' && continue;			\
+	  exe=$$i;					\
+	  if test "$$i" = install; then			\
+	    exe=ginstall;				\
+	  elif test "$$i" = test; then			\
+	    exe='[';					\
+	  fi;						\
+	  LC_ALL=$$locale ./src/$$exe --version		\
+	    | perl -0 -pi -e 's/,\n/, /gm'		\
+	    | sed -n -e '/Written by /{ s//'"$$i"': /;'	\
+		  -e 's/,* and /, /; s/\.$$//; p; }';	\
+	done > $(au_actual) &&				\
+	sed -n '/^[^ ][^ ]*:/p' $(srcdir)/AUTHORS > $(au_dotdot) \
+	  && diff $(au_actual) $(au_dotdot) \
+	  && rm -f $(au_actual) $(au_dotdot)
 
 # Look for lines longer than 80 characters, except omit:
 # - program-generated long lines in diff headers,
@@ -170,18 +198,13 @@ sc_long_lines:
 # One could grep source directly as follows:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
 # but that would miss descriptions not on the same line as the -option.
-ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
-.PHONY: sc_option_desc_uppercase
 sc_option_desc_uppercase:
 	@grep '^\\fB\\-' -A1 man/*.1 | LC_ALL=C grep '\.1.[A-Z][a-z]'	\
 	  && { echo 1>&2 '$@: found initial capitals in --help'; exit 1; } || :
 sc_option_desc_uppercase: $(dist_man1_MANS) \
-                          $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT)) \
-                          $(all_programs)
+                          $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT))
 
 # Ensure all man/*.[1x] files are present.
-ALL_RECURSIVE_TARGETS += sc_man_file_correlation
-.PHONY: sc_man_file_correlation
 sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
 
 # Ensure that for each .x file in the 'man/' subdirectory, there is a
@@ -201,13 +224,13 @@ check-x-vs-1:
 	rm $$t
 
 # Writing a portable rule to generate a manpage like '[.1' would be
-# a nightmare.
-all-progs-but-lbracket = $(filter-out [,$(all_programs))
+# a nightmare, so filter that out.
+all-progs-but-lbracket = $(filter-out [,$(patsubst src/%,%,$(all_programs)))
 
-# Ensure that for each .x file in the 'man/' subdirectory, there is a
-# corresponding coreutils program.
+# Ensure that for each coreutils program there is a corresponding
+# '.x' file in the 'man/' subdirectory.
 .PHONY: check-programs-vs-x
-check-programs-vs-x: $(all_programs)
+check-programs-vs-x:
 	@status=0;					\
 	for p in dummy $(all-progs-but-lbracket); do	\
 	  test $$p = dummy && continue;			\
diff --git a/src/local.mk b/src/local.mk
index 2446200..5146361 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -55,8 +55,8 @@ noinst_HEADERS =		\
   src/wheel.h			\
   src/uname.h
 
-EXTRA_DIST += 		\
-  src/dcgen 		\
+EXTRA_DIST +=		\
+  src/dcgen		\
   src/dircolors.hin	\
   src/tac-pipe.c	\
   src/wheel-gen.pl	\
@@ -66,7 +66,8 @@ EXTRA_DIST += 		\
 CLEANFILES = $(SCRIPTS)
 
 # Also remove these sometimes-built programs.
-# For example, even when excluded, they're built via _sc_check-AUTHORS.
+# For example, even when excluded, they're built via 'sc_check-AUTHORSĂ¬
+# or 'dist'.
 CLEANFILES += $(no_install__progs)
 
 AM_CPPFLAGS = -I$(top_srcdir)/lib
@@ -368,7 +369,7 @@ BUILT_SOURCES += src/dircolors.h
 src/dircolors.h: src/dcgen src/dircolors.hin
 	$(AM_V_GEN)rm -f $@ $@-t
 	$(AM_V_at)$(PERL) -w -- $(srcdir)/src/dcgen \
-	                        $(srcdir)/src/dircolors.hin > $@-t
+				$(srcdir)/src/dircolors.hin > $@-t
 	$(AM_V_at)chmod a-w $@-t
 	$(AM_V_at)mv $@-t $@
 
@@ -450,7 +451,7 @@ BUILT_SOURCES += src/fs-is-local.h
 src/fs-is-local.h: src/stat.c src/extract-magic
 	$(AM_V_GEN)rm -f $@
 	$(AM_V_at)$(PERL) $(srcdir)/src/extract-magic \
-	                  --local $(srcdir)/src/stat.c > $@t
+			  --local $(srcdir)/src/stat.c > $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
 
@@ -458,7 +459,7 @@ BUILT_SOURCES += src/fs.h
 src/fs.h: src/stat.c src/extract-magic
 	$(AM_V_GEN)rm -f $@
 	$(AM_V_at)$(PERL) $(srcdir)/src/extract-magic \
-	                  $(srcdir)/src/stat.c > $@t
+			  $(srcdir)/src/stat.c > $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
 
@@ -522,37 +523,6 @@ check-README:
 check-duplicate-no-install: src/tr
 	$(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)' | tr ' ' '\n' | uniq -d`"
 
-# Ensure that the list of programs and author names is accurate.
-# We need a UTF8 locale.  If a lack of locale support or a missing
-# translation inhibits printing of UTF-8 names, just skip this test.
-au_dotdot = authors-dotdot
-au_actual = authors-actual
-.PHONY: _sc_check-AUTHORS
-_sc_check-AUTHORS: $(all_programs)
-	@locale=en_US.UTF-8;				\
-	LC_ALL=$$locale ./cat --version			\
-	    | grep ' Torbjorn '	> /dev/null		\
-	  && { echo "$@: skipping this check"; exit 0; }; \
-	rm -f $(au_actual) $(au_dotdot);		\
-	for i in `ls $(all_programs)			\
-	    | sed -e 's,^src/,,' -e 's,$(EXEEXT)$$,,'	\
-	    | sed /libstdbuf/d				\
-	    | $(ASSORT) -u`; do				\
-	  test "$$i" = '[' && continue;			\
-	  exe=$$i;					\
-	  if test "$$i" = install; then			\
-	    exe=ginstall;				\
-	  elif test "$$i" = test; then			\
-	    exe='[';					\
-	  fi;						\
-	  LC_ALL=$$locale ./$$exe --version		\
-	    | perl -0 -pi -e 's/,\n/, /gm'		\
-	    | sed -n -e '/Written by /{ s//'"$$i"': /;'	\
-		  -e 's/,* and /, /; s/\.$$//; p; }';	\
-	done > $(au_actual) &&				\
-	sed -n '/^[^ ][^ ]*:/p' $(top_srcdir)/AUTHORS > $(au_dotdot) && \
-	diff $(au_actual) $(au_dotdot) && rm -f $(au_actual) $(au_dotdot)
-
 # Use the just-built 'ginstall', when not cross-compiling.
 if CROSS_COMPILING
 cu_install_program = @INSTALL_PROGRAM@
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 11:47:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7TRd-000206-M8
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 11:47:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40781)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRW-0001n6-Iv
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRU-0004S2-KV
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:34 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:49936)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRU-0004RX-0I
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:32 -0400
Received: by wibhn17 with SMTP id hn17so1313934wib.12
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 08:47:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=UKyWG47s4gvoOaXGZCmTGbZ96sCiFPbvbmmFW/Ykp8k=;
	b=tJv3/RlsHQUxhRy+ZFO+gnKvIcrpKsi1hF2Zx0wZZIbtNqYvLiCl8/VcoIzC0bUkp7
	beHBJaDQnCuL/BiFC6Lm4FPjKnXFyfeaJniTnYoJgUIJUs5cO44JVYHnDm4p+7maAVYe
	3I0h+LN9Q8uN6V7wVqUE7vHfHqOg106SoTHXoq06ZyQ54sqpjLFPCKlKWa4M48qvQFZp
	UrczhrarvZyi4mCF82Z1pKx/AJWCdUXuFJzyXwpfksAbl5ZTeyn/d6CqWZA2lIbdomLH
	cdofNJhrWP7uuPGCDqoDxhqdmkSCjvtCRyd/uxNQhDMpWycL7G9nO7VVWXYB9TyoEmNE
	pUYg==
Received: by 10.180.84.104 with SMTP id x8mr5502279wiy.20.1346428051201;
	Fri, 31 Aug 2012 08:47:31 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id q4sm1469213wix.9.2012.08.31.08.47.30
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 08:47:30 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH v2 6/9] maint: remove unused target 'install-root'
Date: Fri, 31 Aug 2012 17:46:42 +0200
Message-Id: <9da44bfa40c33f5cdb430dcba023803039840d36.1346427900.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <cover.1346427900.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 15:47:39 -0000

It was unneeded and broken since the removal of 'su' from GNU
coreutils, in commit v8.17-16-g928dd73 of 2012-06-06, "su: remove
program (util-linux is now the best source for it)".

* Makefile.am (install-root): Remove.
(ALL_RECURSIVE_TARGETS): Update.
---
 Makefile.am | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 2d5fdaa..8ae8650 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,10 +70,6 @@ $(srcdir)/src/cu-progs.mk: $(gen_progs_lists)
 	  && $(SHELL) $(gen_progs_lists) --automake >$@-t \
 	  && chmod a-w $@-t && mv -f $@-t $@
 
-ALL_RECURSIVE_TARGETS += install-root
-install-root:
-	cd src && $(MAKE) $@
-
 ACLOCAL_AMFLAGS = -I m4
 
 # Some tests always need root privileges, others need them only sometimes.
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 11:47:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7TRf-00026X-BA
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 11:47:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40850)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRb-0001u4-BJ
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRS-0004Qv-Qn
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:39 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:57379)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRS-0004Qe-Ln
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:30 -0400
Received: by wgbdt14 with SMTP id dt14so1855692wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 08:47:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=R435uod90RIlFinPUFcdTfidSFKBtoz/kU3cD8trld4=;
	b=U7CqKwa/LyMYXCgPsEjxr1PVrXOn4Rubwz/0uY3VlaB/xY8pKDy1uNSN7e9PpXcikq
	1z+3g+DUJUt6QBCXSegcQ9vR+czbyztFE908SK2BJ7aKlja2SzMZgVB/Y1WFkP4k1N0r
	ZJVpFl4zb1we+7zdA80ruGtBQB7H+9hHz5mRNQok/J1n7TBOhIZ2aJ3f1r/h8p91LrZK
	MOfRzvY3zpYZQy4oU8eZCGAlzG2Ic42XI1cnQxIQIm3DW5PjTtAhKNSD+xr/uxUfz4ko
	Zkm84oeFVW8tw3WU7MH3d05f/lIMOnq6gzpS8eGi4gMu7Y71gJjjiUlU3uh7mtd01BQi
	1UHQ==
Received: by 10.180.109.166 with SMTP id ht6mr5538405wib.11.1346428049984;
	Fri, 31 Aug 2012 08:47:29 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id q4sm1469213wix.9.2012.08.31.08.47.28
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 08:47:29 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH v2 5/9] maint: improve remake rules for maintainers
Date: Fri, 31 Aug 2012 17:46:41 +0200
Message-Id: <e8334d35a59ef1eff21e3e9685f667f0e46eaa5e.1346427900.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <cover.1346427900.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 15:47:41 -0000

This is a follow up on today's former commit "build: refactor
how lists of coreutils programs are defined".

* Makefile.am ($(top_srcdir)/m4/cu-progs.m4,
$(srcdir)/src/cu-progs.mk): New, generate these files from the
'build-aux/gen-lists-of-programs.sh', the same way it's done
from the bootstrap script.
* bootstrap.conf (bootstrap_post_import_hook): Add comment about
the necessity to keep those new rules synced with the commands
here.  Enhance those commands so to that the generated files are
set read-only.
---
 Makefile.am    | 15 +++++++++++++++
 bootstrap.conf | 10 +++++++---
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 6a56f68..2d5fdaa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,6 +55,21 @@ EXTRA_DIST =				\
   maint.mk				\
   thanks-gen
 
+gen_progs_lists = $(top_srcdir)/build-aux/gen-lists-of-programs.sh
+
+# Keep these in sync with bootstrap.conf:bootstrap_post_import_hook().
+# Use '$(top_srcdir)/m4' and '$(srcdir)/src' for the benefit of non-GNU
+# makes: it is with those directories that 'cu-progs.m4' and 'cu-progs.mk'
+# appear in our dependencies.
+$(top_srcdir)/m4/cu-progs.m4: $(gen_progs_lists)
+	$(AM_V_GEN)rm -f $@ $@-t \
+	  && $(SHELL) $(gen_progs_lists) --autoconf >$@-t \
+	  && chmod a-w $@-t && mv -f $@-t $@
+$(srcdir)/src/cu-progs.mk: $(gen_progs_lists)
+	$(AM_V_GEN)rm -f $@ $@-t \
+	  && $(SHELL) $(gen_progs_lists) --automake >$@-t \
+	  && chmod a-w $@-t && mv -f $@-t $@
+
 ALL_RECURSIVE_TARGETS += install-root
 install-root:
 	cd src && $(MAKE) $@
diff --git a/bootstrap.conf b/bootstrap.conf
index 4ef3fc8..dc0ffb6 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -329,9 +329,13 @@ bootstrap_post_import_hook ()
   # Automake requires that ChangeLog exist.
   touch ChangeLog || return 1
   # List of coreutils programs.  See heading comments in the invoked
-  # script for more info.
-  build-aux/gen-lists-of-programs.sh --autoconf >m4/cu-progs.m4  || return 1
-  build-aux/gen-lists-of-programs.sh --automake >src/cu-progs.mk || return 1
+  # script for more info.  Keep this in sync with the rules in
+  (m4f=m4/cu-progs.m4 mkf=src/cu-progs.mk tmp=cu-progs.tmp \
+    && rm -f $m4f $mkf $tmp-1 $tmp-2 \
+    && build-aux/gen-lists-of-programs.sh --autoconf >$tmp-1 \
+    && build-aux/gen-lists-of-programs.sh --automake >$tmp-2 \
+    && chmod a-w $tmp-1 $tmp-2 \
+    && mv -f $tmp-1 $m4f && mv -f $tmp-2 $mkf)
 }
 
 bootstrap_epilogue()
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 11:47:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7TRf-00027i-NE
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 11:47:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40813)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRY-0001nH-Cf
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRW-0004Sk-G6
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:36 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:36296)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRW-0004P7-9d
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:34 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so1900875wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 08:47:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=MsSjv63ZZcAXj7t2//j0Wqm68Q9RXpsKqkyt2+gTQ08=;
	b=aUg68tHajg6pWH/8rS6q5XXfkKYDJer59o6QQPw1zSCSMKOMsY9FfacVxJ3frerj3E
	/neCl6cVt9Hitgc7DmbTUc13sPqtFGyz6cITpSkaeaterDl8ctwjVx5Y6/scREdLi+ZU
	7/72Q14KVCVFmKDnfWk7VJsySH2LuoCZjC5qJ/gpg+J09/bLC6KFJiE8fHUlGzUoFshW
	V9jRTZ4ucF8/tf8md49rpqn2vUwjRVbv7dKI6UTSTPAh0V6g2+IFWrcCRo3wkonGq6WY
	8cevcr0vrEzHucFTH7ccHQSmxe9NdOSCogQEAmsDWqKWz8RN8stSgRUa1cp+evivpWod
	Ibfg==
Received: by 10.180.80.134 with SMTP id r6mr5588376wix.1.1346428053883;
	Fri, 31 Aug 2012 08:47:33 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id q4sm1469213wix.9.2012.08.31.08.47.32
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 08:47:33 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH v2 8/9] maint: fix one stray reference to src/Makefile.am
Date: Fri, 31 Aug 2012 17:46:44 +0200
Message-Id: <3e9f823876f1f3b53a327ddcca5a07fb69e7f798.1346427900.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <cover.1346427900.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 15:47:41 -0000

* build-aux/gen-lists-of-programs.sh: In heading comments here.
---
 build-aux/gen-lists-of-programs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-aux/gen-lists-of-programs.sh b/build-aux/gen-lists-of-programs.sh
index f049b56..2eecf53 100755
--- a/build-aux/gen-lists-of-programs.sh
+++ b/build-aux/gen-lists-of-programs.sh
@@ -3,7 +3,7 @@
 # and Automake, and with further distinctions about how and when these
 # programs should be built.  This is useful to avoid duplicating the
 # definitions of these list among several files ('configure.ac' and
-# 'src/Makefile.am' at least); such duplication had proved a source of
+# 'src/local.mk' at least); such duplication had proved a source of
 # inconsistencies and bugs in the past.
 
 set -u
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 11:47:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7TRZ-0001nN-7G
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 11:47:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40792)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRW-0001n7-V1
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRS-0004Qg-AT
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:34 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:61874)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRS-0004QF-44
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:30 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so1855664wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 08:47:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=XD/aNHNCbFcVwQrF5EjdlDOSA3+ICVifrbySwto70zs=;
	b=OGQVIr1NwbrSta/Zu9b+qoEzJjqPWVAJlxiiVPEcK4krkDsTjxoz10yc8s+mDtkW0/
	rwgoWyj2bI+8YyHeNin4tWMWgqsdzKjcjYYlZv3LzGYYlToJ6V8Y6X+63bKejiOo5W9b
	z2qujAaTOFnEmCKMFozbbBf8X2YFYJ1U23agXE1XQtbYBouEiiKgyjZjDrLzgq9tgSYd
	e5yxatXV3MNQGVnzabLi+cIpwuH2TtHo1xldKjkpS8+GrqVcwfeNfG8ooPj2NVR5EDzD
	wFenrsbOhJ1XdH0C6Ipx4pUeua4p1erCPuiLkJ/395JoAMaOlYmFwCN3SwEqnxbfaXLv
	lKow==
Received: by 10.180.104.200 with SMTP id gg8mr5522471wib.14.1346428048461;
	Fri, 31 Aug 2012 08:47:28 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id q4sm1469213wix.9.2012.08.31.08.47.27
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 08:47:27 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH v2 4/9] build: fix generation of manpages for programs not
	built by default
Date: Fri, 31 Aug 2012 17:46:40 +0200
Message-Id: <ca3bec48772a9695f0304c5d5610eb3ad0e4f69c.1346427900.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <cover.1346427900.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 15:47:36 -0000

* src/local.mk (dist-hook): Don't use this to ensure all the
programs, even the ones disabled by default or by the user, are
built (doing so is required to generate the distributed manpages
are properly built).  This would build those programs too late
anyway, causing errors like:

    $ make dist
    make  dist-xz am__post_remove_distdir='@:'
    make[1]: Entering directory `~/src/coreutils'
      GEN      man/arch.1
    help2man: can't get '--help' info from man/arch.td/arch
    make[1]: *** [man/arch.1] Error 127
    make[1]: Leaving directory `~/src/coreutils'
    make: *** [dist] Error 2

Instead, ...
* man/local.mk (extra_man_x, extra_man_1): define these ...
($(extra_man_1)): ... and make this depend on $(all_programs).
(EXTRA_DIST): Adjust.
Adjust some comments as well.
---
 man/local.mk | 19 ++++++++++++-------
 src/local.mk |  5 -----
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/man/local.mk b/man/local.mk
index d42c982..80519af 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -25,13 +25,18 @@ MAINTAINERCLEANFILES += $(dist_man1_MANS)
 
 # The "$(VAR:%=dir/%.x)" idiom is not portable according to POSIX, but in
 # practice it works with several make implementation (GNU, BSD, CCS make
-# from Solaris 10, Sun distributed make).  In addition, since only
-# maintainers are expected to build release tarballs (and they should
-# use GNU make when doing so), it's not big deal if this won't work with
-# some dumber make implementation.
-EXTRA_DIST += \
-  $(NO_INSTALL_PROGS_DEFAULT:%=man/%.x) \
-  $(NO_INSTALL_PROGS_DEFAULT:%=man/%.1)
+# from Solaris 10, Sun distributed make).
+extra_man_x = $(NO_INSTALL_PROGS_DEFAULT:%=man/%.x)
+extra_man_1 = $(NO_INSTALL_PROGS_DEFAULT:%=man/%.1)
+
+EXTRA_DIST += $(extra_man_1) $(extra_man_x)
+
+# This is required because we have subtle inter-directory dependencies:
+# in order to generate all man pages, even those for which we don't
+# install a binary, require that all programs be built at distribution
+# time.  We can't use 'dist-hook' for this, since it would run too late:
+# the manpages must be generated before the distdir is created and filled.
+$(extra_man_1): $(all_programs)
 
 # Depend on this to get version number changes.
 mandep = .version
diff --git a/src/local.mk b/src/local.mk
index 45a6268..2446200 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -495,11 +495,6 @@ all_programs.list:
 	  | sed /libstdbuf/d \
 	  | $(ASSORT) -u
 
-# This is required because we have broken inter-directory dependencies:
-# in order to generate all man pages, even those for which we don't
-# install a binary, require that all programs be built at distribution time.
-dist-hook: $(all_programs)
-
 pm = progs-makefile
 pr = progs-readme
 # Ensure that the list of programs in README matches the list
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 11:47:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7TRh-0002Bl-08
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 11:47:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40834)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRa-0001qa-9n
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRZ-0004TN-AW
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:38 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:34333)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7TRZ-0004SN-4L
	for coreutils@gnu.org; Fri, 31 Aug 2012 11:47:37 -0400
Received: by mail-wi0-f171.google.com with SMTP id hq4so1346421wib.12
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 08:47:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=I6duoXzBik4bECTjow7V7NG/M1FhC7FpDWW3d71Vijw=;
	b=Pf0uPZmS+bdVXBAqeRp7JuFrpY27aRLAFDo3ziJHj+CfKF7jYzOvPew8bD350I8O86
	tLamh4rApDmlDdReCoOKMMgo6YEE+Bq0fLafRFjaTuvqdwHuu22xKZIRdYX2MuzbN0lp
	N51qBEv62i7c0R/xT+mAa9zXjFl06CpOyLZbaiNBr0jgrhOwpnNN+T7aex7qDK38Gih2
	HV7i6Calx8MP5dxRzzg8o+osPD3W1Q98lwnw0Nebq/+Fun/GnoWlw9JJfeXZicIyP5BA
	vW2u20ONJNFSTgmDrb1SSdfIFd0LlhvNVJEI/b+gY/Elcr5fy1ginF2hDTU6p17DpSNs
	40+A==
Received: by 10.216.220.89 with SMTP id n67mr5644102wep.73.1346428055328;
	Fri, 31 Aug 2012 08:47:35 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id q4sm1469213wix.9.2012.08.31.08.47.33
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 08:47:34 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH v2 9/9] maint: update gitignore entries
Date: Fri, 31 Aug 2012 17:46:45 +0200
Message-Id: <1c0bea9ffb5f351bbd91e3abc0a275093db7b990.1346427900.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com>
References: <cover.1346427900.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 15:47:43 -0000

* src/.gitinore: Here, adding the '.dirstamp' file generated
by the C compilation rules.
---
 src/.gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/.gitignore b/src/.gitignore
index d78178c..1c1edbb 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1,4 +1,5 @@
 *.exe
+/.dirstamp
 \[
 arch
 base64
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 14:12:18 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7Vha-0006mh-Bh
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 14:12:18 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47601)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7VhY-0006lq-EX
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:12:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7VhW-0000Ro-Vu
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:12:16 -0400
Received: from mx.meyering.net ([88.168.87.75]:38251)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7VhW-0000Rf-FY
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:12:14 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 65814600B1;
	Fri, 31 Aug 2012 20:12:13 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the
	'src/' subdir
In-Reply-To: <cover.1346427900.git.stefano.lattarini@gmail.com> (Stefano
	Lattarini's message of "Fri, 31 Aug 2012 17:46:36 +0200")
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
Date: Fri, 31 Aug 2012 20:12:13 +0200
Message-ID: <87r4qnorr6.fsf@rho.meyering.net>
Lines: 97
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 18:12:17 -0000

Stefano Lattarini wrote:
> On 08/31/2012 04:06 PM, Jim Meyering wrote:
>>
>> Hmm... actually there are a few other problems.  See below.
>> If you don't mind fixing those and reposting, I would be grateful.
>> I'm stepping out for an hour or so.
>>
> Here is an updated series.  Notice that there is still one spurious
> failure:
>
>     proper_name_utf8_requires_ICONV
>     Can't open src/Makefile.am: No such file or directory.
>     Can't open src/Makefile.am: No such file or directory.
>     ...
>     Can't open src/Makefile.am: No such file or directory.
>     0.19 proper_name_utf8_requires_ICONV
>
> but that's due to a bug in the gnulib-provided 'maint.mk' AFAICS,
> and I'm not going to fix it for the moment.
>
> Regards,
>   Stefano
>
> -*-*-*-
>
> Stefano Lattarini (9):
>   maint: add our 'bootstrap_post_import_hook' function
>   build: refactor how lists of coreutils programs are defined
>   build: don't use recursive make to build the 'src' subdirectory
>   build: fix generation of manpages for programs not built by default
>   maint: improve remake rules for maintainers
>   maint: remove unused target 'install-root'
>   maint: fix and simplify maintainer checks
>   maint: fix one stray reference to src/Makefile.am
>   maint: update gitignore entries

Thanks a lot.
I've fixed the two remaining problems.
I'll probably move (to precede) or merge these before pushing your changes.

>From 44bc1cba4ab0a6fd4a2e96f8e6f1e0d27326995f Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Fri, 31 Aug 2012 19:35:35 +0200
Subject: [PATCH 1/2] maint: disable sc_proper_name_utf8_requires_ICONV test

* cfg.mk (local-checks-to-skip): Temporarily disable a test.
This test will need to be adapted to work with a non-recursive
build set-up, in which there is no Makefile.am alongside each program.
---
 cfg.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cfg.mk b/cfg.mk
index 780e6a8..87f54c0 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -22,7 +22,8 @@ manual_title = Core GNU utilities
 url_dir_list = http://ftp.gnu.org/gnu/$(PACKAGE)

 # Tests not to run as part of "make distcheck".
-local-checks-to-skip =
+local-checks-to-skip = \
+  sc_proper_name_utf8_requires_ICONV

 # Tools used to bootstrap this package, used for "announcement".
 bootstrap-tools = autoconf,automake,gnulib,bison
--
1.7.12.146.g16d26b1


>From ea8043e5b08956b804c1cc3cb79ee54f2d969b36 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Fri, 31 Aug 2012 20:05:29 +0200
Subject: [PATCH 2/2] maint: check-programs-vs-x: avoid a new syntax-check
 failure

* cfg.mk (check-programs-vs-x): The new variable,
$(all-progs-but-lbracket) contains libstdbuf.so, and it does
not have a corresponding .x file, so exempt it.
---
 cfg.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cfg.mk b/cfg.mk
index 87f54c0..e1bcf27 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -234,6 +234,7 @@ all-progs-but-lbracket = $(filter-out [,$(patsubst src/%,%,$(all_programs)))
 check-programs-vs-x:
 	@status=0;					\
 	for p in dummy $(all-progs-but-lbracket); do	\
+	  case $$p in *.so) continue;; esac;		\
 	  test $$p = dummy && continue;			\
 	  test $$p = ginstall && p=install || : ;	\
 	  test -f $(srcdir)/man/$$p.x			\
--
1.7.12.146.g16d26b1


From MAILER-DAEMON Fri Aug 31 14:19:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7Vov-0000Bx-G4
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 14:19:53 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56506)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7Vot-0000AF-0Y
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:19:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7Vor-0002ED-4j
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:19:50 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:57108)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7Voq-0002Dm-UO
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:19:49 -0400
Received: by bkcjc3 with SMTP id jc3so1446438bkc.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 11:19:48 -0700 (PDT)
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=0t71sJi16gfay8k3V1pbMUDYxrpcil4m3YNT582lRiQ=;
	b=mjNw+NHoNZBhIap2JoJHVILCngNpiB7NSIztC3G8/vF3AG481nTiXzk8JGSbPrgI4y
	G2Gs5MjKB/JiNu7r14PB/0Fz7y/UWB/FfeIFhPnws3l5rsmrieLc404Eu16x6LZF5CfK
	cZ9AWW2sUJN+4q32i0vHQWiY12fVW2Y8HGv2r0vFSn+88meCicycsQibK3YSyeOqH27T
	2FSxDcNVGZdQ2w2o1CUpj5JA5LFjnNxwuu0JAWMRO9WpuTtgVfs61R8jFzN0ubAGe+5J
	A36x3Pl8v+Kkr4LmgVoCGOIg/QFjfA2j5XlJWmE4ekrRBgMOeCPDXAzAezaT1h6df8LK
	Ujcg==
Received: by 10.204.152.137 with SMTP id g9mr4741998bkw.106.1346437188025;
	Fri, 31 Aug 2012 11:19:48 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id 14sm4069280bkq.12.2012.08.31.11.19.46
	(version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 11:19:47 -0700 (PDT)
Message-ID: <5041003E.7050805@gmail.com>
Date: Fri, 31 Aug 2012 20:19:42 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the
	'src/' subdir
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
	<87r4qnorr6.fsf@rho.meyering.net>
In-Reply-To: <87r4qnorr6.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 31 Aug 2012 18:19:52 -0000

On 08/31/2012 08:12 PM, Jim Meyering wrote:
> 
> From ea8043e5b08956b804c1cc3cb79ee54f2d969b36 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering@redhat.com>
> Date: Fri, 31 Aug 2012 20:05:29 +0200
> Subject: [PATCH 2/2] maint: check-programs-vs-x: avoid a new syntax-check
>  failure
> 
> * cfg.mk (check-programs-vs-x): The new variable,
> $(all-progs-but-lbracket) contains libstdbuf.so, and it does
> not have a corresponding .x file, so exempt it.
> ---
>  cfg.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/cfg.mk b/cfg.mk
> index 87f54c0..e1bcf27 100644
> --- a/cfg.mk
> +++ b/cfg.mk
> @@ -234,6 +234,7 @@ all-progs-but-lbracket = $(filter-out [,$(patsubst src/%,%,$(all_programs)))
>  check-programs-vs-x:
>  	@status=0;					\
>  	for p in dummy $(all-progs-but-lbracket); do	\
> +	  case $$p in *.so) continue;; esac;		\
>  	  test $$p = dummy && continue;			\
>  	  test $$p = ginstall && p=install || : ;	\
>  	  test -f $(srcdir)/man/$$p.x			\
>
Oh.  I hadn't noticed any failure here.  Weird.  Oh well, probably I
missed in in the fully of fix/amend/rebase/....

Thanks for taking care of those issues.

Regards,
  Stefano



From MAILER-DAEMON Fri Aug 31 14:28:06 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7Vws-0003JE-Kh
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 14:28:06 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59492)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bob@proulx.com>) id 1T7Vwq-0003J7-BI
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:28:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bob@proulx.com>) id 1T7Vwp-0005Nb-J9
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:28:04 -0400
Received: from joseki.proulx.com ([216.17.153.58]:48426)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bob@proulx.com>) id 1T7Vwp-0005NG-CF
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:28:03 -0400
Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119])
	by joseki.proulx.com (Postfix) with ESMTP id 3EE5E211D9
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 12:28:01 -0600 (MDT)
Received: by hysteria.proulx.com (Postfix, from userid 1000)
	id E73B92DC66; Fri, 31 Aug 2012 12:28:00 -0600 (MDT)
Date: Fri, 31 Aug 2012 12:28:00 -0600
From: Bob Proulx <bob@proulx.com>
To: coreutils@gnu.org
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
Message-ID: <20120831182800.GA18905@hysteria.proulx.com>
Mail-Followup-To: coreutils@gnu.org
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net> <503F0FDB.2020501@gmail.com>
	<871uio3d29.fsf@rho.meyering.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <871uio3d29.fsf@rho.meyering.net>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
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, 31 Aug 2012 18:28:05 -0000

Jim Meyering wrote:
> As expected, the build now seems faster.
> I haven't yet measured it.

Not wanting to ask work of you but it would be great if when all was
said and done there was a posting of the build time that changed due
to the build infrastructure change from recursive to non-recursive
make.  It would be an interesting datapoint.

Thanks,
Bob


From MAILER-DAEMON Fri Aug 31 14:31:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7W0a-0003fw-BM
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 14:31:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51976)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7W0Y-0003dH-9w
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:31:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7W0X-0006ya-BE
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:31:54 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:64962)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7W0X-0006yR-44
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:31:53 -0400
Received: by bkcjc3 with SMTP id jc3so1450112bkc.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 11:31:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:subject:references:in-reply-to
	:content-type:content-transfer-encoding;
	bh=Kp77OAdZd9rwmo9dS+AxzBrqXKOHOfpZ0NU8q6Bzw4k=;
	b=feNmWg/phuqM6osrcgwQ1Pe1F150Ml9ZUFw8zW2minCQfCgVhSu8Py+anwBJAYPHVi
	2hoif5JEFD3SXDOH2Ntez07vK7ilvHQA5dAyUjXl3k9AuS+Wf2t69ZdJzcooOVTZR5Fv
	sm4Vy+cL1NK6BERtz1ftOZ+wiYmQ8RGyNPPkCNXkJMxf5HrmCT41joMs9PMxSo+Lf7QE
	3j+lZHLQHiI417ke0UmIHLNHMCSUVGU+DtMpoUqwwoZd60YE1joWJIL/CGiNJnnOORLT
	h02bZUMstVQo8BzRMHdc6AVn9gG/G8CIyq+4xtXOYyLcQiB8COBrPUQfLA1+FwTfZGjV
	mRKA==
Received: by 10.204.152.136 with SMTP id g8mr4581379bkw.44.1346437912235;
	Fri, 31 Aug 2012 11:31:52 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id 14sm4084289bkq.12.2012.08.31.11.31.50
	(version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 11:31:51 -0700 (PDT)
Message-ID: <50410312.6010605@gmail.com>
Date: Fri, 31 Aug 2012 20:31:46 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: coreutils@gnu.org
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net> <503F0FDB.2020501@gmail.com>
	<871uio3d29.fsf@rho.meyering.net>
	<20120831182800.GA18905@hysteria.proulx.com>
In-Reply-To: <20120831182800.GA18905@hysteria.proulx.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.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: Fri, 31 Aug 2012 18:31:55 -0000

On 08/31/2012 08:28 PM, Bob Proulx wrote:
> Jim Meyering wrote:
>> As expected, the build now seems faster.
>> I haven't yet measured it.
> 
> Not wanting to ask work of you but it would be great if when all was
> said and done there was a posting of the build time that changed due
> to the build infrastructure change from recursive to non-recursive
> make.  It would be an interesting datapoint.
>
FWIW, I'm helping with this conversion because I believe non-recursive
builds offer improved clarity, correctness and reliability.  The fact
that they might also end up offering enhanced performance is just an
extra (albeit valuable) perk, not a motivating factor.

Regards,
  Stefano


From MAILER-DAEMON Fri Aug 31 14:37:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7W6I-0004ZP-85
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 14:37:50 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36948)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7W6F-0004YM-G3
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:37:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7W69-0000MO-Fy
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:37:47 -0400
Received: from mx.meyering.net ([88.168.87.75]:38320)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7W69-0000MK-6B
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:37:41 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 24C4E600B1;
	Fri, 31 Aug 2012 20:37:40 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the
	'src/' subdir
In-Reply-To: <5041003E.7050805@gmail.com> (Stefano Lattarini's message of
	"Fri, 31 Aug 2012 20:19:42 +0200")
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
	<87r4qnorr6.fsf@rho.meyering.net> <5041003E.7050805@gmail.com>
Date: Fri, 31 Aug 2012 20:37:40 +0200
Message-ID: <87liguq557.fsf@rho.meyering.net>
Lines: 63
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 18:37:48 -0000

Stefano Lattarini wrote:

> On 08/31/2012 08:12 PM, Jim Meyering wrote:
>>
>> From ea8043e5b08956b804c1cc3cb79ee54f2d969b36 Mon Sep 17 00:00:00 2001
>> From: Jim Meyering <meyering@redhat.com>
>> Date: Fri, 31 Aug 2012 20:05:29 +0200
>> Subject: [PATCH 2/2] maint: check-programs-vs-x: avoid a new syntax-check
>>  failure
>>
>> * cfg.mk (check-programs-vs-x): The new variable,
>> $(all-progs-but-lbracket) contains libstdbuf.so, and it does
>> not have a corresponding .x file, so exempt it.
>> ---
>>  cfg.mk | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/cfg.mk b/cfg.mk
>> index 87f54c0..e1bcf27 100644
>> --- a/cfg.mk
>> +++ b/cfg.mk
>> @@ -234,6 +234,7 @@ all-progs-but-lbracket = $(filter-out [,$(patsubst src/%,%,$(all_programs)))
>>  check-programs-vs-x:
>>  	@status=0;					\
>>  	for p in dummy $(all-progs-but-lbracket); do	\
>> +	  case $$p in *.so) continue;; esac;		\
>>  	  test $$p = dummy && continue;			\
>>  	  test $$p = ginstall && p=install || : ;	\
>>  	  test -f $(srcdir)/man/$$p.x			\
>>
> Oh.  I hadn't noticed any failure here.  Weird.  Oh well, probably I
> missed in in the fully of fix/amend/rebase/....
>
> Thanks for taking care of those issues.

No problem.
Next step, "make distcheck".  First failure is because inclusion of
version.h fails in the non-srcdir build:

    $ make src/dd.o
      CC       src/dd.o
    In file included from ../src/dd.c:28:0:
    ../src/system.h:94:21: fatal error: version.h: No such file or directory
     #include "version.h"
                         ^
    compilation terminated.
    make: *** [src/dd.o] Error 1

This fixes it:

diff --git a/src/local.mk b/src/local.mk
index 5146361..6236750 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -70,7 +70,7 @@ CLEANFILES = $(SCRIPTS)
 # or 'dist'.
 CLEANFILES += $(no_install__progs)

-AM_CPPFLAGS = -I$(top_srcdir)/lib
+AM_CPPFLAGS = -I$(top_srcdir)/lib -Isrc

 noinst_LIBRARIES = src/libver.a
 nodist_src_libver_a_SOURCES = src/version.c src/version.h


From MAILER-DAEMON Fri Aug 31 14:42:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7WAt-00052N-Kg
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 14:42:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34056)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7WAq-000524-Vm
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:42:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7WAp-0001zY-Td
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:42:32 -0400
Received: from mx.meyering.net ([88.168.87.75]:38328)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7WAp-0001zS-KS
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:42:31 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id BB3B160096;
	Fri, 31 Aug 2012 20:42:30 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
In-Reply-To: <50410312.6010605@gmail.com> (Stefano Lattarini's message of
	"Fri, 31 Aug 2012 20:31:46 +0200")
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net> <503F0FDB.2020501@gmail.com>
	<871uio3d29.fsf@rho.meyering.net>
	<20120831182800.GA18905@hysteria.proulx.com>
	<50410312.6010605@gmail.com>
Date: Fri, 31 Aug 2012 20:42:30 +0200
Message-ID: <87fw72q4x5.fsf@rho.meyering.net>
Lines: 26
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 18:42:34 -0000

Stefano Lattarini wrote:
> On 08/31/2012 08:28 PM, Bob Proulx wrote:
>> Jim Meyering wrote:
>>> As expected, the build now seems faster.
>>> I haven't yet measured it.
>>
>> Not wanting to ask work of you but it would be great if when all was
>> said and done there was a posting of the build time that changed due
>> to the build infrastructure change from recursive to non-recursive
>> make.  It would be an interesting datapoint.
>>
> FWIW, I'm helping with this conversion because I believe non-recursive
> builds offer improved clarity, correctness and reliability.  The fact
> that they might also end up offering enhanced performance is just an
> extra (albeit valuable) perk, not a motivating factor.

Of course, one of us will time it once it's all done.
We'll also need a NEWS entry, and I hope Stefano will write it.

For reference, I look very favorably on converting all
packages to non-recursive make.  Bison was the first GNU
project that I noticed doing this.  I liked what I saw there
so much that I converted cppi's build system as a proof-of-concept.

It's a lot smaller and simpler, so you can see better what's required
there.  In spite of that, I'm sure it can be cleaned up even more.


From MAILER-DAEMON Fri Aug 31 14:44:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7WCJ-0005Nw-OT
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 14:44:03 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34335)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7WCI-0005Ni-3w
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:44:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7WCG-0002AO-Tp
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:44:02 -0400
Received: from mx.meyering.net ([88.168.87.75]:38334)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7WCG-0002AK-KM
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:44:00 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 9E53660096;
	Fri, 31 Aug 2012 20:43:59 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the
	'src/' subdir
In-Reply-To: <87liguq557.fsf@rho.meyering.net> (Jim Meyering's message of
	"Fri, 31 Aug 2012 20:37:40 +0200")
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
	<87r4qnorr6.fsf@rho.meyering.net> <5041003E.7050805@gmail.com>
	<87liguq557.fsf@rho.meyering.net>
Date: Fri, 31 Aug 2012 20:43:59 +0200
Message-ID: <87a9xaq4uo.fsf@rho.meyering.net>
Lines: 30
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 18:44:03 -0000

Jim Meyering wrote:
...
> No problem.
> Next step, "make distcheck".  First failure is because inclusion of
> version.h fails in the non-srcdir build:
...
> This fixes it:
>
> diff --git a/src/local.mk b/src/local.mk

FYI, here's another make distcheck problem,
in case someone else can get to it before I do
(it'll soon be dinner time here):

  make[2]: Entering directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
    CC       src/uname-arch.o
    CC       src/hostname.o
    CCLD     src/arch
    CCLD     src/hostname
    GEN      man/arch.1
    GEN      man/hostname.1
  mkdir: cannot create directory 'man/arch.td': No such file or directory
  make[2]: *** [man/arch.1] Error 1
  make[2]: *** Waiting for unfinished jobs....
  mkdir: cannot create directory 'man/hostname.td': No such file or directory
  make[2]: *** [man/hostname.1] Error 1
  make[2]: Leaving directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
  make[1]: *** [dist] Error 2
  make[1]: Leaving directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
  make: *** [distcheck] Error 1


From MAILER-DAEMON Fri Aug 31 14:55:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7WNF-00079v-OB
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 14:55:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41202)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7WNC-00075k-0b
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:55:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7WNA-00064E-TP
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:55:17 -0400
Received: from mail-bk0-f41.google.com ([209.85.214.41]:61655)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7WNA-000633-Mk
	for coreutils@gnu.org; Fri, 31 Aug 2012 14:55:16 -0400
Received: by bkcjc3 with SMTP id jc3so1456810bkc.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 11:55:15 -0700 (PDT)
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=rsWpDL4hdbE/30v+JZ4gVG3H40CsSzdZgihrhvVa9pY=;
	b=o3dPNQZgSHoLhkr/epKGrGS1spiMeFO7/r6TVQxoft+SGUcpc35Ww+54w7qrgEDXhq
	FpOihMmNnlz59YJw6nf5NypvYlFXh3BVnrdE5ywtF5sQzqMtuTHelfcMGXBrFffUeVYy
	gpgmzjZqBEMVF0Ql3YYEgqMXBGf3pPPJwnQiLqCOR/WBZYHag6J7fGPndRu2LwROodPO
	r1hFRjUfir4KqAiq4NmIOKmk5OwX5tmdxYREEkkXg+YPSyfcrja4NS10jf9RglrWpvu6
	fqMTQF2G/fJRenUJ0Zz+ZzPvDVCh27xToGHfkxEbaQQWF1Q9Eys7kgWOFf51ic686Fce
	iMMw==
Received: by 10.205.118.14 with SMTP id fo14mr4766668bkc.130.1346439315499;
	Fri, 31 Aug 2012 11:55:15 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id n5sm4111837bkv.14.2012.08.31.11.55.13
	(version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 11:55:14 -0700 (PDT)
Message-ID: <5041088D.6090306@gmail.com>
Date: Fri, 31 Aug 2012 20:55:09 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH 00/22] Towards a non-recursive build system for coreutils?
References: <cover.1346276889.git.stefano.lattarini@gmail.com>
	<87ehmp47fx.fsf@rho.meyering.net> <503F0FDB.2020501@gmail.com>
	<871uio3d29.fsf@rho.meyering.net>
	<20120831182800.GA18905@hysteria.proulx.com>
	<50410312.6010605@gmail.com> <87fw72q4x5.fsf@rho.meyering.net>
In-Reply-To: <87fw72q4x5.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.41
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, 31 Aug 2012 18:55:19 -0000

On 08/31/2012 08:42 PM, Jim Meyering wrote:
> Stefano Lattarini wrote:
>> On 08/31/2012 08:28 PM, Bob Proulx wrote:
>>> Jim Meyering wrote:
>>>> As expected, the build now seems faster.
>>>> I haven't yet measured it.
>>>
>>> Not wanting to ask work of you but it would be great if when all was
>>> said and done there was a posting of the build time that changed due
>>> to the build infrastructure change from recursive to non-recursive
>>> make.  It would be an interesting datapoint.
>>>
>> FWIW, I'm helping with this conversion because I believe non-recursive
>> builds offer improved clarity, correctness and reliability.  The fact
>> that they might also end up offering enhanced performance is just an
>> extra (albeit valuable) perk, not a motivating factor.
> 
> Of course, one of us will time it once it's all done.
> We'll also need a NEWS entry, and I hope Stefano will write it.
> 
> For reference, I look very favorably on converting all
> packages to non-recursive make.  Bison was the first GNU
> project that I noticed doing this.  I liked what I saw there
> so much that I converted cppi's build system as a proof-of-concept.
> 
> It's a lot smaller and simpler, so you can see better what's required
> there.  In spite of that, I'm sure it can be cleaned up even more.
>
An important (and big) step would be to enhance gnulib to create
Makefile fragments that can be used in non-recursive packages.

I see tha, as of today, bison and cppi works around the gnulib
limitation by *heavily* massaging its generated Makefile.am.
Which is quite brittle and not at all scalable (albeit it certainly
was the easiest and quickest way to implement the de-recursion of
those package; and I must admit that, being in Akim's or Jim's
place, I'd have done the same).

Regards,
  Stefano


From MAILER-DAEMON Fri Aug 31 15:09:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7Wam-0001nw-AX
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 15:09:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42429)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T7Wak-0001ld-KG
	for coreutils@gnu.org; Fri, 31 Aug 2012 15:09:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T7Waj-0001Sw-Gn
	for coreutils@gnu.org; Fri, 31 Aug 2012 15:09:18 -0400
Received: from qmta03.westchester.pa.mail.comcast.net ([76.96.62.32]:43819)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T7Waj-0001Sq-Cd
	for coreutils@gnu.org; Fri, 31 Aug 2012 15:09:17 -0400
Received: from omta22.westchester.pa.mail.comcast.net ([76.96.62.73])
	by qmta03.westchester.pa.mail.comcast.net with comcast
	id tPMt1j0031ap0As53X9MTM; Fri, 31 Aug 2012 19:09:21 +0000
Received: from office.redhat.com ([38.96.16.75])
	by omta22.westchester.pa.mail.comcast.net with comcast
	id tX9Y1j00a1dAPSW3iX9dY1; Fri, 31 Aug 2012 19:09:42 +0000
From: Eric Blake <eblake@redhat.com>
To: coreutils@gnu.org
Subject: [PATCH] build: work with new glibc when not optimizing
Date: Fri, 31 Aug 2012 12:09:05 -0700
Message-Id: <1346440145-30209-1-git-send-email-eblake@redhat.com>
X-Mailer: git-send-email 1.7.11.4
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 76.96.62.32
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, 31 Aug 2012 19:09:19 -0000

Newer glibc hates unconditional use of FORTIFY_SOURCE when optimization
is disabled but -Werror is in effect.

* configure.ac (FORTIFY_SOURCE): Make conditional.
---

Copied from a trick I used in libvirt.

 configure.ac | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 083fd34..044b6a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,8 +162,13 @@ if test "$gl_gcc_warnings" = yes; then
   AC_SUBST([WARN_CFLAGS])

   AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
-  AC_DEFINE([_FORTIFY_SOURCE], [2],
-    [enable compile-time and run-time bounds-checking, and some warnings])
+  AH_VERBATIM([FORTIFY_SOURCE],
+  [/* Enable compile-time and run-time bounds-checking, and some warnings,
+      without upsetting newer glibc. */
+   #if defined __OPTIMIZE__ && __OPTIMIZE__
+   # define _FORTIFY_SOURCE 2
+   #endif
+  ])
   AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])

   # We use a slightly smaller set of warning options for lib/.
-- 
1.7.11.4



From MAILER-DAEMON Fri Aug 31 15:18:36 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7Wjk-0004mW-SR
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 15:18:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35356)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Wji-0004ji-9b
	for coreutils@gnu.org; Fri, 31 Aug 2012 15:18:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Wjg-0005F4-5G
	for coreutils@gnu.org; Fri, 31 Aug 2012 15:18:34 -0400
Received: from mx.meyering.net ([88.168.87.75]:38437)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7Wjf-0005Ez-Sw
	for coreutils@gnu.org; Fri, 31 Aug 2012 15:18:32 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id C412B600B1;
	Fri, 31 Aug 2012 21:18:30 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Eric Blake <eblake@redhat.com>
Subject: Re: [PATCH] build: work with new glibc when not optimizing
In-Reply-To: <1346440145-30209-1-git-send-email-eblake@redhat.com> (Eric
	Blake's message of "Fri, 31 Aug 2012 12:09:05 -0700")
References: <1346440145-30209-1-git-send-email-eblake@redhat.com>
Date: Fri, 31 Aug 2012 21:18:30 +0200
Message-ID: <874nniq395.fsf@rho.meyering.net>
Lines: 31
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 19:18:35 -0000

Eric Blake wrote:
> Newer glibc hates unconditional use of FORTIFY_SOURCE when optimization
> is disabled but -Werror is in effect.
>
> * configure.ac (FORTIFY_SOURCE): Make conditional.
> ---
>
> Copied from a trick I used in libvirt.
>
>  configure.ac | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 083fd34..044b6a0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -162,8 +162,13 @@ if test "$gl_gcc_warnings" = yes; then
>    AC_SUBST([WARN_CFLAGS])
>
>    AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
> -  AC_DEFINE([_FORTIFY_SOURCE], [2],
> -    [enable compile-time and run-time bounds-checking, and some warnings])
> +  AH_VERBATIM([FORTIFY_SOURCE],
> +  [/* Enable compile-time and run-time bounds-checking, and some warnings,
> +      without upsetting newer glibc. */

Thanks.  That looks fine.

My only request would be to change the comment to say with which version
of glibc this change starts being useful.  Saying "newer glibc" sounds
fine now, but is guaranteed to be misleading in a year or two.


From MAILER-DAEMON Fri Aug 31 15:58:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7XMT-0001RJ-9o
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 15:58:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60742)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7XMQ-0001QO-3e
	for coreutils@gnu.org; Fri, 31 Aug 2012 15:58:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7XMP-0002Ae-3O
	for coreutils@gnu.org; Fri, 31 Aug 2012 15:58:34 -0400
Received: from mx.meyering.net ([88.168.87.75]:38532)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7XMO-0002AV-JZ
	for coreutils@gnu.org; Fri, 31 Aug 2012 15:58:33 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 15F2E600B1;
	Fri, 31 Aug 2012 21:58:31 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the
	'src/' subdir
In-Reply-To: <87a9xaq4uo.fsf@rho.meyering.net> (Jim Meyering's message of
	"Fri, 31 Aug 2012 20:43:59 +0200")
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
	<87r4qnorr6.fsf@rho.meyering.net> <5041003E.7050805@gmail.com>
	<87liguq557.fsf@rho.meyering.net> <87a9xaq4uo.fsf@rho.meyering.net>
Date: Fri, 31 Aug 2012 21:58:31 +0200
Message-ID: <87sjb2omu0.fsf@rho.meyering.net>
Lines: 73
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 19:58:35 -0000

Jim Meyering wrote:

> Jim Meyering wrote:
> ...
>> No problem.
>> Next step, "make distcheck".  First failure is because inclusion of
>> version.h fails in the non-srcdir build:
> ...
>> This fixes it:
>>
>> diff --git a/src/local.mk b/src/local.mk
>
> FYI, here's another make distcheck problem,
> in case someone else can get to it before I do
> (it'll soon be dinner time here):
>
>   make[2]: Entering directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>     CC       src/uname-arch.o
>     CC       src/hostname.o
>     CCLD     src/arch
>     CCLD     src/hostname
>     GEN      man/arch.1
>     GEN      man/hostname.1
>   mkdir: cannot create directory 'man/arch.td': No such file or directory
>   make[2]: *** [man/arch.1] Error 1
>   make[2]: *** Waiting for unfinished jobs....
>   mkdir: cannot create directory 'man/hostname.td': No such file or directory
>   make[2]: *** [man/hostname.1] Error 1
>   make[2]: Leaving directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>   make[1]: *** [dist] Error 2
>   make[1]: Leaving directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>   make: *** [distcheck] Error 1

For the record, here's another infelicity I've noticed:

  checking whether _sys_siglist is declared... (cached) yes
  checking whether __sys_siglist is declared... (cached) no
  checking for library containing __gmpz_init... (cached) -lgmp
  checking whether this is an ELF system... yes
  ./configure: line 64019: EXEEXT: command not found
  ./configure: line 64019: EXEEXT: command not found
  ./configure: line 64019: EXEEXT: command not found
  ./configure: line 64019: EXEEXT: command not found
  ...
  ./configure: line 64019: EXEEXT: command not found
  ./configure: line 64019: EXEEXT: command not found
  ./configure: line 64019: EXEEXT: command not found
  checking whether NLS is requested... yes
  checking for msgfmt... (cached) /usr/bin/msgfmt
  checking for gmsgfmt... (cached) /usr/bin/msgfmt
  checking for xgettext... (cached) /usr/bin/xgettext

And here's another:

  make[8]: Nothing to be done for `install-exec-am'.
  make[8]: Nothing to be done for `install-data-am'.
  make[8]: Leaving directory `/h/j/w/co/cu/tests/torture/coreutils/test/coreutils-8
  .19.68-ea804-dirty/gnulib-tests'
  make[7]: Leaving directory `/h/j/w/co/cu/tests/torture/coreutils/test/coreutils-8
  .19.68-ea804-dirty/gnulib-tests'
  make[6]: Leaving directory `/h/j/w/co/cu/tests/torture/coreutils/test/coreutils-8
  .19.68-ea804-dirty/gnulib-tests'
  make[5]: Leaving directory `/h/j/w/co/cu/tests/torture/coreutils/test/coreutils-8
  .19.68-ea804-dirty/gnulib-tests'
  make[4]: Leaving directory `/h/j/w/co/cu/tests/torture/coreutils/test/coreutils-8
  .19.68-ea804-dirty'
  make[3]: Leaving directory `/h/j/w/co/cu/tests/torture/coreutils/test/coreutils-8
  .19.68-ea804-dirty'
  make[3]: Makefile: No such file or directory
  make[3]: *** No rule to make target `Makefile'.  Stop.
  make[3]: Entering directory `/h/j/w/co/cu/tests/torture/coreutils/test/coreutils-8.19.68-ea804-dirty'
  Making distclean in lib
  make[4]: Entering directory `/h/j/w/co/cu/tests/torture/coreutils/test/coreutils-8.19.68-ea804-dirty/lib'


From MAILER-DAEMON Fri Aug 31 15:59:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7XNK-0001YT-Fy
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 15:59:30 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60844)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7XNI-0001YM-IL
	for coreutils@gnu.org; Fri, 31 Aug 2012 15:59:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7XNH-0002EF-8U
	for coreutils@gnu.org; Fri, 31 Aug 2012 15:59:28 -0400
Received: from mx.meyering.net ([88.168.87.75]:38538)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7XNG-0002E6-VP
	for coreutils@gnu.org; Fri, 31 Aug 2012 15:59:27 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 065BC601C9;
	Fri, 31 Aug 2012 21:59:26 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the
	'src/' subdir
In-Reply-To: <87a9xaq4uo.fsf@rho.meyering.net> (Jim Meyering's message of
	"Fri, 31 Aug 2012 20:43:59 +0200")
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
	<87r4qnorr6.fsf@rho.meyering.net> <5041003E.7050805@gmail.com>
	<87liguq557.fsf@rho.meyering.net> <87a9xaq4uo.fsf@rho.meyering.net>
Date: Fri, 31 Aug 2012 21:59:26 +0200
Message-ID: <87mx1aomsh.fsf@rho.meyering.net>
Lines: 50
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 19:59:29 -0000

Jim Meyering wrote:
> Jim Meyering wrote:
> ...
>> No problem.
>> Next step, "make distcheck".  First failure is because inclusion of
>> version.h fails in the non-srcdir build:
> ...
>> This fixes it:
>>
>> diff --git a/src/local.mk b/src/local.mk
>
> FYI, here's another make distcheck problem,
> in case someone else can get to it before I do
> (it'll soon be dinner time here):
>
>   make[2]: Entering directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>     CC       src/uname-arch.o
>     CC       src/hostname.o
>     CCLD     src/arch
>     CCLD     src/hostname
>     GEN      man/arch.1
>     GEN      man/hostname.1
>   mkdir: cannot create directory 'man/arch.td': No such file or directory
>   make[2]: *** [man/arch.1] Error 1
>   make[2]: *** Waiting for unfinished jobs....
>   mkdir: cannot create directory 'man/hostname.td': No such file or directory
>   make[2]: *** [man/hostname.1] Error 1
>   make[2]: Leaving directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>   make[1]: *** [dist] Error 2
>   make[1]: Leaving directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>   make: *** [distcheck] Error 1

The fix for this is to create man and src directories:

diff --git a/configure.ac b/configure.ac
index 8c41d62..5dc4b0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -464,6 +464,11 @@ AM_GNU_GETTEXT_VERSION([0.18.1])
 # For a test of uniq: it uses the $LOCALE_FR envvar.
 gt_LOCALE_FR

+# Now that configure no longer creates src/ or man/, create them here.
+# Doing it this way is more maintainable that adding to each individual
+# Makefile rule that creates a file in one of those sub-directories.
+$MKDIR_P man src
+
 AC_CONFIG_FILES(
   Makefile
   lib/Makefile


From MAILER-DAEMON Fri Aug 31 16:00:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7XOK-0001hg-OM
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 16:00:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37046)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7XOI-0001hF-8G
	for coreutils@gnu.org; Fri, 31 Aug 2012 16:00:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7XOH-0002k4-3N
	for coreutils@gnu.org; Fri, 31 Aug 2012 16:00:30 -0400
Received: from mx.meyering.net ([88.168.87.75]:38545)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7XOG-0002jx-PM
	for coreutils@gnu.org; Fri, 31 Aug 2012 16:00:29 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 88D49600B1;
	Fri, 31 Aug 2012 22:00:27 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the
	'src/' subdir
In-Reply-To: <87sjb2omu0.fsf@rho.meyering.net> (Jim Meyering's message of
	"Fri, 31 Aug 2012 21:58:31 +0200")
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
	<87r4qnorr6.fsf@rho.meyering.net> <5041003E.7050805@gmail.com>
	<87liguq557.fsf@rho.meyering.net> <87a9xaq4uo.fsf@rho.meyering.net>
	<87sjb2omu0.fsf@rho.meyering.net>
Date: Fri, 31 Aug 2012 22:00:27 +0200
Message-ID: <87hariomqs.fsf@rho.meyering.net>
Lines: 61
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 20:00:31 -0000

Jim Meyering wrote:
> Jim Meyering wrote:
>
>> Jim Meyering wrote:
>> ...
>>> No problem.
>>> Next step, "make distcheck".  First failure is because inclusion of
>>> version.h fails in the non-srcdir build:
>> ...
>>> This fixes it:
>>>
>>> diff --git a/src/local.mk b/src/local.mk
>>
>> FYI, here's another make distcheck problem,
>> in case someone else can get to it before I do
>> (it'll soon be dinner time here):
>>
>>   make[2]: Entering directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>>     CC       src/uname-arch.o
>>     CC       src/hostname.o
>>     CCLD     src/arch
>>     CCLD     src/hostname
>>     GEN      man/arch.1
>>     GEN      man/hostname.1
>>   mkdir: cannot create directory 'man/arch.td': No such file or directory
>>   make[2]: *** [man/arch.1] Error 1
>>   make[2]: *** Waiting for unfinished jobs....
>>   mkdir: cannot create directory 'man/hostname.td': No such file or directory
>>   make[2]: *** [man/hostname.1] Error 1
>>   make[2]: Leaving directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>>   make[1]: *** [dist] Error 2
>>   make[1]: Leaving directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>>   make: *** [distcheck] Error 1
>
> For the record, here's another infelicity I've noticed:
>
>   checking whether _sys_siglist is declared... (cached) yes
>   checking whether __sys_siglist is declared... (cached) no
>   checking for library containing __gmpz_init... (cached) -lgmp
>   checking whether this is an ELF system... yes
>   ./configure: line 64019: EXEEXT: command not found
...
> And here's another:
...
>   make[3]: *** No rule to make target `Makefile'.  Stop.
>   make[3]: Entering directory
> /h/j/w/co/cu/tests/torture/coreutils/test/coreutils-8.19.68-ea804-dirty'
>   Making distclean in lib
>   make[4]: Entering directory
> /h/j/w/co/cu/tests/torture/coreutils/test/coreutils-8.19.68-ea804-dirty/lib'

And here's one more, so I don't forget:

  rm -rf src/.deps
  rm -f Makefile
  ERROR: files left in build directory after distclean:
  ./man/arch.1
  ./man/hostname.1
  make[1]: *** [distcleancheck] Error 1
  make[1]: Leaving directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
  make: *** [distcheck] Error 1


From MAILER-DAEMON Fri Aug 31 16:31:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7XsN-0004XR-Is
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 16:31:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48253)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7XsL-0004XL-PP
	for coreutils@gnu.org; Fri, 31 Aug 2012 16:31:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7XsK-00040a-Th
	for coreutils@gnu.org; Fri, 31 Aug 2012 16:31:33 -0400
Received: from mx.meyering.net ([88.168.87.75]:38629)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1T7XsK-00040W-KC
	for coreutils@gnu.org; Fri, 31 Aug 2012 16:31:32 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 3C02A60096;
	Fri, 31 Aug 2012 22:31:30 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Subject: Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the
	'src/' subdir
In-Reply-To: <87hariomqs.fsf@rho.meyering.net> (Jim Meyering's message of
	"Fri, 31 Aug 2012 22:00:27 +0200")
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
	<87r4qnorr6.fsf@rho.meyering.net> <5041003E.7050805@gmail.com>
	<87liguq557.fsf@rho.meyering.net> <87a9xaq4uo.fsf@rho.meyering.net>
	<87sjb2omu0.fsf@rho.meyering.net> <87hariomqs.fsf@rho.meyering.net>
Date: Fri, 31 Aug 2012 22:31:30 +0200
Message-ID: <87bohqolb1.fsf@rho.meyering.net>
Lines: 28
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 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: Fri, 31 Aug 2012 20:31:34 -0000

Jim Meyering wrote:
> And here's one more, so I don't forget:
>
>   rm -rf src/.deps
>   rm -f Makefile
>   ERROR: files left in build directory after distclean:
>   ./man/arch.1
>   ./man/hostname.1
>   make[1]: *** [distcleancheck] Error 1
>   make[1]: Leaving directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>   make: *** [distcheck] Error 1

Ahh... that looked familiar once I got into it.
I fixed a similar problem when converting cppi:

diff --git a/man/local.mk b/man/local.mk
index 80519af..a52f5af 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -186,3 +186,8 @@ $(MAN): $(top_srcdir)/src/system.h
 	  && rm -rf $$t							\
 	  && chmod -w $@-t						\
 	  && mv $@-t $@
+
+# This is a kludge to remove man/*.1 from a non-srcdir build.
+distclean-local:
+	test 'x$(srcdir)' = 'x$(builddir)' \
+	  || rm -f $(dist_man1_MANS) $(extra_man_1)


From MAILER-DAEMON Fri Aug 31 16:51:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7YBW-0006tY-Mn
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 16:51:22 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53641)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T7YBU-0006se-Pe
	for coreutils@gnu.org; Fri, 31 Aug 2012 16:51:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T7YBT-0001Og-Qb
	for coreutils@gnu.org; Fri, 31 Aug 2012 16:51:20 -0400
Received: from mx1.redhat.com ([209.132.183.28]:52891)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1T7YBT-0001OV-GK
	for coreutils@gnu.org; Fri, 31 Aug 2012 16:51:19 -0400
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 q7VKpInw017934
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 31 Aug 2012 16:51:18 -0400
Received: from [10.3.113.59] (ovpn-113-59.phx2.redhat.com [10.3.113.59])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q7VKpIBG024671; Fri, 31 Aug 2012 16:51:18 -0400
Message-ID: <504123C5.90908@redhat.com>
Date: Fri, 31 Aug 2012 13:51:17 -0700
From: Eric Blake <eblake@redhat.com>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:14.0) Gecko/20120717 Thunderbird/14.0
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH] build: work with new glibc when not optimizing
References: <1346440145-30209-1-git-send-email-eblake@redhat.com>
	<874nniq395.fsf@rho.meyering.net>
In-Reply-To: <874nniq395.fsf@rho.meyering.net>
X-Enigmail-Version: 1.4.4
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigCC7C3FE81477295761EA4EB6"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 31 Aug 2012 20:51:21 -0000

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

On 08/31/2012 12:18 PM, Jim Meyering wrote:
> Eric Blake wrote:
>> Newer glibc hates unconditional use of FORTIFY_SOURCE when optimizatio=
n
>> is disabled but -Werror is in effect.
>>
>> * configure.ac (FORTIFY_SOURCE): Make conditional.
>> ---
>>
>> Copied from a trick I used in libvirt.

>=20
> My only request would be to change the comment to say with which versio=
n
> of glibc this change starts being useful.  Saying "newer glibc" sounds
> fine now, but is guaranteed to be misleading in a year or two.

Good point.  I amended it to call out glibc 2.15, and pushed.

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


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

iQEcBAEBCAAGBQJQQSPFAAoJEKeha0olJ0NqOxUH/il351WB8GacaP+Fz9YGBb78
e/KdXogn3gxWmBZ0X4SRD7weuBAkIum5p45zqbbeEpJsL5PWlIbvXVUsipsdYXQ8
U4rcTwCSXvpi3PJRBOzSz6PXMLzwaSZPTJi46Ibm01j97JfnREODdCDqfz6zavy4
iuYjDcko1TT/C35IV9X9dvks3ShV4QyvAuhThDSLKIpDtfbWhrVpqXWhPXYOUFVT
HoDRBSEFiqmYHz1aeY6cXvGFPKz7QyZVEyWYRx+rNcbnL3pKC/pc/m7Uih6D1mgn
l5ZWHNo0JAmdY8PRAA1rRxIt+eTdIMiF4vMN9PiGXobin8WwS1ZR+KyO6plUJCo=
=uAku
-----END PGP SIGNATURE-----

--------------enigCC7C3FE81477295761EA4EB6--


From MAILER-DAEMON Fri Aug 31 17:48:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7Z4v-0004cz-Be
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 17:48:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58110)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7Z4t-0004aq-1E
	for coreutils@gnu.org; Fri, 31 Aug 2012 17:48:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7Z4r-0001sS-Uo
	for coreutils@gnu.org; Fri, 31 Aug 2012 17:48:34 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:58202)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7Z4r-0001sM-Oc
	for coreutils@gnu.org; Fri, 31 Aug 2012 17:48:33 -0400
Received: by weys10 with SMTP id s10so2079192wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 14:48:32 -0700 (PDT)
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=Y9a2Za0pimht29sPSX+W9v16/9RsVw+bZC+MaWNr4cA=;
	b=IQIbv63hdYGhodhZe+kqr6c6n6hde1zi0GL9OuAdAVl18rd0WrEZN5Kwf1RPwU5VCK
	biQZvVRoX2cOA2nVOx2DSNMJn74ZnmI8aTME/gP07y18CfD8vD1krZwfjIBrM699z1oQ
	mNEHLv/KcEcfBiRQzJMNEOuC1w+6w8IOTDyf3iiWS95/OhvSewjeZ4HzmmYlENYTMTQL
	9erYHn9c5IWO9+LL0fFmmZFxEhEV2g+syOS/FBmm8AdgfbhSpw833hhV0z1sqN33LtpB
	x18sw9dzaYzTpUBjSlGppj0DJx/K2n7jWlYAQUVBVCii6aW/YO6+y17Brk39ZuTy3sNC
	TECA==
Received: by 10.216.242.196 with SMTP id i46mr5205410wer.123.1346449712778;
	Fri, 31 Aug 2012 14:48:32 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id cl8sm3138581wib.10.2012.08.31.14.48.31
	(version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 14:48:31 -0700 (PDT)
Message-ID: <50413126.1050402@gmail.com>
Date: Fri, 31 Aug 2012 23:48:22 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the
	'src/' subdir
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
	<87r4qnorr6.fsf@rho.meyering.net> <5041003E.7050805@gmail.com>
	<87liguq557.fsf@rho.meyering.net> <87a9xaq4uo.fsf@rho.meyering.net>
	<87sjb2omu0.fsf@rho.meyering.net> <87hariomqs.fsf@rho.meyering.net>
	<87bohqolb1.fsf@rho.meyering.net>
In-Reply-To: <87bohqolb1.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
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, 31 Aug 2012 21:48:35 -0000

Hi Jim, thanks for you patience and work on this.

On 08/31/2012 10:31 PM, Jim Meyering wrote:
> Jim Meyering wrote:
>> And here's one more, so I don't forget:
>>
>>   rm -rf src/.deps
>>   rm -f Makefile
>>   ERROR: files left in build directory after distclean:
>>   ./man/arch.1
>>   ./man/hostname.1
>>   make[1]: *** [distcleancheck] Error 1
>>   make[1]: Leaving directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>>   make: *** [distcheck] Error 1
> 
> Ahh... that looked familiar once I got into it.
> I fixed a similar problem when converting cppi:
> 
> diff --git a/man/local.mk b/man/local.mk
> index 80519af..a52f5af 100644
> --- a/man/local.mk
> +++ b/man/local.mk
> @@ -186,3 +186,8 @@ $(MAN): $(top_srcdir)/src/system.h
>  	  && rm -rf $$t							\
>  	  && chmod -w $@-t						\
>  	  && mv $@-t $@
> +
> +# This is a kludge to remove man/*.1 from a non-srcdir build.
> +distclean-local:
> +	test 'x$(srcdir)' = 'x$(builddir)' \
> +	  || rm -f $(dist_man1_MANS) $(extra_man_1)
>
I have some pending changes that will conflict with this.  Can you hold
this change until I've posted them?  At that point, I might try to fix
VPATH issues myself.

Thanks,
  Stefano


From MAILER-DAEMON Fri Aug 31 17:52:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7Z8b-0004uY-RO
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 17:52:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47702)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7Z8Z-0004uN-Bh
	for coreutils@gnu.org; Fri, 31 Aug 2012 17:52:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7Z8X-0003Ff-Eo
	for coreutils@gnu.org; Fri, 31 Aug 2012 17:52:23 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:47127)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7Z8X-0003FS-8S
	for coreutils@gnu.org; Fri, 31 Aug 2012 17:52:21 -0400
Received: by wibhn17 with SMTP id hn17so1577024wib.12
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 14:52:20 -0700 (PDT)
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=mbDsfu6ef291kuidWaGQxRkt6SwcBeoRU5Z08XT8jJY=;
	b=nkt6+65242Xy0KkYDoZjVQYfLVT1s7fSFAFXMyiZ2tT812zD1PvToEsvXkH5QdX8+D
	+4U694bclFEDZxdebBldNx6iKrmfkfs9hVVhFEj1dFtYNaUFQqGHeKDltWBhZbpVBYmm
	Iww2zXXVThrr84KZ40L1KiZ0uk57DRP2+KRxCzBNGZ/d7XODuI2LpccCuBOk8kB8o8UW
	JURaGOX6YM6rWt9xsE/VHjcW1H+qlhIPKaYs2GgPPfz08+qufWQzyecpkLwGyvcx2KCI
	PhCmU0jJFQzYdtg+IoH3yiAI6pM/43T0HOLnmPESaW5O9T7/oEhQu5LncNaKh8cQSd4j
	Zb2w==
Received: by 10.180.8.40 with SMTP id o8mr7169917wia.9.1346449940408;
	Fri, 31 Aug 2012 14:52:20 -0700 (PDT)
Received: from [192.168.178.21]
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id cu1sm3178602wib.6.2012.08.31.14.52.19
	(version=SSLv3 cipher=OTHER); Fri, 31 Aug 2012 14:52:19 -0700 (PDT)
Message-ID: <50413212.6080203@gmail.com>
Date: Fri, 31 Aug 2012 23:52:18 +0200
From: Stefano Lattarini <stefano.lattarini@gmail.com>
MIME-Version: 1.0
To: Jim Meyering <jim@meyering.net>
Subject: Re: [PATCH v2 0/9] Patches to avoid use of make recursion in the
	'src/' subdir
References: <87a9xbqhoe.fsf@rho.meyering.net>
	<cover.1346427900.git.stefano.lattarini@gmail.com>
	<87r4qnorr6.fsf@rho.meyering.net> <5041003E.7050805@gmail.com>
	<87liguq557.fsf@rho.meyering.net> <87a9xaq4uo.fsf@rho.meyering.net>
	<87mx1aomsh.fsf@rho.meyering.net>
In-Reply-To: <87mx1aomsh.fsf@rho.meyering.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
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, 31 Aug 2012 21:52:24 -0000

On 08/31/2012 09:59 PM, Jim Meyering wrote:
> Jim Meyering wrote:
>> Jim Meyering wrote:
>> ...
>>> No problem.
>>> Next step, "make distcheck".  First failure is because inclusion of
>>> version.h fails in the non-srcdir build:
>> ...
>>> This fixes it:
>>>
>>> diff --git a/src/local.mk b/src/local.mk
>>
>> FYI, here's another make distcheck problem,
>> in case someone else can get to it before I do
>> (it'll soon be dinner time here):
>>
>>   make[2]: Entering directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>>     CC       src/uname-arch.o
>>     CC       src/hostname.o
>>     CCLD     src/arch
>>     CCLD     src/hostname
>>     GEN      man/arch.1
>>     GEN      man/hostname.1
>>   mkdir: cannot create directory 'man/arch.td': No such file or directory
>>   make[2]: *** [man/arch.1] Error 1
>>   make[2]: *** Waiting for unfinished jobs....
>>   mkdir: cannot create directory 'man/hostname.td': No such file or directory
>>   make[2]: *** [man/hostname.1] Error 1
>>   make[2]: Leaving directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>>   make[1]: *** [dist] Error 2
>>   make[1]: Leaving directory `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
>>   make: *** [distcheck] Error 1
> 
> The fix for this is to create man and src directories:
> 
> diff --git a/configure.ac b/configure.ac
> index 8c41d62..5dc4b0a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -464,6 +464,11 @@ AM_GNU_GETTEXT_VERSION([0.18.1])
>  # For a test of uniq: it uses the $LOCALE_FR envvar.
>  gt_LOCALE_FR
> 
> +# Now that configure no longer creates src/ or man/, create them here.
> +# Doing it this way is more maintainable that adding to each individual
> +# Makefile rule that creates a file in one of those sub-directories.
> +$MKDIR_P man src
> +
To be extra-purist, shouldn't this be handled with dirstamp rules in the
Makefile?  Or maybe, such a purist move could be done at least in the
Automake-NG based fork of coreutils, where we can use GNU make order-only
prerequisites, which will DTRT in this context.

Thanks,
  Stefano


From MAILER-DAEMON Fri Aug 31 19:47:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7avj-0001ur-S1
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:15 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53472)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avi-0001tw-1Z
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avg-0007fa-Pq
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:13 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:65072)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avg-0007fH-Jk
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:12 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so2117744wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=w0y6mYTt96aUjkiQ6NRV5oJfCUIbZjlAe5aKzjRFpe8=;
	b=NjYQ4KmCxYt79bIf+tFcwJiNO1GLKK2Akh+ZaoSzQ4r0co0zemirNJWA6RwHRXe1p6
	XIKqMJhPJ8kk2t5XG9qOlGxhC2uk1N6lvwaaJpoq/jl4Yt4Nih5kzsWECkctSzF3YIZT
	tRcmOPD6Q5Y0rwYPFmen3o+oIktndznTJx+51Z6OavkCWtzIXb/LS4Vjdd19uP1wt4Z4
	OepbSVwPz/y9m0SaYa8+fG5Qg4sPuCTJFnytm3CwUGLjaLhrlT/3TF72fd9LiTVCpm1A
	0tQFg6QXmLoL8PLf5kQO3z70z97yKbAW/D0wQ9irz6hcamfACofNcjuTwYIEChO+eOA6
	Xqmw==
Received: by 10.180.90.104 with SMTP id bv8mr7607997wib.22.1346456832184;
	Fri, 31 Aug 2012 16:47:12 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.11
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:11 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 01/22] maint: add our 'bootstrap_post_import_hook' function
Date: Sat,  1 Sep 2012 01:46:38 +0200
Message-Id: <940765bb45f68a85cd90e811d3705a49014d0bc1.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:15 -0000

This is in preparation of future changes.

* bootstrap.conf (bootstrap_post_import_hook): New, will be executed
by bootstrap after gnulib-tool abut before the autotools.
Move creation of dummy ChangeLog into it.
---
 bootstrap.conf | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 535900d..4fc4e67 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -324,8 +324,11 @@ tar        -
 xz         -
 "
 
-# Automake requires that ChangeLog exist.
-touch ChangeLog || exit 1
+bootstrap_post_import_hook ()
+{
+  # Automake requires that ChangeLog exist.
+  touch ChangeLog || exit 1
+}
 
 bootstrap_epilogue()
 {
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7avl-0001yN-2S
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:17 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53477)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avi-0001tx-Du
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avg-0007fP-4Z
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:14 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:65072)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avf-0007fH-Ti
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:12 -0400
Received: by weys10 with SMTP id s10so2117744wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer;
	bh=iNwFm7JNoB0L08N2vp4NgtA9EtzqqxFYvgGeyI6HtlQ=;
	b=mQOLSKDWqGGa3EmPgmFsOPhTK7qBO07q7IM5SKJxUBE3dHwpvLWhA2S74IlmqFkXqF
	GwGlcTPJ/3ZiiUglv2Q0/u9ZUhrh0ULDolfJTY3NAjNIpwxK8RuB4jPNuLScxyOSDL1F
	MDDLHf2/p1CBfGwlgewOvxYHaiMp73/0kTOZ2vyGv3nw1mkjFxjp2AoDqqIhcoaQa0UE
	F9xdEFuffR/E095F6Is1cihlGXcF5HiE38dDg5tk+GbSZ/3MhYRzgDfL0O9a/tnbv5II
	oCD0aBkS2duxVcDQ70kaXBM44mIiG+a4f17Rfv3rX45IxXLDBAUJxcXycyNVqhJ6LWep
	0+4Q==
Received: by 10.216.131.170 with SMTP id m42mr5013638wei.82.1346456830974;
	Fri, 31 Aug 2012 16:47:10 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.09
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:10 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 00/22] Patches to avoid use of make recursion in the 'src/'
	subdir
Date: Sat,  1 Sep 2012 01:46:37 +0200
Message-Id: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:15 -0000

This is a re-spin, extension and follow-up to this previous series:

    <http://lists.gnu.org/archive/html/coreutils/2012-08/msg00257.html>

plus other follow-up fixlets and refactoring.  Thanks to Jim Meyering
for his testing of earlier iterations of this series, and his relentless
reporting of problems and errors.

Further testing would be appreciated.

Regards,
  Stefano

-*-*-*-

Jim Meyering (2):
  build: fix VPATH issues in C compilation
  maint: avoid distcheck failure by properly cleaning $(EXTRA_MANS)

Stefano Lattarini (20):
  maint: add our 'bootstrap_post_import_hook' function
  build: refactor how lists of coreutils programs are defined
  build: don't use recursive make to build the 'src' subdirectory
  build: fix generation of manpages for programs not built by default
  maint: improve remake rules for maintainers
  maint: remove unused target 'install-root'
  maint: fix and simplify maintainer checks
  maint: fix one stray reference to src/Makefile.am
  maint: update gitignore entries
  build: simplify: get rid of some indirection variables
  build: simplify and make more portable to non-GNU make
  build: one less unneeded make variable
  build: rename dist_man1_MANS -> man1_MANS
  build: simplify: get rid of yet some more indirection variables
  build: enhance man pages cleaning and dependencies
  build: $(mandeps): new, factors out man pages dependencies
  maint: simplify declaration of "libexec" programs
  maint: typofix in comments
  maint: fix quoting problem in configure.ac
  maint: port manpages generation to VPATH builds

 .gitignore                         |   2 +
 Makefile.am                        |  23 +-
 bootstrap.conf                     |  15 +-
 build-aux/gen-lists-of-programs.sh | 187 +++++++++++
 cfg.mk                             |  63 ++--
 configure.ac                       |  94 ++----
 man/local.mk                       | 258 +++++++-------
 src/.gitignore                     |   1 +
 src/Makefile.am                    | 665 -------------------------------------
 src/local.mk                       | 533 +++++++++++++++++++++++++++++
 tests/Makefile.am                  |   6 +-
 11 files changed, 960 insertions(+), 887 deletions(-)
 create mode 100755 build-aux/gen-lists-of-programs.sh
 delete mode 100644 src/Makefile.am
 create mode 100644 src/local.mk

-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7avo-00021q-7n
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53519)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avk-0001xl-OJ
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avi-0007gz-Ev
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:16 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:65072)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avi-0007fH-4Q
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:14 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so2117744wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=X4XY6Ida5TekXx8ZFbXkZp7i24bBxiiBCObaxPItUiM=;
	b=TUA7typax49l/qHuF9edlXW3mjdo8G2zzbu4HOC3GivjmbEfV8VWi2c2iNsJyRfuLP
	zsKj8tuZx7dVIGLfmn15ln44r1KXn6S9K1ct4CQypxBDgmxuCwLNpcqzRnx8eMAIuRZu
	050tYYte+nV0plbF9b+ssW6lEQ8sC7lj4X2BmAa+Tf9U4jLEuWp/aU5r6+9M3350vwCU
	6FZsOQwEHjtrD9zHviMaFJ9TphSQDyENDL8jll6TFiOrLz8m4bzyPmYm7JMXG7XOOC0q
	NuM2tRarfPvBu64RUCVIe5V925JObG1PCHJndccVJwMunMDTmIw4ZCm8tNQNoiHvRm7G
	PN2g==
Received: by 10.180.98.138 with SMTP id ei10mr7706383wib.1.1346456833647;
	Fri, 31 Aug 2012 16:47:13 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.12
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:13 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 02/22] build: refactor how lists of coreutils programs are
	defined
Date: Sat,  1 Sep 2012 01:46:39 +0200
Message-Id: <7f14d80067973b2e9d02a9b30ecadaf4a161a0ba.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:19 -0000

This is in preparation of future changes.  Still, this patch
leaves the build system in a better shape; true, with more
indirections, but also with less convoluted and brittle hacks.

Unfortunately, this commit also makes some rebuild rules
incomplete; that will son be fixed by follow-up patches.

* build-aux/gen-lists-of-programs.sh: New, generates autoconf
and automake input fragments that define "lists" of all coreutils
programs, with further distinctions about how and when these
programs should be built (by default; if the system is capable
enough; only if the user ask for them explicitly).  This is
useful to avoid duplicating the definitions of these list among
several files (at least 'configure.ac' 'src/Makefile.am'); such
duplication had proved a source of inconsistencies and bugs in
the past.  And the pre-existing way to avoid such duplication,
as implemented in 'configure.ac' before this patch, was overly
complex and brittle.
* Makefile.am (EXTRA_DIST): Distribute the new script.
* bootstrap.conf (bootstrap_post_import_hook): Run the new script
to generate 'm4/cu-progs.m4' and 'src/cu-progs.mk'.
* .gitignore: Ignore those files.
* configure.ac: Include 'm4/cu-progs.m4', and decidedly simplify
most of the programs' lists definition and processing accordingly.
* src/Makefile.am: Similarly include 'src/cu-progs.mk', containing
definition of variables $(default__progs), $(no_install__progs)
and $(build_if_possible__progs). Accordingly ...
(no_install__progs, build_if_possible__progs): ... remove.
(EXTRA_DIST): Adjust definition.
Adjust a comment.
---
 .gitignore                         |   2 +
 Makefile.am                        |   1 +
 bootstrap.conf                     |   6 +-
 build-aux/gen-lists-of-programs.sh | 186 +++++++++++++++++++++++++++++++++++++
 configure.ac                       |  62 ++-----------
 src/Makefile.am                    | 125 ++-----------------------
 6 files changed, 212 insertions(+), 170 deletions(-)
 create mode 100755 build-aux/gen-lists-of-programs.sh

diff --git a/.gitignore b/.gitignore
index aad59bd..56a9bf4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -96,6 +96,7 @@
 /m4/.cvsignore
 /m4/.gitignore
 /m4/codeset.m4
+/m4/cu-progs.m4
 /m4/fcntl-o.m4
 /m4/gettext.m4
 /m4/glibc2.m4
@@ -150,6 +151,7 @@
 /po/remove-potcdate.sed
 /po/remove-potcdate.sin
 /po/stamp-po
+/src/cu-progs.mk
 /src/version.c
 /src/version.h
 /stamp-h1
diff --git a/Makefile.am b/Makefile.am
index b47b1c1..f3d6eda 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,6 +49,7 @@ EXTRA_DIST =				\
   THANKStt.in				\
   bootstrap				\
   bootstrap.conf			\
+  build-aux/gen-lists-of-programs.sh	\
   cfg.mk				\
   dist-check.mk				\
   maint.mk				\
diff --git a/bootstrap.conf b/bootstrap.conf
index 4fc4e67..4ef3fc8 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -327,7 +327,11 @@ xz         -
 bootstrap_post_import_hook ()
 {
   # Automake requires that ChangeLog exist.
-  touch ChangeLog || exit 1
+  touch ChangeLog || return 1
+  # List of coreutils programs.  See heading comments in the invoked
+  # script for more info.
+  build-aux/gen-lists-of-programs.sh --autoconf >m4/cu-progs.m4  || return 1
+  build-aux/gen-lists-of-programs.sh --automake >src/cu-progs.mk || return 1
 }
 
 bootstrap_epilogue()
diff --git a/build-aux/gen-lists-of-programs.sh b/build-aux/gen-lists-of-programs.sh
new file mode 100755
index 0000000..ec43ee8
--- /dev/null
+++ b/build-aux/gen-lists-of-programs.sh
@@ -0,0 +1,186 @@
+#!/bin/sh
+# Generate lists of all coreutils programs, to be fed both to Autoconf
+# and Automake, and with further distinctions about how and when these
+# programs should be built.  This is useful to avoid duplicating the
+# definitions of these list among several files ('configure.ac' and
+# 'src/Makefile.am' at least); such duplication had proved a source of
+# inconsistencies and bugs in the past.
+
+set -u
+set -e
+
+# These are the names of programs that are not built nor installed
+# by default.  This list is *not* intended for programs like 'who',
+# 'nice', 'chroot', etc., that are built only when certain requisite
+# system features are detected.
+# Hence, if the user wants to install programs from this list anyway,
+# say A and B, he'll have to use "--enable-install-program=A,B" when
+# invoking configure.
+disabled_by_default_progs='
+    arch
+    hostname
+'
+
+# Programs that can be built only when certain requisite system
+# features are detected.  These prerequisites will be looked for
+# at configure runtime.
+build_if_possible_progs='
+    chroot
+    df
+    hostid
+    libstdbuf.so
+    nice
+    pinky
+    stdbuf
+    stty
+    uptime
+    users
+    who
+'
+
+# All the other programs, to be built by default, and that should
+# be buildable without problems on any target system.
+normal_progs='
+    [
+    base64
+    basename
+    cat
+    chcon
+    chgrp
+    chmod
+    chown
+    cksum
+    comm
+    cp
+    csplit
+    cut
+    date
+    dd
+    dir
+    dircolors
+    dirname
+    du
+    echo
+    env
+    expand
+    expr
+    factor
+    false
+    fmt
+    fold
+    ginstall
+    groups
+    head
+    id
+    join
+    kill
+    link
+    ln
+    logname
+    ls
+    md5sum
+    mkdir
+    mkfifo
+    mknod
+    mktemp
+    mv
+    nl
+    nproc
+    nohup
+    od
+    paste
+    pathchk
+    pr
+    printenv
+    printf
+    ptx
+    pwd
+    readlink
+    realpath
+    rm
+    rmdir
+    runcon
+    seq
+    sha1sum
+    sha224sum
+    sha256sum
+    sha384sum
+    sha512sum
+    shred
+    shuf
+    sleep
+    sort
+    split
+    stat
+    sum
+    sync
+    tac
+    tail
+    tee
+    test
+    timeout
+    touch
+    tr
+    true
+    truncate
+    tsort
+    tty
+    uname
+    unexpand
+    uniq
+    unlink
+    vdir
+    wc
+    whoami
+    yes
+'
+
+me=`echo "$0" | sed 's,.*/,,'`
+msg="Automatically generated by $me.  DO NOT EDIT BY HAND!"
+
+case $#,$1 in
+  1,--autoconf|1,--for-autoconf)
+    echo "dnl $msg"
+    for p in $normal_progs; do
+      test x"$p" = x"[" && p='@<:@'
+      echo "gl_ADD_PROG([optional_bin_progs], [$p])"
+    done
+    # Extra 'echo' to normalize whitespace.
+    echo "no_install_progs_default='`echo $disabled_by_default_progs`'"
+    sed 's/^ *//' <<END
+        # Given the name of a variable containing a space-separated
+        # list of install-by-default programs and the actual list
+        # do-not-install-by-default programs, modify the former variable
+        # to reflect any "do-install" and "don't-install" requests.
+        # That is, add any program specified via --enable-install-program,
+        # and remove any program specified via --enable-no-install-program.
+        # Note how the second argument below is a literal, with ","
+        # separators.  That is required due to the way the macro works,
+        # and since the corresponding ./configure option argument is
+        # comma-separated on input.
+        gl_INCLUDE_EXCLUDE_PROG([optional_bin_progs], [`\
+          echo $disabled_by_default_progs \
+                                    | sed 's/ /,/g'`])
+END
+    ;;
+  1,--automake|1,--for-automake)
+    echo "## $msg"
+    echo no_install__progs =
+    for p in $disabled_by_default_progs; do
+      echo no_install__progs += $p
+    done
+    echo build_if_possible__progs =
+    for p in $build_if_possible_progs; do
+      echo build_if_possible__progs += $p
+    done
+    echo default__progs =
+    for p in $normal_progs; do
+      echo default__progs += $p
+    done
+    ;;
+  *)
+    echo "$0: invalid usage" >&2; exit 2
+    ;;
+esac
+
+exit 0
diff --git a/configure.ac b/configure.ac
index 083fd34..ca038c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -407,55 +407,13 @@ if test "$elf_sys" = "yes" && \
 fi
 
 ############################################################################
-mk="$srcdir/src/Makefile.am"
-# Extract all literal names from the definition of $(EXTRA_PROGRAMS)
-# in $mk but don't expand the variable references.
-# Append each literal name to $optional_bin_progs.
-v=EXTRA_PROGRAMS
-for gl_i in `sed -n '/^'$v' =/,/[[^\]]$/p' $mk \
-    | sed 's/^  *//;/^\$.*/d;/^'$v' =/d' \
-    | tr -s '\\015\\012\\\\' '   '`; do
-  gl_ADD_PROG([optional_bin_progs], $gl_i)
-done
-
-# As above, extract literal names from the definition of $(no_install__progs)
-# in $mk but don't expand the variable references.
-v=no_install__progs
-t=`sed -n '/^'$v' =/,/[[^\]]$/p' $mk \
-    | sed 's/^  *//;/^\$.*/d;/^'$v' =/d' \
-    | tr -s '\\015\\012\\\\' '   '`
-# Remove any trailing space.
-no_install_progs_default=`echo "$t"|sed 's/ $//'`
-
-# Unfortunately, due to the way autoconf's AS_HELP_STRING works, the list
-# of default-not-installed programs, "arch hostname", must appear in two
-# places: in this file below, and in $mk.  Using "$no_install_progs_default"
-# below cannot work.  And we can't substitute the names into $mk because
-# automake needs the literals, too.
-# The compromise is to ensure that the space-separated list extracted
-# above matches the literal 2nd argument below.
-c="$srcdir/configure.ac"
-re='^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])'
-t=`sed -n '/'"$re"'/{s/'"$re"'/\1/;s/,/ /gp
-}' $c`
-case $t in
-  $no_install_progs_default) ;;
-  *) AC_MSG_ERROR([[internal error: g'l_INCLUDE_EXCLUDE_PROG's 2nd arg, $t,
-                   does not match the list of default-not-installed programs
-                   ($no_install_progs_default) also recorded in $mk]],
-                   1) ;;
-esac
 
-# Given the name of a variable containing a space-separated list of
-# install-by-default programs and the actual list do-not-install-by-default
-# programs, modify the former variable to reflect any "do-install" and
-# "don't-install" requests.
-# I.e., add any program name specified via --enable-install-program=..., and
-# remove any program name specified via --enable-no-install-program=...
-# Note how the second argument below is a literal, with "," separators.
-# That is required due to the way the macro works, and since the
-# corresponding ./configure option argument is comma-separated on input.
-gl_INCLUDE_EXCLUDE_PROG([optional_bin_progs], [arch,hostname])
+dnl Autogenerated by the 'gen-lists-of-programs.sh' auxiliary script.
+dnl Issue proper calls to the macros gl_INCLUDE_EXCLUDE_PROG and
+dnl gl_ADD_PROG (updating $optional_bin_progs), and generate the list
+dnl of coreutils programs to be built only upon explicit user request,
+dnl saving that list in the $no_install_progs_default shell variable.
+m4_include([m4/cu-progs.m4])
 
 # Now that we know which programs will actually be built up, figure out
 # which optional helper progs should be compiled.
@@ -478,19 +436,15 @@ MAN=`
 # Normalize whitespace.
 MAN=`echo $MAN`
 
+NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
+AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
 OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
 AC_SUBST([OPTIONAL_BIN_PROGS])
 OPTIONAL_PKGLIB_PROGS=`echo "$optional_pkglib_progs " | sed 's/ $//'`
 AC_SUBST([OPTIONAL_PKGLIB_PROGS])
-NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
-AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
 
 AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
 
-# Arrange to rerun configure whenever the file, src/Makefile.am,
-# containing the list of program names changes.
-CONFIG_STATUS_DEPENDENCIES='$(top_srcdir)/src/Makefile.am'
-AC_SUBST([CONFIG_STATUS_DEPENDENCIES])
 ############################################################################
 
 # As long as "grep 'PRI[diouxX]' po/*.pot" reports matches in
diff --git a/src/Makefile.am b/src/Makefile.am
index 9be3acf..3b0ef65 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,124 +15,18 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# These are the names of programs that are not installed by default.
-# This list is *not* intended for programs like who, nice, chroot, etc.,
-# that are built only when certain requisite system features are detected.
-# Hence, if you want to install programs from this list anyway, say A and B,
-# use --enable-install-program=A,B
-no_install__progs = \
-  arch hostname
-
-build_if_possible__progs = \
-  chroot	\
-  df		\
-  hostid	\
-  libstdbuf.so	\
-  nice		\
-  pinky		\
-  stdbuf	\
-  stty		\
-  uptime	\
-  users		\
-  who
-
 AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
 
+# The list of all programs (separated in different variables to express
+# the how and when they should be installed) is defined in this makefile
+# fragment, autogenerated by the 'gen-lists-of-programs.sh' auxiliary
+# script.
+include $(srcdir)/cu-progs.mk
+
 EXTRA_PROGRAMS = \
   $(no_install__progs) \
   $(build_if_possible__progs) \
-  [		\
-  base64	\
-  basename	\
-  cat		\
-  chcon		\
-  chgrp		\
-  chmod		\
-  chown		\
-  cksum		\
-  comm		\
-  cp		\
-  csplit	\
-  cut		\
-  date		\
-  dd		\
-  dir		\
-  dircolors	\
-  dirname	\
-  du		\
-  echo		\
-  env		\
-  expand	\
-  expr		\
-  factor	\
-  false		\
-  fmt		\
-  fold		\
-  ginstall	\
-  groups	\
-  head		\
-  id		\
-  join		\
-  kill		\
-  link		\
-  ln		\
-  logname	\
-  ls		\
-  md5sum	\
-  mkdir		\
-  mkfifo	\
-  mknod		\
-  mktemp	\
-  mv		\
-  nl		\
-  nproc		\
-  nohup		\
-  od		\
-  paste		\
-  pathchk	\
-  pr		\
-  printenv	\
-  printf	\
-  ptx		\
-  pwd		\
-  readlink	\
-  realpath	\
-  rm		\
-  rmdir		\
-  runcon	\
-  seq		\
-  sha1sum	\
-  sha224sum	\
-  sha256sum	\
-  sha384sum	\
-  sha512sum	\
-  shred		\
-  shuf		\
-  sleep		\
-  sort		\
-  split		\
-  stat		\
-  sum		\
-  sync		\
-  tac		\
-  tail		\
-  tee		\
-  test		\
-  timeout	\
-  touch		\
-  tr		\
-  true		\
-  truncate	\
-  tsort		\
-  tty		\
-  uname		\
-  unexpand	\
-  uniq		\
-  unlink	\
-  vdir		\
-  wc		\
-  whoami	\
-  yes
+  $(default__progs)
 
 bin_PROGRAMS = $(OPTIONAL_BIN_PROGS)
 
@@ -620,8 +514,9 @@ check-README:
 	$(AM_V_at)diff $(pm) $(pr) && rm -rf $(pr) $(pm)
 
 # Ensure that a by-default-not-installed program (listed in
-# $(no_install__progs) is not also listed in $(EXTRA_PROGRAMS), because
-# if that were to happen, it *would* be installed by default.
+# $(no_install__progs) is not also listed as another $(EXTRA_PROGRAMS)
+# entry, because if that were to happen, it *would* be installed
+# by default.
 .PHONY: check-duplicate-no-install
 check-duplicate-no-install: tr
 	$(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)'| ./tr ' ' '\n' | uniq -d`"
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7avq-00026y-Bg
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:22 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53577)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avn-00021o-Kn
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avm-0007kF-1h
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:19 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:34789)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avl-0007jZ-Sc
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:17 -0400
Received: by wgbdt14 with SMTP id dt14so2092479wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=XD/aNHNCbFcVwQrF5EjdlDOSA3+ICVifrbySwto70zs=;
	b=ZrG585ucztVgbM+MZapTH8LEgRLvfOEjEBhkh6ldd7aet7byOjssSyyQvYkk24M1Yi
	HArWIKbZ5uBMfIhqOznlyTJQGJf8XcCzBvXFsh5p9AwKcnOkYVgZjILiSLtiNin8Rf1F
	QYMf8OyozsbK2bYIEQBykYoCOfZVJv35CDqYefvieEwhwxC/nyw04BDgjUZVSNfoXhq0
	LpBfi7GrlNSAwuxy0/DT15UtZv8W0gqz93w378XtHp0vFUEvz/PcrMYfuYBZXbNud7+/
	1/4lr4f/HkHBiH74GKPmidA9SAhFbDCZIZ9k8fycLuiNIn3eThoQVtR/Mle9u5fvjDUw
	Yd0g==
Received: by 10.180.78.5 with SMTP id x5mr7643202wiw.13.1346456837045;
	Fri, 31 Aug 2012 16:47:17 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.15
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:16 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 04/22] build: fix generation of manpages for programs not
	built by default
Date: Sat,  1 Sep 2012 01:46:41 +0200
Message-Id: <ca3bec48772a9695f0304c5d5610eb3ad0e4f69c.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:20 -0000

* src/local.mk (dist-hook): Don't use this to ensure all the
programs, even the ones disabled by default or by the user, are
built (doing so is required to generate the distributed manpages
are properly built).  This would build those programs too late
anyway, causing errors like:

    $ make dist
    make  dist-xz am__post_remove_distdir='@:'
    make[1]: Entering directory `~/src/coreutils'
      GEN      man/arch.1
    help2man: can't get '--help' info from man/arch.td/arch
    make[1]: *** [man/arch.1] Error 127
    make[1]: Leaving directory `~/src/coreutils'
    make: *** [dist] Error 2

Instead, ...
* man/local.mk (extra_man_x, extra_man_1): define these ...
($(extra_man_1)): ... and make this depend on $(all_programs).
(EXTRA_DIST): Adjust.
Adjust some comments as well.
---
 man/local.mk | 19 ++++++++++++-------
 src/local.mk |  5 -----
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/man/local.mk b/man/local.mk
index d42c982..80519af 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -25,13 +25,18 @@ MAINTAINERCLEANFILES += $(dist_man1_MANS)
 
 # The "$(VAR:%=dir/%.x)" idiom is not portable according to POSIX, but in
 # practice it works with several make implementation (GNU, BSD, CCS make
-# from Solaris 10, Sun distributed make).  In addition, since only
-# maintainers are expected to build release tarballs (and they should
-# use GNU make when doing so), it's not big deal if this won't work with
-# some dumber make implementation.
-EXTRA_DIST += \
-  $(NO_INSTALL_PROGS_DEFAULT:%=man/%.x) \
-  $(NO_INSTALL_PROGS_DEFAULT:%=man/%.1)
+# from Solaris 10, Sun distributed make).
+extra_man_x = $(NO_INSTALL_PROGS_DEFAULT:%=man/%.x)
+extra_man_1 = $(NO_INSTALL_PROGS_DEFAULT:%=man/%.1)
+
+EXTRA_DIST += $(extra_man_1) $(extra_man_x)
+
+# This is required because we have subtle inter-directory dependencies:
+# in order to generate all man pages, even those for which we don't
+# install a binary, require that all programs be built at distribution
+# time.  We can't use 'dist-hook' for this, since it would run too late:
+# the manpages must be generated before the distdir is created and filled.
+$(extra_man_1): $(all_programs)
 
 # Depend on this to get version number changes.
 mandep = .version
diff --git a/src/local.mk b/src/local.mk
index 45a6268..2446200 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -495,11 +495,6 @@ all_programs.list:
 	  | sed /libstdbuf/d \
 	  | $(ASSORT) -u
 
-# This is required because we have broken inter-directory dependencies:
-# in order to generate all man pages, even those for which we don't
-# install a binary, require that all programs be built at distribution time.
-dist-hook: $(all_programs)
-
 pm = progs-makefile
 pr = progs-readme
 # Ensure that the list of programs in README matches the list
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7avr-0002AM-G1
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53596)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avo-000220-EO
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avn-0007kx-9l
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:20 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:33996)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avn-0007kc-3W
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:19 -0400
Received: by wibhn17 with SMTP id hn17so1625250wib.12
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=R435uod90RIlFinPUFcdTfidSFKBtoz/kU3cD8trld4=;
	b=mHjFLM5spqwSK6EYiiTbbQgCUs+dIVqJX7UTEZrKH2bCuPXx9U29OxGiNwpzQU7T2+
	tBLxp4Cv3lYXLA1PIMXyNDiQHSmPLj/xSdITcomgcLLBU783pyR03crKCThLspg/QfzC
	37fw1rgN7pgqqZHJpA/xBynXFB2JHc9684OaP/0vuvDV0Jqmu8tHTW3XNWK47Uaqhd6S
	1GOZc5IYFadrveBz7/eAGn8GqYdTVwn27an43wtBN81eMHk1NrQonLcDZTMoZaLfVYgv
	hkDHJTjpBSExaDHG4iYPS/xDa1nNM52eLpnxjdBhvti1a81cw/IRfMRuCtSa/iRA7SNH
	yUCw==
Received: by 10.180.86.133 with SMTP id p5mr7630439wiz.17.1346456838302;
	Fri, 31 Aug 2012 16:47:18 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.17
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:17 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 05/22] maint: improve remake rules for maintainers
Date: Sat,  1 Sep 2012 01:46:42 +0200
Message-Id: <e8334d35a59ef1eff21e3e9685f667f0e46eaa5e.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:22 -0000

This is a follow up on today's former commit "build: refactor
how lists of coreutils programs are defined".

* Makefile.am ($(top_srcdir)/m4/cu-progs.m4,
$(srcdir)/src/cu-progs.mk): New, generate these files from the
'build-aux/gen-lists-of-programs.sh', the same way it's done
from the bootstrap script.
* bootstrap.conf (bootstrap_post_import_hook): Add comment about
the necessity to keep those new rules synced with the commands
here.  Enhance those commands so to that the generated files are
set read-only.
---
 Makefile.am    | 15 +++++++++++++++
 bootstrap.conf | 10 +++++++---
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 6a56f68..2d5fdaa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,6 +55,21 @@ EXTRA_DIST =				\
   maint.mk				\
   thanks-gen
 
+gen_progs_lists = $(top_srcdir)/build-aux/gen-lists-of-programs.sh
+
+# Keep these in sync with bootstrap.conf:bootstrap_post_import_hook().
+# Use '$(top_srcdir)/m4' and '$(srcdir)/src' for the benefit of non-GNU
+# makes: it is with those directories that 'cu-progs.m4' and 'cu-progs.mk'
+# appear in our dependencies.
+$(top_srcdir)/m4/cu-progs.m4: $(gen_progs_lists)
+	$(AM_V_GEN)rm -f $@ $@-t \
+	  && $(SHELL) $(gen_progs_lists) --autoconf >$@-t \
+	  && chmod a-w $@-t && mv -f $@-t $@
+$(srcdir)/src/cu-progs.mk: $(gen_progs_lists)
+	$(AM_V_GEN)rm -f $@ $@-t \
+	  && $(SHELL) $(gen_progs_lists) --automake >$@-t \
+	  && chmod a-w $@-t && mv -f $@-t $@
+
 ALL_RECURSIVE_TARGETS += install-root
 install-root:
 	cd src && $(MAKE) $@
diff --git a/bootstrap.conf b/bootstrap.conf
index 4ef3fc8..dc0ffb6 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -329,9 +329,13 @@ bootstrap_post_import_hook ()
   # Automake requires that ChangeLog exist.
   touch ChangeLog || return 1
   # List of coreutils programs.  See heading comments in the invoked
-  # script for more info.
-  build-aux/gen-lists-of-programs.sh --autoconf >m4/cu-progs.m4  || return 1
-  build-aux/gen-lists-of-programs.sh --automake >src/cu-progs.mk || return 1
+  # script for more info.  Keep this in sync with the rules in
+  (m4f=m4/cu-progs.m4 mkf=src/cu-progs.mk tmp=cu-progs.tmp \
+    && rm -f $m4f $mkf $tmp-1 $tmp-2 \
+    && build-aux/gen-lists-of-programs.sh --autoconf >$tmp-1 \
+    && build-aux/gen-lists-of-programs.sh --automake >$tmp-2 \
+    && chmod a-w $tmp-1 $tmp-2 \
+    && mv -f $tmp-1 $m4f && mv -f $tmp-2 $mkf)
 }
 
 bootstrap_epilogue()
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7avt-0002E1-Jj
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53602)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avo-00022U-S1
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avo-0007lU-3B
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:20 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:65072)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avn-0007fH-TI
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:20 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so2117744wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=UKyWG47s4gvoOaXGZCmTGbZ96sCiFPbvbmmFW/Ykp8k=;
	b=H8GNHReSuuAyIaAAULDcjkqZ55b9NVurzwy11pcw9VLymetbiRBW0Xi4DGTcwegm2W
	nBmtRk4TY89dk+xh0SpoJ2ztWjoIL0LrqUtemzW0QiQ00uzcpZ2Dg6bqUySTuzBz4mjO
	WhrMQPNkj+2kfAX9rOB1r45JNtGTISiCS0ElLypvfzyVxs/1s57A2l3RDuRAdkaioPnh
	574o+udhctZD7ynlWIrCMQWjrLGJTDmk6JcYbRlyquEubGt6TQOR/oWeimdTPpjmIc53
	1hM9My9simiE0V/MfURgw75qnW8Qio7EyFuxM28c8FgBhO+YkehvHpTs/pz+siEAyIzR
	xCWA==
Received: by 10.180.108.45 with SMTP id hh13mr7643677wib.15.1346456839497;
	Fri, 31 Aug 2012 16:47:19 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.18
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:18 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 06/22] maint: remove unused target 'install-root'
Date: Sat,  1 Sep 2012 01:46:43 +0200
Message-Id: <9da44bfa40c33f5cdb430dcba023803039840d36.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:24 -0000

It was unneeded and broken since the removal of 'su' from GNU
coreutils, in commit v8.17-16-g928dd73 of 2012-06-06, "su: remove
program (util-linux is now the best source for it)".

* Makefile.am (install-root): Remove.
(ALL_RECURSIVE_TARGETS): Update.
---
 Makefile.am | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 2d5fdaa..8ae8650 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,10 +70,6 @@ $(srcdir)/src/cu-progs.mk: $(gen_progs_lists)
 	  && $(SHELL) $(gen_progs_lists) --automake >$@-t \
 	  && chmod a-w $@-t && mv -f $@-t $@
 
-ALL_RECURSIVE_TARGETS += install-root
-install-root:
-	cd src && $(MAKE) $@
-
 ACLOCAL_AMFLAGS = -I m4
 
 # Some tests always need root privileges, others need them only sometimes.
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7avu-0002H9-OA
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53654)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avr-0002B9-Ng
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avq-0007mm-1d
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:23 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:34789)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avp-0007jZ-P2
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:21 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so2092479wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references:mime-version:content-type
	:content-transfer-encoding;
	bh=gyrFpEFgqj/GP4wrWQoWyD3KSU1kxm/g64M1IZLrP9M=;
	b=mDaLjuulLkxXI4SG0cjJ2u6HCTskK1KfLupAOdYfkeB1WqWsSbDqx0hkPqRxUO0LI8
	thkG6pHnSYcqQN0biTGybGvtETyy+fhClmBSJIC4VbhJH/M6ecQQDrwV8JP2nZx9WFO8
	DbzrX4r7RbYQcKzu4dDaQ5vEVekjlWn6qu+xVWxuRkF+hYmK2RJSEvsZ+LK2WMCExSyc
	2M3Q1oVVgKCIYwXObtWBsdKnDTE+h/FeqG9SFHKNwWT8nj8V2/F3V3eyKl4X5YJne6Fb
	PHD1qA0nx2tHNmttYEXLcDsH99/rPWW2R5maJmghcRiUTFGgxmeKY71cLk+JF/b1DefI
	ytig==
Received: by 10.180.7.200 with SMTP id l8mr7667671wia.9.1346456841329;
	Fri, 31 Aug 2012 16:47:21 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.19
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:20 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: =?UTF-8?q?=5BPATCH=2007/22=5D=20maint=3A=20fix=20and=20simplify=20maintainer=20checks?=
Date: Sat,  1 Sep 2012 01:46:44 +0200
Message-Id: <bbbba1daa1a73d172b2395f09c087a5ce066a28c.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:25 -0000

Some of them can be simplified after the previous changes, some
of them have been downright broken them, and need fixing.

* src/local.mk: Adjust some comments.
(EXTRA_DIST): Avoid SPACE-TAB sequences.
(src/dircolors.h, src/fs.h src/fs-is-local.h): Avoid 8-SPACES
indentation.
(_sc_check-AUTHORS): Move ...
* cfg.mk (sc_check-AUTHORS): ... here (superseding the old rule
with the same name, that was only a recursive invocation to it).
Adjust the paths of the invoked coreutils programs, to account
for the fact that this rule now runs in the top-level build dir,
not in the 'src/' subdir.  Other minor cosmetic adjustments.
(ALL_RECURSIVE_TARGETS): Remove 'sc_option_desc_uppercase' and
'sc_man_file_correlation', since they no longer entails any
recursive make invocation.
(sc_option_desc_uppercase): Remove dependency from $(all_programs):
it isn't actually needed.
(check-programs-vs-x): Likewise.  Also, fix heading comments to
truly reflect what this check does.
(all-progs-but-lbracket): Strip the 'src/' prefix from each entry
in the list of programs; this avoids a spurious failure in the
'check-programs-vs-x' recipe.
(.PHONY): No need to list targets 'sc_man_file_correlation' and
'sc_option_desc_uppercase': they are automatically declared phony
by 'maint.mk', being recognized as syntax checks.

xxx
---
 cfg.mk       | 49 ++++++++++++++++++++++++++++++++++++-------------
 src/local.mk | 44 +++++++-------------------------------------
 2 files changed, 43 insertions(+), 50 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index b56e329..780e6a8 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -145,9 +145,37 @@ sc_sun_os_names:
 	  { echo '$(ME): found misuse of Sun OS version numbers' 1>&2;	\
 	    exit 1; } || :
 
-ALL_RECURSIVE_TARGETS += sc_check-AUTHORS
 sc_check-AUTHORS:
-	@$(MAKE) -s -C src _sc_check-AUTHORS
+# Ensure that the list of programs and author names is accurate.
+# We need a UTF8 locale.  If a lack of locale support or a missing
+# translation inhibits printing of UTF-8 names, just skip this test.
+au_dotdot = authors-dotdot
+au_actual = authors-actual
+sc_check-AUTHORS: $(all_programs)
+	@locale=en_US.UTF-8;				\
+	LC_ALL=$$locale ./src/cat --version		\
+	    | grep ' Torbjorn '	> /dev/null		\
+	  && { echo "$@: skipping this check"; exit 0; }; \
+	rm -f $(au_actual) $(au_dotdot);		\
+	for i in `ls $(all_programs)			\
+	    | sed -e 's,^src/,,' -e 's,$(EXEEXT)$$,,'	\
+	    | sed /libstdbuf/d				\
+	    | $(ASSORT) -u`; do				\
+	  test "$$i" = '[' && continue;			\
+	  exe=$$i;					\
+	  if test "$$i" = install; then			\
+	    exe=ginstall;				\
+	  elif test "$$i" = test; then			\
+	    exe='[';					\
+	  fi;						\
+	  LC_ALL=$$locale ./src/$$exe --version		\
+	    | perl -0 -pi -e 's/,\n/, /gm'		\
+	    | sed -n -e '/Written by /{ s//'"$$i"': /;'	\
+		  -e 's/,* and /, /; s/\.$$//; p; }';	\
+	done > $(au_actual) &&				\
+	sed -n '/^[^ ][^ ]*:/p' $(srcdir)/AUTHORS > $(au_dotdot) \
+	  && diff $(au_actual) $(au_dotdot) \
+	  && rm -f $(au_actual) $(au_dotdot)
 
 # Look for lines longer than 80 characters, except omit:
 # - program-generated long lines in diff headers,
@@ -170,18 +198,13 @@ sc_long_lines:
 # One could grep source directly as follows:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
 # but that would miss descriptions not on the same line as the -option.
-ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
-.PHONY: sc_option_desc_uppercase
 sc_option_desc_uppercase:
 	@grep '^\\fB\\-' -A1 man/*.1 | LC_ALL=C grep '\.1.[A-Z][a-z]'	\
 	  && { echo 1>&2 '$@: found initial capitals in --help'; exit 1; } || :
 sc_option_desc_uppercase: $(dist_man1_MANS) \
-                          $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT)) \
-                          $(all_programs)
+                          $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT))
 
 # Ensure all man/*.[1x] files are present.
-ALL_RECURSIVE_TARGETS += sc_man_file_correlation
-.PHONY: sc_man_file_correlation
 sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
 
 # Ensure that for each .x file in the 'man/' subdirectory, there is a
@@ -201,13 +224,13 @@ check-x-vs-1:
 	rm $$t
 
 # Writing a portable rule to generate a manpage like '[.1' would be
-# a nightmare.
-all-progs-but-lbracket = $(filter-out [,$(all_programs))
+# a nightmare, so filter that out.
+all-progs-but-lbracket = $(filter-out [,$(patsubst src/%,%,$(all_programs)))
 
-# Ensure that for each .x file in the 'man/' subdirectory, there is a
-# corresponding coreutils program.
+# Ensure that for each coreutils program there is a corresponding
+# '.x' file in the 'man/' subdirectory.
 .PHONY: check-programs-vs-x
-check-programs-vs-x: $(all_programs)
+check-programs-vs-x:
 	@status=0;					\
 	for p in dummy $(all-progs-but-lbracket); do	\
 	  test $$p = dummy && continue;			\
diff --git a/src/local.mk b/src/local.mk
index 2446200..5146361 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -55,8 +55,8 @@ noinst_HEADERS =		\
   src/wheel.h			\
   src/uname.h
 
-EXTRA_DIST += 		\
-  src/dcgen 		\
+EXTRA_DIST +=		\
+  src/dcgen		\
   src/dircolors.hin	\
   src/tac-pipe.c	\
   src/wheel-gen.pl	\
@@ -66,7 +66,8 @@ EXTRA_DIST += 		\
 CLEANFILES = $(SCRIPTS)
 
 # Also remove these sometimes-built programs.
-# For example, even when excluded, they're built via _sc_check-AUTHORS.
+# For example, even when excluded, they're built via 'sc_check-AUTHORSĂ¬
+# or 'dist'.
 CLEANFILES += $(no_install__progs)
 
 AM_CPPFLAGS = -I$(top_srcdir)/lib
@@ -368,7 +369,7 @@ BUILT_SOURCES += src/dircolors.h
 src/dircolors.h: src/dcgen src/dircolors.hin
 	$(AM_V_GEN)rm -f $@ $@-t
 	$(AM_V_at)$(PERL) -w -- $(srcdir)/src/dcgen \
-	                        $(srcdir)/src/dircolors.hin > $@-t
+				$(srcdir)/src/dircolors.hin > $@-t
 	$(AM_V_at)chmod a-w $@-t
 	$(AM_V_at)mv $@-t $@
 
@@ -450,7 +451,7 @@ BUILT_SOURCES += src/fs-is-local.h
 src/fs-is-local.h: src/stat.c src/extract-magic
 	$(AM_V_GEN)rm -f $@
 	$(AM_V_at)$(PERL) $(srcdir)/src/extract-magic \
-	                  --local $(srcdir)/src/stat.c > $@t
+			  --local $(srcdir)/src/stat.c > $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
 
@@ -458,7 +459,7 @@ BUILT_SOURCES += src/fs.h
 src/fs.h: src/stat.c src/extract-magic
 	$(AM_V_GEN)rm -f $@
 	$(AM_V_at)$(PERL) $(srcdir)/src/extract-magic \
-	                  $(srcdir)/src/stat.c > $@t
+			  $(srcdir)/src/stat.c > $@t
 	$(AM_V_at)chmod a-w $@t
 	$(AM_V_at)mv $@t $@
 
@@ -522,37 +523,6 @@ check-README:
 check-duplicate-no-install: src/tr
 	$(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)' | tr ' ' '\n' | uniq -d`"
 
-# Ensure that the list of programs and author names is accurate.
-# We need a UTF8 locale.  If a lack of locale support or a missing
-# translation inhibits printing of UTF-8 names, just skip this test.
-au_dotdot = authors-dotdot
-au_actual = authors-actual
-.PHONY: _sc_check-AUTHORS
-_sc_check-AUTHORS: $(all_programs)
-	@locale=en_US.UTF-8;				\
-	LC_ALL=$$locale ./cat --version			\
-	    | grep ' Torbjorn '	> /dev/null		\
-	  && { echo "$@: skipping this check"; exit 0; }; \
-	rm -f $(au_actual) $(au_dotdot);		\
-	for i in `ls $(all_programs)			\
-	    | sed -e 's,^src/,,' -e 's,$(EXEEXT)$$,,'	\
-	    | sed /libstdbuf/d				\
-	    | $(ASSORT) -u`; do				\
-	  test "$$i" = '[' && continue;			\
-	  exe=$$i;					\
-	  if test "$$i" = install; then			\
-	    exe=ginstall;				\
-	  elif test "$$i" = test; then			\
-	    exe='[';					\
-	  fi;						\
-	  LC_ALL=$$locale ./$$exe --version		\
-	    | perl -0 -pi -e 's/,\n/, /gm'		\
-	    | sed -n -e '/Written by /{ s//'"$$i"': /;'	\
-		  -e 's/,* and /, /; s/\.$$//; p; }';	\
-	done > $(au_actual) &&				\
-	sed -n '/^[^ ][^ ]*:/p' $(top_srcdir)/AUTHORS > $(au_dotdot) && \
-	diff $(au_actual) $(au_dotdot) && rm -f $(au_actual) $(au_dotdot)
-
 # Use the just-built 'ginstall', when not cross-compiling.
 if CROSS_COMPILING
 cu_install_program = @INSTALL_PROGRAM@
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7avv-0002K9-UJ
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53695)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avt-0002Dv-1H
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avs-0007ot-8U
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:24 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:34789)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avs-0007jZ-2k
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:24 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so2092479wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=5Vf5LAa+ZEDBD6dVrUtqOJRxybIrE3X9EZSaT4LVxGA=;
	b=TNPl3E3JQgOBwn3l8ed60XLNkBBJ/EEjOx54zcqNHn52EdcQUFVEw0e4LVuq3SPt/8
	0lra6SKvL5mM3IwIwnIhAeQLi1O0XZLR4loITsdhpzTB3jKzhTQLkg9UCq9VwMj9xURQ
	m3pdV6gdhWMCg3h3b7S/yeO1lNMXU3NnhScAU+cNhPgBYldOW96UGfg9F31s0eAF6jGH
	CXBNKQDsHqAJ0dw7BoaMa3lN8L7TmHyH1/CEhgxjvxPf6MPl7cqFB1A5wZXA8+rSDVAs
	No4gXJHYZb2Vi1BVwzLDUSeegERxHphEfPQz8c9Qyb0Y0tiZukpecSshT1bzFsR25TBU
	TZrQ==
Received: by 10.180.97.106 with SMTP id dz10mr7612928wib.21.1346456843688;
	Fri, 31 Aug 2012 16:47:23 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.22
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:23 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 09/22] maint: update gitignore entries
Date: Sat,  1 Sep 2012 01:46:46 +0200
Message-Id: <7ed94638f7d56cf22543ba5b5d84d20447f809f5.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:26 -0000

* src/.gitignore: Here, adding the '.dirstamp' file generated
by the C compilation rules.
---
 src/.gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/.gitignore b/src/.gitignore
index d78178c..1c1edbb 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1,4 +1,5 @@
 *.exe
+/.dirstamp
 \[
 arch
 base64
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7avw-0002LI-9Q
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53707)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avt-0002E2-JV
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avr-0007no-FD
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:25 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:62872)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avr-0007nJ-99
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:23 -0400
Received: by wibhq4 with SMTP id hq4so1667137wib.12
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=MsSjv63ZZcAXj7t2//j0Wqm68Q9RXpsKqkyt2+gTQ08=;
	b=BPcHgmlDTnPtzHZpp70uhFntXrgNVmXiq0hpgwE0BXtrVizTiBnhDKa7hZ4brAhhM4
	kUSnOW7yd30g/6ofcs3lnkL1BdzRo70TrA56Ulg0Kt3mCpBjGv9vUgaBEve2EITjiak/
	l9tTf88oPFiKSK9imhNgBu8BnZxBU9OD+PkNIb/dWha70Bgs0u2ny7swQckqjlX4t5S8
	j1QuwWvz5KvRo57p1sSDRSnCpEr0BhiQ3bNDMlm233n2nwrB0Er1QyLbUcyoBfXMPUFS
	4mMMtQJpfDGrweTi58Yo9cYSDxcf1fEhA9K7WKnMfMGA+qwqBiRxDNuCJQx+vHnzBnpP
	GBLQ==
Received: by 10.216.123.69 with SMTP id u47mr5815220weh.89.1346456842494;
	Fri, 31 Aug 2012 16:47:22 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.21
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:21 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 08/22] maint: fix one stray reference to src/Makefile.am
Date: Sat,  1 Sep 2012 01:46:45 +0200
Message-Id: <3e9f823876f1f3b53a327ddcca5a07fb69e7f798.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:26 -0000

* build-aux/gen-lists-of-programs.sh: In heading comments here.
---
 build-aux/gen-lists-of-programs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-aux/gen-lists-of-programs.sh b/build-aux/gen-lists-of-programs.sh
index f049b56..2eecf53 100755
--- a/build-aux/gen-lists-of-programs.sh
+++ b/build-aux/gen-lists-of-programs.sh
@@ -3,7 +3,7 @@
 # and Automake, and with further distinctions about how and when these
 # programs should be built.  This is useful to avoid duplicating the
 # definitions of these list among several files ('configure.ac' and
-# 'src/Makefile.am' at least); such duplication had proved a source of
+# 'src/local.mk' at least); such duplication had proved a source of
 # inconsistencies and bugs in the past.
 
 set -u
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7avz-0002Tw-0f
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:31 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53745)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avu-0002Gf-JP
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avt-0007pd-Fz
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:26 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:34789)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avt-0007jZ-9W
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:25 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so2092479wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=os5ERJoAmFnEHoaHnS7Z9TqaJ0O64lpfuGXZUBX+sHM=;
	b=Tzev5WGe7f1RNiT9/NhAmbmg0mKKgYjNE5/VfEmh6zjLiHfqf1FpdDQ6EuCwD1r2/8
	AFr4YHMOIEXein0h3FsE6GwRsuc83kfDTiv2n0MrJYvQT/fVXWPNVYrSfIYCBBLpF11a
	MOOh/8KbFY9ilnMjFlq0WFT4Xk2lZL5q6lbn2FzKom+ziroQRTglVyQ6nin2m5bkxDpt
	s4aAbY6N+aQYQ1D7X/gTBFf5ll7u7QooKU6smxCnpAYmhmhF+/7Vj1CAbuOAAbNruV4Z
	agm8N8MY7QE145d2t72BfamTBpv/r4aMZexiZs93jT8QOPELe61wDvHRzGgFOLKGbTST
	2Adg==
Received: by 10.180.84.164 with SMTP id a4mr7656455wiz.12.1346456844909;
	Fri, 31 Aug 2012 16:47:24 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.23
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:24 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 10/22] build: simplify: get rid of some indirection variables
Date: Sat,  1 Sep 2012 01:46:47 +0200
Message-Id: <2f345570b6705adc3033b4893ffb1c43cc3282de.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:27 -0000

The code deciding which coreutils programs to build (depending on
defaults, system capabilities, and user requests) is overly complex
and rather confusing.  Let's begin simplifying it by removing some
non-strictly-necessary indirection variables.

* configure.ac: Adjust and improve few comments.
(OPTIONAL_BIN_PROGS, OPTIONAL_PKGLIB_PROGS): Rename ...
(bin_PROGRAMS, pkglibexec_PROGRAMS): ... like these, respectively.
Ensure they aren't initialized in all Makefiles (which would lead
to spurious errors), by calling AM_SUBST_NOTMAKE on them.
* src/local.mk: Adjust and improve few comments.
(bin_PROGRAMS, pkglibexec_PROGRAMS): Simply define
to the corresponding '@substitution@'.  Not strictly required,
but certainly clearer and safer.
---
 configure.ac | 19 +++++++++++--------
 src/local.mk |  7 ++++---
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8c41d62..7c0b19c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -435,22 +435,25 @@ MAN=`
   done`
 
 NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
-OPTIONAL_PKGLIB_PROGS=`
-  for p in $optional_pkglib_progs; do echo src/$p; done`
+
+# The programs built and installed by "make && make install".
 # Since this is AC_SUBST'd, Automake won't be able to perform rewrite
-# with $(EXEEXT) appending on it, so we have to do it ourselves.
-OPTIONAL_BIN_PROGS=`
+# with $(EXEEXT) appending on it, so we have to do it ourselves -- in
+# this case, only for $(bin_PROGRAMS).
+bin_PROGRAMS=`
   for p in $optional_bin_progs; do echo "src/$p\$(EXEEXT)"; done`
+pkglibexec_PROGRAMS=`
+  for p in $optional_pkglib_progs; do echo src/$p; done`
 
 # Normalize whitespace.
 MAN=`echo $MAN`
 NO_INSTALL_PROGS_DEFAULT=`echo $NO_INSTALL_PROGS_DEFAULT`
-OPTIONAL_BIN_PROGS=`echo $OPTIONAL_BIN_PROGS`
-OPTIONAL_PKGLIB_PROGS=`echo $OPTIONAL_PKGLIB_PROGS`
+bin_PROGRAMS=`echo $bin_PROGRAMS`
+pkglibexec_PROGS=`echo $pkglibexec_PROGRAMS`
 
 AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
-AC_SUBST([OPTIONAL_BIN_PROGS])
-AC_SUBST([OPTIONAL_PKGLIB_PROGS])
+AC_SUBST([bin_PROGRAMS])        AM_SUBST_NOTMAKE([bin_PROGRAMS])
+AC_SUBST([pkglibexec_PROGRAMS]) AM_SUBST_NOTMAKE([pkglibexec_PROGRAMS])
 
 AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
 
diff --git a/src/local.mk b/src/local.mk
index 5146361..0909d95 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -29,12 +29,13 @@ EXTRA_PROGRAMS = \
    $(build_if_possible__progs) \
    $(default__progs)
 
-bin_PROGRAMS = $(OPTIONAL_BIN_PROGS)
+# The user can tweak these lists at configure time.
+bin_PROGRAMS = @bin_PROGRAMS@
+pkglibexec_PROGRAMS = @pkglibexec_PROGRAMS@
 
+# Needed by the testsuite.
 noinst_PROGRAMS = src/setuidgid src/getlimits
 
-pkglibexec_PROGRAMS = $(OPTIONAL_PKGLIB_PROGS)
-
 noinst_HEADERS =		\
   src/chown-core.h		\
   src/copy.h			\
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7aw0-0002Ye-DY
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53793)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avw-0002NX-UJ
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avw-0007rR-00
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:28 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:33996)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avv-0007kc-Q2
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:27 -0400
Received: by mail-wi0-f177.google.com with SMTP id hn17so1625250wib.12
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=KJkeOMGEyr6fAQias/cEu2RGzaGuHt6gWBOifE3JSUA=;
	b=nC/m8/Q6AXE6/Q1+My76nyw868fv0+U2W3TqcN3f+a+OwD6BVR3cebwWLFhDGGFNNk
	smPhifjnirXiBBE3633oqawcA4OzK0hRkndLtseV+VswreYfyqIOeDuW2TZiqBVME+zq
	MWzJXq+c5HifUKiFxYnKbH0YEqVHQrG/q4lyQ+GmChvyGdWkKpTy3PXH2BA7BNPwi+/i
	X9fDTkC06twZmp2FpRG1zybHrJbxcY2Qfklq2k/2a2J/K8VpbaDRzcKx/+feX5UcS6+V
	4LeAUX0xGj+ynpnpKpXS7A8ZIQrVd1xU58DaIw132hVpX/2J3SP7rnqL0YBOhsKzQ3J1
	ibMw==
Received: by 10.180.20.204 with SMTP id p12mr7671082wie.7.1346456847323;
	Fri, 31 Aug 2012 16:47:27 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.26
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:26 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 12/22] build: one less unneeded make variable
Date: Sat,  1 Sep 2012 01:46:49 +0200
Message-Id: <bf1b59ac1f545f4a6c7fdda708a4e7c26cc75484.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:30 -0000

* man/local.mk (man_aux): This was used only once, so inline its
expansion in its only point of use ...
(EXTRA_DIST): ... here.
---
 man/local.mk | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/man/local.mk b/man/local.mk
index f487442..717a877 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -18,9 +18,7 @@
 
 dist_man1_MANS = $(MAN)
 
-man_aux = $(dist_man1_MANS:.1=.x)
-
-EXTRA_DIST += $(man_aux) man/help2man
+EXTRA_DIST += $(dist_man1_MANS:.1=.x) man/help2man
 MAINTAINERCLEANFILES += $(dist_man1_MANS)
 
 EXTRA_MANS = @EXTRA_MANS@
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7aw1-0002cP-Ui
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53841)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avy-0002Sd-Kc
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avx-0007sX-6g
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:30 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:34789)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avx-0007jZ-0m
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:29 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so2092479wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=1mvmnLj4nNEA3raUPUcqDcWwfqQJwFlBJnmVdjjUWhY=;
	b=Vkzm68hlvgl88sM6lsVuM/0lu+40o9M49bs0X2wPI1oPWuK19n8hiPbMGR5Wv/gG67
	+/80t3U+NVwWo3r0I8TS/AFyNX+DA/LlGKpQ9Blthe+VR28KpM+GsK/1vlup9TiqJPpv
	vQ2JbKI6oKQx0RL4CD/v1Qh2tfXErD2ZVF0I0OKcaWKeFgSeZvhkw89V3J25ztV9TrwN
	JkhpA7z//d3FgSVRTqFZzB+tqtzMwPoqOPV3nOzBTPd84kiLd7LQ7+TF6NMshL1tEvha
	k/Hh0FEjIyDLuJbggTzTsSJ913/CK1FCxeu4vp2NiQePrvZFRCszYuCbYf5/ga0B/Ft0
	bBqA==
Received: by 10.180.94.38 with SMTP id cz6mr7662720wib.10.1346456848518;
	Fri, 31 Aug 2012 16:47:28 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.27
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:27 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 13/22] build: rename dist_man1_MANS -> man1_MANS
Date: Sat,  1 Sep 2012 01:46:50 +0200
Message-Id: <3f4aa7e4cce6c009059d54162cb238a9df27aded.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:32 -0000

And list $(man1_MANS) directly in $(EXTRA_DIST) instead.  This
offers more similarity to what is done for $(EXTRA_MANS)

* man/local.mk (dist_man1_MANS): Rename ...
(man1_MANS): ... like this.
(EXTRA_DIST): Add its contents.
* cfg.mk (check-x-vs-1): Fix a botched comment.
---
 cfg.mk       |  2 +-
 man/local.mk | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 2323fa3..a3a4d4c 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -206,7 +206,7 @@ sc_option_desc_uppercase: $(ALL_MANS)
 sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
 
 # Ensure that for each .x file in the 'man/' subdirectory, there is a
-# corresponding .1 file in the definition of $(dist_man1_MANS).
+# corresponding .1 file in the definition of $(EXTRA_MANS).
 # But since that expansion usually lacks programs like arch and hostname,
 # add them here manually.
 .PHONY: check-x-vs-1
diff --git a/man/local.mk b/man/local.mk
index 717a877..5e89829 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -16,16 +16,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-dist_man1_MANS = $(MAN)
+EXTRA_DIST += man/help2man
 
-EXTRA_DIST += $(dist_man1_MANS:.1=.x) man/help2man
-MAINTAINERCLEANFILES += $(dist_man1_MANS)
+man1_MANS = $(MAN)
+
+EXTRA_DIST += $(man1_MANS) $(man1_MANS:.1=.x)
+MAINTAINERCLEANFILES += $(man1_MANS)
 
 EXTRA_MANS = @EXTRA_MANS@
 
 EXTRA_DIST += $(EXTRA_MANS) $(EXTRA_MANS:.1=.x)
 
-ALL_MANS = $(dist_man1_MANS) $(EXTRA_MANS)
+ALL_MANS = $(man1_MANS) $(EXTRA_MANS)
 
 # This is required because we have subtle inter-directory dependencies:
 # in order to generate all man pages, even those for which we don't
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:28 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7avw-0002Ml-MB
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53618)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avp-00025b-RS
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avk-0007ik-Mx
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:21 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:65072)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avk-0007fH-9X
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:16 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so2117744wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=nlFV8rVbn/9bRlUIn//2v5n+vjCwsCAizxmBW0RSuB4=;
	b=berRCkqIVY48ftnIzhhEYxyldvBl37mOf0R1MnzbvpHTjOE/FPXozSRrvMWxCTz81Z
	ap9S0Qj/tvSehVDEr5eCeEYMKcTANLXVDjCNsjjVR9X7KghGwAGFMMN56nBvjtW9SFa/
	6EI3ZWx2yzZnGVfBBBjVR6pyezLKKBL2gwot798DjI9ZrnJfR6HcUHTrks/Gyvx11+qr
	BiBJEgWBczL4ERAl0fG9A35g+jEP4P3yxMCuNSDXL0N925FYXJIuT2sHUMR0bJ3ZlPuK
	pWYXq2I+gXBNW269l4JayRPgqsJC/6gwaM/2PcXw8FfhhG0vQOcNzWhdSj/NSaQkG9Fb
	w9og==
Received: by 10.180.86.3 with SMTP id l3mr7645716wiz.16.1346456835796;
	Fri, 31 Aug 2012 16:47:15 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.13
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:15 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 03/22] build: don't use recursive make to build the 'src'
	subdirectory
Date: Sat,  1 Sep 2012 01:46:40 +0200
Message-Id: <1096684ffff8df4bd5a515baf8d624a6987e35ac.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:26 -0000

* Makefile.am (SUBDIRS): Remove 'src'.  Ensure '.' is listed before
'tests' and 'gnulib-tests'.
(dist-hook): Adjust: we must now tweak the top-level Makefile.in
in $(distdir), not the one in the 'src/' subdir (which is gone).
(include): The '$(top_srcdir)/src/local.mk' file.
* build-aux/gen-lists-of-programs.sh: Adjust the generation of the
automake input fragment.
* tests/Makefile.am (.built-programs): Adjust.
* cfg.mk (all_programs): Remove this convenience rule; it's no
longer needed, now that we can rely directly on the contents of
$(all_programs).
(sc_option_desc_uppercase, check-programs-vs-x:): Adjust list
of prerequisites accordingly.
(all-progs-but-lbracket): Simplify definition accordingly.
* configure.ac ($OPTIONAL_BIN_PROGS): Adjust definition.
($OPTIONAL_PKGLIB_PROGS): Likewise.
($NO_INSTALL_PROGS_DEFAULT): Tweak definition, for consistency.
(AC_CONFIG_FILES): Remove 'src/Makefile'.
* src/Makefile.am: Rename ...
* src/local.mk: ... like this, with a lot of adjustments.  In
addition ...
(all_programs): ... remove this now-unneeded convenience target.
---
 Makefile.am                        |   5 +-
 build-aux/gen-lists-of-programs.sh |   7 +-
 cfg.mk                             |  13 +-
 configure.ac                       |  16 +-
 src/Makefile.am                    | 560 ------------------------------------
 src/local.mk                       | 567 +++++++++++++++++++++++++++++++++++++
 tests/Makefile.am                  |   6 +-
 7 files changed, 592 insertions(+), 582 deletions(-)
 delete mode 100644 src/Makefile.am
 create mode 100644 src/local.mk

diff --git a/Makefile.am b/Makefile.am
index f3d6eda..6a56f68 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@
 
 ALL_RECURSIVE_TARGETS =
 
-SUBDIRS = lib src po tests gnulib-tests
+SUBDIRS = lib po . tests gnulib-tests
 
 changelog_etc =				\
   ChangeLog-2005			\
@@ -92,7 +92,7 @@ BUILT_SOURCES = .version
 # See the rm_subst comment for details.
 dist-hook: gen-ChangeLog
 	$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
-	$(AM_V_at)perl -pi -e '$(rm_subst)' $(distdir)/src/Makefile.in
+	$(AM_V_at)perl -pi -e '$(rm_subst)' $(distdir)/Makefile.in
 
 gen_start_date = 2008-02-08
 .PHONY: gen-ChangeLog
@@ -170,5 +170,6 @@ check-git-hook-script-sync:
 	rm -rf $$t;							\
 	test $$fail = 0
 
+include $(top_srcdir)/src/local.mk
 include $(top_srcdir)/doc/local.mk
 include $(top_srcdir)/man/local.mk
diff --git a/build-aux/gen-lists-of-programs.sh b/build-aux/gen-lists-of-programs.sh
index ec43ee8..f049b56 100755
--- a/build-aux/gen-lists-of-programs.sh
+++ b/build-aux/gen-lists-of-programs.sh
@@ -165,17 +165,18 @@ END
     ;;
   1,--automake|1,--for-automake)
     echo "## $msg"
+    progsdir=src
     echo no_install__progs =
     for p in $disabled_by_default_progs; do
-      echo no_install__progs += $p
+      echo no_install__progs += $progsdir/$p
     done
     echo build_if_possible__progs =
     for p in $build_if_possible_progs; do
-      echo build_if_possible__progs += $p
+      echo build_if_possible__progs += $progsdir/$p
     done
     echo default__progs =
     for p in $normal_progs; do
-      echo default__progs += $p
+      echo default__progs += $progsdir/$p
     done
     ;;
   *)
diff --git a/cfg.mk b/cfg.mk
index 1dbfe42..b56e329 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -166,12 +166,6 @@ sc_long_lines:
 	  sed -e "s|^|$$file:|" -e '$(FILTER_LONG_LINES)';		\
 	done | grep . && { msg="$$halt" $(_sc_say_and_exit) } || :
 
-# TODO: remove once the build system in 'src/' is merged with the
-# top-level one.
-.PHONY: all_programs
-all_programs:
-	@cd ./src && $(MAKE) -s $@
-
 # Option descriptions should not start with a capital letter.
 # One could grep source directly as follows:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
@@ -183,7 +177,7 @@ sc_option_desc_uppercase:
 	  && { echo 1>&2 '$@: found initial capitals in --help'; exit 1; } || :
 sc_option_desc_uppercase: $(dist_man1_MANS) \
                           $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT)) \
-                          all_programs
+                          $(all_programs)
 
 # Ensure all man/*.[1x] files are present.
 ALL_RECURSIVE_TARGETS += sc_man_file_correlation
@@ -208,13 +202,12 @@ check-x-vs-1:
 
 # Writing a portable rule to generate a manpage like '[.1' would be
 # a nightmare.
-all-progs-but-lbracket = $(filter-out [, $(shell \
-      (cd ./src && MAKEFLAGS= ${MAKE} -s all_programs.list)))
+all-progs-but-lbracket = $(filter-out [,$(all_programs))
 
 # Ensure that for each .x file in the 'man/' subdirectory, there is a
 # corresponding coreutils program.
 .PHONY: check-programs-vs-x
-check-programs-vs-x: all_programs
+check-programs-vs-x: $(all_programs)
 	@status=0;					\
 	for p in dummy $(all-progs-but-lbracket); do	\
 	  test $$p = dummy && continue;			\
diff --git a/configure.ac b/configure.ac
index ca038c8..8c41d62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -433,14 +433,23 @@ MAN=`
     test x$p = x'@<:@' && continue
     echo "man/$p.1"
   done`
+
+NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
+OPTIONAL_PKGLIB_PROGS=`
+  for p in $optional_pkglib_progs; do echo src/$p; done`
+# Since this is AC_SUBST'd, Automake won't be able to perform rewrite
+# with $(EXEEXT) appending on it, so we have to do it ourselves.
+OPTIONAL_BIN_PROGS=`
+  for p in $optional_bin_progs; do echo "src/$p\$(EXEEXT)"; done`
+
 # Normalize whitespace.
 MAN=`echo $MAN`
+NO_INSTALL_PROGS_DEFAULT=`echo $NO_INSTALL_PROGS_DEFAULT`
+OPTIONAL_BIN_PROGS=`echo $OPTIONAL_BIN_PROGS`
+OPTIONAL_PKGLIB_PROGS=`echo $OPTIONAL_PKGLIB_PROGS`
 
-NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
 AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
-OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
 AC_SUBST([OPTIONAL_BIN_PROGS])
-OPTIONAL_PKGLIB_PROGS=`echo "$optional_pkglib_progs " | sed 's/ $//'`
 AC_SUBST([OPTIONAL_PKGLIB_PROGS])
 
 AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
@@ -459,7 +468,6 @@ AC_CONFIG_FILES(
   Makefile
   lib/Makefile
   po/Makefile.in
-  src/Makefile
   tests/Makefile
   gnulib-tests/Makefile
   )
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index 3b0ef65..0000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,560 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-
-
-## Copyright (C) 1990-2012 Free Software Foundation, Inc.
-
-## This program is free software: you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation, either version 3 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
-
-# The list of all programs (separated in different variables to express
-# the how and when they should be installed) is defined in this makefile
-# fragment, autogenerated by the 'gen-lists-of-programs.sh' auxiliary
-# script.
-include $(srcdir)/cu-progs.mk
-
-EXTRA_PROGRAMS = \
-  $(no_install__progs) \
-  $(build_if_possible__progs) \
-  $(default__progs)
-
-bin_PROGRAMS = $(OPTIONAL_BIN_PROGS)
-
-noinst_PROGRAMS = setuidgid getlimits
-
-pkglibexec_PROGRAMS = $(OPTIONAL_PKGLIB_PROGS)
-
-noinst_HEADERS =	\
-  chown-core.h		\
-  copy.h		\
-  cp-hash.h		\
-  dircolors.h		\
-  fiemap.h		\
-  find-mount-point.h	\
-  fs.h			\
-  fs-is-local.h		\
-  group-list.h		\
-  ioblksize.h		\
-  ls.h			\
-  operand2sig.h		\
-  prog-fprintf.h	\
-  remove.h		\
-  system.h		\
-  wheel-size.h		\
-  wheel.h		\
-  uname.h
-
-EXTRA_DIST = dcgen dircolors.hin tac-pipe.c \
-  wheel-gen.pl extract-magic c99-to-c89.diff
-BUILT_SOURCES =
-CLEANFILES = $(SCRIPTS)
-
-# Also remove these sometimes-built programs.
-# For example, even when excluded, they're built via _sc_check-AUTHORS.
-CLEANFILES += $(no_install__progs)
-
-AM_CPPFLAGS = -I$(top_srcdir)/lib
-
-noinst_LIBRARIES = libver.a
-nodist_libver_a_SOURCES = version.c version.h
-
-# Tell the linker to omit references to unused shared libraries.
-AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
-
-# Extra libraries needed by more than one program.  Will be updated later.
-copy_ldadd =
-remove_ldadd =
-
-# Sometimes, the expansion of $(LIBINTL) includes -lc which may
-# include modules defining variables like 'optind', so libcoreutils.a
-# must precede $(LIBINTL) in order to ensure we use GNU getopt.
-# But libcoreutils.a must also follow $(LIBINTL), since libintl uses
-# replacement functions defined in libcoreutils.a.
-LDADD = libver.a ../lib/libcoreutils.a $(LIBINTL) ../lib/libcoreutils.a
-
-# First, list all programs, to make listing per-program libraries easier.
-# See [ below.
-arch_LDADD = $(LDADD)
-base64_LDADD = $(LDADD)
-basename_LDADD = $(LDADD)
-cat_LDADD = $(LDADD)
-chcon_LDADD = $(LDADD)
-chgrp_LDADD = $(LDADD)
-chmod_LDADD = $(LDADD)
-chown_LDADD = $(LDADD)
-chroot_LDADD = $(LDADD)
-cksum_LDADD = $(LDADD)
-comm_LDADD = $(LDADD)
-nproc_LDADD = $(LDADD)
-cp_LDADD = $(LDADD)
-csplit_LDADD = $(LDADD)
-cut_LDADD = $(LDADD)
-date_LDADD = $(LDADD)
-dd_LDADD = $(LDADD)
-df_LDADD = $(LDADD)
-# See dir_LDADD below
-dircolors_LDADD = $(LDADD)
-dirname_LDADD = $(LDADD)
-du_LDADD = $(LDADD)
-echo_LDADD = $(LDADD)
-env_LDADD = $(LDADD)
-expand_LDADD = $(LDADD)
-expr_LDADD = $(LDADD)
-factor_LDADD = $(LDADD)
-false_LDADD = $(LDADD)
-fmt_LDADD = $(LDADD)
-fold_LDADD = $(LDADD)
-getlimits_LDADD = $(LDADD)
-ginstall_LDADD = $(LDADD)
-groups_LDADD = $(LDADD)
-head_LDADD = $(LDADD)
-hostid_LDADD = $(LDADD)
-hostname_LDADD = $(LDADD)
-id_LDADD = $(LDADD)
-join_LDADD = $(LDADD)
-kill_LDADD = $(LDADD)
-link_LDADD = $(LDADD)
-ln_LDADD = $(LDADD)
-logname_LDADD = $(LDADD)
-ls_LDADD = $(LDADD)
-md5sum_LDADD = $(LDADD)
-mkdir_LDADD = $(LDADD)
-mkfifo_LDADD = $(LDADD)
-mknod_LDADD = $(LDADD)
-mktemp_LDADD = $(LDADD)
-mv_LDADD = $(LDADD)
-nice_LDADD = $(LDADD)
-nl_LDADD = $(LDADD)
-nohup_LDADD = $(LDADD)
-od_LDADD = $(LDADD)
-paste_LDADD = $(LDADD)
-pathchk_LDADD = $(LDADD)
-pinky_LDADD = $(LDADD)
-pr_LDADD = $(LDADD)
-printenv_LDADD = $(LDADD)
-printf_LDADD = $(LDADD)
-ptx_LDADD = $(LDADD)
-pwd_LDADD = $(LDADD)
-readlink_LDADD = $(LDADD)
-realpath_LDADD = $(LDADD)
-rm_LDADD = $(LDADD)
-rmdir_LDADD = $(LDADD)
-runcon_LDADD = $(LDADD)
-seq_LDADD = $(LDADD)
-setuidgid_LDADD = $(LDADD)
-sha1sum_LDADD = $(LDADD)
-sha224sum_LDADD = $(LDADD)
-sha256sum_LDADD = $(LDADD)
-sha384sum_LDADD = $(LDADD)
-sha512sum_LDADD = $(LDADD)
-shred_LDADD = $(LDADD)
-shuf_LDADD = $(LDADD)
-sleep_LDADD = $(LDADD)
-sort_LDADD = $(LDADD)
-split_LDADD = $(LDADD)
-stat_LDADD = $(LDADD)
-stdbuf_LDADD = $(LDADD)
-stty_LDADD = $(LDADD)
-sum_LDADD = $(LDADD)
-sync_LDADD = $(LDADD)
-tac_LDADD = $(LDADD)
-tail_LDADD = $(LDADD)
-tee_LDADD = $(LDADD)
-test_LDADD = $(LDADD)
-timeout_LDADD = $(LDADD)
-touch_LDADD = $(LDADD)
-tr_LDADD = $(LDADD)
-true_LDADD = $(LDADD)
-truncate_LDADD = $(LDADD)
-tsort_LDADD = $(LDADD)
-tty_LDADD = $(LDADD)
-uname_LDADD = $(LDADD)
-unexpand_LDADD = $(LDADD)
-uniq_LDADD = $(LDADD)
-unlink_LDADD = $(LDADD)
-uptime_LDADD = $(LDADD)
-users_LDADD = $(LDADD)
-# See vdir_LDADD below
-wc_LDADD = $(LDADD)
-who_LDADD = $(LDADD)
-whoami_LDADD = $(LDADD)
-yes_LDADD = $(LDADD)
-
-# Synonyms.  Recall that Automake transliterates '[' to '_'.
-__LDADD = $(test_LDADD)
-dir_LDADD = $(ls_LDADD)
-vdir_LDADD = $(ls_LDADD)
-
-cp_LDADD += $(copy_ldadd)
-ginstall_LDADD += $(copy_ldadd)
-mv_LDADD += $(copy_ldadd)
-
-mv_LDADD += $(remove_ldadd)
-rm_LDADD += $(remove_ldadd)
-
-# for eaccess, euidaccess
-copy_ldadd += $(LIB_EACCESS)
-remove_ldadd += $(LIB_EACCESS)
-sort_LDADD += $(LIB_EACCESS)
-test_LDADD += $(LIB_EACCESS)
-
-# for selinux use
-copy_ldadd += $(LIB_SELINUX)
-chcon_LDADD += $(LIB_SELINUX)
-ginstall_LDADD += $(LIB_SELINUX)
-id_LDADD += $(LIB_SELINUX)
-ls_LDADD += $(LIB_SELINUX)
-mkdir_LDADD += $(LIB_SELINUX)
-mkfifo_LDADD += $(LIB_SELINUX)
-mknod_LDADD += $(LIB_SELINUX)
-runcon_LDADD += $(LIB_SELINUX)
-stat_LDADD += $(LIB_SELINUX)
-
-# for gettime, settime, utimecmp, utimens
-copy_ldadd += $(LIB_CLOCK_GETTIME)
-date_LDADD += $(LIB_CLOCK_GETTIME)
-ginstall_LDADD += $(LIB_CLOCK_GETTIME)
-ls_LDADD += $(LIB_CLOCK_GETTIME)
-pr_LDADD += $(LIB_CLOCK_GETTIME)
-timeout_LDADD += $(LIB_TIMER_TIME)
-touch_LDADD += $(LIB_CLOCK_GETTIME)
-
-# for gethrxtime
-dd_LDADD += $(LIB_GETHRXTIME)
-
-# for cap_get_file
-ls_LDADD += $(LIB_CAP)
-
-# for fdatasync
-dd_LDADD += $(LIB_FDATASYNC)
-shred_LDADD += $(LIB_FDATASYNC)
-
-# for xnanosleep
-sleep_LDADD += $(LIB_NANOSLEEP)
-sort_LDADD += $(LIB_NANOSLEEP)
-tail_LDADD += $(LIB_NANOSLEEP)
-
-# for various GMP functions
-expr_LDADD += $(LIB_GMP)
-factor_LDADD += $(LIB_GMP)
-
-# for getloadavg
-uptime_LDADD += $(GETLOADAVG_LIBS)
-
-# for various ACL functions
-copy_ldadd += $(LIB_ACL)
-ls_LDADD += $(LIB_ACL)
-
-# for various xattr functions
-copy_ldadd += $(LIB_XATTR)
-
-# for print_unicode_char, proper_name_utf8
-cat_LDADD += $(LIBICONV)
-cp_LDADD += $(LIBICONV)
-df_LDADD += $(LIBICONV)
-du_LDADD += $(LIBICONV)
-getlimits_LDADD += $(LIBICONV)
-printf_LDADD += $(LIBICONV)
-ptx_LDADD += $(LIBICONV)
-realpath_LDADD += $(LIBICONV)
-split_LDADD += $(LIBICONV)
-stdbuf_LDADD += $(LIBICONV)
-timeout_LDADD += $(LIBICONV)
-truncate_LDADD += $(LIBICONV)
-
-# for canon_host
-pinky_LDADD += $(GETADDRINFO_LIB)
-who_LDADD += $(GETADDRINFO_LIB)
-
-# for gethostname, uname
-hostname_LDADD += $(GETHOSTNAME_LIB)
-uname_LDADD += $(GETHOSTNAME_LIB)
-
-# for strsignal
-kill_LDADD += $(LIBTHREAD)
-
-# for pthread
-sort_LDADD += $(LIB_PTHREAD)
-
-$(PROGRAMS): ../lib/libcoreutils.a
-
-# Get the release year from ../lib/version-etc.c.
-RELEASE_YEAR = \
-  `sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \
-    $(top_srcdir)/lib/version-etc.c`
-
-copy_sources = copy.c cp-hash.c extent-scan.c extent-scan.h
-
-# Use 'ginstall' in the definition of PROGRAMS and in dependencies to avoid
-# confusion with the 'install' target.  The install rule transforms 'ginstall'
-# to install before applying any user-specified name transformations.
-
-transform = s/ginstall/install/; $(program_transform_name)
-ginstall_SOURCES = install.c prog-fprintf.c $(copy_sources)
-
-# This is for the '[' program.  Automake transliterates '[' to '_'.
-__SOURCES = lbracket.c
-
-cp_SOURCES = cp.c $(copy_sources)
-dir_SOURCES = ls.c ls-dir.c
-vdir_SOURCES = ls.c ls-vdir.c
-id_SOURCES = id.c group-list.c
-groups_SOURCES = groups.c group-list.c
-ls_SOURCES = ls.c ls-ls.c
-ln_SOURCES = ln.c relpath.c relpath.h
-chown_SOURCES = chown.c chown-core.c
-chgrp_SOURCES = chgrp.c chown-core.c
-kill_SOURCES = kill.c operand2sig.c
-realpath_SOURCES = realpath.c relpath.c relpath.h
-timeout_SOURCES = timeout.c operand2sig.c
-
-mv_SOURCES = mv.c remove.c $(copy_sources)
-rm_SOURCES = rm.c remove.c
-
-mkdir_SOURCES = mkdir.c prog-fprintf.c
-rmdir_SOURCES = rmdir.c prog-fprintf.c
-
-df_SOURCES = df.c find-mount-point.c
-stat_SOURCES = stat.c find-mount-point.c
-
-uname_SOURCES = uname.c uname-uname.c
-arch_SOURCES = uname.c uname-arch.c
-
-md5sum_CPPFLAGS = -DHASH_ALGO_MD5=1 $(AM_CPPFLAGS)
-sha1sum_SOURCES = md5sum.c
-sha1sum_CPPFLAGS = -DHASH_ALGO_SHA1=1 $(AM_CPPFLAGS)
-sha224sum_SOURCES = md5sum.c
-sha224sum_CPPFLAGS = -DHASH_ALGO_SHA224=1 $(AM_CPPFLAGS)
-sha256sum_SOURCES = md5sum.c
-sha256sum_CPPFLAGS = -DHASH_ALGO_SHA256=1 $(AM_CPPFLAGS)
-sha384sum_SOURCES = md5sum.c
-sha384sum_CPPFLAGS = -DHASH_ALGO_SHA384=1 $(AM_CPPFLAGS)
-sha512sum_SOURCES = md5sum.c
-sha512sum_CPPFLAGS = -DHASH_ALGO_SHA512=1 $(AM_CPPFLAGS)
-
-ginstall_CPPFLAGS = -DENABLE_MATCHPATHCON=1 $(AM_CPPFLAGS)
-
-# Ensure we don't link against libcoreutils.a as that lib is
-# not compiled with -fPIC which causes issues on 64 bit at least
-libstdbuf_so_LDADD =
-
-# Note libstdbuf is only compiled if GCC is available
-# (as per the check in configure.ac), so these flags should be available.
-# libtool is probably required to relax this dependency.
-libstdbuf_so_LDFLAGS = -shared
-libstdbuf_so_CFLAGS = -fPIC $(AM_CFLAGS)
-
-BUILT_SOURCES += dircolors.h
-dircolors.h: dcgen dircolors.hin
-	$(AM_V_GEN)rm -f $@ $@-t
-	$(AM_V_at)$(PERL) -w -- $(srcdir)/dcgen $(srcdir)/dircolors.hin > $@-t
-	$(AM_V_at)chmod a-w $@-t
-	$(AM_V_at)mv $@-t $@
-
-wheel_size = 5
-
-BUILT_SOURCES += wheel-size.h
-wheel-size.h: Makefile.am
-	$(AM_V_GEN)rm -f $@ $@-t
-	$(AM_V_at)echo '#define WHEEL_SIZE $(wheel_size)' > $@-t
-	$(AM_V_at)chmod a-w $@-t
-	$(AM_V_at)mv $@-t $@
-
-BUILT_SOURCES += wheel.h
-wheel.h: wheel-gen.pl Makefile.am
-	$(AM_V_GEN)rm -f $@ $@-t
-	$(AM_V_at)$(srcdir)/wheel-gen.pl $(wheel_size) > $@-t
-	$(AM_V_at)chmod a-w $@-t
-	$(AM_V_at)mv $@-t $@
-
-# false exits nonzero even with --help or --version.
-# test doesn't support --help or --version.
-# Tell automake to exempt then from that installcheck test.
-AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = false test
-
-# Compare fs.h with the list of file system names/magic-numbers in the
-# Linux statfs man page.  This target prints any new name/number pairs.
-# Also compare against /usr/include/linux/magic.h
-.PHONY: fs-magic-compare
-fs-magic-compare: fs-magic fs-kernel-magic fs-def
-	join -v1 -t@ fs-magic fs-def
-	join -v1 -t@ fs-kernel-magic fs-def
-
-CLEANFILES += fs-def
-fs-def: fs.h
-	grep '^# *define ' fs.h | $(ASSORT) > $@-t && mv $@-t $@
-
-# Massage bits of the statfs man page and definitions from
-# /usr/include/linux/magic.h to be in a form consistent with what's in fs.h.
-fs_normalize_perl_subst =			\
-  -e 's/MINIX_SUPER_MAGIC\b/MINIX/;'		\
-  -e 's/MINIX_SUPER_MAGIC2\b/MINIX_30/;'	\
-  -e 's/MINIX2_SUPER_MAGIC\b/MINIX_V2/;'	\
-  -e 's/MINIX2_SUPER_MAGIC2\b/MINIX_V2_30/;'	\
-  -e 's/MINIX3_SUPER_MAGIC\b/MINIX_V3/;'	\
-  -e 's/CIFS_MAGIC_NUMBER/CIFS/;'		\
-  -e 's/(_SUPER)?_MAGIC//;'			\
-  -e 's/\s+0x(\S+)/" 0x" . uc $$1/e;'		\
-  -e 's/(\s+0x)(\X{3})\b/$${1}0$$2/;'		\
-  -e 's/(\s+0x)(\X{6})\b/$${1}00$$2/;'		\
-  -e 's/(\s+0x)(\X{7})\b/$${1}0$$2/;'		\
-  -e 's/^\s+//;'				\
-  -e 's/^\043define\s+//;'			\
-  -e 's/^_(XIAFS)/$$1/;'			\
-  -e 's/^USBDEVICE/USBDEVFS/;'			\
-  -e 's/NTFS_SB/NTFS/;'				\
-  -e 's/^/\043 define S_MAGIC_/;'		\
-  -e 's,\s*/\* .*? \*/,,;'
-
-CLEANFILES += fs-magic
-fs-magic: Makefile
-	man statfs \
-	  |perl -ne '/File system types:/.../Nobody kno/ and print'	\
-	  |grep 0x | perl -p						\
-	    $(fs_normalize_perl_subst)					\
-	  | grep -Ev 'S_MAGIC_EXT[34]|STACK_END'			\
-	  | $(ASSORT)							\
-	  > $@-t && mv $@-t $@
-
-CLEANFILES += fs-kernel-magic
-fs-kernel-magic: Makefile
-	perl -ne '/^#define.*0x/ and print' /usr/include/linux/magic.h	\
-	  | perl -p							\
-	    $(fs_normalize_perl_subst)					\
-	  | grep -Ev 'S_MAGIC_EXT[34]|STACK_END'			\
-	  | $(ASSORT)							\
-	  > $@-t && mv $@-t $@
-
-BUILT_SOURCES += fs-is-local.h
-fs-is-local.h: stat.c extract-magic
-	$(AM_V_GEN)rm -f $@
-	$(AM_V_at)$(PERL) $(srcdir)/extract-magic --local $(srcdir)/stat.c \
-	  > $@t
-	$(AM_V_at)chmod a-w $@t
-	$(AM_V_at)mv $@t $@
-
-BUILT_SOURCES += fs.h
-fs.h: stat.c extract-magic
-	$(AM_V_GEN)rm -f $@
-	$(AM_V_at)$(PERL) $(srcdir)/extract-magic $(srcdir)/stat.c > $@t
-	$(AM_V_at)chmod a-w $@t
-	$(AM_V_at)mv $@t $@
-
-BUILT_SOURCES += version.c
-version.c: Makefile
-	$(AM_V_GEN)rm -f $@
-	$(AM_V_at)printf '#include <config.h>\n' > $@t
-	$(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t
-	$(AM_V_at)chmod a-w $@t
-	$(AM_V_at)mv $@t $@
-
-BUILT_SOURCES += version.h
-version.h: Makefile
-	$(AM_V_GEN)rm -f $@
-	$(AM_V_at)printf 'extern char const *Version;\n' > $@t
-	$(AM_V_at)chmod a-w $@t
-	$(AM_V_at)mv $@t $@
-
-DISTCLEANFILES = version.c version.h
-MAINTAINERCLEANFILES = $(BUILT_SOURCES)
-
-# Sort in traditional ASCII order, regardless of the current locale;
-# otherwise we may get into trouble with distinct strings that the
-# current locale considers to be equal.
-ASSORT = LC_ALL=C sort
-
-all_programs = \
-    $(bin_PROGRAMS) \
-    $(bin_SCRIPTS) \
-  $(EXTRA_PROGRAMS)
-
-built_programs.list:
-	@echo $(bin_PROGRAMS) $(bin_SCRIPTS) | tr ' ' '\n' \
-	  | sed -e 's,$(EXEEXT)$$,,' | $(ASSORT) -u | tr '\n' ' '
-
-all_programs.list:
-	@echo $(all_programs) | tr ' ' '\n' | sed -e 's,$(EXEEXT)$$,,' \
-	  | sed /libstdbuf/d \
-	  | $(ASSORT) -u
-
-# This is required because we have broken inter-directory dependencies:
-# in order to generate all man pages, even those for which we don't
-# install a binary, require that all programs be built at distribution time.
-dist-hook: $(all_programs)
-
-# Ensure that all programs are built so we can for example
-# subsequently syntax check all man pages.
-.PHONY: all_programs
-all_programs: $(all_programs)
-
-pm = progs-makefile
-pr = progs-readme
-# Ensure that the list of programs in README matches the list
-# of programs we can build.
-check: check-README check-duplicate-no-install
-.PHONY: check-README
-check-README:
-	$(AM_V_GEN)rm -rf $(pr) $(pm)
-	$(AM_V_at)echo $(all_programs) \
-	 | tr -s ' ' '\n' | sed -e 's,$(EXEEXT)$$,,;s/ginstall/install/' \
-	 | sed /libstdbuf/d \
-	 | $(ASSORT) -u > $(pm) && \
-	sed -n '/^The programs .* are:/,/^[a-zA-Z]/p' $(top_srcdir)/README \
-	  | sed -n '/^   */s///p' | tr -s ' ' '\n' > $(pr)
-	$(AM_V_at)diff $(pm) $(pr) && rm -rf $(pr) $(pm)
-
-# Ensure that a by-default-not-installed program (listed in
-# $(no_install__progs) is not also listed as another $(EXTRA_PROGRAMS)
-# entry, because if that were to happen, it *would* be installed
-# by default.
-.PHONY: check-duplicate-no-install
-check-duplicate-no-install: tr
-	$(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)'| ./tr ' ' '\n' | uniq -d`"
-
-# Ensure that the list of programs and author names is accurate.
-# We need a UTF8 locale.  If a lack of locale support or a missing
-# translation inhibits printing of UTF-8 names, just skip this test.
-au_dotdot = authors-dotdot
-au_actual = authors-actual
-.PHONY: _sc_check-AUTHORS
-_sc_check-AUTHORS: $(all_programs)
-	@locale=en_US.UTF-8;				\
-	LC_ALL=$$locale ./cat --version			\
-	    | grep ' Torbjorn '	> /dev/null		\
-	  && { echo "$@: skipping this check"; exit 0; }; \
-	rm -f $(au_actual) $(au_dotdot);		\
-	for i in `ls $(all_programs) | sed -e 's,$(EXEEXT)$$,,' \
-	    | sed /libstdbuf/d				\
-	    | $(ASSORT) -u`; do				\
-	  test "$$i" = '[' && continue;			\
-	  exe=$$i;					\
-	  if test "$$i" = install; then			\
-	    exe=ginstall;				\
-	  elif test "$$i" = test; then			\
-	    exe='[';					\
-	  fi;						\
-	  LC_ALL=$$locale ./$$exe --version		\
-	    | perl -0 -pi -e 's/,\n/, /gm'		\
-	    | sed -n -e '/Written by /{ s//'"$$i"': /;'	\
-		  -e 's/,* and /, /; s/\.$$//; p; }';	\
-	done > $(au_actual) &&				\
-	sed -n '/^[^ ][^ ]*:/p' $(top_srcdir)/AUTHORS > $(au_dotdot) && \
-	diff $(au_actual) $(au_dotdot) && rm -f $(au_actual) $(au_dotdot)
-
-# Use the just-built ./ginstall, when not cross-compiling.
-if CROSS_COMPILING
-cu_install_program = @INSTALL_PROGRAM@
-else
-cu_install_program = ./ginstall
-endif
-INSTALL_PROGRAM = $(cu_install_program)
diff --git a/src/local.mk b/src/local.mk
new file mode 100644
index 0000000..45a6268
--- /dev/null
+++ b/src/local.mk
@@ -0,0 +1,567 @@
+# Make coreutils programs.                             -*-Makefile-*-
+# This is included by the top-level Makefile.am.
+
+## Copyright (C) 1990-2012 Free Software Foundation, Inc.
+
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
+
+# The list of all programs (separated in different variables to express
+# the how and when they should be installed) is defined in this makefile
+# fragment, autogenerated by the 'gen-lists-of-programs.sh' auxiliary
+# script.
+include $(srcdir)/src/cu-progs.mk
+
+EXTRA_PROGRAMS = \
+   $(no_install__progs) \
+   $(build_if_possible__progs) \
+   $(default__progs)
+
+bin_PROGRAMS = $(OPTIONAL_BIN_PROGS)
+
+noinst_PROGRAMS = src/setuidgid src/getlimits
+
+pkglibexec_PROGRAMS = $(OPTIONAL_PKGLIB_PROGS)
+
+noinst_HEADERS =		\
+  src/chown-core.h		\
+  src/copy.h			\
+  src/cp-hash.h			\
+  src/dircolors.h		\
+  src/fiemap.h			\
+  src/find-mount-point.h	\
+  src/fs.h			\
+  src/fs-is-local.h		\
+  src/group-list.h		\
+  src/ioblksize.h		\
+  src/ls.h			\
+  src/operand2sig.h		\
+  src/prog-fprintf.h		\
+  src/remove.h			\
+  src/system.h			\
+  src/wheel-size.h		\
+  src/wheel.h			\
+  src/uname.h
+
+EXTRA_DIST += 		\
+  src/dcgen 		\
+  src/dircolors.hin	\
+  src/tac-pipe.c	\
+  src/wheel-gen.pl	\
+  src/extract-magic	\
+  src/c99-to-c89.diff
+
+CLEANFILES = $(SCRIPTS)
+
+# Also remove these sometimes-built programs.
+# For example, even when excluded, they're built via _sc_check-AUTHORS.
+CLEANFILES += $(no_install__progs)
+
+AM_CPPFLAGS = -I$(top_srcdir)/lib
+
+noinst_LIBRARIES = src/libver.a
+nodist_src_libver_a_SOURCES = src/version.c src/version.h
+
+# Tell the linker to omit references to unused shared libraries.
+AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
+
+# Extra libraries needed by more than one program.  Will be updated later.
+copy_ldadd =
+remove_ldadd =
+
+# Sometimes, the expansion of $(LIBINTL) includes -lc which may
+# include modules defining variables like 'optind', so libcoreutils.a
+# must precede $(LIBINTL) in order to ensure we use GNU getopt.
+# But libcoreutils.a must also follow $(LIBINTL), since libintl uses
+# replacement functions defined in libcoreutils.a.
+LDADD = src/libver.a lib/libcoreutils.a $(LIBINTL) lib/libcoreutils.a
+
+# First, list all programs, to make listing per-program libraries easier.
+# See [ below.
+src_arch_LDADD = $(LDADD)
+src_base64_LDADD = $(LDADD)
+src_basename_LDADD = $(LDADD)
+src_cat_LDADD = $(LDADD)
+src_chcon_LDADD = $(LDADD)
+src_chgrp_LDADD = $(LDADD)
+src_chmod_LDADD = $(LDADD)
+src_chown_LDADD = $(LDADD)
+src_chroot_LDADD = $(LDADD)
+src_cksum_LDADD = $(LDADD)
+src_comm_LDADD = $(LDADD)
+src_nproc_LDADD = $(LDADD)
+src_cp_LDADD = $(LDADD)
+src_csplit_LDADD = $(LDADD)
+src_cut_LDADD = $(LDADD)
+src_date_LDADD = $(LDADD)
+src_dd_LDADD = $(LDADD)
+src_df_LDADD = $(LDADD)
+# See dir_LDADD below
+src_dircolors_LDADD = $(LDADD)
+src_dirname_LDADD = $(LDADD)
+src_du_LDADD = $(LDADD)
+src_echo_LDADD = $(LDADD)
+src_env_LDADD = $(LDADD)
+src_expand_LDADD = $(LDADD)
+src_expr_LDADD = $(LDADD)
+src_factor_LDADD = $(LDADD)
+src_false_LDADD = $(LDADD)
+src_fmt_LDADD = $(LDADD)
+src_fold_LDADD = $(LDADD)
+src_getlimits_LDADD = $(LDADD)
+src_ginstall_LDADD = $(LDADD)
+src_groups_LDADD = $(LDADD)
+src_head_LDADD = $(LDADD)
+src_hostid_LDADD = $(LDADD)
+src_hostname_LDADD = $(LDADD)
+src_id_LDADD = $(LDADD)
+src_join_LDADD = $(LDADD)
+src_kill_LDADD = $(LDADD)
+src_link_LDADD = $(LDADD)
+src_ln_LDADD = $(LDADD)
+src_logname_LDADD = $(LDADD)
+src_ls_LDADD = $(LDADD)
+src_md5sum_LDADD = $(LDADD)
+src_mkdir_LDADD = $(LDADD)
+src_mkfifo_LDADD = $(LDADD)
+src_mknod_LDADD = $(LDADD)
+src_mktemp_LDADD = $(LDADD)
+src_mv_LDADD = $(LDADD)
+src_nice_LDADD = $(LDADD)
+src_nl_LDADD = $(LDADD)
+src_nohup_LDADD = $(LDADD)
+src_od_LDADD = $(LDADD)
+src_paste_LDADD = $(LDADD)
+src_pathchk_LDADD = $(LDADD)
+src_pinky_LDADD = $(LDADD)
+src_pr_LDADD = $(LDADD)
+src_printenv_LDADD = $(LDADD)
+src_printf_LDADD = $(LDADD)
+src_ptx_LDADD = $(LDADD)
+src_pwd_LDADD = $(LDADD)
+src_readlink_LDADD = $(LDADD)
+src_realpath_LDADD = $(LDADD)
+src_rm_LDADD = $(LDADD)
+src_rmdir_LDADD = $(LDADD)
+src_runcon_LDADD = $(LDADD)
+src_seq_LDADD = $(LDADD)
+src_setuidgid_LDADD = $(LDADD)
+src_sha1sum_LDADD = $(LDADD)
+src_sha224sum_LDADD = $(LDADD)
+src_sha256sum_LDADD = $(LDADD)
+src_sha384sum_LDADD = $(LDADD)
+src_sha512sum_LDADD = $(LDADD)
+src_shred_LDADD = $(LDADD)
+src_shuf_LDADD = $(LDADD)
+src_sleep_LDADD = $(LDADD)
+src_sort_LDADD = $(LDADD)
+src_split_LDADD = $(LDADD)
+src_stat_LDADD = $(LDADD)
+src_stdbuf_LDADD = $(LDADD)
+src_stty_LDADD = $(LDADD)
+src_sum_LDADD = $(LDADD)
+src_sync_LDADD = $(LDADD)
+src_tac_LDADD = $(LDADD)
+src_tail_LDADD = $(LDADD)
+src_tee_LDADD = $(LDADD)
+src_test_LDADD = $(LDADD)
+src_timeout_LDADD = $(LDADD)
+src_touch_LDADD = $(LDADD)
+src_tr_LDADD = $(LDADD)
+src_true_LDADD = $(LDADD)
+src_truncate_LDADD = $(LDADD)
+src_tsort_LDADD = $(LDADD)
+src_tty_LDADD = $(LDADD)
+src_uname_LDADD = $(LDADD)
+src_unexpand_LDADD = $(LDADD)
+src_uniq_LDADD = $(LDADD)
+src_unlink_LDADD = $(LDADD)
+src_uptime_LDADD = $(LDADD)
+src_users_LDADD = $(LDADD)
+# See vdir_LDADD below
+src_wc_LDADD = $(LDADD)
+src_who_LDADD = $(LDADD)
+src_whoami_LDADD = $(LDADD)
+src_yes_LDADD = $(LDADD)
+
+# Synonyms.  Recall that Automake transliterates '[' and '/' to '_'.
+src___LDADD = $(src_test_LDADD)
+src_dir_LDADD = $(src_ls_LDADD)
+src_vdir_LDADD = $(src_ls_LDADD)
+
+src_cp_LDADD += $(copy_ldadd)
+src_ginstall_LDADD += $(copy_ldadd)
+src_mv_LDADD += $(copy_ldadd)
+
+src_mv_LDADD += $(remove_ldadd)
+src_rm_LDADD += $(remove_ldadd)
+
+# for eaccess, euidaccess
+copy_ldadd += $(LIB_EACCESS)
+remove_ldadd += $(LIB_EACCESS)
+src_sort_LDADD += $(LIB_EACCESS)
+src_test_LDADD += $(LIB_EACCESS)
+
+# for selinux use
+copy_ldadd += $(LIB_SELINUX)
+src_chcon_LDADD += $(LIB_SELINUX)
+src_ginstall_LDADD += $(LIB_SELINUX)
+src_id_LDADD += $(LIB_SELINUX)
+src_ls_LDADD += $(LIB_SELINUX)
+src_mkdir_LDADD += $(LIB_SELINUX)
+src_mkfifo_LDADD += $(LIB_SELINUX)
+src_mknod_LDADD += $(LIB_SELINUX)
+src_runcon_LDADD += $(LIB_SELINUX)
+src_stat_LDADD += $(LIB_SELINUX)
+
+# for gettime, settime, utimecmp, utimens
+copy_ldadd += $(LIB_CLOCK_GETTIME)
+src_date_LDADD += $(LIB_CLOCK_GETTIME)
+src_ginstall_LDADD += $(LIB_CLOCK_GETTIME)
+src_ls_LDADD += $(LIB_CLOCK_GETTIME)
+src_pr_LDADD += $(LIB_CLOCK_GETTIME)
+src_timeout_LDADD += $(LIB_TIMER_TIME)
+src_touch_LDADD += $(LIB_CLOCK_GETTIME)
+
+# for gethrxtime
+src_dd_LDADD += $(LIB_GETHRXTIME)
+
+# for cap_get_file
+src_ls_LDADD += $(LIB_CAP)
+
+# for fdatasync
+src_dd_LDADD += $(LIB_FDATASYNC)
+src_shred_LDADD += $(LIB_FDATASYNC)
+
+# for xnanosleep
+src_sleep_LDADD += $(LIB_NANOSLEEP)
+src_sort_LDADD += $(LIB_NANOSLEEP)
+src_tail_LDADD += $(LIB_NANOSLEEP)
+
+# for various GMP functions
+src_expr_LDADD += $(LIB_GMP)
+src_factor_LDADD += $(LIB_GMP)
+
+# for getloadavg
+src_uptime_LDADD += $(GETLOADAVG_LIBS)
+
+# for various ACL functions
+copy_ldadd += $(LIB_ACL)
+src_ls_LDADD += $(LIB_ACL)
+
+# for various xattr functions
+copy_ldadd += $(LIB_XATTR)
+
+# for print_unicode_char, proper_name_utf8
+src_cat_LDADD += $(LIBICONV)
+src_cp_LDADD += $(LIBICONV)
+src_df_LDADD += $(LIBICONV)
+src_du_LDADD += $(LIBICONV)
+src_getlimits_LDADD += $(LIBICONV)
+src_printf_LDADD += $(LIBICONV)
+src_ptx_LDADD += $(LIBICONV)
+src_realpath_LDADD += $(LIBICONV)
+src_split_LDADD += $(LIBICONV)
+src_stdbuf_LDADD += $(LIBICONV)
+src_timeout_LDADD += $(LIBICONV)
+src_truncate_LDADD += $(LIBICONV)
+
+# for canon_host
+src_pinky_LDADD += $(GETADDRINFO_LIB)
+src_who_LDADD += $(GETADDRINFO_LIB)
+
+# for gethostname, uname
+src_hostname_LDADD += $(GETHOSTNAME_LIB)
+src_uname_LDADD += $(GETHOSTNAME_LIB)
+
+# for strsignal
+src_kill_LDADD += $(LIBTHREAD)
+
+# for pthread
+src_sort_LDADD += $(LIB_PTHREAD)
+
+$(PROGRAMS): lib/libcoreutils.a
+
+# Get the release year from lib/version-etc.c.
+RELEASE_YEAR = \
+  `sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \
+    $(top_srcdir)/lib/version-etc.c`
+
+copy_sources = \
+  src/copy.c \
+  src/cp-hash.c \
+  src/extent-scan.c \
+  src/extent-scan.h
+
+# Use 'ginstall' in the definition of PROGRAMS and in dependencies to avoid
+# confusion with the 'install' target.  The install rule transforms 'ginstall'
+# 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)
+
+# This is for the '[' program.  Automake transliterates '[' and '/' to '_'.
+src___SOURCES = src/lbracket.c
+
+src_cp_SOURCES = src/cp.c $(copy_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
+src_groups_SOURCES = src/groups.c src/group-list.c
+src_ls_SOURCES = src/ls.c src/ls-ls.c
+src_ln_SOURCES = src/ln.c src/relpath.c src/relpath.h
+src_chown_SOURCES = src/chown.c src/chown-core.c
+src_chgrp_SOURCES = src/chgrp.c src/chown-core.c
+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_rm_SOURCES = src/rm.c src/remove.c
+
+src_mkdir_SOURCES = src/mkdir.c src/prog-fprintf.c
+src_rmdir_SOURCES = src/rmdir.c src/prog-fprintf.c
+
+src_df_SOURCES = src/df.c src/find-mount-point.c
+src_stat_SOURCES = src/stat.c src/find-mount-point.c
+
+src_uname_SOURCES = src/uname.c src/uname-uname.c
+src_arch_SOURCES = src/uname.c src/uname-arch.c
+
+src_md5sum_CPPFLAGS = -DHASH_ALGO_MD5=1 $(AM_CPPFLAGS)
+src_sha1sum_SOURCES = src/md5sum.c
+src_sha1sum_CPPFLAGS = -DHASH_ALGO_SHA1=1 $(AM_CPPFLAGS)
+src_sha224sum_SOURCES = src/md5sum.c
+src_sha224sum_CPPFLAGS = -DHASH_ALGO_SHA224=1 $(AM_CPPFLAGS)
+src_sha256sum_SOURCES = src/md5sum.c
+src_sha256sum_CPPFLAGS = -DHASH_ALGO_SHA256=1 $(AM_CPPFLAGS)
+src_sha384sum_SOURCES = src/md5sum.c
+src_sha384sum_CPPFLAGS = -DHASH_ALGO_SHA384=1 $(AM_CPPFLAGS)
+src_sha512sum_SOURCES = src/md5sum.c
+src_sha512sum_CPPFLAGS = -DHASH_ALGO_SHA512=1 $(AM_CPPFLAGS)
+
+src_ginstall_CPPFLAGS = -DENABLE_MATCHPATHCON=1 $(AM_CPPFLAGS)
+
+# Ensure we don't link against libcoreutils.a as that lib is
+# not compiled with -fPIC which causes issues on 64 bit at least
+src_libstdbuf_so_LDADD =
+
+# Note libstdbuf is only compiled if GCC is available
+# (as per the check in configure.ac), so these flags should be available.
+# libtool is probably required to relax this dependency.
+src_libstdbuf_so_LDFLAGS = -shared
+src_libstdbuf_so_CFLAGS = -fPIC $(AM_CFLAGS)
+
+BUILT_SOURCES += src/dircolors.h
+src/dircolors.h: src/dcgen src/dircolors.hin
+	$(AM_V_GEN)rm -f $@ $@-t
+	$(AM_V_at)$(PERL) -w -- $(srcdir)/src/dcgen \
+	                        $(srcdir)/src/dircolors.hin > $@-t
+	$(AM_V_at)chmod a-w $@-t
+	$(AM_V_at)mv $@-t $@
+
+wheel_size = 5
+
+BUILT_SOURCES += src/wheel-size.h
+src/wheel-size.h: Makefile.am
+	$(AM_V_GEN)rm -f $@ $@-t
+	$(AM_V_at)echo '#define WHEEL_SIZE $(wheel_size)' > $@-t
+	$(AM_V_at)chmod a-w $@-t
+	$(AM_V_at)mv $@-t $@
+
+BUILT_SOURCES += src/wheel.h
+src/wheel.h: src/wheel-gen.pl Makefile.am
+	$(AM_V_GEN)rm -f $@ $@-t
+	$(AM_V_at)$(srcdir)/src/wheel-gen.pl $(wheel_size) > $@-t
+	$(AM_V_at)chmod a-w $@-t
+	$(AM_V_at)mv $@-t $@
+
+# false exits nonzero even with --help or --version.
+# test doesn't support --help or --version.
+# Tell automake to exempt then from that installcheck test.
+AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = src/false src/test
+
+# Compare fs.h with the list of file system names/magic-numbers in the
+# Linux statfs man page.  This target prints any new name/number pairs.
+# Also compare against /usr/include/linux/magic.h
+.PHONY: src/fs-magic-compare
+src/fs-magic-compare: src/fs-magic src/fs-kernel-magic src/fs-def
+	join -v1 -t@ src/fs-magic src/fs-def
+	join -v1 -t@ src/fs-kernel-magic src/fs-def
+
+CLEANFILES += src/fs-def
+src/fs-def: src/fs.h
+	grep '^# *define ' src/fs.h | $(ASSORT) > $@-t && mv $@-t $@
+
+# Massage bits of the statfs man page and definitions from
+# /usr/include/linux/magic.h to be in a form consistent with what's in fs.h.
+fs_normalize_perl_subst =			\
+  -e 's/MINIX_SUPER_MAGIC\b/MINIX/;'		\
+  -e 's/MINIX_SUPER_MAGIC2\b/MINIX_30/;'	\
+  -e 's/MINIX2_SUPER_MAGIC\b/MINIX_V2/;'	\
+  -e 's/MINIX2_SUPER_MAGIC2\b/MINIX_V2_30/;'	\
+  -e 's/MINIX3_SUPER_MAGIC\b/MINIX_V3/;'	\
+  -e 's/CIFS_MAGIC_NUMBER/CIFS/;'		\
+  -e 's/(_SUPER)?_MAGIC//;'			\
+  -e 's/\s+0x(\S+)/" 0x" . uc $$1/e;'		\
+  -e 's/(\s+0x)(\X{3})\b/$${1}0$$2/;'		\
+  -e 's/(\s+0x)(\X{6})\b/$${1}00$$2/;'		\
+  -e 's/(\s+0x)(\X{7})\b/$${1}0$$2/;'		\
+  -e 's/^\s+//;'				\
+  -e 's/^\043define\s+//;'			\
+  -e 's/^_(XIAFS)/$$1/;'			\
+  -e 's/^USBDEVICE/USBDEVFS/;'			\
+  -e 's/NTFS_SB/NTFS/;'				\
+  -e 's/^/\043 define S_MAGIC_/;'		\
+  -e 's,\s*/\* .*? \*/,,;'
+
+CLEANFILES += src/fs-magic
+src/fs-magic: Makefile
+	man statfs \
+	  |perl -ne '/File system types:/.../Nobody kno/ and print'	\
+	  |grep 0x | perl -p						\
+	    $(fs_normalize_perl_subst)					\
+	  | grep -Ev 'S_MAGIC_EXT[34]|STACK_END'			\
+	  | $(ASSORT)							\
+	  > $@-t && mv $@-t $@
+
+CLEANFILES += src/fs-kernel-magic
+src/fs-kernel-magic: Makefile
+	perl -ne '/^#define.*0x/ and print' /usr/include/linux/magic.h	\
+	  | perl -p							\
+	    $(fs_normalize_perl_subst)					\
+	  | grep -Ev 'S_MAGIC_EXT[34]|STACK_END'			\
+	  | $(ASSORT)							\
+	  > $@-t && mv $@-t $@
+
+BUILT_SOURCES += src/fs-is-local.h
+src/fs-is-local.h: src/stat.c src/extract-magic
+	$(AM_V_GEN)rm -f $@
+	$(AM_V_at)$(PERL) $(srcdir)/src/extract-magic \
+	                  --local $(srcdir)/src/stat.c > $@t
+	$(AM_V_at)chmod a-w $@t
+	$(AM_V_at)mv $@t $@
+
+BUILT_SOURCES += src/fs.h
+src/fs.h: src/stat.c src/extract-magic
+	$(AM_V_GEN)rm -f $@
+	$(AM_V_at)$(PERL) $(srcdir)/src/extract-magic \
+	                  $(srcdir)/src/stat.c > $@t
+	$(AM_V_at)chmod a-w $@t
+	$(AM_V_at)mv $@t $@
+
+BUILT_SOURCES += src/version.c
+src/version.c: Makefile
+	$(AM_V_GEN)rm -f $@
+	$(AM_V_at)printf '#include <config.h>\n' > $@t
+	$(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t
+	$(AM_V_at)chmod a-w $@t
+	$(AM_V_at)mv $@t $@
+
+BUILT_SOURCES += src/version.h
+src/version.h: Makefile
+	$(AM_V_GEN)rm -f $@
+	$(AM_V_at)printf 'extern char const *Version;\n' > $@t
+	$(AM_V_at)chmod a-w $@t
+	$(AM_V_at)mv $@t $@
+
+DISTCLEANFILES += src/version.c src/version.h
+MAINTAINERCLEANFILES += $(BUILT_SOURCES)
+
+all_programs = \
+    $(bin_PROGRAMS) \
+    $(bin_SCRIPTS) \
+    $(EXTRA_PROGRAMS)
+
+built_programs.list:
+	@echo $(bin_PROGRAMS) $(bin_SCRIPTS) | tr ' ' '\n' \
+	  | sed -e 's,$(EXEEXT)$$,,' -e 's,^src/,,' \
+	  | $(ASSORT) -u | tr '\n' ' '
+
+all_programs.list:
+	@echo $(all_programs) | tr ' ' '\n' | sed -e 's,$(EXEEXT)$$,,' \
+	  | sed /libstdbuf/d \
+	  | $(ASSORT) -u
+
+# This is required because we have broken inter-directory dependencies:
+# in order to generate all man pages, even those for which we don't
+# install a binary, require that all programs be built at distribution time.
+dist-hook: $(all_programs)
+
+pm = progs-makefile
+pr = progs-readme
+# Ensure that the list of programs in README matches the list
+# of programs we can build.
+check: check-README check-duplicate-no-install
+.PHONY: check-README
+check-README:
+	$(AM_V_GEN)rm -rf $(pr) $(pm)
+	$(AM_V_at)echo $(all_programs) \
+	 | tr -s ' ' '\n' \
+	 | sed -e 's,$(EXEEXT)$$,,' \
+	       -e 's,^src/,,' \
+	       -e 's/^ginstall$$/install/' \
+	 | sed /libstdbuf/d \
+	 | $(ASSORT) -u > $(pm) && \
+	sed -n '/^The programs .* are:/,/^[a-zA-Z]/p' $(top_srcdir)/README \
+	  | sed -n '/^   */s///p' | tr -s ' ' '\n' > $(pr)
+	$(AM_V_at)diff $(pm) $(pr) && rm -rf $(pr) $(pm)
+
+# Ensure that a by-default-not-installed program (listed in
+# $(no_install__progs) is not also listed as another $(EXTRA_PROGRAMS)
+# entry, because if that were to happen, it *would* be installed
+# by default.
+.PHONY: check-duplicate-no-install
+check-duplicate-no-install: src/tr
+	$(AM_V_GEN)test -z "`echo '$(EXTRA_PROGRAMS)' | tr ' ' '\n' | uniq -d`"
+
+# Ensure that the list of programs and author names is accurate.
+# We need a UTF8 locale.  If a lack of locale support or a missing
+# translation inhibits printing of UTF-8 names, just skip this test.
+au_dotdot = authors-dotdot
+au_actual = authors-actual
+.PHONY: _sc_check-AUTHORS
+_sc_check-AUTHORS: $(all_programs)
+	@locale=en_US.UTF-8;				\
+	LC_ALL=$$locale ./cat --version			\
+	    | grep ' Torbjorn '	> /dev/null		\
+	  && { echo "$@: skipping this check"; exit 0; }; \
+	rm -f $(au_actual) $(au_dotdot);		\
+	for i in `ls $(all_programs)			\
+	    | sed -e 's,^src/,,' -e 's,$(EXEEXT)$$,,'	\
+	    | sed /libstdbuf/d				\
+	    | $(ASSORT) -u`; do				\
+	  test "$$i" = '[' && continue;			\
+	  exe=$$i;					\
+	  if test "$$i" = install; then			\
+	    exe=ginstall;				\
+	  elif test "$$i" = test; then			\
+	    exe='[';					\
+	  fi;						\
+	  LC_ALL=$$locale ./$$exe --version		\
+	    | perl -0 -pi -e 's/,\n/, /gm'		\
+	    | sed -n -e '/Written by /{ s//'"$$i"': /;'	\
+		  -e 's/,* and /, /; s/\.$$//; p; }';	\
+	done > $(au_actual) &&				\
+	sed -n '/^[^ ][^ ]*:/p' $(top_srcdir)/AUTHORS > $(au_dotdot) && \
+	diff $(au_actual) $(au_dotdot) && rm -f $(au_actual) $(au_dotdot)
+
+# Use the just-built 'ginstall', when not cross-compiling.
+if CROSS_COMPILING
+cu_install_program = @INSTALL_PROGRAM@
+else
+cu_install_program = src/ginstall
+endif
+INSTALL_PROGRAM = $(cu_install_program)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d8dee57..54f1e08 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -40,10 +40,10 @@ check: vc_exe_in_TESTS
 CLEANFILES =
 CLEANFILES += .built-programs
 check_DATA = .built-programs
-.built-programs: $(top_srcdir)/src/Makefile.am
-	$(AM_V_GEN)(cd $(top_builddir)/src				\
+.built-programs: $(top_srcdir)/Makefile.am
+	$(AM_V_GEN)(cd $(top_builddir)					\
             && MAKEFLAGS= $(MAKE) -s built_programs.list)		\
-          > $@-t && mv $@-t $@
+          | sed s,^src/,, > $@-t && mv $@-t $@
 
 TEST_EXTENSIONS = .sh .pl .xpl
 
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7aw5-0002ll-05
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53863)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avz-0002VE-Bd
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avy-0007tH-8K
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:31 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:33996)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avy-0007kc-2i
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:30 -0400
Received: by mail-wi0-f177.google.com with SMTP id hn17so1625250wib.12
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=CGxqyafUesBQsr7ruuxpp2IoypSwuajBvjYm+kr5+Y8=;
	b=JYlYP4ocyBo1PjrNyI8bR92bQSZu5j3NAmCeUYMT8uyrrfagcs12hRZbhAY2evpYQJ
	0MAY0yAF3mJHwbdkbH1dAorvICN2HABSRhztjAt/IMgM7NsGlhNsRUElzFlgezUt4ca5
	g+2MMdTQbrRcoLKtlmvnxv51fDhxtAHMVjtoKPahigLViNyEqRA60R6VoKRl97acQ5eQ
	8zsMq39phblvk+RAUvZkYYdq3gvrmku8SkWFDdWOyqmDGroZ7g9NAILqnJkobdZmTDg2
	xuIDAIvvhVynF6+Hib0xFrAulz+io8hgW2XuQ5AkDAfh7eLrKznrPST+Hoth3+Ja2Ud4
	MjKw==
Received: by 10.180.97.135 with SMTP id ea7mr7664085wib.11.1346456849692;
	Fri, 31 Aug 2012 16:47:29 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.28
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:29 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 14/22] build: simplify: get rid of yet some more indirection
	variables
Date: Sat,  1 Sep 2012 01:46:51 +0200
Message-Id: <60ff145a390a3da5f0dbf04b61b2f98773d75001.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:33 -0000

* configure.ac: Adjust and improve few comments.
(MAN): Rename ...
(man1_MANS): ... like this.
Ensure it's aren't initialized in all Makefiles (which would lead
to spurious errors), by calling AM_SUBST_NOTMAKE on it.
Also call AM_SUBST_NOTMAKE on 'EXTRA_MANS', for consistency.
* man/local.mk (man1_MANS): Simply define to '@man1_MANS@'.
---
 configure.ac | 9 +++++----
 man/local.mk | 6 +++---
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5c3592b..99f293a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -422,9 +422,9 @@ case " $optional_bin_progs " in
   *' stdbuf '*) gl_ADD_PROG([optional_pkglib_progs], [libstdbuf.so]) ;;
 esac
 
-MAN=`
+man1_MANS=`
   for p in $optional_bin_progs; do
-    # Change "ginstall.1" to "install.1" in $MAN.
+    # Change "ginstall.1" to "install.1".
     test $p = ginstall && p=install
     # Ignore the "[" program, since writing a portable make rule to
     # generate its manpage is not practical.
@@ -448,14 +448,15 @@ pkglibexec_PROGRAMS=`
   for p in $optional_pkglib_progs; do echo src/$p; done`
 
 # Normalize whitespace.
-MAN=`echo $MAN`
+man1_MANS=`echo $man1_MANS`
 EXTRA_MANS=`echo $EXTRA_MANS`
 bin_PROGRAMS=`echo $bin_PROGRAMS`
 pkglibexec_PROGS=`echo $pkglibexec_PROGRAMS`
 
 AC_SUBST([bin_PROGRAMS])        AM_SUBST_NOTMAKE([bin_PROGRAMS])
 AC_SUBST([pkglibexec_PROGRAMS]) AM_SUBST_NOTMAKE([pkglibexec_PROGRAMS])
-AC_SUBST([EXTRA_MANS])
+AC_SUBST([man1_MANS])           AM_SUBST_NOTMAKE([man1_MANS])
+AC_SUBST([EXTRA_MANS])          AM_SUBST_NOTMAKE([EXTRA_MANS])
 
 AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
 
diff --git a/man/local.mk b/man/local.mk
index 5e89829..99eb215 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -18,7 +18,7 @@
 
 EXTRA_DIST += man/help2man
 
-man1_MANS = $(MAN)
+man1_MANS = @man1_MANS@
 
 EXTRA_DIST += $(man1_MANS) $(man1_MANS:.1=.x)
 MAINTAINERCLEANFILES += $(man1_MANS)
@@ -149,8 +149,8 @@ man/whoami.1:    $(mandep)  src/whoami.c
 man/yes.1:       $(mandep)  src/yes.c
 
 # This is required so that changes to e.g., emit_bug_reporting_address
-# provoke regeneration of all $(MAN) files.
-$(MAN): $(top_srcdir)/src/system.h
+# provoke regeneration of all the manpages.
+$(man1_MANS): $(top_srcdir)/src/system.h
 
 .x.1:
 	$(AM_V_GEN)case '$(PERL)' in				\
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7aw5-0002oU-M2
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53915)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw1-0002bV-FG
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avz-0007uZ-Eb
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:33 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:65072)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avz-0007fH-8L
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:31 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so2117744wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=j2ZLz9LZCDXlqHVjxVXOeNS2lZPVR1DJiSQNS+UPh9k=;
	b=lLWKweKbiqQNOEvy2ub4r5ZrcCY77WB9FSc5mPFu7wHYoyDL1FmlWmu4ICfdCUnpps
	HldwKM46a2Gc6QAITNPV1hDF9jEPDuTe+zVQDyyQPOL1ryIWx3Rbz7s1Hff27Hm7A+va
	D0TEDQ4AX8jUaygsFstl2m0MmywajT0xZc6bDf9onmN7dnA9+Qtr5e38kbNMM6hlilwz
	2tX2vKjJJ06hwyTQZLGfSVwVuo5beOdJiDPX/mnytCWbylxkL7XP/DY33YyvPgjWO2Zl
	me0UXklcP8F/B4KHeZyEbA0KPt2YP1CpIlp3ZPYORQUnY4GSxxbK/gx6bVGpODOhXrfT
	pLKw==
Received: by 10.216.139.196 with SMTP id c46mr5663939wej.220.1346456850842;
	Fri, 31 Aug 2012 16:47:30 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.29
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:30 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 15/22] build: enhance man pages cleaning and dependencies
Date: Sat,  1 Sep 2012 01:46:52 +0200
Message-Id: <718b99a54809e5b9163c0ce57de0cfa1a8efc40d.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:34 -0000

* man/local.mk: All of the manpages should depend on 'src/system.h',
and all of them should be cleaned by "make maintainer-clean", that
is, added to MAINTAINERCLEANFILES.  Make it be so.
Some minor cosmetic tweakings and reorderings while at it.
---
 man/local.mk | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/man/local.mk b/man/local.mk
index 99eb215..182020b 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -19,16 +19,15 @@
 EXTRA_DIST += man/help2man
 
 man1_MANS = @man1_MANS@
-
 EXTRA_DIST += $(man1_MANS) $(man1_MANS:.1=.x)
-MAINTAINERCLEANFILES += $(man1_MANS)
 
 EXTRA_MANS = @EXTRA_MANS@
-
 EXTRA_DIST += $(EXTRA_MANS) $(EXTRA_MANS:.1=.x)
 
 ALL_MANS = $(man1_MANS) $(EXTRA_MANS)
 
+MAINTAINERCLEANFILES += $(ALL_MANS)
+
 # This is required because we have subtle inter-directory dependencies:
 # in order to generate all man pages, even those for which we don't
 # install a binary, require that all programs be built at distribution
@@ -150,7 +149,7 @@ man/yes.1:       $(mandep)  src/yes.c
 
 # This is required so that changes to e.g., emit_bug_reporting_address
 # provoke regeneration of all the manpages.
-$(man1_MANS): $(top_srcdir)/src/system.h
+$(ALL_MANS): $(top_srcdir)/src/system.h
 
 .x.1:
 	$(AM_V_GEN)case '$(PERL)' in				\
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7aw8-0002v4-1v
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53976)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw4-0002jI-3q
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw3-0007xM-5h
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:36 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:65072)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw2-0007fH-T5
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:35 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so2117744wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references:mime-version:content-type
	:content-transfer-encoding;
	bh=aj6N357wPVTKR+hgtAefE9f+gYZxyX4jDz/H9xy+OvE=;
	b=zSoGqXEjKRPQT2+a2HuiV6urItVwSe3+f7lgowOOQF1hcuoECmldnjwFVgYJ14nUq6
	A0aYZEAqr8mwsYw1+e7rPG3pbcsyYSFlDJ9lw+j+3J0qJTlNjyvVqrDHRN4PvemG/Nhq
	QcWMi6eS0jMDMQxKcnSuaP8zWORv/BCFHQ4+WTckBb+nzurG7kqsnkze40ggVSmx0q8p
	rUvjruWgP22/23jO/DyyQWnvPHUdfDx/QB7YmkTgNxgHqWL90XHrxv9z753+9i07B65f
	oxWnXJU/X3mpzZauAC4aoVuAu0jqd4aHqGy2ibvtypeiOwwVsFxyiYJBVoohMw0KB/S9
	E0LA==
Received: by 10.180.20.11 with SMTP id j11mr7657364wie.12.1346456854519;
	Fri, 31 Aug 2012 16:47:34 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.33
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:33 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: =?UTF-8?q?=5BPATCH=2018/22=5D=20maint=3A=20typofix=20in=20comments?=
Date: Sat,  1 Sep 2012 01:46:55 +0200
Message-Id: <ef2219d52a9ed9ea0e3b9d0811fb7c1644aa9d19.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:38 -0000

---
 src/local.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/local.mk b/src/local.mk
index 0909d95..e127c74 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -67,7 +67,7 @@ EXTRA_DIST +=		\
 CLEANFILES = $(SCRIPTS)
 
 # Also remove these sometimes-built programs.
-# For example, even when excluded, they're built via 'sc_check-AUTHORSĂ¬
+# For example, even when excluded, they're built via 'sc_check-AUTHORS'
 # or 'dist'.
 CLEANFILES += $(no_install__progs)
 
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7aw0-0002Zw-QT
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53784)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avw-0002M1-Gb
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avu-0007qe-QV
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:28 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:34789)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7avu-0007jZ-K8
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:26 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so2092479wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=31myR01M0dcJjweuOXVxidGBi9goU0cnyFE96OyoRPY=;
	b=ZXkTJNjWO2ofxeJvAuGDYlYXb6QFWe0P59CXchCOXwSLBUM1fHaRBl5Kt7Sej4aN/B
	zO2xMDyAQX8aX30uo/tpT+ZEXoTTX+3ZCjTgfyf2Jk6PHPiFUJwWKBHref3faVBLcsO6
	7vnS3HFS2+XnREZORPWXIZsED0UQ7V4tPvZLw4yzeczAHIfEur3OPAU8uk1XMr1afMFW
	eDROAYSZx6004QzLNBpPhoYssmlBgGIpiOV64sARUuWYYDK1bhSv30lLAvIYi5VcP6gR
	+eLLnSefPVZ3ksSUgcY9aUip0Pv3AriqOyCPjSpoFI0CTXwRrX4gkHNDyOTYvx0U5W/s
	bjOQ==
Received: by 10.180.100.37 with SMTP id ev5mr7685553wib.5.1346456846185;
	Fri, 31 Aug 2012 16:47:26 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.24
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:25 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 11/22] build: simplify and make more portable to non-GNU make
Date: Sat,  1 Sep 2012 01:46:48 +0200
Message-Id: <7c445a32d33bfeed3d8535b432325e72a7931660.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:30 -0000

The AC_SUBST'd variable '$(NO_INSTALL_PROGS_DEFAULT)' is only used in
makefile expressions listing the manual pages that are not built by
default (but might need to be when a distribution tarball is created).
And such expressions exploited some features of make variable expansion
-- namely, $(VAR:%=dir/%.x) -- that, while seemingly quite portable in
practice, is not POSIX-conforming, and could break on lesser vendor
make implementations.  So kill two birds with one stone, by getting
rid of the $(NO_INSTALL_PROGS_DEFAULT) intermediate variable and
improving makefile portability in the process.

While at it, we also clean up some other minor naming inconsistency
and useless indirection, and fix some dependency issue.

* configure.ac (NO_INSTALL_PROGS_DEFAULT): Don't define nor AC_SUBST
anymore; instead ...
(EXTRA_MANS): ... define and AC_SUBST these.
* man/local.mk (extra_man_1): Rename ...
(EXTRA_MANS): ... like this, explicitly making clear it's AC_SUBST'd.
(extra_man_x): It's used only once, no need to define it; just inline
its only expansion where needed.
(EXTRA_DIST): Adjust.
(ALL_MANS): New, union of $(EXTRA_MANS) and $(dist_man1_MANS).
* cfg.mk (check-x-vs-1, sc_option_desc_uppercase): Rely on $(ALL_MANS)
rather than $(NO_INSTALL_PROGS_DEFAULT) and $(dist_man1_MANS).
---
 cfg.mk       |  7 ++-----
 configure.ac |  8 +++++---
 man/local.mk | 12 +++++-------
 3 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 780e6a8..2323fa3 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -198,11 +198,9 @@ sc_long_lines:
 # One could grep source directly as follows:
 # grep -E " {2,6}-.*[^.]  [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
 # but that would miss descriptions not on the same line as the -option.
-sc_option_desc_uppercase:
+sc_option_desc_uppercase: $(ALL_MANS)
 	@grep '^\\fB\\-' -A1 man/*.1 | LC_ALL=C grep '\.1.[A-Z][a-z]'	\
 	  && { echo 1>&2 '$@: found initial capitals in --help'; exit 1; } || :
-sc_option_desc_uppercase: $(dist_man1_MANS) \
-                          $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT))
 
 # Ensure all man/*.[1x] files are present.
 sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
@@ -217,8 +215,7 @@ check-x-vs-1:
 	t=$@-t;								\
 	(cd $(srcdir)/man && ls -1 *.x)					\
 	  | sed 's/\.x$$//' | $(ASSORT) > $$t;				\
-	(echo $(patsubst man/%,%,$(dist_man1_MANS))			\
-	      $(NO_INSTALL_PROGS_DEFAULT)				\
+	(echo $(patsubst man/%,%,$(ALL_MANS))				\
 	  | tr -s ' ' '\n' | sed 's/\.1$$//')				\
 	  | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; };		\
 	rm $$t
diff --git a/configure.ac b/configure.ac
index 7c0b19c..5c3592b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -434,7 +434,9 @@ MAN=`
     echo "man/$p.1"
   done`
 
-NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
+# Not installed by "make install", but must be built when creating
+# a distribution tarball.
+EXTRA_MANS=`for p in $no_install_progs_default; do echo man/$p.1; done`
 
 # The programs built and installed by "make && make install".
 # Since this is AC_SUBST'd, Automake won't be able to perform rewrite
@@ -447,13 +449,13 @@ pkglibexec_PROGRAMS=`
 
 # Normalize whitespace.
 MAN=`echo $MAN`
-NO_INSTALL_PROGS_DEFAULT=`echo $NO_INSTALL_PROGS_DEFAULT`
+EXTRA_MANS=`echo $EXTRA_MANS`
 bin_PROGRAMS=`echo $bin_PROGRAMS`
 pkglibexec_PROGS=`echo $pkglibexec_PROGRAMS`
 
-AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
 AC_SUBST([bin_PROGRAMS])        AM_SUBST_NOTMAKE([bin_PROGRAMS])
 AC_SUBST([pkglibexec_PROGRAMS]) AM_SUBST_NOTMAKE([pkglibexec_PROGRAMS])
+AC_SUBST([EXTRA_MANS])
 
 AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
 
diff --git a/man/local.mk b/man/local.mk
index 80519af..f487442 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -23,20 +23,18 @@ man_aux = $(dist_man1_MANS:.1=.x)
 EXTRA_DIST += $(man_aux) man/help2man
 MAINTAINERCLEANFILES += $(dist_man1_MANS)
 
-# The "$(VAR:%=dir/%.x)" idiom is not portable according to POSIX, but in
-# practice it works with several make implementation (GNU, BSD, CCS make
-# from Solaris 10, Sun distributed make).
-extra_man_x = $(NO_INSTALL_PROGS_DEFAULT:%=man/%.x)
-extra_man_1 = $(NO_INSTALL_PROGS_DEFAULT:%=man/%.1)
+EXTRA_MANS = @EXTRA_MANS@
 
-EXTRA_DIST += $(extra_man_1) $(extra_man_x)
+EXTRA_DIST += $(EXTRA_MANS) $(EXTRA_MANS:.1=.x)
+
+ALL_MANS = $(dist_man1_MANS) $(EXTRA_MANS)
 
 # This is required because we have subtle inter-directory dependencies:
 # in order to generate all man pages, even those for which we don't
 # install a binary, require that all programs be built at distribution
 # time.  We can't use 'dist-hook' for this, since it would run too late:
 # the manpages must be generated before the distdir is created and filled.
-$(extra_man_1): $(all_programs)
+$(EXTRA_MANS): $(all_programs)
 
 # Depend on this to get version number changes.
 mandep = .version
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7aw7-0002tO-IB
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53953)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw3-0002gC-6A
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw1-0007vs-2A
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:35 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:34789)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw0-0007jZ-KI
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:32 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so2092479wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=2KFNB7VICnIO5CTseZ1AdX+U5IWD8V3ShCCvfOMXgck=;
	b=rFXt44SX3U8uA1WUKIYfuxRO5hOgcHCLQAoHsEChegx0lrlTf7WPKBOx7PAmlWEhO1
	go9co+ORo8IAcdcO0sTdDrarRJN0LykzYTsAVDAxf6lKyHT0S29IyeJuyxq3GaoC75n5
	c7HyiqmBL9VWZhdmQdsAFDDxjipue1/HarMdBMIgzPvdmswlbIdjpSdGmexOe/Jux8lT
	nC5EYQTZNj0sBSg83CYWVZH0FeK9XAIFaUWGHCIR4DMW6V74uOP8VDc0vj2KZp7d/lrX
	2rt7MnM1kOs6hQop9ovmE1+TLGw+3Girz+H7uuaLoCZwJ0poczKj2ygRoF5JtDatXDOI
	MhOg==
Received: by 10.180.84.104 with SMTP id x8mr7620460wiy.20.1346456852173;
	Fri, 31 Aug 2012 16:47:32 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.30
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:31 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 16/22] build: $(mandeps): new,
	factors out man pages dependencies
Date: Sat,  1 Sep 2012 01:46:53 +0200
Message-Id: <6b853930d87259ddb58bce0e26eca24ce8304e3f.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:37 -0000

* man/local.mk (mandpep): Rename ...
(mandeps): ... like this.  Make $(ALL_MANS) depend on its
content.  List 'src/system.h' in here, instead of making
$(ALL_MANS) depend on it explicitly.
(man/*.1): No need to list $(mandep) among the dependencies
any longer.
---
 man/local.mk | 225 ++++++++++++++++++++++++++++++-----------------------------
 1 file changed, 115 insertions(+), 110 deletions(-)

diff --git a/man/local.mk b/man/local.mk
index 182020b..3074511 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -35,121 +35,126 @@ MAINTAINERCLEANFILES += $(ALL_MANS)
 # the manpages must be generated before the distdir is created and filled.
 $(EXTRA_MANS): $(all_programs)
 
+# Dependencies common to all man pages.  Updated below.
+mandeps =
+
 # Depend on this to get version number changes.
-mandep = .version
+mandeps += .version
+
+# This is required so that changes to e.g., emit_bug_reporting_address
+# provoke regeneration of all the manpages.
+mandeps += $(top_srcdir)/src/system.h
+
+$(ALL_MANS): $(mandeps)
 
 # Note that arch depends on uname.c
-man/arch.1:      $(mandep)  src/uname.c
-
-man/base64.1:    $(mandep)  src/base64.c
-man/basename.1:  $(mandep)  src/basename.c
-man/cat.1:       $(mandep)  src/cat.c
-man/chcon.1:     $(mandep)  src/chcon.c
-man/chgrp.1:     $(mandep)  src/chgrp.c
-man/chmod.1:     $(mandep)  src/chmod.c
-man/chown.1:     $(mandep)  src/chown.c
-man/chroot.1:    $(mandep)  src/chroot.c
-man/cksum.1:     $(mandep)  src/cksum.c
-man/comm.1:      $(mandep)  src/comm.c
-man/cp.1:        $(mandep)  src/cp.c
-man/csplit.1:    $(mandep)  src/csplit.c
-man/cut.1:       $(mandep)  src/cut.c
-man/date.1:      $(mandep)  src/date.c
-man/dd.1:        $(mandep)  src/dd.c
-man/df.1:        $(mandep)  src/df.c
+man/arch.1:      src/uname.c
+
+man/base64.1:    src/base64.c
+man/basename.1:  src/basename.c
+man/cat.1:       src/cat.c
+man/chcon.1:     src/chcon.c
+man/chgrp.1:     src/chgrp.c
+man/chmod.1:     src/chmod.c
+man/chown.1:     src/chown.c
+man/chroot.1:    src/chroot.c
+man/cksum.1:     src/cksum.c
+man/comm.1:      src/comm.c
+man/cp.1:        src/cp.c
+man/csplit.1:    src/csplit.c
+man/cut.1:       src/cut.c
+man/date.1:      src/date.c
+man/dd.1:        src/dd.c
+man/df.1:        src/df.c
 
 # Note that dir depends on ls.c, since that's where its --help text is.
-man/dir.1:       $(mandep)  src/ls.c
-
-man/dircolors.1: $(mandep)  src/dircolors.c
-man/dirname.1:   $(mandep)  src/dirname.c
-man/du.1:        $(mandep)  src/du.c
-man/echo.1:      $(mandep)  src/echo.c
-man/env.1:       $(mandep)  src/env.c
-man/expand.1:    $(mandep)  src/expand.c
-man/expr.1:      $(mandep)  src/expr.c
-man/factor.1:    $(mandep)  src/factor.c
-man/false.1:     $(mandep)  src/false.c
-man/fmt.1:       $(mandep)  src/fmt.c
-man/fold.1:      $(mandep)  src/fold.c
-man/groups.1:    $(mandep)  src/groups.c
-man/head.1:      $(mandep)  src/head.c
-man/hostid.1:    $(mandep)  src/hostid.c
-man/hostname.1:  $(mandep)  src/hostname.c
-man/id.1:        $(mandep)  src/id.c
-man/install.1:   $(mandep)  src/install.c
-man/join.1:      $(mandep)  src/join.c
-man/kill.1:      $(mandep)  src/kill.c
-man/link.1:      $(mandep)  src/link.c
-man/ln.1:        $(mandep)  src/ln.c
-man/logname.1:   $(mandep)  src/logname.c
-man/ls.1:        $(mandep)  src/ls.c
-man/md5sum.1:    $(mandep)  src/md5sum.c
-man/mkdir.1:     $(mandep)  src/mkdir.c
-man/mkfifo.1:    $(mandep)  src/mkfifo.c
-man/mknod.1:     $(mandep)  src/mknod.c
-man/mktemp.1:    $(mandep)  src/mktemp.c
-man/mv.1:        $(mandep)  src/mv.c
-man/nice.1:      $(mandep)  src/nice.c
-man/nl.1:        $(mandep)  src/nl.c
-man/nohup.1:     $(mandep)  src/nohup.c
-man/nproc.1:     $(mandep)  src/nproc.c
-man/od.1:        $(mandep)  src/od.c
-man/paste.1:     $(mandep)  src/paste.c
-man/pathchk.1:   $(mandep)  src/pathchk.c
-man/pinky.1:     $(mandep)  src/pinky.c
-man/pr.1:        $(mandep)  src/pr.c
-man/printenv.1:  $(mandep)  src/printenv.c
-man/printf.1:    $(mandep)  src/printf.c
-man/ptx.1:       $(mandep)  src/ptx.c
-man/pwd.1:       $(mandep)  src/pwd.c
-man/readlink.1:  $(mandep)  src/readlink.c
-man/realpath.1:  $(mandep)  src/realpath.c
-man/rm.1:        $(mandep)  src/rm.c
-man/rmdir.1:     $(mandep)  src/rmdir.c
-man/runcon.1:    $(mandep)  src/runcon.c
-man/seq.1:       $(mandep)  src/seq.c
-man/sha1sum.1:   $(mandep)  src/md5sum.c
-man/sha224sum.1: $(mandep)  src/md5sum.c
-man/sha256sum.1: $(mandep)  src/md5sum.c
-man/sha384sum.1: $(mandep)  src/md5sum.c
-man/sha512sum.1: $(mandep)  src/md5sum.c
-man/shred.1:     $(mandep)  src/shred.c
-man/shuf.1:      $(mandep)  src/shuf.c
-man/sleep.1:     $(mandep)  src/sleep.c
-man/sort.1:      $(mandep)  src/sort.c
-man/split.1:     $(mandep)  src/split.c
-man/stat.1:      $(mandep)  src/stat.c
-man/stdbuf.1:    $(mandep)  src/stdbuf.c
-man/stty.1:      $(mandep)  src/stty.c
-man/sum.1:       $(mandep)  src/sum.c
-man/sync.1:      $(mandep)  src/sync.c
-man/tac.1:       $(mandep)  src/tac.c
-man/tail.1:      $(mandep)  src/tail.c
-man/tee.1:       $(mandep)  src/tee.c
-man/test.1:      $(mandep)  src/test.c
-man/timeout.1:   $(mandep)  src/timeout.c
-man/touch.1:     $(mandep)  src/touch.c
-man/tr.1:        $(mandep)  src/tr.c
-man/true.1:      $(mandep)  src/true.c
-man/truncate.1:  $(mandep)  src/truncate.c
-man/tsort.1:     $(mandep)  src/tsort.c
-man/tty.1:       $(mandep)  src/tty.c
-man/uname.1:     $(mandep)  src/uname.c
-man/unexpand.1:  $(mandep)  src/unexpand.c
-man/uniq.1:      $(mandep)  src/uniq.c
-man/unlink.1:    $(mandep)  src/unlink.c
-man/uptime.1:    $(mandep)  src/uptime.c
-man/users.1:     $(mandep)  src/users.c
-man/vdir.1:      $(mandep)  src/ls.c
-man/wc.1:        $(mandep)  src/wc.c
-man/who.1:       $(mandep)  src/who.c
-man/whoami.1:    $(mandep)  src/whoami.c
-man/yes.1:       $(mandep)  src/yes.c
-
-# This is required so that changes to e.g., emit_bug_reporting_address
-# provoke regeneration of all the manpages.
-$(ALL_MANS): $(top_srcdir)/src/system.h
+man/dir.1:       src/ls.c
+
+man/dircolors.1: src/dircolors.c
+man/dirname.1:   src/dirname.c
+man/du.1:        src/du.c
+man/echo.1:      src/echo.c
+man/env.1:       src/env.c
+man/expand.1:    src/expand.c
+man/expr.1:      src/expr.c
+man/factor.1:    src/factor.c
+man/false.1:     src/false.c
+man/fmt.1:       src/fmt.c
+man/fold.1:      src/fold.c
+man/groups.1:    src/groups.c
+man/head.1:      src/head.c
+man/hostid.1:    src/hostid.c
+man/hostname.1:  src/hostname.c
+man/id.1:        src/id.c
+man/install.1:   src/install.c
+man/join.1:      src/join.c
+man/kill.1:      src/kill.c
+man/link.1:      src/link.c
+man/ln.1:        src/ln.c
+man/logname.1:   src/logname.c
+man/ls.1:        src/ls.c
+man/md5sum.1:    src/md5sum.c
+man/mkdir.1:     src/mkdir.c
+man/mkfifo.1:    src/mkfifo.c
+man/mknod.1:     src/mknod.c
+man/mktemp.1:    src/mktemp.c
+man/mv.1:        src/mv.c
+man/nice.1:      src/nice.c
+man/nl.1:        src/nl.c
+man/nohup.1:     src/nohup.c
+man/nproc.1:     src/nproc.c
+man/od.1:        src/od.c
+man/paste.1:     src/paste.c
+man/pathchk.1:   src/pathchk.c
+man/pinky.1:     src/pinky.c
+man/pr.1:        src/pr.c
+man/printenv.1:  src/printenv.c
+man/printf.1:    src/printf.c
+man/ptx.1:       src/ptx.c
+man/pwd.1:       src/pwd.c
+man/readlink.1:  src/readlink.c
+man/realpath.1:  src/realpath.c
+man/rm.1:        src/rm.c
+man/rmdir.1:     src/rmdir.c
+man/runcon.1:    src/runcon.c
+man/seq.1:       src/seq.c
+man/sha1sum.1:   src/md5sum.c
+man/sha224sum.1: src/md5sum.c
+man/sha256sum.1: src/md5sum.c
+man/sha384sum.1: src/md5sum.c
+man/sha512sum.1: src/md5sum.c
+man/shred.1:     src/shred.c
+man/shuf.1:      src/shuf.c
+man/sleep.1:     src/sleep.c
+man/sort.1:      src/sort.c
+man/split.1:     src/split.c
+man/stat.1:      src/stat.c
+man/stdbuf.1:    src/stdbuf.c
+man/stty.1:      src/stty.c
+man/sum.1:       src/sum.c
+man/sync.1:      src/sync.c
+man/tac.1:       src/tac.c
+man/tail.1:      src/tail.c
+man/tee.1:       src/tee.c
+man/test.1:      src/test.c
+man/timeout.1:   src/timeout.c
+man/touch.1:     src/touch.c
+man/tr.1:        src/tr.c
+man/true.1:      src/true.c
+man/truncate.1:  src/truncate.c
+man/tsort.1:     src/tsort.c
+man/tty.1:       src/tty.c
+man/uname.1:     src/uname.c
+man/unexpand.1:  src/unexpand.c
+man/uniq.1:      src/uniq.c
+man/unlink.1:    src/unlink.c
+man/uptime.1:    src/uptime.c
+man/users.1:     src/users.c
+man/vdir.1:      src/ls.c
+man/wc.1:        src/wc.c
+man/who.1:       src/who.c
+man/whoami.1:    src/whoami.c
+man/yes.1:       src/yes.c
 
 .x.1:
 	$(AM_V_GEN)case '$(PERL)' in				\
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7aw9-0002zD-Bd
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54054)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw6-0002qA-K4
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw4-0007z5-Ls
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:38 -0400
Received: from mail-wg0-f41.google.com ([74.125.82.41]:56278)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw4-0007y8-GB
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:36 -0400
Received: by wgbds1 with SMTP id ds1so1041495wgb.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=Vrtb2HRu0N2OTdDK6AUYvjurnLVpepvi0zR1CkL2U4c=;
	b=dnoTU3fHNw4/p5JsoWUvN3BDhNoho6U4RuIOtJWm+3aFvgnKR9VGXfbtBr5XoIW2Qm
	i4fApydcLdBIP8V8WQDELQ+lQxXk+vX88/44q0e6GjDpt0Qo6ZSUV2bbodZ+kacARLZb
	mxqplRNAbYHyCzs3UeLsijUsT0esWyMJ5lQaWBGPZNrPykEmifLo3KqeEM/fLdCTv5xi
	6T24XEVeTvzmJrKNFsWUte7fZab3qMAsMd/y2kyZH2XiKZYHVoXLzYKrvr3rlTVp4ApR
	LrZHesyLrxz91alqynynH65BGjR4GYEK3Tg6kV65eJIa3Vm9EoiZ30XbnrCpwf56EOfS
	Ie9g==
Received: by 10.180.81.193 with SMTP id c1mr7664881wiy.12.1346456855671;
	Fri, 31 Aug 2012 16:47:35 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.34
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:35 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 19/22] maint: fix quoting problem in configure.ac
Date: Sat,  1 Sep 2012 01:46:56 +0200
Message-Id: <d70249d241228ca252169857e4c033f055d806b8.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.41
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:40 -0000

* configure.ac ($bin_PROGRAMS): In the definition of this variable (due
to the never-enough-reviled  `...` non-POSIX command substitution).

Reported-by: Jim Meyering <meyering@redhat.com>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 53dc706..28c81cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -443,7 +443,7 @@ EXTRA_MANS=`for p in $no_install_progs_default; do echo man/$p.1; done`
 # with $(EXEEXT) appending on it, so we have to do it ourselves -- in
 # this case, only for $(bin_PROGRAMS).
 bin_PROGRAMS=`
-  for p in $optional_bin_progs; do echo "src/$p\$(EXEEXT)"; done`
+  for p in $optional_bin_progs; do echo src/"$p"'$(EXEEXT)'; done`
 
 # Normalize whitespace.
 man1_MANS=`echo $man1_MANS`
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7awC-00038X-G8
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54057)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw6-0002qc-OX
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw5-0007zm-RJ
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:38 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:34789)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw5-0007jZ-KR
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:37 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so2092479wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=TwWk7+mq+CwCrdUK9jVctZ/lWt1jsC7WJ3csvs+v8Cs=;
	b=GMAr1fgI+h2XH4r4acrcqBvOWd9+kA+jETUJE8i8ytVKAJtvlpUAMwi1PH5ISKtoB5
	2V0jtfCVjII5mW1htbnauEIiYQ3OlMhVScjSAtyCzanViIUJC4vIVX5YKcf0mpPCJ3DS
	8R68ipb6yoWga+naP4lknhdiEApQjHRKsKML0Rb7laAMNOweMk+rAy0D/S0Ua673KAyW
	meMYwCCeZW9EWb7IgXPx/BxTQM68Rcwd5XUKN7tNVPpvTzi23WkFBy5isgqi+oY6Ic2R
	uum58bUU2JNyWCHYytYl/RHrLEsCLF9Bm15pw6ypZSU6rM9DAmeYLfS/M2TNkRNVxNVp
	DXrA==
Received: by 10.180.93.68 with SMTP id cs4mr7645944wib.14.1346456857242;
	Fri, 31 Aug 2012 16:47:37 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.35
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:36 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 20/22] build: fix VPATH issues in C compilation
Date: Sat,  1 Sep 2012 01:46:57 +0200
Message-Id: <63a6eaaaadca26578d3235cd14bbf6756b8f0c40.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Jim Meyering <meyering@redhat.com>,
	Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:41 -0000

From: Jim Meyering <meyering@redhat.com>

* src/local.mk (AM_CPPFLAGS): Add 'src' to the directories where
to look for header files.
---
 src/local.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/local.mk b/src/local.mk
index e127c74..218ea0f 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -71,7 +71,7 @@ CLEANFILES = $(SCRIPTS)
 # or 'dist'.
 CLEANFILES += $(no_install__progs)
 
-AM_CPPFLAGS = -I$(top_srcdir)/lib
+AM_CPPFLAGS = -I$(top_srcdir)/lib -Isrc
 
 noinst_LIBRARIES = src/libver.a
 nodist_src_libver_a_SOURCES = src/version.c src/version.h
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7awD-0003Bu-Gc
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54134)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw9-000300-JJ
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw8-00081q-DX
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:41 -0400
Received: from mail-wg0-f49.google.com ([74.125.82.49]:34789)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw8-0007jZ-6w
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:40 -0400
Received: by mail-wg0-f49.google.com with SMTP id dt14so2092479wgb.30
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=U9DKso5ZFdw+3ilvitGdiG45WKnOHGCnz+kn2SSV5Go=;
	b=CwZEWv+Kr3v+xj8jb2k9Ob6a5JIekIOtEkilfskLMbjGvuvPbMTukCtdHcCXn3jc8Y
	whVU/7yULUsGiwRqCrmhF/daftLwvKyC0QJ5gHw0k8Cecc/T3APNjBHaJkzVSYC6waqa
	UckZXsnhl+vVpo3YIDuPh+g5YuglOYkT2RmZ6Vc92ToerOOmf4RgubuRGpZ4rsEgWS/B
	OuxzfkPOhQeA9Q1MxrTltdraB/RSSUgYq5+J0zwwx0IPesnKLFpWw5L4iC6t9TIRXaIO
	3YYbo4cUvOh/VgiJHTbDdLJuvFz0ndPQjsZjgYv4kiHPla7/cQaGvOa6arfOAuqfQrmy
	/h8g==
Received: by 10.180.79.69 with SMTP id h5mr7679850wix.6.1346456859793;
	Fri, 31 Aug 2012 16:47:39 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.38
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:39 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 22/22] maint: avoid distcheck failure by properly cleaning
	$(EXTRA_MANS)
Date: Sat,  1 Sep 2012 01:46:59 +0200
Message-Id: <f18dc5582ec862977a05e7c56a3a4e4dcff448d9.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.49
Cc: Jim Meyering <meyering@redhat.com>,
	Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:43 -0000

From: Jim Meyering <meyering@redhat.com>

* man/local.mk (distclean-local): Remove $(ALL_MANS) when doing
a VPATH build.  If it's not done, generated manpages can be left
around in the build directory after a "make distclean", causing
failures in "make distcheck".
---
 man/local.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/man/local.mk b/man/local.mk
index 8904eb5..da7de24 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -35,6 +35,11 @@ MAINTAINERCLEANFILES += $(ALL_MANS)
 # the manpages must be generated before the distdir is created and filled.
 $(EXTRA_MANS): $(all_programs)
 
+# This is a kludge to remove generated 'man/*.1' from a non-srcdir build.
+# Without this, "make distcheck" might fail.
+distclean-local:
+	test $(srcdir) = x$(builddir) || rm -f $(ALL_MANS)
+
 # Dependencies common to all man pages.  Updated below.
 mandeps =
 
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7aw7-0002uB-P1
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53983)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw4-0002k2-9l
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw1-0007wT-UI
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:36 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:62872)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw1-0007nJ-Ny
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:33 -0400
Received: by mail-wi0-f171.google.com with SMTP id hq4so1667137wib.12
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=qe0bEMYP6/v3OcewpP43S7OcF2Rp68s6mEyHwUh6TIQ=;
	b=vsAz6wYjOGN8NafYdrr0YDDYJOHJmQERECk9fW7HzxAjNrOixoTIV9sLF2hlifaRib
	THImzIq91+gdjJyzjnuRxIbQpKqIJUyih0g7roUAwX+6EFSv5GB0sLpKdf7Fhz2T/fbj
	WezEu+YFtPWHDZKEGlAJZkJkxjmcBQiN1atSoV6tZMA4eX7Z5oNs1EyDJggT8e427yj/
	XOHUStlzdlVLqipapNZmMprO8mAvDPkAbYkWEVMZB6b2j03fFKIfYdkLsaS0M8yb70nu
	Kpz/ZX7pg/2CrrcaPnf6HisGRs0Wjv6afRD9h4t5Jo7woK6s3nQ+iH2dYTbR2j88HXje
	rM3A==
Received: by 10.216.131.170 with SMTP id m42mr5014066wei.82.1346456853356;
	Fri, 31 Aug 2012 16:47:33 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.32
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:32 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 17/22] maint: simplify declaration of "libexec" programs
Date: Sat,  1 Sep 2012 01:46:54 +0200
Message-Id: <49172bf2da8b0eaed0e11cd77fce2d73e90a46ba.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:38 -0000

* configure.ac: No need to use 'gl_ADD_PROG' and an indirection
variable '$optional_pkglib_progs' to declare the 'libstdbuf.so'
"libexec" program; the decision to whether compile that program
is not up to the user, but it only and simply depends on whether
the 'stdbuf' "bin" program is to be built or not.
---
 configure.ac | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 99f293a..53dc706 100644
--- a/configure.ac
+++ b/configure.ac
@@ -417,9 +417,9 @@ m4_include([m4/cu-progs.m4])
 
 # Now that we know which programs will actually be built up, figure out
 # which optional helper progs should be compiled.
-optional_pkglib_progs=
 case " $optional_bin_progs " in
-  *' stdbuf '*) gl_ADD_PROG([optional_pkglib_progs], [libstdbuf.so]) ;;
+  *' stdbuf '*) pkglibexec_PROGRAMS='libstdbuf.so';;
+  *) pkglibexec_PROGRAMS='';;
 esac
 
 man1_MANS=`
@@ -444,8 +444,6 @@ EXTRA_MANS=`for p in $no_install_progs_default; do echo man/$p.1; done`
 # this case, only for $(bin_PROGRAMS).
 bin_PROGRAMS=`
   for p in $optional_bin_progs; do echo "src/$p\$(EXEEXT)"; done`
-pkglibexec_PROGRAMS=`
-  for p in $optional_pkglib_progs; do echo src/$p; done`
 
 # Normalize whitespace.
 man1_MANS=`echo $man1_MANS`
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 19:47:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7awD-0003Af-4i
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 19:47:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54101)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw8-0002vt-9B
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw7-00080g-3j
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:40 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:65072)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stefano.lattarini@gmail.com>) id 1T7aw6-0007fH-U5
	for coreutils@gnu.org; Fri, 31 Aug 2012 19:47:39 -0400
Received: by mail-we0-f169.google.com with SMTP id s10so2117744wey.0
	for <coreutils@gnu.org>; Fri, 31 Aug 2012 16:47:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
	:in-reply-to:references;
	bh=yseDYudPSf6Qn33Nbifk3IIVTKUoxKFw+sVpywILpaE=;
	b=kmqPED4DA/sg02w8zRr727h2monVlGlEPJcJwoAzUjiMyUo+mOA0r9tYtrmHkZ6H8K
	By+oMRVYDN0/Jk9xav4I+QKg36iakJEpzPAM666k6YgBPYSkEEO0jl0IIR8sO5+1iYGA
	9lRd61iJJdZXNZAue7V9corDeGdkHT0i4jMEuCmmMJ17q2v/+QIgc9/ECMzgJcZ8xqQe
	2MKvlfpX0b1/7MBYPi+N4KZauDl3FpQqiSu31IGg2Q12g8Sx3xGd5IcHRzrJ5CMv0/Cs
	jNo9kqb4U8+WQCrT5ReSRLCds0gAvvbajngzjEWTsno5Gn2bipNF+gU6MEUja9Zi1yII
	UUYA==
Received: by 10.180.75.209 with SMTP id e17mr7951401wiw.0.1346456858524;
	Fri, 31 Aug 2012 16:47:38 -0700 (PDT)
Received: from localhost.localdomain
	(host194-94-dynamic.2-87-r.retail.telecomitalia.it. [87.2.94.194])
	by mx.google.com with ESMTPS id l5sm5327273wix.5.2012.08.31.16.47.37
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 31 Aug 2012 16:47:37 -0700 (PDT)
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: coreutils@gnu.org
Subject: [PATCH 21/22] maint: port manpages generation to VPATH builds
Date: Sat,  1 Sep 2012 01:46:58 +0200
Message-Id: <b1072947e254c641be7dc69534f065085733cd69.1346456574.git.stefano.lattarini@gmail.com>
X-Mailer: git-send-email 1.7.12
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
In-Reply-To: <cover.1346456574.git.stefano.lattarini@gmail.com>
References: <cover.1346456574.git.stefano.lattarini@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: Stefano Lattarini <stefano.lattarini@gmail.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: Fri, 31 Aug 2012 23:47:41 -0000

* man/local.mk (.x.1): Use '$(MKDIR_P)' rather than bare 'mkdir'
where appropriate.

Reported-by: Jim Meyering <meyering@redhat.com>
---
 man/local.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/local.mk b/man/local.mk
index 3074511..8904eb5 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -178,7 +178,7 @@ man/yes.1:       src/yes.c
 	rm -f $@ $@-t							\
 	  && t=$*.td							\
 	  && rm -rf $$t							\
-	  && mkdir $$t							\
+	  && $(MKDIR_P) $$t						\
 	  && (cd $$t && $(LN_S) $(abs_top_builddir)/src/$$prog $$name)	\
 	  && $(PERL) -- $(srcdir)/man/help2man				\
 		     --source='$(PACKAGE_STRING)'			\
-- 
1.7.12



From MAILER-DAEMON Fri Aug 31 21:58:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T7cyQ-0006am-RS
	for mharc-coreutils@gnu.org; Fri, 31 Aug 2012 21:58:10 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38194)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T7cyO-0006Zg-4L
	for coreutils@gnu.org; Fri, 31 Aug 2012 21:58:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T7cyM-0001tv-Ma
	for coreutils@gnu.org; Fri, 31 Aug 2012 21:58:08 -0400
Received: from mx1.redhat.com ([209.132.183.28]:17392)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <P@draigBrady.com>) id 1T7cyM-0001pK-EM
	for coreutils@gnu.org; Fri, 31 Aug 2012 21:58:06 -0400
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 q811w28a017370
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 31 Aug 2012 21:58:03 -0400
Received: from [10.36.116.25] (ovpn-116-25.ams2.redhat.com [10.36.116.25])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q811w0h5004223
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 31 Aug 2012 21:58:02 -0400
Message-ID: <50416BA8.90003@draigBrady.com>
Date: Sat, 01 Sep 2012 02:58:00 +0100
From: =?ISO-8859-1?Q?P=E1draig_Brady?= <P@draigBrady.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:6.0) Gecko/20110816 Thunderbird/6.0
MIME-Version: 1.0
To: Assaf Gordon <assafgordon@gmail.com>
Subject: Re: physmem: a new program to report memory information
References: <503F8842.1040002@gmail.com>
In-Reply-To: <503F8842.1040002@gmail.com>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
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
	q811w28a017370
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
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, 01 Sep 2012 01:58:09 -0000

On 08/30/2012 04:35 PM, Assaf Gordon wrote:
> Hello,
>=20
> Related to the previous sort+memory envvar usage thread: http://thread.=
gmane.org/gmane.comp.gnu.coreutils.general/3028/focus=3D3090 .
>=20
> Attached is a suggestion for a tiny command-line program "physmem", tha=
t similarly to "nproc", exposes the gnulib functions "physmem_total()" an=
d "physmem_available()".
>=20
> The code is closely modeled after nproc, and the "recommended" memory u=
sage is calculated using sort's default_sort_size() .
>=20
> The program works like this:
> =3D=3D=3D
> $ ./src/physmem --help
> Usage: ./src/physmem [OPTION]...
> Prints information about physical memory.
>=20
>   -t, --total           print the total physical memory.
>   -a, --available       print the available physical memory.
>   -r, --recommended     print a safe recommended amount of useable memo=
ry.
>   -h, --human-readable  print sizes in human readable format (e.g., 1K =
234M 2G)
>       --si              like -h, but use powers of 1000 not 1024
>       --help     display this help and exit
>       --version  output version information and exit
>=20
> Report physmem bugs to bug-coreutils@gnu.org
> GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
> General help using GNU software: <http://www.gnu.org/gethelp/>
> Report physmem translation bugs to <http://translationproject.org/team/=
>
> For complete documentation, run: info coreutils 'physmem invocation'
> =3D=3D=3D
>=20
> The actual working code (at the bottom of physmem.c) is:
> =3D=3D=3D
>   switch(memory_report_type)
>     {
>     case total:
>       memory =3D physmem_total();
>       break;
>=20
>     case available:
>       memory =3D physmem_available();
>       break;
>=20
>     case recommended:
>       memory =3D default_sort_size();
>       break;
>     }
>=20
>   char buf[LONGEST_HUMAN_READABLE + 1];
>   fputs (human_readable (memory, buf, human_output_opts,1,1),stdout);
>   fputs("\n", stdout);
> =3D=3D=3D
>=20
> So it's very simple, and rely on existing coreutils code.
>=20
> Please let me know if this is something you'd be willing to include in =
coreutils.
>=20
> Thanks,
>  -gordon


Thanks for taking the time to do a patch.
However this seems more appropriate for maybe util-linux.
Also it might be better as an option to the existing free(1) program?
Also RAM is just one aspect of the memory hierarchy.
For a separate tool, it should probably be more general
and allow inspection of any level. This already exists
in the hwloc utils for example:

$ hwloc-info -p -v --only machine
Machine (2860MB)
$ hwloc-info -p -v --only cache
L3 (3072KB)
L2 (256KB)
L1 (32KB)

So I wouldn't be that enthusiastic for such a util,
in coreutils at least.

cheers,
P=E1draig.


