bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* allow trailing ws in standards/maintain.texi
@ 2019-08-15 20:37 Karl Berry
  0 siblings, 0 replies; 4+ messages in thread
From: Karl Berry @ 2019-08-15 20:37 UTC (permalink / raw)
  To: bug-gnulib

Can the gnulib git hook please be changed to allow trailing whitespace
in doc/standards.texi and doc/maintain.texi? rms inserted some and did
not reply to my request to remove it. THanks.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: allow trailing ws in standards/maintain.texi
@ 2019-08-21 15:14 Karl Berry
  2019-08-21 18:44 ` Paul Eggert
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Berry @ 2019-08-21 15:14 UTC (permalink / raw)
  To: bug-gnulib

[Ping? Anyone there?]

Can the gnulib git hook please be changed to allow trailing whitespace
in doc/standards.texi and doc/maintain.texi? rms inserted some and did
not reply to my request to remove it. Unless we want to stop
having these files in gnulib ... --thanks, karl.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: allow trailing ws in standards/maintain.texi
  2019-08-21 15:14 allow trailing ws in standards/maintain.texi Karl Berry
@ 2019-08-21 18:44 ` Paul Eggert
  2019-08-23 21:09   ` Karl Berry
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggert @ 2019-08-21 18:44 UTC (permalink / raw)
  To: Karl Berry; +Cc: bug-gnulib

[-- Attachment #1: Type: text/plain, Size: 681 bytes --]

Karl Berry wrote:
> [Ping? Anyone there?]

I don't think I have the bits to fiddle with commit hooks on Savannah. However, 
this problem isn't limited to Savannah; it could happen to any downstream 
project that uses these files and has similar commit hooks. All things 
considered I suspect it's better just to trim the trailing white space in the 
Gnulib copy. Of course the upstream version should be trimmed too but (as we see 
here) that's not always easy.

I installed the attached patch and did an autoupdate. While I was at it, I 
configured srclist.txt to strip trailing white space from texinfo.tex too, as I 
recall that being an issue in the past (don't recall where).

[-- Attachment #2: 0001-New-strip-trailing-space-option-for-srclist-update.patch --]
[-- Type: text/x-patch, Size: 2993 bytes --]

From 63bd32fd4232cb916a683cecebf954e678360aec Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 21 Aug 2019 11:30:10 -0700
Subject: [PATCH] New strip-trailing-space option for srclist-update

* config/srclist-update (fixfile): Support new option.
* config/srclist.txt (texinfo.tex, maintain.texi, standards.texi):
Use it.
---
 ChangeLog             |  7 +++++++
 config/srclist-update | 10 ++++++++--
 config/srclist.txt    |  6 +++---
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f5eda2fa3..d76da745b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-08-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+	New strip-trailing-space option for srclist-update
+	* config/srclist-update (fixfile): Support new option.
+	* config/srclist.txt (texinfo.tex, maintain.texi, standards.texi):
+	Use it.
+
 2019-08-20  Eric Blake  <eblake@redhat.com>
 
 	accept4: Support SOCK_NONBLOCK, if defined
diff --git a/config/srclist-update b/config/srclist-update
index b90ef1544..e57ba4eaf 100755
--- a/config/srclist-update
+++ b/config/srclist-update
@@ -14,6 +14,7 @@
 #   options.
 # The possible options are "gpl" (to replace the license with the GPL)
 #   and "doclicense" (to replace @include doclicense.texi with fdl.texi)
+#   and "strip-trailing-space" (to strip trailing white space from lines)
 #   and "release" (to use the release version instead of the
 #   development version).
 #   Unrecognized options are ignored.
@@ -91,8 +92,8 @@ fixlicense='
 # Quote the $ so that CVS does not expand it in this script.
 remove_id_lines='/[$]Id:.*[$]/d'
 
-# $1 is the root directory of input file, $2 is input file, $3 is
-# output.  Remove $Id lines, since they'll differ between source
+# $1 is input file, $2 is output.
+# Remove $Id lines, since they'll differ between source
 # locations.  If $options contains "gpl", change the license to be the
 # standard GPL.  We use this for libc files, et al.
 #
@@ -100,6 +101,11 @@ fixfile() \
 {
   sed_command="$remove_id_lines"
 
+  case " $options " in
+  *' strip-trailing-space '*)
+    sed_command="$sed_command; s/[[:space:]]*\$//";;
+  esac
+
   case " $options " in
   *' gpl '*)
     sed_command="$sed_command; $fixlicense";;
diff --git a/config/srclist.txt b/config/srclist.txt
index bb6ad87ab..6d37729ce 100644
--- a/config/srclist.txt
+++ b/config/srclist.txt
@@ -12,13 +12,13 @@ $AUTOMAKE lib/install-sh	build-aux
 $AUTOMAKE lib/mdate-sh		build-aux
 $AUTOMAKE lib/mkinstalldirs	build-aux
 
-$TEXINFOTEX texinfo.tex		build-aux
+$TEXINFOTEX texinfo.tex		build-aux strip-trailing-space
 
 # we generate INSTALL from this via a rule in doc/Makefile.
 $AUTOCONF doc/install.texi	doc
 
-$GNUSTANDARDS maintain.texi	doc
-$GNUSTANDARDS standards.texi	doc
+$GNUSTANDARDS maintain.texi	doc strip-trailing-space
+$GNUSTANDARDS standards.texi	doc strip-trailing-space
 $GNUSTANDARDS make-stds.texi	doc
 $GNUSTANDARDS gnu-oids.texi	doc
 $GNUSTANDARDS fdl.texi		doc
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: allow trailing ws in standards/maintain.texi
  2019-08-21 18:44 ` Paul Eggert
@ 2019-08-23 21:09   ` Karl Berry
  0 siblings, 0 replies; 4+ messages in thread
From: Karl Berry @ 2019-08-23 21:09 UTC (permalink / raw)
  To: eggert; +Cc: bug-gnulib

    I don't think I have the bits to fiddle with commit hooks 

I forgot that Savannah disallows user access to hooks. Sorry.

    better just to trim the trailing white space in the 

Fair enough. Thanks much for dealing with it. Quite frustrating.

    While I was at it, I configured srclist.txt to strip trailing white
    space from texinfo.tex too, as I recall that being an issue in the past

texinfo.tex has always had, and still does have, trailing
whitespace. Thus presumably the exception was installed in the
gnulib, automake, ..., whatever hooks. --thanks, karl.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-23 21:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-21 15:14 allow trailing ws in standards/maintain.texi Karl Berry
2019-08-21 18:44 ` Paul Eggert
2019-08-23 21:09   ` Karl Berry
  -- strict thread matches above, loose matches on Subject: below --
2019-08-15 20:37 Karl Berry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).