On Sun, Nov 5, 2017 at 4:39 PM, Pádraig Brady <[email protected]> wrote:
> On 19/09/17 22:48, Pádraig Brady wrote:
>> On 19/09/17 01:31, Paul Eggert wrote:
>>> I installed the attached patches to switch Coreutils to prefer HTTPS URLs 
>>> when
>>> they work. The first patch is so long that it's compressed. The remaining 
>>> HTTP
>>> URLs are for sites where I couldn't get HTTPS to work, either because they
>>> didn't respond or their certificates had expired.
>>
>> For my reference, the http:// links in --help and man pages
>> will auto update to https:// when using an autoconf updated with:
>> https://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commit;h=d3dcd589
>> Or we could override PACKAGE_URL (temporarily) in AC_INIT as per:
>> https://lists.gnu.org/archive/html/autoconf/2011-10/msg00051.html
>>
>> p.s. syntax checks for this one are fixed in:
>> https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=a608f1e
>
> I just pushed the following to ensure we use https:// in --help
> https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.28-27-gada1cae

Speaking of URLs...
You might have heard that we can now shorten any URL like this:
  https://lists.gnu.org/archive/html/bug-coreutils/2004-09/msg00145.html
to this:
  https://lists.gnu.org/r/bug-coreutils/2004-09/msg00145.html

Probably worth adjusting the commit hook, too.
Do you think it's worth it to shorten these, replacing each
"/archive/html/" with "/r/"

$ git grep -h archive/html|sed 's/^.*htt/htt/'
https://lists.gnu.org/archive/html/bug-coreutils/2004-09/msg00145.html
https://lists.gnu.org/archive/html/bug-fileutils/2003-03/msg00030.html
https://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00075.html
https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
https://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html>
https://lists.gnu.org/archive/html/bug-textutils/2003-05/msg00007.html */
https://lists.gnu.org/archive/html/bug-tar/2010-10/msg00075.html>.
https://lists.gnu.org/archive/html/bug-coreutils/2004-10/msg00035.html>.
https://lists.gnu.org/archive/html/coreutils/2016-06/msg00015.html
https://lists.gnu.org/archive/html/coreutils/2016-07/msg00011.html
https://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
https://lists.gnu.org/archive/html/bug-coreutils/2009-11/msg00213.html

Attached patches make the comment changes and adjust the log-checking
commit hook to require the abbreviated form.
From b3d4a7fe35d88f2b70eafaec8b98a58172d74ad0 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Mon, 6 Nov 2017 06:26:41 -0800
Subject: [PATCH 1/2] maint: shorten https://lists.gnu.org/archive/html/...
 links

Each /archive/html/ part can be replace with /r/.
Run this to induce the change:
git grep -l archive/html|xargs perl -pi -e 's,/archive/html/,/r/,g'
* TODO: Perform that substitution.
* bootstrap: Likewise.
* src/sort.c (sequential_sort): Likewise.
* src/tail.c (tail_file): Likewise.
* tests/misc/sort-merge-fdlimit.sh: Likewise.
* tests/misc/stty-row-col.sh: Likewise.
* tests/misc/unexpand.pl: Likewise.
* tests/rm/readdir-bug.sh: Likewise.
* tests/tail-2/inotify-rotate.sh: Likewise.
---
 TODO                             | 6 +++---
 bootstrap                        | 2 +-
 src/sort.c                       | 2 +-
 src/tail.c                       | 2 +-
 tests/misc/sort-merge-fdlimit.sh | 2 +-
 tests/misc/stty-row-col.sh       | 2 +-
 tests/misc/unexpand.pl           | 4 ++--
 tests/rm/readdir-bug.sh          | 2 +-
 tests/tail-2/inotify-rotate.sh   | 2 +-
 9 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/TODO b/TODO
index 9fcb3e84e..7199205c1 100644
--- a/TODO
+++ b/TODO
@@ -8,7 +8,7 @@ before embarking on a big project.
 Modify chmod so that it does not change an inode's st_ctime
   when the selected operation would have no other effect.
   First suggested by Hans Ecke <https://hans.ecke.ws> in
