summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Source
AgeCommit message (Collapse)AuthorFilesLines
2019-11-29Fix missing $dirIgor Pashev2-2/+2
2019-11-27Dpkg::Source::Package: Honor require_valid_signature optionGuillem Jover1-4/+12
We need to pass this option forward to the verify_signature() calls, otherwise we use the default. Fixes: commit 139dfc4c78593d995610c0aa180300a9a7dd94ac Fixes: commit 3821f024d92aabf24a333025c1c1956d8a45e718
2019-11-26Dpkg::Source::Package::V3::Native: Do not say v1.0 for 3.0 formatsGuillem Jover1-1/+1
2019-11-26Dpkg: Say class instead of object when appropriateGuillem Jover2-3/+3
These were referring to the type and not the instance, which makes using the incorrect nomenclature confusing.
2019-11-26Dpkg::Exit: Register exit handlers also for __DIE__Guillem Jover1-16/+5
This makes sure we execute the handlers on normal errors, and can thus remove the traps from several functions to run the handlers and to then rethrow the exception.
2019-11-26Dpkg::Source::Package: Remove and hide internal lowercase variablesGuillem Jover1-9/+7
Bump module version to 2.00.
2019-10-30Dpkg::Source::Package::V2: Emit a special patch header on single-debian-patchGuillem Jover1-0/+12
The previous default patch header does not make sense for a conglomerate patch. Instead provide a more suitable default, that can always be overridden with either the local-patch-header or patch-header files. Closes: #933152
2019-10-30Dpkg::Source::Package: Verify original tarball signatures at build timeGuillem Jover3-2/+40
When we are building the source package, while detecting whether there is any original upstream tarball signature to be included in the .dsc, it's the best time to verify them, so that when the .dsc gets eventually signed there's a certification path for the maintainer that they are including what they expected to be there.
2019-10-12Dpkg::OpenPGP: Refactor signature verification into a new functionGuillem Jover1-38/+9
2019-10-12perl: Use File::Copy instead of spawning mv/cp commandsGuillem Jover1-2/+3
We use cp() in Dpkg::Source::Package to preserve the file attributes, but just move() in dpkg-buildpackage where it does not matter.
2019-10-12Dpkg::Source::Package: Refactor original tarball handlingGuillem Jover2-21/+19
2019-10-12scripts: Remove support for versioned GnuPG 2 program and packagesGuillem Jover1-5/+1
The current default in Debian and anywhere else is to use unversioned GnuPG 2.x binaries, so there's no need anymore to try these first or at all.
2019-03-24Dpkg::Source::Package: Handle Format field being undefinedGuillem Jover1-1/+2
On source format 1.0, the default is for the debian/source/format file not being present, which means we'll start with an empty Format field name. Fixes: commit d1d35a56e401181b6d15baf474a7db21d3372a65
2019-03-24Dpkg::Source::Package::V1: Change default build option style to -saGuillem Jover1-1/+1
Using -sA by default means the user might lose data on overwrite if there is already a directory with the same name laying around. Closes: #910737
2019-02-23Dpkg::Source::Package: Add a missing use Dpkg::Source::FormatGuillem Jover1-0/+1
Closes: #921031 Fixes: commit d1d35a56e401181b6d15baf474a7db21d3372a65 Diagnosed-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2019-01-15Dpkg::Source::Package, dpkg-source: Switch to new Dpkg::Source::Format moduleGuillem Jover1-30/+22
This move all ad-hoc code to use the new Dpkg::Source::Format module.
2019-01-15Dpkg::Source::Format: New moduleGuillem Jover1-0/+191
This new public module centralizes the handling of debian/source/format so that other projects can reuse it instead of having to reimplement it. Prompted-by: Mattia Rizzolo <mattia@debian.org> Ref: https://salsa.debian.org/debian/devscripts/merge_requests/63
2019-01-15Dpkg::Source::Package: Improve debian/source/format parsing and validationGuillem Jover1-16/+9
Make the regex more strict and decompose it right away instead of doing a second pass over it. Only initialize minor when we need to update the format. And fix the error for an invalid format to stop referencing the Format field, which might not be involved during the parsing.
2019-01-15Dpkg::Source::Package: Add a new format option to the new constructorGuillem Jover1-5/+16
This makes it easier to construct a source package object with the desired object, and initialize it as required. Prompted-by: James McCoy <jamesan@debian.org> Ref: https://salsa.debian.org/debian/devscripts/merge_requests/61
2019-01-15Dpkg::Source::Package::V3::Bzr: Fix format name in output messageGuillem Jover1-1/+1
2019-01-15Dpkg::Source::Patch: Do not recommend --include-removal when not supportedGuillem Jover1-4/+5
If the option has not been set, then the source format does not support it and we should thus not recommend the --include-removal option in the warning. Closes: #913012
2019-01-15Dpkg::Source::Package: Do not reinitialize fields member in constructorGuillem Jover1-2/+1
We initialized it already in the new constructor, no point in doing the same twice.
2019-01-15Dpkg::File: Make file_slurp() also accept pathnames in addition to filehandlesGuillem Jover1-5/+2
This makes several call sites more clear, as we move the logic inside the function.
2018-10-08Dpkg::Source::Package::V2: Move binary file detection to BinaryFiles moduleGuillem Jover2-44/+59
This makes it possible to reuse the code by other modules.
2018-10-08Dpkg::Source::Package::V2: Split BinaryFiles module into its own fileGuillem Jover2-84/+111
2018-10-08Dpkg::Source::Functions: Reimplement is_binary() w/o using diff(1)Guillem Jover1-23/+8
The check is very simple, and can be done w/o requiring calling diff(1) for each input file. This makes the code shorter, more portable, and should be faster in the non-binary cases.
2018-08-30Dpkg::Source::Package::V3::Quilt: Print series file used when applying patchesGuillem Jover1-0/+2
We might use a vendor specific series file, so we should print the one being used to notify if this fact.
2018-08-30Fix some typosGuillem Jover1-1/+1
Thanks-to: Niels Thykier <niels@thykier.net> (for typo in dpkg(1))
2018-08-01Dpkg::Source: Do not change patch permissions if not necessaryGuillem Jover4-6/+19
To be able to build a source tree, a user needs write permisions on it, but not necessarily ownership of those files. We check the existing file permissions and avoid changing them if not necessary, which helps in the case where the user does not have ownership of those files, and they were already present. Closes: #898010 Naming-by: Julian Andres Klode <jak@debian.org>
2018-02-19Dpkg::Source::Package: Print building lines for upstream tarball signaturesGuillem Jover2-7/+16
When we are picking up upstream tarball signatures, we should also print them as being used to create the source package. Closes: #888787
2018-02-19Dpkg::Source::Package::V2: Print one building line per existing tarballGuillem Jover1-2/+4
Lumping all found tarballs into a single line makes the output more confusing.
2017-10-21Dpkg::Source::Package::V1: Check that $tarname is defined before useChristoph Biedl1-1/+1
Closes: #879124 Warned-by: perl Signed-off-by: Guillem Jover <guillem@debian.org>
2017-10-17Dpkg::Source::Package: Call source format prerequisites method if presentGuillem Jover3-2/+3
We want to be able to check for prerequisites when loading the source format module. That function used to be called import, which is a misnomer here, and was not being invoked. Rename it to the more appropriate prerequisites() and call it if it's present from the module loading code. Addresses: #877688
2017-10-17Dpkg::Source::Package::V3: Use find_command() instead of ad-hoc codeGuillem Jover2-10/+4
2017-10-17Dpkg::Source::Package: Auto-convert binary signatures to OpenPGP ASCII ArmorGuillem Jover2-0/+11
When we are building a source package, if we find a binary signature in the form of a .sig file, we should try to auto-convert it to the format that we expect to include in the source package, which is an OpenPGP ASCII Armor.
2017-09-24Dpkg::Source: Use Errno module instead of the slow to import POSIXGuillem Jover2-2/+2
2017-09-24perl: Remove unused use POSIX module importsGuillem Jover1-1/+0
2017-08-26Dpkg::Source::Package::V1: Re-enable upstream tar signatures when buildingGuillem Jover1-3/+1
2017-08-26perl: Use -> operator for function variablesGuillem Jover1-3/+3
2017-05-20Dpkg::Util: Remove and replace with core module List::UtilGuillem Jover2-2/+2
Our current minimal Perl version contains a new enough List::Util module implementing none and any, and several other functions.
2017-05-17Dpkg::Source::Package: Ignore debian/files and debian/files.new by defaultGuillem Jover2-4/+12
These are generated files, and these pathnames are part of the external interface. With the introduction of the buildinfo support, these get generated even on source builds, which means that it can disrupt previous workflows based on not cleaning the source tree, because they assumed that source-only builds did not have filesystem side-effects.
2017-05-17build: Detect the required GNU patchGuillem Jover1-4/+5
This makes sure the perl module is using a directory traversal resistant patch implementation, currently that's only GNU patch. Fixes: CVE-2017-8283 Stable-Candidate: 1.17.x
2017-05-06doc: Spelling fixesJosh Soref1-1/+1
Signed-off-by: Guillem Jover <guillem@debian.org>
2017-02-26Dpkg::Source::Package: Add ‘.mnt-ignore’ to the default ignore listsNicolas Boulenguez1-1/+2
Closes: #855450 Signed-off-by: Guillem Jover <guillem@debian.org>
2017-01-23dpkg-buildpackage, dpkg-source: Always set SOURCE_DATE_EPOCHGuillem Jover1-1/+1
If we do not have a date from the changelog set it to the current time. Closes: #849081
2017-01-22doc: Fix typos in documentation and code commentsGuillem Jover1-1/+1
Warned-by: codespell, spellintian
2017-01-22Dpkg::Source::Package::V2: Abort on EOF in patch name promptGuillem Jover1-1/+3
Instead of entering into an infinite loop. Closes: #851441
2017-01-22Dpkg::Source::Package: Clarify major/minor format version parsing codeGuillem Jover1-2/+4
2016-10-30perl: Remove default «.» from @INC before loading modulesGuillem Jover1-1/+5
When loading eval'ed modules we should remove «.» from @INC, or we might end up loading code under the caller's control. Fixes: CVE-2016-1238
2016-10-30Dpkg: Add new Dpkg::PROGTAR variable to store GNU tar command nameGuillem Jover1-2/+3