Debian Codegraph @

build-aux/announce-gen

raw
1 #!/bin/sh
2 #! -*-perl-*-
3
4 # Generate a release announcement message.
5
6 # Copyright (C) 2002-2025 Free Software Foundation, Inc.
7 #
8 # This program is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <https://www.gnu.org/licenses/>.
20 #
21 # Written by Jim Meyering
22
23 # This is a prologue that allows to run a perl script as an executable
24 # on systems that are compliant to a POSIX version before POSIX:2017.
25 # On such systems, the usual invocation of an executable through execlp()
26 # or execvp() fails with ENOEXEC if it is a script that does not start
27 # with a #! line. The script interpreter mentioned in the #! line has
28 # to be /bin/sh, because on GuixSD systems that is the only program that
29 # has a fixed file name. The second line is essential for perl and is
30 # also useful for editing this file in Emacs. The next two lines below
31 # are valid code in both sh and perl. When executed by sh, they re-execute
32 # the script through the perl program found in $PATH. The '-x' option
33 # is essential as well; without it, perl would re-execute the script
34 # through /bin/sh. When executed by perl, the next two lines are a no-op.
35 eval 'exec perl -wSx "$0" "$@"'
36 if 0;
37
38 my $VERSION = '2025-01-31 23:21'; # UTC
39 # The definition above must lie within the first 8 lines in order
40 # for the Emacs time-stamp write hook (at end) to update it.
41 # If you change this file with Emacs, please let the write hook
42 # do its job. Otherwise, update this string manually.
43
44 (my $copyright_year = $VERSION) =~ s/^(\d*)-.*$/$1/;
45
46 use strict;
47 use Getopt::Long;
48 use POSIX qw(strftime);
49
50 (my $ME = $0) =~ s|.*/||;
51
52 my %valid_release_types = map {$_ => 1} qw (alpha beta stable);
53 my @archive_suffixes = qw (tar.gz tar.bz2 tar.lz tar.lzma tar.xz);
54 my $srcdir = '.';
55
56 sub usage ($)
57 {
58 my ($exit_code) = @_;
59 my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
60 if ($exit_code != 0)
61 {
62 print $STREAM "Try '$ME --help' for more information.\n";
63 }
64 else
65 {
66 my @types = sort keys %valid_release_types;
67 print $STREAM <<EOF;
68 Usage: $ME [OPTIONS]
69 Generate an announcement message. Run this from builddir.
70
71 OPTIONS:
72
73 These options must be specified:
74
75 --release-type=TYPE TYPE must be one of @types
76 --package-name=PACKAGE_NAME
77 --previous-version=VER
78 --current-version=VER
79 --gpg-key-id=ID The GnuPG ID of the key used to sign the tarballs
80 --url-directory=URL_DIR
81
82 The following are optional:
83
84 --news=NEWS_FILE include the NEWS section about this release
85 from this NEWS_FILE; accumulates.
86 --srcdir=DIR where to find the NEWS_FILEs (default: $srcdir)
87 --bootstrap-tools=TOOL_LIST a comma-separated list of tools, e.g.,
88 autoconf,automake,bison,gnulib
89 --gnulib-version=VERSION report VERSION as the gnulib version, where
90 VERSION is the result of running git describe
91 in the gnulib source directory.
92 required if gnulib is in TOOL_LIST.
93 --gpg-key-email=EMAIL The email address of the key used to
94 sign the tarballs
95 --gpg-keyring-url=URL URL pointing to keyring containing the key used
96 to sign the tarballs
97 --no-print-checksums do not emit SHA1 or SHA256 checksums
98 --cksum-checksums emit SHA256 checksums in a form that requires
99 cksum from coreutils or OpenBSD
100 --archive-suffix=SUF add SUF to the list of archive suffixes
101 --mail-headers=HEADERS a space-separated list of mail headers, e.g.,
102 To: x\@example.com Cc: y-announce\@example.com,...
103
104 --help display this help and exit
105 --version output version information and exit
106
107 Send patches and bug reports to <bug-gnulib\@gnu.org>.
108 EOF
109 }
110 exit $exit_code;
111 }
112
113
114 =item C<%size> = C<sizes (@file)>
115
116 Compute the sizes of the C<@file> and return them as a hash. Return
117 C<undef> if one of the computation failed.
118
119 =cut
120
121 sub sizes (@)
122 {
123 my (@file) = @_;
124
125 my $fail = 0;
126 my %res;
127 foreach my $f (@file)
128 {
129 my $cmd = "du -h -L $f";
130 my $t = `$cmd`;
131 # FIXME-someday: give a better diagnostic, a la $PROCESS_STATUS
132 $@
133 and (warn "command failed: '$cmd'\n"), $fail = 1;
134 chomp $t;
135 $t =~ s/^\s*([\d.]+[MkK]).*/${1}B/;
136 $res{$f} = $t;
137 }
138 return $fail ? undef : %res;
139 }
140
141 =item C<print_locations ($title, \@url, \%size, @file)
142
143 Print a section C<$title> dedicated to the list of <@file>, which
144 sizes are stored in C<%size>, and which are available from the C<@url>.
145
146 =cut
147
148 sub print_locations ($\@\%@)
149 {
150 my ($title, $url, $size, @file) = @_;
151 print "Here are the $title:\n";
152 foreach my $url (@{$url})
153 {
154 for my $file (@file)
155 {
156 print " $url/$file";
157 print " (", $$size{$file}, ")"
158 if exists $$size{$file};
159 print "\n";
160 }
161 }
162 print "\n";
163 }
164
165 =item C<print_checksums (@file)
166
167 Print the SHA1 and SHA256 signature section for each C<@file>.
168
169 =cut
170
171 # This digest function omits the "=" padding that is required by cksum,
172 # so add the 0..2 bytes of padding required for each of Digest's algorithms.
173 # To verify such a digest, users need
174 # - a particular command ('cksum -a sha256 --check')
175 # - and particular tools (coreutils >= 9.2 or OpenBSD's cksum since 2007).
176 sub digest_file_base64_wrap ($$)
177 {
178 my ($file, $alg) = @_;
179 my $h = digest_file_base64($file, $alg);
180 $alg =~ tr{-}{}d;
181 my %pad = (MD5 => 2, SHA1 => 1, SHA256 => 1, SHA384 => 0, SHA512 => 2);
182 return $h . '=' x $pad{$alg};
183 }
184
185 sub print_checksums ($@)
186 {
187 my ($prefer_cksum, @file) = @_;
188
189 print "Here are the SHA1 and SHA256 checksums:\n";
190 print "\n";
191
192 use Digest::file qw(digest_file_hex digest_file_base64);
193
194 if ($prefer_cksum)
195 {
196 foreach my $f (@file)
197 {
198 print ' ', digest_file_hex ($f, "SHA-1"), " $f\n";
199 print ' ', digest_file_base64_wrap ($f, "SHA-256"), " $f\n";
200 }
201 print "\nVerify the base64 SHA256 checksum with cksum -a sha256 --check\n";
202 print "from coreutils-9.2 or OpenBSD's cksum since 2007.\n\n";
203 }
204 else
205 {
206 foreach my $f (@file)
207 {
208 print " File: $f\n";
209 print ' SHA1 sum: ', digest_file_hex ($f, "SHA-1"), "\n";
210 print ' SHA256 sum: ', digest_file_hex ($f, "SHA-256"), "\n";
211 print "\n";
212 }
213 }
214 }
215
216 =item C<print_news_deltas ($news_file, $prev_version, $curr_version)
217
218 Print the section of the NEWS file C<$news_file> addressing changes
219 between versions C<$prev_version> and C<$curr_version>.
220
221 =cut
222
223 sub print_news_deltas ($$$)
224 {
225 my ($news_file, $prev_version, $curr_version) = @_;
226
227 my $news_name = $news_file;
228 $news_name =~ s|^\Q$srcdir\E/||;
229
230 print "\n$news_name\n\n";
231
232 # Print all lines from $news_file, starting with the first one
233 # that mentions $curr_version up to but not including
234 # the first occurrence of $prev_version.
235 my $in_items;
236
237 my $re_prefix = qr/(?:\* )?(?:Noteworthy c|Major c|C)(?i:hanges)/;
238
239 my $found_news;
240 open NEWS, '<', $news_file
241 or die "$ME: $news_file: cannot open for reading: $!\n";
242 while (defined (my $line = <NEWS>))
243 {
244 if ( ! $in_items)
245 {
246 # Match lines like these:
247 # * Major changes in release 5.0.1:
248 # * Noteworthy changes in release 6.6 (2006-11-22) [stable]
249 $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$curr_version\E(?:[^\d.]|$)/o
250 or next;
251 $in_items = 1;
252 print $line;
253 }
254 else
255 {
256 # This regexp must not match version numbers in NEWS items.
257 # For example, they might well say "introduced in 4.5.5",
258 # and we don't want that to match.
259 $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$prev_version\E(?:[^\d.]|$)/o
260 and last;
261 print $line;
262 $line =~ /\S/
263 and $found_news = 1;
264 }
265 }
266 close NEWS;
267
268 $in_items
269 or die "$ME: $news_file: no matching lines for '$curr_version'\n";
270 $found_news
271 or die "$ME: $news_file: no news item found for '$curr_version'\n";
272 }
273
274 sub print_changelog_deltas ($$)
275 {
276 my ($package_name, $prev_version) = @_;
277
278 # Print new ChangeLog entries.
279
280 # First find all CVS-controlled ChangeLog files.
281 use File::Find;
282 my @changelog;
283 find ({wanted => sub {$_ eq 'ChangeLog' && -d 'CVS'
284 and push @changelog, $File::Find::name}},
285 '.');
286
287 # If there are no ChangeLog files, we're done.
288 @changelog
289 or return;
290 my %changelog = map {$_ => 1} @changelog;
291
292 # Reorder the list of files so that if there are ChangeLog
293 # files in the specified directories, they're listed first,
294 # in this order:
295 my @dir = qw ( . src lib m4 config doc );
296
297 # A typical @changelog array might look like this:
298 # ./ChangeLog
299 # ./po/ChangeLog
300 # ./m4/ChangeLog
301 # ./lib/ChangeLog
302 # ./doc/ChangeLog
303 # ./config/ChangeLog
304 my @reordered;
305 foreach my $d (@dir)
306 {
307 my $dot_slash = $d eq '.' ? $d : "./$d";
308 my $target = "$dot_slash/ChangeLog";
309 delete $changelog{$target}
310 and push @reordered, $target;
311 }
312
313 # Append any remaining ChangeLog files.
314 push @reordered, sort keys %changelog;
315
316 # Remove leading './'.
317 @reordered = map { s!^\./!!; $_ } @reordered;
318
319 print "\nChangeLog entries:\n\n";
320 # print join ("\n", @reordered), "\n";
321
322 $prev_version =~ s/\./_/g;
323 my $prev_cvs_tag = "\U$package_name\E-$prev_version";
324
325 my $cmd = "cvs -n diff -u -r$prev_cvs_tag -rHEAD @reordered";
326 open DIFF, '-|', $cmd
327 or die "$ME: cannot run '$cmd': $!\n";
328 # Print two types of lines, making minor changes:
329 # Lines starting with '+++ ', e.g.,
330 # +++ ChangeLog 22 Feb 2003 16:52:51 -0000 1.247
331 # and those starting with '+'.
332 # Don't print the others.
333 my $prev_printed_line_empty = 1;
334 while (defined (my $line = <DIFF>))
335 {
336 if ($line =~ /^\+\+\+ /)
337 {
338 my $separator = "*"x70 ."\n";
339 $line =~ s///;
340 $line =~ s/\s.*//;
341 $prev_printed_line_empty
342 or print "\n";
343 print $separator, $line, $separator;
344 }
345 elsif ($line =~ /^\+/)
346 {
347 $line =~ s///;
348 print $line;
349 $prev_printed_line_empty = ($line =~ /^$/);
350 }
351 }
352 close DIFF;
353
354 # The exit code should be 1.
355 # Allow in case there are no modified ChangeLog entries.
356 $? == 256 || $? == 128
357 or warn "warning: '$cmd' had unexpected exit code or signal ($?)\n";
358 }
359
360 sub get_tool_versions ($$)
361 {
362 my ($tool_list, $gnulib_version) = @_;
363 @$tool_list
364 or return ();
365
366 my $fail;
367 my @tool_version_pair;
368 foreach my $t (@$tool_list)
369 {
370 if ($t eq 'gnulib')
371 {
372 push @tool_version_pair, ucfirst $t . ' ' . $gnulib_version;
373 next;
374 }
375 # Assume that the last "word" on the first line of
376 # 'tool --version' output is the version string.
377 my ($first_line, undef) = split ("\n", `$t --version`);
378 if ($first_line =~ /.* ([a-f\d][\w.-]+)$/)
379 {
380 $t = ucfirst $t;
381 push @tool_version_pair, "$t $1";
382 }
383 else
384 {
385 warn "$t: unexpected --version output:\n$first_line";
386 defined $first_line
387 and $first_line = '';
388 $fail = 1;
389 }
390 }
391
392 $fail
393 and exit 1;
394
395 return @tool_version_pair;
396 }
397
398 # Print a more human-friendly representation of $SEC seconds.
399 sub readable_interval0($)
400 {
401 my $sec = shift;
402 $sec < 60 and return "$sec seconds";
403
404 my $min = int($sec / 60); $sec %= 60;
405 30 < $sec and $min++;
406 $min < 60 and return "$min minutes";
407
408 my $hr = int($min / 60); $min %= 60;
409 30 < $min and $hr++;
410 $hr < 24 and return "$hr hours";
411
412 my $day = int($hr / 24); $hr %= 24;
413 12 < $hr and $day++;
414 $day < 50 and return "$day days";
415
416 my $wk = int($day / 7); $day %= 7;
417 4 < $day and $wk++;
418 return "$wk weeks";
419 }
420
421 # Convert e.g., "1 weeks", to "1 week".
422 sub readable_interval($)
423 {
424 my $interval_str = shift;
425 my $i = readable_interval0 $interval_str;
426 $i =~ m{^1 \w+s$} and chop $i;
427 return $i;
428 }
429
430 {
431 # Use the C locale so that, for instance, "du" does not
432 # print "1,2" instead of "1.2", which would confuse our regexps.
433 $ENV{LC_ALL} = "C";
434
435 my $mail_headers;
436 my $release_type;
437 my $package_name;
438 my $prev_version;
439 my $curr_version;
440 my $gpg_key_id;
441 my @url_dir_list;
442 my @news_file;
443 my $bootstrap_tools;
444 my $gnulib_version;
445 my $print_checksums_p = 1;
446 my $cksum_checksums_p;
447 my $gpg_key_email;
448 my $gpg_keyring_url;
449
450 # Reformat the warnings before displaying them.
451 local $SIG{__WARN__} = sub
452 {
453 my ($msg) = @_;
454 # Warnings from GetOptions.
455 $msg =~ s/Option (\w)/option --$1/;
456 warn "$ME: $msg";
457 };
458
459 GetOptions
460 (
461 'mail-headers=s' => \$mail_headers,
462 'release-type=s' => \$release_type,
463 'package-name=s' => \$package_name,
464 'previous-version=s' => \$prev_version,
465 'current-version=s' => \$curr_version,
466 'gpg-key-id=s' => \$gpg_key_id,
467 'gpg-key-email=s' => \$gpg_key_email,
468 'gpg-keyring-url=s' => \$gpg_keyring_url,
469 'url-directory=s' => \@url_dir_list,
470 'news=s' => \@news_file,
471 'srcdir=s' => \$srcdir,
472 'bootstrap-tools=s' => \$bootstrap_tools,
473 'gnulib-version=s' => \$gnulib_version,
474 'print-checksums!' => \$print_checksums_p,
475 'cksum-checksums' => \$cksum_checksums_p,
476 'archive-suffix=s' => \@archive_suffixes,
477
478 help => sub { usage 0 },
479 version =>
480 sub
481 {
482 print "$ME version $VERSION\n";
483 print "Copyright (C) $copyright_year Free Software Foundation, Inc.\n";
484 print "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\n"
485 . "This is free software: you are free to change and redistribute it.\n"
486 . "There is NO WARRANTY, to the extent permitted by law.\n";
487 print "\n";
488 my $author = "Jim Meyering";
489 print "Written by $author.\n";
490 exit
491 },
492 ) or usage 1;
493
494 my $fail = 0;
495 # Ensure that each required option is specified.
496 $release_type
497 or (warn "release type not specified\n"), $fail = 1;
498 $package_name
499 or (warn "package name not specified\n"), $fail = 1;
500 $prev_version
501 or (warn "previous version string not specified\n"), $fail = 1;
502 $curr_version
503 or (warn "current version string not specified\n"), $fail = 1;
504 $gpg_key_id
505 or (warn "GnuPG key ID not specified\n"), $fail = 1;
506 @url_dir_list
507 or (warn "URL directory name(s) not specified\n"), $fail = 1;
508
509 my @tool_list = split ',', $bootstrap_tools
510 if $bootstrap_tools;
511
512 grep (/^gnulib$/, @tool_list) && ! defined $gnulib_version
513 and (warn "when specifying gnulib as a tool, you must also specify\n"
514 . "--gnulib-version=V, where V is the result of running git describe\n"
515 . "in the gnulib source directory.\n"), $fail = 1;
516
517 ! grep (/^gnulib$/, @tool_list) && defined $gnulib_version
518 and (warn "with --gnulib-version=V you must use --bootstrap-tools=...\n"
519 . "including gnulib in that list"), $fail = 1;
520
521 !$release_type || exists $valid_release_types{$release_type}
522 or (warn "'$release_type': invalid release type\n"), $fail = 1;
523
524 @ARGV
525 and (warn "too many arguments:\n", join ("\n", @ARGV), "\n"),
526 $fail = 1;
527 $fail
528 and usage 1;
529
530 my $my_distdir = "$package_name-$curr_version";
531
532 my $xd = "$package_name-$prev_version-$curr_version.xdelta";
533
534 my @candidates = map { "$my_distdir.$_" } @archive_suffixes;
535 my @tarballs = grep {-f $_} @candidates;
536
537 @tarballs
538 or die "$ME: none of " . join(', ', @candidates) . " were found\n";
539 my @sizable = @tarballs;
540 -f $xd
541 and push @sizable, $xd;
542 my %size = sizes (@sizable);
543 %size
544 or exit 1;
545
546 my $headers = '';
547 if (defined $mail_headers)
548 {
549 ($headers = $mail_headers) =~ s/\s+(\S+:)/\n$1/g;
550 $headers .= "\n";
551 }
552
553 # The markup is escaped as <\# so that when this script is sent by
554 # mail (or part of a diff), Gnus is not triggered.
555 print <<EOF;
556
557 ${headers}Subject: $my_distdir released [$release_type]
558
559 <\#secure method=pgpmime mode=sign>
560 This is to announce $package_name-$curr_version, a $release_type release.
561
562 FIXME: put comments here
563
564 EOF
565
566 my $v0 = $prev_version;
567 my $v1 = $curr_version;
568
569 (my $first_name = `git -C "$srcdir" config user.name|cut -d' ' -f1`)
570 =~ m{\S} or die "no name? set user.name in ~/.gitconfig\n";
571
572 chomp (my $n_ci = `git -C "$srcdir" rev-list "v$v0..v$v1" | wc -l`);
573 chomp (my $n_p = `git -C "$srcdir" shortlog "v$v0..v$v1" | grep -c '^[^ ]'`);
574
575 my $this_commit_hash = `git -C "$srcdir" log --pretty=%H -1 "v$v1"`;
576 chop $this_commit_hash;
577 my $prev_release_date = `git -C "$srcdir" log --pretty=%ct -1 "v$v0"`;
578 my $this_release_date = `git -C "$srcdir" log --pretty=%ct -1 "v$v1"`;
579 my $n_seconds = $this_release_date - $prev_release_date;
580 my $time_since_prev = readable_interval $n_seconds;
581 my $names = `git -C "$srcdir" shortlog "v$v0..v$v1"|perl -lne '/^(\\w.*):/ and print " ".\$1'`;
582
583 print <<EOF;
584 There have been $n_ci commits by $n_p people in the $time_since_prev since $v0.
585
586 See the NEWS below for a brief summary.
587
588 Thanks to everyone who has contributed!
589 The following people contributed changes to this release:
590
591 $names
592 $first_name [on behalf of the $package_name maintainers]
593 ==================================================================
594
595 Here is the GNU $package_name home page:
596 https://gnu.org/s/$package_name/
597
598 EOF
599
600 if (@url_dir_list == 1 && @tarballs == 1)
601 {
602 # When there's only one tarball and one URL, use a more concise form.
603 my $m = "$url_dir_list[0]/$tarballs[0]";
604 print "Here are the compressed sources and a GPG detached signature:\n"
605 . " $m\n"
606 . " $m.sig\n\n";
607 }
608 else
609 {
610 print_locations ("compressed sources", @url_dir_list, %size, @tarballs);
611 -f $xd
612 and print_locations ("xdelta diffs (useful? if so, "
613 . "please tell bug-gnulib\@gnu.org)",
614 @url_dir_list, %size, $xd);
615 my @sig_files = map { "$_.sig" } @tarballs;
616 print_locations ("GPG detached signatures", @url_dir_list, %size,
617 @sig_files);
618 }
619
620 if ($url_dir_list[0] =~ "gnu\.org")
621 {
622 print "Use a mirror for higher download bandwidth:\n";
623 if (@tarballs == 1 && $url_dir_list[0] =~ m!https://ftp\.gnu\.org/gnu/!)
624 {
625 (my $m = "$url_dir_list[0]/$tarballs[0]")
626 =~ s!https://ftp\.gnu\.org/gnu/!https://ftpmirror\.gnu\.org/!;
627 print " $m\n"
628 . " $m.sig\n\n";
629
630 }
631 else
632 {
633 print " https://www.gnu.org/order/ftp.html\n\n";
634 }
635 }
636
637 $print_checksums_p
638 and print_checksums ($cksum_checksums_p, @sizable);
639
640 print <<EOF;
641 Use a .sig file to verify that the corresponding file (without the
642 .sig suffix) is intact. First, be sure to download both the .sig file
643 and the corresponding tarball. Then, run a command like this:
644
645 gpg --verify $tarballs[0].sig
646
647 EOF
648 my $gpg_fingerprint = `LC_ALL=C gpg --fingerprint $gpg_key_id | grep -v ^sub`;
649 if ($gpg_fingerprint =~ /^pub/)
650 {
651 chop $gpg_fingerprint;
652 $gpg_fingerprint =~ s/ \[expires:.*//mg;
653 $gpg_fingerprint =~ s/^uid \[ultimate\]/uid /mg;
654 $gpg_fingerprint =~ s/^/ /mg;
655 print<<EOF
656 The signature should match the fingerprint of the following key:
657
658 $gpg_fingerprint
659 EOF
660 }
661 print <<EOF;
662 If that command fails because you don't have the required public key,
663 or that public key has expired, try the following commands to retrieve
664 or refresh it, and then rerun the 'gpg --verify' command.
665 EOF
666 if ($gpg_key_email) {
667 print <<EOF;
668
669 gpg --locate-external-key $gpg_key_email
670 EOF
671 }
672 print <<EOF;
673
674 gpg --recv-keys $gpg_key_id
675 EOF
676 if ($gpg_keyring_url) {
677 print <<EOF;
678
679 wget -q -O- '$gpg_keyring_url' | gpg --import -
680 EOF
681 }
682 print <<EOF;
683
684 As a last resort to find the key, you can try the official GNU
685 keyring:
686
687 wget -q https://ftp.gnu.org/gnu/gnu-keyring.gpg
688 gpg --keyring gnu-keyring.gpg --verify $tarballs[0].sig
689 EOF
690
691 print <<EOF;
692
693 This release is based on the $package_name git repository, available as
694
695 git clone https://git.savannah.gnu.org/git/$package_name.git
696
697 with commit $this_commit_hash tagged as v$v1.
698
699 For a summary of changes and contributors, see:
700
701 https://git.sv.gnu.org/gitweb/?p=$package_name.git;a=shortlog;h=v$v1
702
703 or run this command from a git-cloned $package_name directory:
704
705 git shortlog v$v0..v$v1
706 EOF
707
708 my @tool_versions = get_tool_versions (\@tool_list, $gnulib_version);
709 @tool_versions
710 and print "\nThis release was bootstrapped with the following tools:",
711 join ('', map {"\n $_"} @tool_versions), "\n";
712
713 print_news_deltas ($_, $prev_version, $curr_version)
714 foreach @news_file;
715
716 $release_type eq 'stable'
717 or print_changelog_deltas ($package_name, $prev_version);
718
719 exit 0;
720 }
721
722 ### Setup "GNU" style for perl-mode and cperl-mode.
723 ## Local Variables:
724 ## mode: perl
725 ## perl-indent-level: 2
726 ## perl-continued-statement-offset: 2
727 ## perl-continued-brace-offset: 0
728 ## perl-brace-offset: 0
729 ## perl-brace-imaginary-offset: 0
730 ## perl-label-offset: -2
731 ## perl-extra-newline-before-brace: t
732 ## perl-merge-trailing-else: nil
733 ## eval: (add-hook 'before-save-hook 'time-stamp nil t)
734 ## time-stamp-line-limit: 50
735 ## time-stamp-start: "my $VERSION = '"
736 ## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
737 ## time-stamp-time-zone: "UTC0"
738 ## time-stamp-end: "'; # UTC"
739 ## End: