1dpkg-parsechangelog(1)            dpkg suite            dpkg-parsechangelog(1)
2
3
4

NAME

6       dpkg-parsechangelog - parse Debian changelog files
7

SYNOPSIS

9       dpkg-parsechangelog [option...]
10

DESCRIPTION

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

OPTIONS

17       -l, --file changelog-file
18           Specifies the changelog file to read information from.  A ‘-’ can
19           be used to specify reading from standard input.  The default is
20           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 effect
31           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).  The
35           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 option
51           existed) and the default. It consists of one paragraph in Debian
52           control format (see deb-control(5)). If more than one entry is
53           requested, then most fields are taken from the first entry (usually
54           the most recent entry), except otherwise stated:
55
56           Source: pkg-name
57           Version: version
58           Distribution: target-distribution
59           Urgency: urgency
60               The highest urgency of all included entries is used, followed
61               by the concatenated (space-separated) comments from all the
62               versions requested.
63
64           Maintainer: author
65           Date: date
66               The date of the entry as a string, as it appears in the
67               changelog.  With a strptime(3) format "%a, %d %b %Y %T %z", but
68               where the day of the week might not actually correspond to the
69               real day obtained from the rest of the date string.  If you
70               need a more accurate representation of the date, use the
71               Timestamp field, but take into account it might not be possible
72               to map it back to the exact value in this field.
73
74           Timestamp: timestamp
75               The date of the entry as a timestamp in seconds since the epoch
76               (since dpkg 1.18.8).
77
78           Closes: bug-number
79               The Closes fields of all included entries are merged.
80
81           Changes: changelog-entries
82               The text of all changelog entries is concatenated. To make this
83               field a valid Debian control format multiline field empty lines
84               are replaced with a single full stop and all lines is intended
85               by one space character. The exact content depends on the
86               changelog format.
87
88           The Version, Distribution, Urgency, Maintainer and Changes fields
89           are mandatory.
90
91           There might be additional user-defined fields present.
92
93           The rfc822 format uses the same fields but outputs a separate
94           paragraph for each changelog entry so that all metadata for each
95           entry is preserved.
96
97       --reverse
98           Include all changes in reverse order (since dpkg 1.19.1).
99
100           Note: For the dpkg format the first entry will be the most ancient
101           entry.
102
103       --all
104           Include all changes.  Note: Other options have no effect when this
105           is in use.
106
107       -s, --since version
108       -v version
109           Include all changes later than version.
110
111       -u, --until version
112           Include all changes earlier than version.
113
114       -f, --from version
115           Include all changes equal or later than version.
116
117       -t, --to version
118           Include all changes up to or equal than version.
119
120       -c, --count number
121       -n number
122           Include number entries from the top (or the tail if number is lower
123           than 0).
124
125       -o, --offset number
126           Change the starting point for --count, counted from the top (or the
127           tail if number is lower than 0).
128

CHANGELOG FORMATS

130       It is possible to use a different format to the standard one, by
131       providing a parser for that alternative format.
132
133       In order to have dpkg-parsechangelog run the new parser, a line must be
134       included within the last 40 lines of the changelog file, matching the
135       Perl regular expression: “\schangelog-format:\s+([0-9a-z]+)\W”.  The
136       part in parentheses should be the name of the format. For example:
137
138           @@@ changelog-format: otherformat @@@
139
140       Changelog format names are non-empty strings of lowercase alphanumerics
141       (“a-z0-9”).
142
143       If such a line exists then dpkg-parsechangelog will look for the parser
144       as a Dpkg::Changelog::Otherformat perl module; it is an error for it
145       not being present.  The parser name in the perl module will be
146       automatically capitalized.  The default changelog format is debian, and
147       a parser for it is provided by default.
148
149       The parser should be derived from the Dpkg::Changelog class and
150       implement the required documented interface.
151
152       If the changelog format which is being parsed always or almost always
153       leaves a blank line between individual change notes, these blank lines
154       should be stripped out, so as to make the resulting output compact.
155
156       If the changelog format does not contain date or package name
157       information this information should be omitted from the output. The
158       parser should not attempt to synthesize it or find it from other
159       sources.
160
161       If the changelog does not have the expected format the parser should
162       error out, rather than trying to muddle through and possibly generating
163       incorrect output.
164
165       A changelog parser may not interact with the user at all.
166

NOTES

168       All Parser Options except for -v are only supported since dpkg 1.14.16.
169
170       Short option parsing with non-bundled values available only since dpkg
171       1.18.0.
172

ENVIRONMENT

174       DPKG_COLORS
175           Sets the color mode (since dpkg 1.18.5).  The currently accepted
176           values are: auto (default), always and never.
177
178       DPKG_NLS
179           If set, it will be used to decide whether to activate Native
180           Language Support, also known as internationalization (or i18n)
181           support (since dpkg 1.19.0).  The accepted values are: 0 and 1
182           (default).
183

FILES

185       debian/changelog
186           The changelog file, used to obtain version-dependent information
187           about the source package, such as the urgency and distribution of
188           an upload, the changes made since a particular release, and the
189           source version number itself.
190

SEE ALSO

192       deb-changelog(5).
193
194
195
1961.20.9                            2021-04-13            dpkg-parsechangelog(1)
Impressum