1Dpkg::Source::Package(3perl) libdpkg-perl Dpkg::Source::Package(3perl)
2
3
4
6 Dpkg::Source::Package - manipulate Debian source packages
7
9 This module provides a class that can manipulate Debian source
10 packages. While it supports both the extraction and the creation of
11 source packages, the only API that is officially supported is the one
12 that supports the extraction of the source package.
13
15 $string = get_default_diff_ignore_regex()
16 Returns the default diff ignore regex.
17
18 set_default_diff_ignore_regex($string)
19 Set a regex as the new default diff ignore regex.
20
21 @array = get_default_tar_ignore_pattern()
22 Returns the default tar ignore pattern, as an array.
23
25 $p = Dpkg::Source::Package->new(%opts, options => {})
26 Creates a new object corresponding to a source package. When the
27 key filename is set to a .dsc file, it will be used to initialize
28 the source package with its description. Otherwise if the format
29 key is set to a valid value, the object will be initialized for
30 that format (since dpkg 1.19.3).
31
32 The options key is a hash ref which supports the following options:
33
34 skip_debianization
35 If set to 1, do not apply Debian changes on the extracted
36 source package.
37
38 skip_patches
39 If set to 1, do not apply Debian-specific patches. This
40 options is specific for source packages using format "2.0"
41 and "3.0 (quilt)".
42
43 require_valid_signature
44 If set to 1, the check_signature() method will be stricter
45 and will error out if the signature can't be verified.
46
47 require_strong_checksums
48 If set to 1, the check_checksums() method will be stricter
49 and will error out if there is no strong checksum.
50
51 copy_orig_tarballs
52 If set to 1, the extraction will copy the upstream tarballs
53 next the target directory. This is useful if you want to be
54 able to rebuild the source package after its extraction.
55
56 $p->get_filename()
57 Returns the filename of the DSC file.
58
59 $p->get_files()
60 Returns the list of files referenced by the source package. The
61 filenames usually do not have any path information.
62
63 $p->check_checksums()
64 Verify the checksums embedded in the DSC file. It requires the
65 presence of the other files constituting the source package. If any
66 inconsistency is discovered, it immediately errors out. It will
67 make sure at least one strong checksum is present.
68
69 If the object has been created with the "require_strong_checksums"
70 option, then any problem will result in a fatal error.
71
72 $p->get_upstream_signing_key($dir)
73 Get the filename for the upstream key.
74
75 $p->check_original_tarball_signature($dir, @asc)
76 Verify the original upstream tarball signatures @asc using the
77 upstream public keys. It requires the origin upstream tarballs,
78 their signatures and the upstream signing key, as found in an
79 unpacked source tree $dir. If any inconsistency is discovered, it
80 immediately errors out.
81
82 $bool = $p->is_signed()
83 Returns 1 if the DSC files contains an embedded OpenPGP signature.
84 Otherwise returns 0.
85
86 $p->check_signature()
87 Implement the same OpenPGP signature check that dpkg-source does.
88 In case of problems, it prints a warning or errors out.
89
90 If the object has been created with the "require_valid_signature"
91 option, then any problem will result in a fatal error.
92
93 $p->extract($targetdir)
94 Extracts the source package in the target directory $targetdir.
95 Beware that if $targetdir already exists, it will be erased (as
96 long as the no_overwrite_dir option is set).
97
99 Version 2.01 (dpkg 1.20.1)
100 New method: get_upstream_signing_key().
101
102 Version 2.00 (dpkg 1.20.0)
103 New method: check_original_tarball_signature().
104
105 Remove variable: $diff_ignore_default_regexp.
106
107 Hide variable: @tar_ignore_default_pattern.
108
109 Version 1.03 (dpkg 1.19.3)
110 New option: format in new().
111
112 Version 1.02 (dpkg 1.18.7)
113 New option: require_strong_checksums in check_checksums().
114
115 Version 1.01 (dpkg 1.17.2)
116 New functions: get_default_diff_ignore_regex(),
117 set_default_diff_ignore_regex(), get_default_tar_ignore_pattern()
118
119 Deprecated variables: $diff_ignore_default_regexp,
120 @tar_ignore_default_pattern
121
122 Version 1.00 (dpkg 1.16.1)
123 Mark the module as public.
124
125
126
1271.20.9 2021-07-21 Dpkg::Source::Package(3perl)