.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "dpkg-parsechangelog 1" .TH dpkg-parsechangelog 1 "2022-09-01" "1.20.12" "dpkg suite" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" dpkg\-parsechangelog \- parse Debian changelog files .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBdpkg-parsechangelog\fR [\fIoption\fR...] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBdpkg-parsechangelog\fR reads and parses the changelog of an unpacked Debian source tree and outputs the information in it to standard output in a machine-readable form. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-l\fR, \fB\-\-file\fR \fIchangelog-file\fR" 4 .IX Item "-l, --file changelog-file" Specifies the changelog file to read information from. A \(oq\-\(cq can be used to specify reading from standard input. The default is \&\fBdebian/changelog\fR. .IP "\fB\-F\fR \fIchangelog-format\fR" 4 .IX Item "-F changelog-format" Specifies the format of the changelog. By default the format is read from a special line near the bottom of the changelog or failing that defaults to the \fBdebian\fR standard format. See also \&\fB\s-1CHANGELOG FORMATS\s0\fR. .IP "\fB\-L\fR \fIlibdir\fR" 4 .IX Item "-L libdir" Obsolete option without effect (since dpkg 1.18.8). Setting the perl environment variables \fB\s-1PERL5LIB\s0\fR or \fB\s-1PERLLIB\s0\fR has a similar effect when looking for the parser perl modules. .IP "\fB\-S\fR, \fB\-\-show\-field\fR \fIfield\fR" 4 .IX Item "-S, --show-field field" Specifies the name of the field to show (since dpkg 1.17.0). The field name is not printed, only its value. .IP "\fB\-?\fR, \fB\-\-help\fR" 4 .IX Item "-?, --help" Show the usage message and exit. .IP "\fB\-\-version\fR" 4 .IX Item "--version" Show the version and exit. .SS "Parser Options" .IX Subsection "Parser Options" The following options can be used to influence the output of the changelog parser, e.g. the range of entries or the format of the output. .IP "\fB\-\-format\fR \fIoutput-format\fR" 4 .IX Item "--format output-format" Set the output format. Currently supported values are \&\fBdpkg\fR and \fBrfc822\fR. \&\fBdpkg\fR is the classic output format (from before this option existed) and the default. It consists of one paragraph in Debian control format (see \fBdeb-control\fR(5)). If more than one entry is requested, then most fields are taken from the first entry (usually the most recent entry), except otherwise stated: .RS 4 .IP "\fBSource:\fR \fIpkg-name\fR" 4 .IX Item "Source: pkg-name" .PD 0 .IP "\fBVersion:\fR \fIversion\fR" 4 .IX Item "Version: version" .IP "\fBDistribution:\fR \fItarget-distribution\fR" 4 .IX Item "Distribution: target-distribution" .IP "\fBUrgency:\fR \fIurgency\fR" 4 .IX Item "Urgency: urgency" .PD The highest urgency of all included entries is used, followed by the concatenated (space-separated) comments from all the versions requested. .IP "\fBMaintainer:\fR \fIauthor\fR" 4 .IX Item "Maintainer: author" .PD 0 .IP "\fBDate:\fR \fIdate\fR" 4 .IX Item "Date: date" .PD The date of the entry as a string, as it appears in the changelog. With a \fBstrptime\fR(3) format "\fB\f(CB%a\fB, \f(CB%d\fB \f(CB%b\fB \f(CB%Y\fB \f(CB%T\fB \f(CB%z\fB\fR", but where the day of the week might not actually correspond to the real day obtained from the rest of the date string. If you need a more accurate representation of the date, use the \&\fBTimestamp\fR field, but take into account it might not be possible to map it back to the exact value in this field. .IP "\fBTimestamp:\fR \fItimestamp\fR" 4 .IX Item "Timestamp: timestamp" The date of the entry as a timestamp in seconds since the epoch (since dpkg 1.18.8). .IP "\fBCloses:\fR \fIbug-number\fR" 4 .IX Item "Closes: bug-number" The Closes fields of all included entries are merged. .IP "\fBChanges:\fR \fIchangelog-entries\fR" 4 .IX Item "Changes: changelog-entries" The text of all changelog entries is concatenated. To make this field a valid Debian control format multiline field empty lines are replaced with a single full stop and all lines is intended by one space character. The exact content depends on the changelog format. .RE .RS 4 .Sp The \fBVersion\fR, \fBDistribution\fR, \fBUrgency\fR, \fBMaintainer\fR and \&\fBChanges\fR fields are mandatory. .Sp There might be additional user-defined fields present. .Sp The \fBrfc822\fR format uses the same fields but outputs a separate paragraph for each changelog entry so that all metadata for each entry is preserved. .RE .IP "\fB\-\-reverse\fR" 4 .IX Item "--reverse" Include all changes in reverse order (since dpkg 1.19.1). .Sp \&\fBNote:\fR For the \fBdpkg\fR format the first entry will be the most ancient entry. .IP "\fB\-\-all\fR" 4 .IX Item "--all" Include all changes. \&\fBNote:\fR Other options have no effect when this is in use. .IP "\fB\-s\fR, \fB\-\-since\fR \fIversion\fR" 4 .IX Item "-s, --since version" .PD 0 .IP "\fB\-v\fR \fIversion\fR" 4 .IX Item "-v version" .PD Include all changes later than \fIversion\fR. .IP "\fB\-u\fR, \fB\-\-until\fR \fIversion\fR" 4 .IX Item "-u, --until version" Include all changes earlier than \fIversion\fR. .IP "\fB\-f\fR, \fB\-\-from\fR \fIversion\fR" 4 .IX Item "-f, --from version" Include all changes equal or later than \fIversion\fR. .IP "\fB\-t\fR, \fB\-\-to\fR \fIversion\fR" 4 .IX Item "-t, --to version" Include all changes up to or equal than \fIversion\fR. .IP "\fB\-c\fR, \fB\-\-count\fR \fInumber\fR" 4 .IX Item "-c, --count number" .PD 0 .IP "\fB\-n\fR \fInumber\fR" 4 .IX Item "-n number" .PD Include \fInumber\fR entries from the top (or the tail if \fInumber\fR is lower than 0). .IP "\fB\-o\fR, \fB\-\-offset\fR \fInumber\fR" 4 .IX Item "-o, --offset number" Change the starting point for \fB\-\-count\fR, counted from the top (or the tail if \fInumber\fR is lower than 0). .SH "CHANGELOG FORMATS" .IX Header "CHANGELOG FORMATS" It is possible to use a different format to the standard one, by providing a parser for that alternative format. .PP In order to have \fBdpkg-parsechangelog\fR run the new parser, a line must be included within the last 40 lines of the changelog file, matching the Perl regular expression: \(lq\fB\eschangelog\-format:\es+([0\-9a\-z]+)\eW\fR\(rq. The part in parentheses should be the name of the format. For example: .Sp .RS 4 @@@ changelog-format: \fIotherformat\fR @@@ .RE .PP Changelog format names are non-empty strings of lowercase alphanumerics (\(lqa\-z0\-9\(rq). .PP If such a line exists then \fBdpkg-parsechangelog\fR will look for the parser as a \fBDpkg::Changelog::\fR\fIOtherformat\fR perl module; it is an error for it not being present. The parser name in the perl module will be automatically capitalized. The default changelog format is \fBdebian\fR, and a parser for it is provided by default. .PP The parser should be derived from the Dpkg::Changelog class and implement the required documented interface. .PP If the changelog format which is being parsed always or almost always leaves a blank line between individual change notes, these blank lines should be stripped out, so as to make the resulting output compact. .PP If the changelog format does not contain date or package name information this information should be omitted from the output. The parser should not attempt to synthesize it or find it from other sources. .PP If the changelog does not have the expected format the parser should error out, rather than trying to muddle through and possibly generating incorrect output. .PP A changelog parser may not interact with the user at all. .SH "NOTES" .IX Header "NOTES" All \fBParser Options\fR except for \fB\-v\fR are only supported since dpkg 1.14.16. .PP Short option parsing with non-bundled values available only since dpkg 1.18.0. .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" .IP "\fB\s-1DPKG_COLORS\s0\fR" 4 .IX Item "DPKG_COLORS" Sets the color mode (since dpkg 1.18.5). The currently accepted values are: \fBauto\fR (default), \fBalways\fR and \&\fBnever\fR. .IP "\fB\s-1DPKG_NLS\s0\fR" 4 .IX Item "DPKG_NLS" If set, it will be used to decide whether to activate Native Language Support, also known as internationalization (or i18n) support (since dpkg 1.19.0). The accepted values are: \fB0\fR and \fB1\fR (default). .SH "FILES" .IX Header "FILES" .IP "\fBdebian/changelog\fR" 4 .IX Item "debian/changelog" The changelog file, used to obtain version-dependent information about the source package, such as the urgency and distribution of an upload, the changes made since a particular release, and the source version number itself. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBdeb-changelog\fR(5).