-    https://lists.gnu.org/archive/html/bug-coreutils/2004-09/msg00145.html
+    https://lists.gnu.org/r/bug-coreutils/2004-09/msg00145.html
   Discussed more recently on <https://bugs.debian.org/497514>.

 document the following in coreutils.texi:
@@ -52,7 +52,7 @@ Write an autoconf test to work around build failure in HPUX's 
64-bit mode.
 See notes in README -- and remove them once there's a work-around.

 Integrate use of sendfile, suggested here:
-  https://lists.gnu.org/archive/html/bug-fileutils/2003-03/msg00030.html
+  https://lists.gnu.org/r/bug-fileutils/2003-03/msg00030.html
 I don't plan to do that, since a few tests demonstrate no significant benefit.

 printf: consider adapting builtins/printf.def from bash
@@ -86,7 +86,7 @@ sort: Investigate better sorting algorithms; see Knuth vol. 3.
   Mathematical Monthly 66 (1959), 387-389.

 shred: Update shred as described here to conform to DoD 5220 rules:
-https://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00075.html
+https://lists.gnu.org/r/bug-coreutils/2007-05/msg00075.html

 Remove suspicious uses of alloca (ones that may allocate more than
    about 4k)
diff --git a/bootstrap b/bootstrap
index 85b85c530..03057c378 100755
--- a/bootstrap
+++ b/bootstrap
@@ -792,7 +792,7 @@ symlink_to_dir()
       # aren't confused into doing unnecessary builds.  Conversely, if the
       # existing symlink's timestamp is older than the source, make it afresh,
       # so that broken tools aren't confused into skipping needed builds.  See
-      # <https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
+      # <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
       test -h "$dst" &&
       src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
       dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
