Bruno said a while ago that the following programs are missing bug
report emails in --help output [1]:

> announce-gen --help
> gitlog-to-changelog --help
> mktempd --help
> update-copyright --help
> useless-if-before-free --help
> vcs-to-changelog.py --help

The attached 3 patches improve the --help and --version output of some
programs that already have them implemented.

The following programs still need to be written:

    mktempd --help
    update-copyright --help
    vcs-to-changelog.py --help

I'll get around to them eventually if no one else does. :)

Collin

[1] https://lists.gnu.org/archive/html/bug-gnulib/2024-06/msg00141.html

>From d149dd240d9b50b0c85ac8b2a97af82e3c98464e Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Tue, 16 Jul 2024 19:15:10 -0700
Subject: [PATCH 1/3] useless-if-before-free: Add bug reporting address to
 --help.

* build-aux/useless-if-before-free (usage): Add bug reporting address.
---
 ChangeLog                        | 5 +++++
 build-aux/useless-if-before-free | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 08322a3aca..7bcb133557 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-07-16  Collin Funk  <collin.fu...@gmail.com>
+
+	useless-if-before-free: Add bug reporting address to --help.
+	* build-aux/useless-if-before-free (usage): Add bug reporting address.
+
 2024-07-15  Paul Eggert  <egg...@cs.ucla.edu>
 
 	strnlen: port to Android 5.0 (API 21)
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
index 39ce39ab31..a90ced5d2d 100755
--- a/build-aux/useless-if-before-free
+++ b/build-aux/useless-if-before-free
@@ -36,7 +36,7 @@
 eval 'exec perl -wSx "$0" "$@"'
      if 0;
 
-my $VERSION = '2024-07-14 03:13'; # UTC
+my $VERSION = '2024-07-17 02:10'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -98,6 +98,7 @@ and "kfree" calls in the linux kernel sources:
 
     git ls-files -z |xargs -0 $ME --name=kfree
 
+Send patches and bug reports to <bug-gnulib\@gnu.org>.
 EOF
     }
   exit $exit_code;
-- 
2.45.2

>From 92908fcbc65f83951176591412edd8b4cc7a2eea Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Tue, 16 Jul 2024 19:18:22 -0700
Subject: [PATCH 2/3] announce-gen: Add bug reporting address to --help.

* build-aux/announce-gen (usage): Add bug reporting address.
---
 ChangeLog              | 3 +++
 build-aux/announce-gen | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 7bcb133557..10d712f5d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2024-07-16  Collin Funk  <collin.fu...@gmail.com>
 
+	announce-gen: Add bug reporting address to --help.
+	* build-aux/announce-gen (usage): Add bug reporting address.
+
 	useless-if-before-free: Add bug reporting address to --help.
 	* build-aux/useless-if-before-free (usage): Add bug reporting address.
 
diff --git a/build-aux/announce-gen b/build-aux/announce-gen
index a412853429..4b7ba07165 100755
--- a/build-aux/announce-gen
+++ b/build-aux/announce-gen
@@ -35,7 +35,7 @@
 eval 'exec perl -wSx "$0" "$@"'
      if 0;
 
-my $VERSION = '2024-07-14 03:11'; # UTC
+my $VERSION = '2024-07-17 02:16'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -102,6 +102,7 @@ The following are optional:
    --help             display this help and exit
    --version          output version information and exit
 
+Send patches and bug reports to <bug-gnulib\@gnu.org>.
 EOF
     }
   exit $exit_code;
-- 
2.45.2

>From b78892521c1aa822f109e2f7db3e8e352d10590a Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Tue, 16 Jul 2024 19:21:51 -0700
Subject: [PATCH 3/3] gitlog-to-changelog: Improve --version and --help output.

* build-aux/gitlog-to-changelog (usage): Add bug reporting address.
(print_version): New function.
---
 ChangeLog                     |  4 ++++
 build-aux/gitlog-to-changelog | 19 +++++++++++++++++--
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 10d712f5d2..2b9db07b47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2024-07-16  Collin Funk  <collin.fu...@gmail.com>
 
+	gitlog-to-changelog: Improve --version and --help output.
+	* build-aux/gitlog-to-changelog (usage): Add bug reporting address.
+	(print_version): New function.
+
 	announce-gen: Add bug reporting address to --help.
 	* build-aux/announce-gen (usage): Add bug reporting address.
 
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index a2c348e2cf..90a53ef71e 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -35,12 +35,14 @@
 eval 'exec perl -wSx "$0" "$@"'
      if 0;
 
-my $VERSION = '2024-07-04 10:56'; # UTC
+my $VERSION = '2024-07-17 02:20'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
 # do its job.  Otherwise, update this string manually.
 
+(my $copyright_year = $VERSION) =~ s/^(\d*)-.*$/$1/;
+
 use strict;
 use warnings;
 use Getopt::Long;
@@ -138,11 +140,24 @@ s/all tile types/all file types/
 # Change the author to be Paul.  Note the escaped "@":
 s,Jim .*>,Paul Eggert <eggert\\\@cs.ucla.edu>,
 
+Send patches and bug reports to <bug-gnulib\@gnu.org>.
 EOF
     }
   exit $exit_code;
 }
 
+sub print_version ()
+{
+  print "$ME version $VERSION\n";
+  print "Copyright (C) $copyright_year Free Software Foundation, Inc.\n";
+  print "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>\n"
+    . "This is free software: you are free to change and redistribute it.\n"
+    . "There is NO WARRANTY, to the extent permitted by law.\n";
+  print "\n";
+  my $author = "Jim Meyering";
+  print "Written by $author.\n";
+}
+
 # If the string $S is a well-behaved file name, simply return it.
 # If it contains white space, quotes, etc., quote it, and return the new string.
 sub shell_quote($)
@@ -253,7 +268,7 @@ sub git_dir_option($)
   GetOptions
     (
      help => sub { usage 0 },
-     version => sub { print "$ME version $VERSION\n"; exit },
+     version => sub { print_version; exit },
      'since=s' => \$since_date,
      'until=s' => \$until_date,
      'format=s' => \$format_string,
-- 
2.45.2

Reply via email to