Mercurial > hg > octave-lojdl > gnulib-hg
annotate build-aux/announce-gen @ 16876:d252b31de6ab
announce-gen: du -h is more portable than du --human
* build-aux/announce-gen (sizes): Invoke du with -h instead
of --human. Accept leading white space in its output.
These changes are required to accommodate OS/X's du.
author | Akim Demaille <akim@lrde.epita.fr> |
---|---|
date | Wed, 23 May 2012 09:47:48 +0200 |
parents | 4d9281e52998 |
children | 3cd0e20dcf8e |
rev | line source |
---|---|
12217
e9550a750583
perl scripts: remove #!/usr/bin/perl in favor of more portable...
Jim Meyering <meyering@redhat.com>
parents:
12083
diff
changeset
|
1 eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' |
e9550a750583
perl scripts: remove #!/usr/bin/perl in favor of more portable...
Jim Meyering <meyering@redhat.com>
parents:
12083
diff
changeset
|
2 & eval 'exec perl -wS "$0" $argv:q' |
e9550a750583
perl scripts: remove #!/usr/bin/perl in favor of more portable...
Jim Meyering <meyering@redhat.com>
parents:
12083
diff
changeset
|
3 if 0; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
4 # Generate a release announcement message. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
5 |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
6 my $VERSION = '2012-05-23 08:55'; # UTC |
7718
605d4ddb5673
* build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
Jim Meyering <jim@meyering.net>
parents:
7716
diff
changeset
|
7 # The definition above must lie within the first 8 lines in order |
605d4ddb5673
* build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
Jim Meyering <jim@meyering.net>
parents:
7716
diff
changeset
|
8 # for the Emacs time-stamp write hook (at end) to update it. |
605d4ddb5673
* build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
Jim Meyering <jim@meyering.net>
parents:
7716
diff
changeset
|
9 # If you change this file with Emacs, please let the write hook |
605d4ddb5673
* build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
Jim Meyering <jim@meyering.net>
parents:
7716
diff
changeset
|
10 # do its job. Otherwise, update this string manually. |
605d4ddb5673
* build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
Jim Meyering <jim@meyering.net>
parents:
7716
diff
changeset
|
11 |
16201
8250f2777afc
maint: update all copyright year number ranges
Jim Meyering <meyering@redhat.com>
parents:
16188
diff
changeset
|
12 # Copyright (C) 2002-2012 Free Software Foundation, Inc. |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
13 |
9114
81009beff1e2
* build-aux/announce-gen: Update to GPLv3.
Paul Eggert <eggert@cs.ucla.edu>
parents:
8256
diff
changeset
|
14 # This program is free software: you can redistribute it and/or modify |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
15 # it under the terms of the GNU General Public License as published by |
9114
81009beff1e2
* build-aux/announce-gen: Update to GPLv3.
Paul Eggert <eggert@cs.ucla.edu>
parents:
8256
diff
changeset
|
16 # the Free Software Foundation, either version 3 of the License, or |
81009beff1e2
* build-aux/announce-gen: Update to GPLv3.
Paul Eggert <eggert@cs.ucla.edu>
parents:
8256
diff
changeset
|
17 # (at your option) any later version. |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
18 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
19 # This program is distributed in the hope that it will be useful, |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
22 # GNU General Public License for more details. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
23 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
24 # You should have received a copy of the GNU General Public License |
9114
81009beff1e2
* build-aux/announce-gen: Update to GPLv3.
Paul Eggert <eggert@cs.ucla.edu>
parents:
8256
diff
changeset
|
25 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
26 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
27 # Written by Jim Meyering |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
28 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
29 use strict; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
30 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
31 use Getopt::Long; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
32 use Digest::MD5; |
16711
c9ce7d847cbf
announce-gen: use Digest::SHA when possible
Reuben Thomas <rrt@sc3d.org>
parents:
16235
diff
changeset
|
33 eval { require Digest::SHA; } |
16792
c75a91e0cad0
announce-gen: avoid failure due to lack of Digest::SHA1
Jim Meyering <meyering@redhat.com>
parents:
16711
diff
changeset
|
34 or eval 'use Digest::SHA1'; |
7716
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
35 use POSIX qw(strftime); |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
36 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
37 (my $ME = $0) =~ s|.*/||; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
38 |
12083
b7b81ca175f4
maint.mk: requiring "make major" was annoying, for a "minor" release.
Jim Meyering <meyering@redhat.com>
parents:
11988
diff
changeset
|
39 my %valid_release_types = map {$_ => 1} qw (alpha beta stable); |
11265
abf535c3fafd
Specify archive suffixes to announce-gen (the --archive-suffix option)
Sergey Poznyakoff <gray@gnu.org.ua>
parents:
11251
diff
changeset
|
40 my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz'); |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
41 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
42 sub usage ($) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
43 { |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
44 my ($exit_code) = @_; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
45 my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
46 if ($exit_code != 0) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
47 { |
16234
f9b906545e2f
Use ', not `, for quoting output.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
48 print $STREAM "Try '$ME --help' for more information.\n"; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
49 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
50 else |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
51 { |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
52 my @types = sort keys %valid_release_types; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
53 print $STREAM <<EOF; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
54 Usage: $ME [OPTIONS] |
11923
61821cbbceb2
announce-gen: correct formatting in --help output
Jim Meyering <meyering@redhat.com>
parents:
11867
diff
changeset
|
55 Generate an announcement message. |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
56 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
57 OPTIONS: |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
58 |
7716
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
59 These options must be specified: |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
60 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
61 --release-type=TYPE TYPE must be one of @types |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
62 --package-name=PACKAGE_NAME |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
63 --previous-version=VER |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
64 --current-version=VER |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
65 --gpg-key-id=ID The GnuPG ID of the key used to sign the tarballs |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
66 --url-directory=URL_DIR |
7716
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
67 |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
68 The following are optional: |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
69 |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
70 --news=NEWS_FILE |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
71 --bootstrap-tools=TOOL_LIST a comma-separated list of tools, e.g., |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
72 autoconf,automake,bison,gnulib |
10619
73ac6a6d08a9
Improve announce-gen user messages.
Ben Pfaff <blp@cs.stanford.edu>
parents:
10145
diff
changeset
|
73 --gnulib-version=VERSION report VERSION as the gnulib version, where |
73ac6a6d08a9
Improve announce-gen user messages.
Ben Pfaff <blp@cs.stanford.edu>
parents:
10145
diff
changeset
|
74 VERSION is the result of running git describe |
73ac6a6d08a9
Improve announce-gen user messages.
Ben Pfaff <blp@cs.stanford.edu>
parents:
10145
diff
changeset
|
75 in the gnulib source directory. |
73ac6a6d08a9
Improve announce-gen user messages.
Ben Pfaff <blp@cs.stanford.edu>
parents:
10145
diff
changeset
|
76 required if gnulib is in TOOL_LIST. |
11251
744c2c4f9309
announce-gen: new option: --no-print-checksums
Jim Meyering <meyering@redhat.com>
parents:
10859
diff
changeset
|
77 --no-print-checksums do not emit MD5 or SHA1 checksums |
11265
abf535c3fafd
Specify archive suffixes to announce-gen (the --archive-suffix option)
Sergey Poznyakoff <gray@gnu.org.ua>
parents:
11251
diff
changeset
|
78 --archive-suffix=SUF add SUF to the list of archive suffixes |
13306
3b72fc82a799
maint.mk, announce-gen: allow project-specific announcement mail headers
Jim Meyering <meyering@redhat.com>
parents:
12559
diff
changeset
|
79 --mail-headers=HEADERS a space-separated list of mail headers, e.g., |
13307
67bccb71cc24
announce-gen: backslash-escape '@'s in --help output
Jim Meyering <meyering@redhat.com>
parents:
13306
diff
changeset
|
80 To: x\@example.com Cc: y-announce\@example.com,... |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
81 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
82 --help display this help and exit |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
83 --version output version information and exit |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
84 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
85 EOF |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
86 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
87 exit $exit_code; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
88 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
89 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
90 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
91 =item C<%size> = C<sizes (@file)> |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
92 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
93 Compute the sizes of the C<@file> and return them as a hash. Return |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
94 C<undef> if one of the computation failed. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
95 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
96 =cut |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
97 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
98 sub sizes (@) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
99 { |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
100 my (@file) = @_; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
101 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
102 my $fail = 0; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
103 my %res; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
104 foreach my $f (@file) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
105 { |
16876
d252b31de6ab
announce-gen: du -h is more portable than du --human
Akim Demaille <akim@lrde.epita.fr>
parents:
16875
diff
changeset
|
106 my $cmd = "du -h $f"; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
107 my $t = `$cmd`; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
108 # FIXME-someday: give a better diagnostic, a la $PROCESS_STATUS |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
109 $@ |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
110 and (warn "command failed: '$cmd'\n"), $fail = 1; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
111 chomp $t; |
16876
d252b31de6ab
announce-gen: du -h is more portable than du --human
Akim Demaille <akim@lrde.epita.fr>
parents:
16875
diff
changeset
|
112 $t =~ s/^\s*([\d.]+[MkK]).*/${1}B/; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
113 $res{$f} = $t; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
114 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
115 return $fail ? undef : %res; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
116 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
117 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
118 =item C<print_locations ($title, \@url, \%size, @file) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
119 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
120 Print a section C<$title> dedicated to the list of <@file>, which |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
121 sizes are stored in C<%size>, and which are available from the C<@url>. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
122 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
123 =cut |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
124 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
125 sub print_locations ($\@\%@) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
126 { |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
127 my ($title, $url, $size, @file) = @_; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
128 print "Here are the $title:\n"; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
129 foreach my $url (@{$url}) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
130 { |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
131 for my $file (@file) |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
132 { |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
133 print " $url/$file"; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
134 print " (", $$size{$file}, ")" |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
135 if exists $$size{$file}; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
136 print "\n"; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
137 } |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
138 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
139 print "\n"; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
140 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
141 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
142 =item C<print_checksums (@file) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
143 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
144 Print the MD5 and SHA1 signature section for each C<@file>. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
145 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
146 =cut |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
147 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
148 sub print_checksums (@) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
149 { |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
150 my (@file) = @_; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
151 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
152 print "Here are the MD5 and SHA1 checksums:\n"; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
153 print "\n"; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
154 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
155 foreach my $meth (qw (md5 sha1)) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
156 { |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
157 foreach my $f (@file) |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
158 { |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
159 open IN, '<', $f |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
160 or die "$ME: $f: cannot open for reading: $!\n"; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
161 binmode IN; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
162 my $dig = |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
163 ($meth eq 'md5' |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
164 ? Digest::MD5->new->addfile(*IN)->hexdigest |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
165 : Digest::SHA1->new->addfile(*IN)->hexdigest); |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
166 close IN; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
167 print "$dig $f\n"; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
168 } |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
169 } |
11251
744c2c4f9309
announce-gen: new option: --no-print-checksums
Jim Meyering <meyering@redhat.com>
parents:
10859
diff
changeset
|
170 print "\n"; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
171 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
172 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
173 =item C<print_news_deltas ($news_file, $prev_version, $curr_version) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
174 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
175 Print the section of the NEWS file C<$news_file> addressing changes |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
176 between versions C<$prev_version> and C<$curr_version>. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
177 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
178 =cut |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
179 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
180 sub print_news_deltas ($$$) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
181 { |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
182 my ($news_file, $prev_version, $curr_version) = @_; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
183 |
14655
855c7dafba01
announce-gen: cosmetic improvement
Reuben Thomas <rrt@sc3d.org>
parents:
14653
diff
changeset
|
184 my $news_name = $news_file; |
855c7dafba01
announce-gen: cosmetic improvement
Reuben Thomas <rrt@sc3d.org>
parents:
14653
diff
changeset
|
185 $news_name =~ s|^\./||; |
855c7dafba01
announce-gen: cosmetic improvement
Reuben Thomas <rrt@sc3d.org>
parents:
14653
diff
changeset
|
186 |
855c7dafba01
announce-gen: cosmetic improvement
Reuben Thomas <rrt@sc3d.org>
parents:
14653
diff
changeset
|
187 print "\n$news_name\n\n"; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
188 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
189 # Print all lines from $news_file, starting with the first one |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
190 # that mentions $curr_version up to but not including |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
191 # the first occurrence of $prev_version. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
192 my $in_items; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
193 |
10766
11b902b8ebdc
Accept Bison's NEWS format.
Paolo Bonzini <bonzini@gnu.org>
parents:
10619
diff
changeset
|
194 my $re_prefix = qr/(?:\* )?(?:Noteworthy c|Major c|C)(?i:hanges)/; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
195 |
14755
4d11fcc7fcf9
announce-gen: fail if the NEWS delta is empty
Jim Meyering <meyering@redhat.com>
parents:
14655
diff
changeset
|
196 my $found_news; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
197 open NEWS, '<', $news_file |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
198 or die "$ME: $news_file: cannot open for reading: $!\n"; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
199 while (defined (my $line = <NEWS>)) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
200 { |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
201 if ( ! $in_items) |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
202 { |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
203 # Match lines like these: |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
204 # * Major changes in release 5.0.1: |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
205 # * Noteworthy changes in release 6.6 (2006-11-22) [stable] |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
206 $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$curr_version\E(?:[^\d.]|$)/o |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
207 or next; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
208 $in_items = 1; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
209 print $line; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
210 } |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
211 else |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
212 { |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
213 # This regexp must not match version numbers in NEWS items. |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16234
diff
changeset
|
214 # For example, they might well say "introduced in 4.5.5", |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
215 # and we don't want that to match. |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
216 $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$prev_version\E(?:[^\d.]|$)/o |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
217 and last; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
218 print $line; |
14755
4d11fcc7fcf9
announce-gen: fail if the NEWS delta is empty
Jim Meyering <meyering@redhat.com>
parents:
14655
diff
changeset
|
219 $line =~ /\S/ |
4d11fcc7fcf9
announce-gen: fail if the NEWS delta is empty
Jim Meyering <meyering@redhat.com>
parents:
14655
diff
changeset
|
220 and $found_news = 1; |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
221 } |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
222 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
223 close NEWS; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
224 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
225 $in_items |
16234
f9b906545e2f
Use ', not `, for quoting output.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
226 or die "$ME: $news_file: no matching lines for '$curr_version'\n"; |
14755
4d11fcc7fcf9
announce-gen: fail if the NEWS delta is empty
Jim Meyering <meyering@redhat.com>
parents:
14655
diff
changeset
|
227 $found_news |
16234
f9b906545e2f
Use ', not `, for quoting output.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
228 or die "$ME: $news_file: no news item found for '$curr_version'\n"; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
229 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
230 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
231 sub print_changelog_deltas ($$) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
232 { |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
233 my ($package_name, $prev_version) = @_; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
234 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
235 # Print new ChangeLog entries. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
236 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
237 # First find all CVS-controlled ChangeLog files. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
238 use File::Find; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
239 my @changelog; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
240 find ({wanted => sub {$_ eq 'ChangeLog' && -d 'CVS' |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
241 and push @changelog, $File::Find::name}}, |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
242 '.'); |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
243 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
244 # If there are no ChangeLog files, we're done. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
245 @changelog |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
246 or return; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
247 my %changelog = map {$_ => 1} @changelog; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
248 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
249 # Reorder the list of files so that if there are ChangeLog |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
250 # files in the specified directories, they're listed first, |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
251 # in this order: |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
252 my @dir = qw ( . src lib m4 config doc ); |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
253 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
254 # A typical @changelog array might look like this: |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
255 # ./ChangeLog |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
256 # ./po/ChangeLog |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
257 # ./m4/ChangeLog |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
258 # ./lib/ChangeLog |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
259 # ./doc/ChangeLog |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
260 # ./config/ChangeLog |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
261 my @reordered; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
262 foreach my $d (@dir) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
263 { |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
264 my $dot_slash = $d eq '.' ? $d : "./$d"; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
265 my $target = "$dot_slash/ChangeLog"; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
266 delete $changelog{$target} |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
267 and push @reordered, $target; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
268 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
269 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
270 # Append any remaining ChangeLog files. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
271 push @reordered, sort keys %changelog; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
272 |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16234
diff
changeset
|
273 # Remove leading './'. |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
274 @reordered = map { s!^\./!!; $_ } @reordered; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
275 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
276 print "\nChangeLog entries:\n\n"; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
277 # print join ("\n", @reordered), "\n"; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
278 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
279 $prev_version =~ s/\./_/g; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
280 my $prev_cvs_tag = "\U$package_name\E-$prev_version"; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
281 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
282 my $cmd = "cvs -n diff -u -r$prev_cvs_tag -rHEAD @reordered"; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
283 open DIFF, '-|', $cmd |
16234
f9b906545e2f
Use ', not `, for quoting output.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
284 or die "$ME: cannot run '$cmd': $!\n"; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
285 # Print two types of lines, making minor changes: |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16234
diff
changeset
|
286 # Lines starting with '+++ ', e.g., |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
287 # +++ ChangeLog 22 Feb 2003 16:52:51 -0000 1.247 |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16234
diff
changeset
|
288 # and those starting with '+'. |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
289 # Don't print the others. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
290 my $prev_printed_line_empty = 1; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
291 while (defined (my $line = <DIFF>)) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
292 { |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
293 if ($line =~ /^\+\+\+ /) |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
294 { |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
295 my $separator = "*"x70 ."\n"; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
296 $line =~ s///; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
297 $line =~ s/\s.*//; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
298 $prev_printed_line_empty |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
299 or print "\n"; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
300 print $separator, $line, $separator; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
301 } |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
302 elsif ($line =~ /^\+/) |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
303 { |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
304 $line =~ s///; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
305 print $line; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
306 $prev_printed_line_empty = ($line =~ /^$/); |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
307 } |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
308 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
309 close DIFF; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
310 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
311 # The exit code should be 1. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
312 # Allow in case there are no modified ChangeLog entries. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
313 $? == 256 || $? == 128 |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
314 or warn "warning: '$cmd' had unexpected exit code or signal ($?)\n"; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
315 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
316 |
7716
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
317 sub get_tool_versions ($$) |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
318 { |
9610
d317af57e145
announce-gen: emit Gnulib's git-based version string.
Jim Meyering <meyering@redhat.com>
parents:
9609
diff
changeset
|
319 my ($tool_list, $gnulib_version) = @_; |
d317af57e145
announce-gen: emit Gnulib's git-based version string.
Jim Meyering <meyering@redhat.com>
parents:
9609
diff
changeset
|
320 @$tool_list |
7716
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
321 or return (); |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
322 |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
323 my $fail; |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
324 my @tool_version_pair; |
9610
d317af57e145
announce-gen: emit Gnulib's git-based version string.
Jim Meyering <meyering@redhat.com>
parents:
9609
diff
changeset
|
325 foreach my $t (@$tool_list) |
7716
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
326 { |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
327 if ($t eq 'gnulib') |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
328 { |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
329 push @tool_version_pair, ucfirst $t . ' ' . $gnulib_version; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
330 next; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
331 } |
7716
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
332 # Assume that the last "word" on the first line of |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16234
diff
changeset
|
333 # 'tool --version' output is the version string. |
7716
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
334 my ($first_line, undef) = split ("\n", `$t --version`); |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
335 if ($first_line =~ /.* (\d[\w.-]+)$/) |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
336 { |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
337 $t = ucfirst $t; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
338 push @tool_version_pair, "$t $1"; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
339 } |
7716
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
340 else |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
341 { |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
342 defined $first_line |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
343 and $first_line = ''; |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
344 warn "$t: unexpected --version output\n:$first_line"; |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
345 $fail = 1; |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
346 } |
7716
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
347 } |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
348 |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
349 $fail |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
350 and exit 1; |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
351 |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
352 return @tool_version_pair; |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
353 } |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
354 |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
355 { |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
356 # Neutralize the locale, so that, for instance, "du" does not |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
357 # issue "1,2" instead of "1.2", what confuses our regexps. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
358 $ENV{LC_ALL} = "C"; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
359 |
13306
3b72fc82a799
maint.mk, announce-gen: allow project-specific announcement mail headers
Jim Meyering <meyering@redhat.com>
parents:
12559
diff
changeset
|
360 my $mail_headers; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
361 my $release_type; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
362 my $package_name; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
363 my $prev_version; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
364 my $curr_version; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
365 my $gpg_key_id; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
366 my @url_dir_list; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
367 my @news_file; |
7716
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
368 my $bootstrap_tools; |
9610
d317af57e145
announce-gen: emit Gnulib's git-based version string.
Jim Meyering <meyering@redhat.com>
parents:
9609
diff
changeset
|
369 my $gnulib_version; |
11251
744c2c4f9309
announce-gen: new option: --no-print-checksums
Jim Meyering <meyering@redhat.com>
parents:
10859
diff
changeset
|
370 my $print_checksums_p = 1; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
371 |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
372 # Reformat the warnings before displaying them. |
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
373 local $SIG{__WARN__} = sub |
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
374 { |
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
375 my ($msg) = @_; |
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
376 # Warnings from GetOptions. |
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
377 $msg =~ s/Option (\w)/option --$1/; |
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
378 warn "$ME: $msg"; |
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
379 }; |
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
380 |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
381 GetOptions |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
382 ( |
13306
3b72fc82a799
maint.mk, announce-gen: allow project-specific announcement mail headers
Jim Meyering <meyering@redhat.com>
parents:
12559
diff
changeset
|
383 'mail-headers=s' => \$mail_headers, |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
384 'release-type=s' => \$release_type, |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
385 'package-name=s' => \$package_name, |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
386 'previous-version=s' => \$prev_version, |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
387 'current-version=s' => \$curr_version, |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
388 'gpg-key-id=s' => \$gpg_key_id, |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
389 'url-directory=s' => \@url_dir_list, |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
390 'news=s' => \@news_file, |
7716
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
391 'bootstrap-tools=s' => \$bootstrap_tools, |
9610
d317af57e145
announce-gen: emit Gnulib's git-based version string.
Jim Meyering <meyering@redhat.com>
parents:
9609
diff
changeset
|
392 'gnulib-version=s' => \$gnulib_version, |
11251
744c2c4f9309
announce-gen: new option: --no-print-checksums
Jim Meyering <meyering@redhat.com>
parents:
10859
diff
changeset
|
393 'print-checksums!' => \$print_checksums_p, |
11265
abf535c3fafd
Specify archive suffixes to announce-gen (the --archive-suffix option)
Sergey Poznyakoff <gray@gnu.org.ua>
parents:
11251
diff
changeset
|
394 'archive-suffix=s' => \@archive_suffixes, |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
395 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
396 help => sub { usage 0 }, |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
397 version => sub { print "$ME version $VERSION\n"; exit }, |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
398 ) or usage 1; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
399 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
400 my $fail = 0; |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
401 # Ensure that each required option is specified. |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
402 $release_type |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
403 or (warn "release type not specified\n"), $fail = 1; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
404 $package_name |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
405 or (warn "package name not specified\n"), $fail = 1; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
406 $prev_version |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
407 or (warn "previous version string not specified\n"), $fail = 1; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
408 $curr_version |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
409 or (warn "current version string not specified\n"), $fail = 1; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
410 $gpg_key_id |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
411 or (warn "GnuPG key ID not specified\n"), $fail = 1; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
412 @url_dir_list |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
413 or (warn "URL directory name(s) not specified\n"), $fail = 1; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
414 |
9610
d317af57e145
announce-gen: emit Gnulib's git-based version string.
Jim Meyering <meyering@redhat.com>
parents:
9609
diff
changeset
|
415 my @tool_list = split ',', $bootstrap_tools; |
d317af57e145
announce-gen: emit Gnulib's git-based version string.
Jim Meyering <meyering@redhat.com>
parents:
9609
diff
changeset
|
416 |
d317af57e145
announce-gen: emit Gnulib's git-based version string.
Jim Meyering <meyering@redhat.com>
parents:
9609
diff
changeset
|
417 grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
418 and (warn "when specifying gnulib as a tool, you must also specify\n" |
14653
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
419 . "--gnulib-version=V, where V is the result of running git describe\n" |
4867b9dad286
announce-gen: indent with spaces, not TABs
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
420 . "in the gnulib source directory.\n"), $fail = 1; |
9610
d317af57e145
announce-gen: emit Gnulib's git-based version string.
Jim Meyering <meyering@redhat.com>
parents:
9609
diff
changeset
|
421 |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
422 exists $valid_release_types{$release_type} |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
423 or (warn "'$release_type': invalid release type\n"), $fail = 1; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
424 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
425 @ARGV |
16875
4d9281e52998
announce-gen: improve getopt-emitted diagnostics
Akim Demaille <akim@lrde.epita.fr>
parents:
16792
diff
changeset
|
426 and (warn "too many arguments:\n", join ("\n", @ARGV), "\n"), |
8256
53012fe4365b
* build-aux/announce-gen: When complaining about excess arguments,
Jim Meyering <jim@meyering.net>
parents:
7761
diff
changeset
|
427 $fail = 1; |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
428 $fail |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
429 and usage 1; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
430 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
431 my $my_distdir = "$package_name-$curr_version"; |
10859
82a95524822c
announce-gen (get_tool_versions): Accept .xz tarballs.
Jim Meyering <meyering@redhat.com>
parents:
10766
diff
changeset
|
432 |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
433 my $xd = "$package_name-$prev_version-$curr_version.xdelta"; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
434 |
11265
abf535c3fafd
Specify archive suffixes to announce-gen (the --archive-suffix option)
Sergey Poznyakoff <gray@gnu.org.ua>
parents:
11251
diff
changeset
|
435 my @candidates = map { "$my_distdir.$_" } @archive_suffixes; |
abf535c3fafd
Specify archive suffixes to announce-gen (the --archive-suffix option)
Sergey Poznyakoff <gray@gnu.org.ua>
parents:
11251
diff
changeset
|
436 my @tarballs = grep {-f $_} @candidates; |
abf535c3fafd
Specify archive suffixes to announce-gen (the --archive-suffix option)
Sergey Poznyakoff <gray@gnu.org.ua>
parents:
11251
diff
changeset
|
437 |
10619
73ac6a6d08a9
Improve announce-gen user messages.
Ben Pfaff <blp@cs.stanford.edu>
parents:
10145
diff
changeset
|
438 @tarballs |
11265
abf535c3fafd
Specify archive suffixes to announce-gen (the --archive-suffix option)
Sergey Poznyakoff <gray@gnu.org.ua>
parents:
11251
diff
changeset
|
439 or die "$ME: none of " . join(', ', @candidates) . " were found\n"; |
7761
40f43f921279
* build-aux/announce-gen: Do not assume that the package
Jim Meyering <jim@meyering.net>
parents:
7718
diff
changeset
|
440 my @sizable = @tarballs; |
40f43f921279
* build-aux/announce-gen: Do not assume that the package
Jim Meyering <jim@meyering.net>
parents:
7718
diff
changeset
|
441 -f $xd |
40f43f921279
* build-aux/announce-gen: Do not assume that the package
Jim Meyering <jim@meyering.net>
parents:
7718
diff
changeset
|
442 and push @sizable, $xd; |
40f43f921279
* build-aux/announce-gen: Do not assume that the package
Jim Meyering <jim@meyering.net>
parents:
7718
diff
changeset
|
443 my %size = sizes (@sizable); |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
444 %size |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
445 or exit 1; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
446 |
13306
3b72fc82a799
maint.mk, announce-gen: allow project-specific announcement mail headers
Jim Meyering <meyering@redhat.com>
parents:
12559
diff
changeset
|
447 my $headers = ''; |
3b72fc82a799
maint.mk, announce-gen: allow project-specific announcement mail headers
Jim Meyering <meyering@redhat.com>
parents:
12559
diff
changeset
|
448 if (defined $mail_headers) |
3b72fc82a799
maint.mk, announce-gen: allow project-specific announcement mail headers
Jim Meyering <meyering@redhat.com>
parents:
12559
diff
changeset
|
449 { |
3b72fc82a799
maint.mk, announce-gen: allow project-specific announcement mail headers
Jim Meyering <meyering@redhat.com>
parents:
12559
diff
changeset
|
450 ($headers = $mail_headers) =~ s/\s+(\S+:)/\n$1/g; |
3b72fc82a799
maint.mk, announce-gen: allow project-specific announcement mail headers
Jim Meyering <meyering@redhat.com>
parents:
12559
diff
changeset
|
451 $headers .= "\n"; |
3b72fc82a799
maint.mk, announce-gen: allow project-specific announcement mail headers
Jim Meyering <meyering@redhat.com>
parents:
12559
diff
changeset
|
452 } |
3b72fc82a799
maint.mk, announce-gen: allow project-specific announcement mail headers
Jim Meyering <meyering@redhat.com>
parents:
12559
diff
changeset
|
453 |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
454 # The markup is escaped as <\# so that when this script is sent by |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
455 # mail (or part of a diff), Gnus is not triggered. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
456 print <<EOF; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
457 |
13306
3b72fc82a799
maint.mk, announce-gen: allow project-specific announcement mail headers
Jim Meyering <meyering@redhat.com>
parents:
12559
diff
changeset
|
458 ${headers}Subject: $my_distdir released [$release_type] |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
459 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
460 <\#secure method=pgpmime mode=sign> |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
461 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
462 FIXME: put comments here |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
463 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
464 EOF |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
465 |
16066
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
466 if (@url_dir_list == 1 && @tarballs == 1) |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
467 { |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
468 # When there's only one tarball and one URL, use a more concise form. |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
469 my $m = "$url_dir_list[0]/$tarballs[0]"; |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
470 print "Here are the compressed sources and a GPG detached signature[*]:\n" |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
471 . " $m\n" |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
472 . " $m.sig\n\n"; |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
473 } |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
474 else |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
475 { |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
476 print_locations ("compressed sources", @url_dir_list, %size, @tarballs); |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
477 -f $xd |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
478 and print_locations ("xdelta diffs (useful? if so, " |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
479 . "please tell bug-gnulib\@gnu.org)", |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
480 @url_dir_list, %size, $xd); |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
481 my @sig_files = map { "$_.sig" } @tarballs; |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
482 print_locations ("GPG detached signatures[*]", @url_dir_list, %size, |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
483 @sig_files); |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
484 } |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
485 |
12329
1d8d8b72ddd8
build: mention ftp redirector in release announcements
Eric Blake <ebb9@byu.net>
parents:
12217
diff
changeset
|
486 if ($url_dir_list[0] =~ "gnu\.org") |
1d8d8b72ddd8
build: mention ftp redirector in release announcements
Eric Blake <ebb9@byu.net>
parents:
12217
diff
changeset
|
487 { |
16066
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
488 print "Use a mirror for higher download bandwidth:\n"; |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
489 if (@tarballs == 1 && $url_dir_list[0] =~ m!http://ftp\.gnu\.org/gnu/!) |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
490 { |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
491 (my $m = "$url_dir_list[0]/$tarballs[0]") |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
492 =~ s!http://ftp\.gnu\.org/gnu/!http://ftpmirror\.gnu\.org/!; |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
493 print " $m\n" |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
494 . " $m.sig\n\n"; |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
495 |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
496 } |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
497 else |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
498 { |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
499 print " http://www.gnu.org/order/ftp.html\n\n"; |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
500 } |
12329
1d8d8b72ddd8
build: mention ftp redirector in release announcements
Eric Blake <ebb9@byu.net>
parents:
12217
diff
changeset
|
501 } |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
502 |
11251
744c2c4f9309
announce-gen: new option: --no-print-checksums
Jim Meyering <meyering@redhat.com>
parents:
10859
diff
changeset
|
503 $print_checksums_p |
744c2c4f9309
announce-gen: new option: --no-print-checksums
Jim Meyering <meyering@redhat.com>
parents:
10859
diff
changeset
|
504 and print_checksums (@sizable); |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
505 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
506 print <<EOF; |
16066
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
507 [*] Use a .sig file to verify that the corresponding file (without the |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
508 .sig suffix) is intact. First, be sure to download both the .sig file |
bfcbd618231e
announce-gen: be more concise when there's only one URL+tarball
Jim Meyering <meyering@redhat.com>
parents:
14755
diff
changeset
|
509 and the corresponding tarball. Then, run a command like this: |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
510 |
11265
abf535c3fafd
Specify archive suffixes to announce-gen (the --archive-suffix option)
Sergey Poznyakoff <gray@gnu.org.ua>
parents:
11251
diff
changeset
|
511 gpg --verify $tarballs[0].sig |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
512 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
513 If that command fails because you don't have the required public key, |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
514 then run this command to import it: |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
515 |
10145
1c6dc066fe6d
announce-gen: use a better key-server host name
Jim Meyering <meyering@redhat.com>
parents:
9678
diff
changeset
|
516 gpg --keyserver keys.gnupg.net --recv-keys $gpg_key_id |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
517 |
16234
f9b906545e2f
Use ', not `, for quoting output.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
518 and rerun the 'gpg --verify' command. |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
519 EOF |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
520 |
9610
d317af57e145
announce-gen: emit Gnulib's git-based version string.
Jim Meyering <meyering@redhat.com>
parents:
9609
diff
changeset
|
521 my @tool_versions = get_tool_versions (\@tool_list, $gnulib_version); |
7716
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
522 @tool_versions |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
523 and print "\nThis release was bootstrapped with the following tools:", |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
524 join ('', map {"\n $_"} @tool_versions), "\n"; |
f2d3357d1ce7
* build-aux/announce-gen: Add two new options, both optional:
Jim Meyering <jim@meyering.net>
parents:
7685
diff
changeset
|
525 |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
526 print_news_deltas ($_, $prev_version, $curr_version) |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
527 foreach @news_file; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
528 |
12083
b7b81ca175f4
maint.mk: requiring "make major" was annoying, for a "minor" release.
Jim Meyering <meyering@redhat.com>
parents:
11988
diff
changeset
|
529 $release_type eq 'stable' |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
530 or print_changelog_deltas ($package_name, $prev_version); |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
531 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
532 exit 0; |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
533 } |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
534 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
535 ### Setup "GNU" style for perl-mode and cperl-mode. |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
536 ## Local Variables: |
12217
e9550a750583
perl scripts: remove #!/usr/bin/perl in favor of more portable...
Jim Meyering <meyering@redhat.com>
parents:
12083
diff
changeset
|
537 ## mode: perl |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
538 ## perl-indent-level: 2 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
539 ## perl-continued-statement-offset: 2 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
540 ## perl-continued-brace-offset: 0 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
541 ## perl-brace-offset: 0 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
542 ## perl-brace-imaginary-offset: 0 |
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
543 ## perl-label-offset: -2 |
12217
e9550a750583
perl scripts: remove #!/usr/bin/perl in favor of more portable...
Jim Meyering <meyering@redhat.com>
parents:
12083
diff
changeset
|
544 ## perl-extra-newline-before-brace: t |
e9550a750583
perl scripts: remove #!/usr/bin/perl in favor of more portable...
Jim Meyering <meyering@redhat.com>
parents:
12083
diff
changeset
|
545 ## perl-merge-trailing-else: nil |
7718
605d4ddb5673
* build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
Jim Meyering <jim@meyering.net>
parents:
7716
diff
changeset
|
546 ## eval: (add-hook 'write-file-hooks 'time-stamp) |
605d4ddb5673
* build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
Jim Meyering <jim@meyering.net>
parents:
7716
diff
changeset
|
547 ## time-stamp-start: "my $VERSION = '" |
605d4ddb5673
* build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
Jim Meyering <jim@meyering.net>
parents:
7716
diff
changeset
|
548 ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" |
605d4ddb5673
* build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
Jim Meyering <jim@meyering.net>
parents:
7716
diff
changeset
|
549 ## time-stamp-time-zone: "UTC" |
605d4ddb5673
* build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
Jim Meyering <jim@meyering.net>
parents:
7716
diff
changeset
|
550 ## time-stamp-end: "'; # UTC" |
7685
89b16a28419e
* build-aux/announce-gen: New file. From coreutils.
Jim Meyering <jim@meyering.net>
parents:
diff
changeset
|
551 ## End: |