diff --git a/src/sort.c b/src/sort.c
index 8f16ec41d..4b6b61fcd 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -3193,7 +3193,7 @@ sequential_sort (struct line *restrict lines, size_t 
nlines,
   if (nlines == 2)
     {
       /* Declare 'swap' as int, not bool, to work around a bug
-        
<https://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html>
+        <https://lists.gnu.org/r/bug-coreutils/2005-10/msg00086.html>
          in the IBM xlc 6.0.0.0 compiler in 64-bit mode.  */
       int swap = (0 < compare (&lines[-1], &lines[-2]));
       if (to_temp)
diff --git a/src/tail.c b/src/tail.c
index 1c7418d34..a195443d8 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -2027,7 +2027,7 @@ tail_file (struct File_spec *f, uintmax_t n_units)
             {
               /* Note: we must use read_pos here, not stats.st_size,
                  to avoid a race condition described by Ken Raeburn:
-       https://lists.gnu.org/archive/html/bug-textutils/2003-05/msg00007.html 
*/
+       https://lists.gnu.org/r/bug-textutils/2003-05/msg00007.html */
               record_open_fd (f, fd, read_pos, &stats, (is_stdin ? -1 : 1));
               f->remote = fremote (fd, pretty_name (f));
             }
diff --git a/tests/misc/sort-merge-fdlimit.sh b/tests/misc/sort-merge-fdlimit.sh
index d9d45cd3d..e30b66cd6 100755
--- a/tests/misc/sort-merge-fdlimit.sh
+++ b/tests/misc/sort-merge-fdlimit.sh
@@ -57,7 +57,7 @@ done
 # ordinary redirection on the 'sort' command.  This is intended to
 # work around bugs in OpenBSD /bin/sh, and some other sh variants,
 # that squirrel away file descriptors before closing them; see
-# <https://lists.gnu.org/archive/html/bug-tar/2010-10/msg00075.html>.
+# <https://lists.gnu.org/r/bug-tar/2010-10/msg00075.html>.
 # This test finds the bug only with shells that do not close FDs on
 # exec, and will miss the bug (if present) on other shells, but it's
 # not easy to fix this without running afoul of the OpenBSD-like sh bugs.
diff --git a/tests/misc/stty-row-col.sh b/tests/misc/stty-row-col.sh
index f0b0de11c..877d0d81c 100755
--- a/tests/misc/stty-row-col.sh
+++ b/tests/misc/stty-row-col.sh
@@ -23,7 +23,7 @@ export COLUMNS

 # Make sure we get English-language behavior.
 # See the report about a possibly-related Solaris problem by Alexandre 
Peshansky
-# <https://lists.gnu.org/archive/html/bug-coreutils/2004-10/msg00035.html>.
+# <https://lists.gnu.org/r/bug-coreutils/2004-10/msg00035.html>.
 # Currently stty isn't localized, but it might be in the future.
 LC_ALL=C
 export LC_ALL
diff --git a/tests/misc/unexpand.pl b/tests/misc/unexpand.pl
index c5ddaa24b..cc70cdfdc 100755
--- a/tests/misc/unexpand.pl
+++ b/tests/misc/unexpand.pl
@@ -121,8 +121,8 @@ my @Tests =
      # and to be consistent in output with older versions, we output
      # a '\t' rather than a space for the second tab position.
      # For more detailed comparison with other implementations see:
-     # https://lists.gnu.org/archive/html/coreutils/2016-06/msg00015.html
-     # https://lists.gnu.org/archive/html/coreutils/2016-07/msg00011.html
+     # https://lists.gnu.org/r/coreutils/2016-06/msg00015.html
+     # https://lists.gnu.org/r/coreutils/2016-07/msg00011.html
      ['ts1', '-t8,9', {IN=>"x\t \t y\n"},    {OUT=>"x\t\t\t y\n"}],
      # There is no ambiguity here. This should always be the output.
      ['ts2', '-t5,8', {IN=>"x\t \t y\n"},    {OUT=>"x\t\t y\n"}],
diff --git a/tests/rm/readdir-bug.sh b/tests/rm/readdir-bug.sh
index b782e603f..28f547e85 100755
--- a/tests/rm/readdir-bug.sh
+++ b/tests/rm/readdir-bug.sh
@@ -23,7 +23,7 @@ print_ver_ rm
 # Create a directory containing many files.
 # What counts is a combination of the number of files and
 # the lengths of their names.  For details, see
-# https://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
+# https://lists.gnu.org/r/bug-coreutils/2006-09/msg00326.html
 mkdir b || framework_failure_
 cd b || framework_failure_
 for i in $(seq 1 250); do
diff --git a/tests/tail-2/inotify-rotate.sh b/tests/tail-2/inotify-rotate.sh
index 4b4cff271..d25bf9104 100755
--- a/tests/tail-2/inotify-rotate.sh
+++ b/tests/tail-2/inotify-rotate.sh
@@ -48,7 +48,7 @@ fastpoll='-s.1 --max-unchanged-stats=1'

 # Perform at least this many iterations, because on multi-core systems
 # the offending sequence of events can be surprisingly uncommon.
-# See: https://lists.gnu.org/archive/html/bug-coreutils/2009-11/msg00213.html
+# See: https://lists.gnu.org/r/bug-coreutils/2009-11/msg00213.html
 for i in $(seq 50); do
     echo $i
     rm -f k x out
-- 
2.13.5


From ad48d41a244d9d7f505711cbb3d297217243af1d Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Mon, 6 Nov 2017 06:34:49 -0800
Subject: [PATCH 2/2] maint: reject "/archive/html" in lists.gnu.org URLS

* scripts/git-hooks/commit-msg: Require the abbreviated "/r/"
form in any log message URL.
---
 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 e6b38bb21..3dbddc63d 100755
--- a/scripts/git-hooks/commit-msg
+++ b/scripts/git-hooks/commit-msg
@@ -130,6 +130,9 @@ sub check_msg($$)
   $buf =~ m!https?://debbugs\.gnu\.org/(?:cgi/bugreport\.cgi\?bug=)?(\d+)!s
     and return "use shorter https://bugs.gnu.org/$1";;

+  $buf =~ m!https://lists\.gnu\.org/archive/html/!s
+    and return "use '/r/' in place of '/archive/html/' in lists.gnu.org URLs";
+
   $buf =~ /^ *Signed-off-by:/mi
     and return q(do not use "Signed-off-by:");

-- 
2.13.5

Reply via email to