.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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::Source::Package 3perl" .TH Dpkg::Source::Package 3perl 2024-03-10 1.22.6 libdpkg-perl .\" 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::Source::Package \- manipulate Debian source packages .SH DESCRIPTION .IX Header "DESCRIPTION" This module provides a class that can manipulate Debian source packages. While it supports both the extraction and the creation of source packages, the only API that is officially supported is the one that supports the extraction of the source package. .SH FUNCTIONS .IX Header "FUNCTIONS" .ie n .IP "$string = \fBget_default_diff_ignore_regex()\fR" 4 .el .IP "\f(CW$string\fR = \fBget_default_diff_ignore_regex()\fR" 4 .IX Item "$string = get_default_diff_ignore_regex()" Returns the default diff ignore regex. .IP set_default_diff_ignore_regex($string) 4 .IX Item "set_default_diff_ignore_regex($string)" Set a regex as the new default diff ignore regex. .ie n .IP "@array = \fBget_default_tar_ignore_pattern()\fR" 4 .el .IP "\f(CW@array\fR = \fBget_default_tar_ignore_pattern()\fR" 4 .IX Item "@array = get_default_tar_ignore_pattern()" Returns the default tar ignore pattern, as an array. .SH METHODS .IX Header "METHODS" .ie n .IP "$p = Dpkg::Source::Package\->new(%opts, options => {})" 4 .el .IP "\f(CW$p\fR = Dpkg::Source::Package\->new(%opts, options => {})" 4 .IX Item "$p = Dpkg::Source::Package->new(%opts, options => {})" Creates a new object corresponding to a source package. When the key \&\fBfilename\fR is set to a \fI.dsc\fR file, it will be used to initialize the source package with its description. Otherwise if the \fBformat\fR key is set to a valid value, the object will be initialized for that format (since dpkg 1.19.3). .Sp The \fBoptions\fR key is a hash ref which supports the following options: .RS 4 .IP skip_debianization 8 .IX Item "skip_debianization" If set to 1, do not apply Debian changes on the extracted source package. .IP skip_patches 8 .IX Item "skip_patches" If set to 1, do not apply Debian-specific patches. This options is specific for source packages using format "2.0" and "3.0 (quilt)". .IP require_valid_signature 8 .IX Item "require_valid_signature" If set to 1, the \fBcheck_signature()\fR method will be stricter and will error out if the signature can't be verified. .IP require_strong_checksums 8 .IX Item "require_strong_checksums" If set to 1, the \fBcheck_checksums()\fR method will be stricter and will error out if there is no strong checksum. .IP copy_orig_tarballs 8 .IX Item "copy_orig_tarballs" If set to 1, the extraction will copy the upstream tarballs next the target directory. This is useful if you want to be able to rebuild the source package after its extraction. .RE .RS 4 .RE .ie n .IP $p\->\fBget_filename()\fR 4 .el .IP \f(CW$p\fR\->\fBget_filename()\fR 4 .IX Item "$p->get_filename()" Returns the filename of the DSC file. .ie n .IP $p\->\fBget_files()\fR 4 .el .IP \f(CW$p\fR\->\fBget_files()\fR 4 .IX Item "$p->get_files()" Returns the list of files referenced by the source package. The filenames usually do not have any path information. .ie n .IP $p\->\fBcheck_checksums()\fR 4 .el .IP \f(CW$p\fR\->\fBcheck_checksums()\fR 4 .IX Item "$p->check_checksums()" Verify the checksums embedded in the DSC file. It requires the presence of the other files constituting the source package. If any inconsistency is discovered, it immediately errors out. It will make sure at least one strong checksum is present. .Sp If the object has been created with the "require_strong_checksums" option, then any problem will result in a fatal error. .ie n .IP $p\->get_upstream_signing_key($dir) 4 .el .IP \f(CW$p\fR\->get_upstream_signing_key($dir) 4 .IX Item "$p->get_upstream_signing_key($dir)" Get the filename for the upstream key. .ie n .IP "$p\->armor_original_tarball_signature($bin, $asc)" 4 .el .IP "\f(CW$p\fR\->armor_original_tarball_signature($bin, \f(CW$asc\fR)" 4 .IX Item "$p->armor_original_tarball_signature($bin, $asc)" Convert a signature from binary to ASCII armored form. If the signature file does not exist, it is a no-op. If the signature file is already ASCII armored then simply copy it, otherwise convert it from binary to ASCII armored form. .ie n .IP "$p\->check_original_tarball_signature($dir, @asc)" 4 .el .IP "\f(CW$p\fR\->check_original_tarball_signature($dir, \f(CW@asc\fR)" 4 .IX Item "$p->check_original_tarball_signature($dir, @asc)" Verify the original upstream tarball signatures \f(CW@asc\fR using the upstream public keys. It requires the origin upstream tarballs, their signatures and the upstream signing key, as found in an unpacked source tree \f(CW$dir\fR. If any inconsistency is discovered, it immediately errors out. .ie n .IP "$bool = $p\->\fBis_signed()\fR" 4 .el .IP "\f(CW$bool\fR = \f(CW$p\fR\->\fBis_signed()\fR" 4 .IX Item "$bool = $p->is_signed()" Returns 1 if the DSC files contains an embedded OpenPGP signature. Otherwise returns 0. .ie n .IP $p\->\fBcheck_signature()\fR 4 .el .IP \f(CW$p\fR\->\fBcheck_signature()\fR 4 .IX Item "$p->check_signature()" Implement the same OpenPGP signature check that dpkg-source does. In case of problems, it prints a warning or errors out. .Sp If the object has been created with the "require_valid_signature" option, then any problem will result in a fatal error. .ie n .IP $p\->extract($targetdir) 4 .el .IP \f(CW$p\fR\->extract($targetdir) 4 .IX Item "$p->extract($targetdir)" Extracts the source package in the target directory \f(CW$targetdir\fR. Beware that if \f(CW$targetdir\fR already exists, it will be erased (as long as the no_overwrite_dir option is set). .SH CHANGES .IX Header "CHANGES" .SS "Version 2.02 (dpkg 1.21.10)" .IX Subsection "Version 2.02 (dpkg 1.21.10)" New method: \fBarmor_original_tarball_signature()\fR. .SS "Version 2.01 (dpkg 1.20.1)" .IX Subsection "Version 2.01 (dpkg 1.20.1)" New method: \fBget_upstream_signing_key()\fR. .SS "Version 2.00 (dpkg 1.20.0)" .IX Subsection "Version 2.00 (dpkg 1.20.0)" New method: \fBcheck_original_tarball_signature()\fR. .PP Remove variable: \f(CW$diff_ignore_default_regexp\fR. .PP Hide variable: \f(CW@tar_ignore_default_pattern\fR. .SS "Version 1.03 (dpkg 1.19.3)" .IX Subsection "Version 1.03 (dpkg 1.19.3)" New option: format in \fBnew()\fR. .SS "Version 1.02 (dpkg 1.18.7)" .IX Subsection "Version 1.02 (dpkg 1.18.7)" New option: require_strong_checksums in \fBcheck_checksums()\fR. .SS "Version 1.01 (dpkg 1.17.2)" .IX Subsection "Version 1.01 (dpkg 1.17.2)" New functions: \fBget_default_diff_ignore_regex()\fR, \fBset_default_diff_ignore_regex()\fR, \&\fBget_default_tar_ignore_pattern()\fR .PP Deprecated variables: \f(CW$diff_ignore_default_regexp\fR, \f(CW@tar_ignore_default_pattern\fR .SS "Version 1.00 (dpkg 1.16.1)" .IX Subsection "Version 1.00 (dpkg 1.16.1)" Mark the module as public.