1dpkg-parsechangelog(1) dpkg suite dpkg-parsechangelog(1)
2
3
4
6 dpkg-parsechangelog - parse Debian changelog files
7
9 dpkg-parsechangelog [option...]
10
12 dpkg-parsechangelog reads and parses the changelog of an unpacked
13 Debian source tree and outputs the information in it to standard output
14 in a machine-readable form.
15
17 -l, --file changelog-file
18 Specifies the changelog file to read information from. A ‘-’
19 can be used to specify reading from standard input. The default
20 is debian/changelog.
21
22 -F changelog-format
23 Specifies the format of the changelog. By default the format is
24 read from a special line near the bottom of the changelog or
25 failing that defaults to the debian standard format. See also
26 CHANGELOG FORMATS.
27
28 -L libdir
29 Obsolete option without effect (since dpkg 1.18.8). Setting the
30 perl environment variables PERL5LIB or PERLLIB has a similar
31 effect when looking for the parser perl modules.
32
33 -S, --show-field field
34 Specifies the name of the field to show (since dpkg 1.17.0).
35 The field name is not printed, only its value.
36
37 -?, --help
38 Show the usage message and exit.
39
40 --version
41 Show the version and exit.
42
43 Parser Options
44 The following options can be used to influence the output of the
45 changelog parser, e.g. the range of entries or the format of the
46 output.
47
48 --format output-format
49 Set the output format. Currently supported values are dpkg and
50 rfc822. dpkg is the classic output format (from before this
51 option existed) and the default. It consists of one paragraph in
52 Debian control format (see deb-control(5)). If more than one
53 entry is requested, then most fields are taken from the first
54 entry (usually the most recent entry), except otherwise stated:
55
56 Source: pkg-name
57
58 Version: version
59
60 Distribution: target-distribution
61
62 Urgency: urgency
63 The highest urgency of all included entries is used,
64 followed by the concatenated (space-separated) comments
65 from all the versions requested.
66
67 Maintainer: author
68
69 Date: date
70 The date of the entry as a string, as it appears in the
71 changelog. With a strptime(3) format "%a, %d %b %Y %T
72 %z", but where the day of the week might not actually
73 correspond to the real day obtained from the rest of the
74 date string. If you need a more accurate representation
75 of the date, use the Timestamp field, but take into
76 account it might not be possible to map it back to the
77 exact value in this field.
78
79 Timestamp: timestamp
80 The date of the entry as a timestamp in seconds since the
81 epoch (since dpkg 1.18.8).
82
83 Closes: bug-number
84 The Closes fields of all included entries are merged.
85
86 Changes: changelog-entries
87 The text of all changelog entries is concatenated. To
88 make this field a valid Debian control format multiline
89 field empty lines are replaced with a single full stop
90 and all lines is intended by one space character. The
91 exact content depends on the changelog format.
92
93 The Version, Distribution, Urgency, Maintainer and Changes
94 fields are mandatory.
95
96 There might be additional user-defined fields present.
97
98 The rfc822 format uses the same fields but outputs a separate
99 paragraph for each changelog entry so that all metadata for each
100 entry is preserved.
101
102 --reverse
103 Include all changes in reverse order (since dpkg 1.19.1). Note:
104 for the dpkg format the first entry will be the most ancient
105 entry.
106
107 --all Include all changes. Note: other options have no effect when
108 this is in use.
109
110 -s, --since version
111 -v version
112 Include all changes later than version.
113
114 -u, --until version
115 Include all changes earlier than version.
116
117 -f, --from version
118 Include all changes equal or later than version.
119
120 -t, --to version
121 Include all changes up to or equal than version.
122
123 -c, --count number
124 -n number
125 Include number entries from the top (or the tail if number is
126 lower than 0).
127
128 -o, --offset number
129 Change the starting point for --count, counted from the top (or
130 the tail if number is lower than 0).
131
133 It is possible to use a different format to the standard one, by
134 providing a parser for that alternative format.
135
136 In order to have dpkg-parsechangelog run the new parser, a line must be
137 included within the last 40 lines of the changelog file, matching the
138 Perl regular expression: “\schangelog-format:\s+([0-9a-z]+)\W”. The
139 part in parentheses should be the name of the format. For example:
140
141 @@@ changelog-format: otherformat @@@
142
143 Changelog format names are non-empty strings of lowercase alphanumerics
144 (“a-z0-9”).
145
146 If such a line exists then dpkg-parsechangelog will look for the parser
147 as a Dpkg::Changelog::Otherformat perl module; it is an error for it
148 not being present. The parser name in the perl module will be
149 automatically capitalized. The default changelog format is debian, and
150 a parser for it is provided by default.
151
152 The parser should be derived from the Dpkg::Changelog class and
153 implement the required documented interface.
154
155 If the changelog format which is being parsed always or almost always
156 leaves a blank line between individual change notes, these blank lines
157 should be stripped out, so as to make the resulting output compact.
158
159 If the changelog format does not contain date or package name
160 information this information should be omitted from the output. The
161 parser should not attempt to synthesize it or find it from other
162 sources.
163
164 If the changelog does not have the expected format the parser should
165 error out, rather than trying to muddle through and possibly generating
166 incorrect output.
167
168 A changelog parser may not interact with the user at all.
169
171 All Parser Options except for -v are only supported since dpkg 1.14.16.
172
173 Short option parsing with non-bundled values available only since dpkg
174 1.18.0.
175
177 DPKG_COLORS
178 Sets the color mode (since dpkg 1.18.5). The currently accepted
179 values are: auto (default), always and never.
180
181 DPKG_NLS
182 If set, it will be used to decide whether to activate Native
183 Language Support, also known as internationalization (or i18n)
184 support (since dpkg 1.19.0). The accepted values are: 0 and 1
185 (default).
186
188 debian/changelog
189 The changelog file, used to obtain version-dependent information
190 about the source package, such as the urgency and distribution
191 of an upload, the changes made since a particular release, and
192 the source version number itself.
193
195 deb-changelog(5).
196
197
198
1991.19.7 2019-06-03 dpkg-parsechangelog(1)