From: Pádraig Brady
Date: Tue, 12 Aug 2025 13:31:03 +0000 (+0100)
Subject: maint: use short form bug URLs
X-Git-Tag: v9.8~109
X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2543c0052c9be0e53c529f6be90b861ac99a092b;p=thirdparty%2Fcoreutils.git
maint: use short form bug URLs
* cfg.mk (sc_prohibit-long-form-bug-urls): Disallow long form in code.
* scripts/git-hooks/commit-msg: Disallow long form in commit messages.
* NEWS: Shorten long urls.
* bootstrap.conf: Likewise.
* configure.ac: Likewise.
* scripts/git-hooks/commit-msg: Likewise.
* src/csplit.c: Likewise.
* src/fmt.c: Likewise.
* src/make-prime-list.c: Likewise.
* src/nohup.c: Likewise.
* tests/od/od-float.sh: Likewise.
* tests/rm/r-root.sh: Likewise.
* tests/tail/inotify-race.sh: Likewise.
* tests/tail/inotify-race2.sh: Likewise.
---
diff --git a/NEWS b/NEWS
index e4575d0db7..bfde1e62d4 100644
--- a/NEWS
+++ b/NEWS
@@ -19,7 +19,7 @@ GNU coreutils NEWS -*- outline -*-
cp, install, and mv now avoid possible data corruption on
glibc 2.41 and 2.42 systems when copy_file_range is used with ranges > 2GiB,
- avoiding https://sourceware.org/bugzilla/show_bug.cgi?id=33245
+ avoiding https://sourceware.org/PR33245
[bug triggered since coreutils-9.0]
'install -d' now produces the correct diagnostic upon failure
diff --git a/bootstrap.conf b/bootstrap.conf
index 99d4df90bf..49fcf30f32 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -420,7 +420,7 @@ bootstrap_epilogue()
# Add dummy 'install-html' target, required for packages using
# non-recursive makefiles with older gettext.
- # See https://debbugs.gnu.org/25690
+ # See https://bugs.gnu.org/25690
if ! grep -w 'install-html' po/Makefile.in.in ; then
printf 'install-%s:;\n' dvi ps pdf html >> po/Makefile.in.in
fi
diff --git a/cfg.mk b/cfg.mk
index 4c634f663c..2db427012f 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -863,6 +863,15 @@ sc_prohibit-form-feed:
halt='Form Feed (^L) detected' \
$(_sc_search_regexp)
+# debbugs.gnu.org/cgi/bugreport.cgi?bug=... -> bugs.gnu.org/...
+# bugzilla.redhat.com/show_bug.cgi?id=... -> bugzilla.redhat.com/...
+# sourceware.org/bugzilla/show_bug.cgi?id=... -> sourceware.org/PR...
+# gcc.gnu.org/bugzilla/show_bug.cgi?id=... -> gcc.gnu.org/PR...
+sc_prohibit-long-form-bug-urls:
+ @prohibit='http.*(bugreport|show_bug)\.cgi' \
+ halt='use short form bug url' \
+ $(_sc_search_regexp)
+
# Override the default Cc: used in generating an announcement.
announcement_Cc_ = $(translation_project_), \
coreutils@gnu.org, coreutils-announce@gnu.org
diff --git a/configure.ac b/configure.ac
index b446872043..bcd41a71ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,7 +204,7 @@ if test $gl_gcc_warnings != no; then
# Using -Wstrict-overflow is a pain, but the alternative is worse.
# For an example, see the code that provoked this report:
- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33498
+ # https://gcc.gnu.org/PR33498
# Code like that still infloops with gcc-4.6.0 and -O2. Scary indeed.
gl_MANYWARN_ALL_GCC([ws])
diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg
index da094c95af..bdea8c38d3 100755
--- a/scripts/git-hooks/commit-msg
+++ b/scripts/git-hooks/commit-msg
@@ -136,6 +136,12 @@ sub check_msg($$)
$buf =~ m!https://lists\.gnu\.org/archive/html/!s
and return "use '/r/' in place of '/archive/html/' in lists.gnu.org URLs";
+ $buf =~ m!https?://(?:.*\.)?sourceware\.org/bugzilla/show_bug\.cgi\?id=(\d+)!s
+ and return "use shorter https://sourceware.org/PR$1";
+
+ $buf =~ m!https?://gcc\.gnu\.org/bugzilla/show_bug\.cgi\?id=(\d+)!s
+ and return "use shorter https://gcc.gnu.org/PR$1";
+
return '';
}
diff --git a/src/csplit.c b/src/csplit.c
index 9119dcf5a3..506f9248f9 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -378,7 +378,7 @@ record_line_starts (struct buffer_record *b)
return lines;
}
-/* Work around