I noticed that 'gzip --version', 'zgrep --version', etc. still say "Copyright (C) 2018" in gzip 1.12, released today, and that 'make syntax-check' didn't catch this. I installed the attached patch to update the year to 2022 and to change 'make syntax-check' to try to catch this issue better next time.
From 9ab26eaf47092530508269a4d1be0d4e3574e1d6 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Thu, 7 Apr 2022 15:49:26 -0700
Subject: [PATCH] maint: update --version copyright dates
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* cfg.mk (srcdirslash): New macro.
(in_vc_files): Use it to avoid problems when srcdir is '.'.
Also look for copyright dates in shell script *.in files,
so that ‘zgrep --version’ etc. outputs current dates.
* gunzip.in, gzexe.in, gzip.c, zcat.in, zcmp.in, zdiff.in:
* zforce.in, zgrep.in, zless.in, zmore.in, znew.in:
Update copyright date in --version output to 2022.
---
 cfg.mk    | 10 ++++++++--
 gunzip.in |  2 +-
 gzexe.in  |  2 +-
 gzip.c    |  2 +-
 zcat.in   |  2 +-
 zcmp.in   |  2 +-
 zdiff.in  |  2 +-
 zforce.in |  2 +-
 zgrep.in  |  2 +-
 zless.in  |  2 +-
 zmore.in  |  2 +-
 znew.in   |  2 +-
 12 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index bcb9978..74f094b 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -65,10 +65,16 @@ sc_prohibit_emacs__indent_tabs_mode__setting:
 	halt='use of emacs indent-tabs-mode: setting'			\
 	  $(_sc_search_regexp)
 
+ifeq ($(srcdir),.)
+  srcdirslash =
+else
+  srcdirslash = $(srcdir)/
+endif
+
 sc_gzip_copyright_check:
 	@require='Copyright \(C\) '$$(date +%Y)' Free'			\
-	in_vc_files=$(srcdir)/gzip.c					\
-	halt="out of date copyright in $$in_files; update it"		\
+	in_vc_files='^$(srcdirslash)(gzip\.c|[^z].*\.in|z[^ef].*\.in|zf[^g].*\.in)$$'	\
+	halt="out of date copyright in $$in_vc_files; update it"	\
 	  $(_sc_search_regexp)
 
 include $(srcdir)/dist-check.mk
diff --git a/gunzip.in b/gunzip.in
index 6a84659..a6262ba 100644
--- a/gunzip.in
+++ b/gunzip.in
@@ -18,7 +18,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 version="gunzip (gzip) @VERSION@
-Copyright (C) 2007, 2011-2018 Free Software Foundation, Inc.
+Copyright (C) 2022 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
diff --git a/gzexe.in b/gzexe.in
index 5fc7204..6fb5cda 100644
--- a/gzexe.in
+++ b/gzexe.in
@@ -37,7 +37,7 @@ nl='
 IFS=" $tab$nl"
 
 version='gzexe (gzip) @VERSION@
-Copyright (C) 2007, 2011-2018 Free Software Foundation, Inc.
+Copyright (C) 2022 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
diff --git a/gzip.c b/gzip.c
index 4300997..d6afad4 100644
--- a/gzip.c
+++ b/gzip.c
@@ -29,7 +29,7 @@
  */
 
 static char const *const license_msg[] = {
-"Copyright (C) 2018 Free Software Foundation, Inc.",
+"Copyright (C) 2022 Free Software Foundation, Inc.",
 "Copyright (C) 1993 Jean-loup Gailly.",
 "This is free software.  You may redistribute copies of it under the terms of",
 "the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.",
diff --git a/zcat.in b/zcat.in
index 4f5fdcd..94b04ed 100644
--- a/zcat.in
+++ b/zcat.in
@@ -18,7 +18,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 version="zcat (gzip) @VERSION@
-Copyright (C) 2007, 2011-2018 Free Software Foundation, Inc.
+Copyright (C) 2022 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
diff --git a/zcmp.in b/zcmp.in
index d072231..0ffb5e8 100644
--- a/zcmp.in
+++ b/zcmp.in
@@ -18,7 +18,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 version="zcmp (gzip) @VERSION@
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2022 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
diff --git a/zdiff.in b/zdiff.in
index eb4752b..e6c417b 100644
--- a/zdiff.in
+++ b/zdiff.in
@@ -25,7 +25,7 @@ case $1 in
 esac
 
 version="z$prog (gzip) @VERSION@
-Copyright (C) 2009, 2011-2018 Free Software Foundation, Inc.
+Copyright (C) 2022 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
diff --git a/zforce.in b/zforce.in
index aeb966a..9205c6f 100644
--- a/zforce.in
+++ b/zforce.in
@@ -24,7 +24,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 version="zforce (gzip) @VERSION@
-Copyright (C) 2010-2018 Free Software Foundation, Inc.
+Copyright (C) 2022 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
diff --git a/zgrep.in b/zgrep.in
index 25c2782..e1d2229 100644
--- a/zgrep.in
+++ b/zgrep.in
@@ -26,7 +26,7 @@ grep='${GREP-'\''@GREP@'\''}'
 args=
 
 version='zgrep (gzip) @VERSION@
-Copyright (C) 2010-2018 Free Software Foundation, Inc.
+Copyright (C) 2022 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
diff --git a/zless.in b/zless.in
index 4638e94..4ca25a9 100644
--- a/zless.in
+++ b/zless.in
@@ -17,7 +17,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 version="zless (gzip) @VERSION@
-Copyright (C) 2007, 2011-2018 Free Software Foundation, Inc.
+Copyright (C) 2022 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
diff --git a/zmore.in b/zmore.in
index bd007b4..59b0a77 100644
--- a/zmore.in
+++ b/zmore.in
@@ -18,7 +18,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 version="zmore (gzip) @VERSION@
-Copyright (C) 2010-2018 Free Software Foundation, Inc.
+Copyright (C) 2022 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
diff --git a/znew.in b/znew.in
index ea76a22..23e53c9 100644
--- a/znew.in
+++ b/znew.in
@@ -22,7 +22,7 @@ LC_ALL=C
 export LC_ALL
 
 version="znew (gzip) @VERSION@
-Copyright (C) 2010-2018 Free Software Foundation, Inc.
+Copyright (C) 2022 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
-- 
2.35.1

Reply via email to