Age | Commit message (Collapse) | Author | Files | Lines |
|
The loop in the function was expecting $line to be filled by its last
part, and by working on the topic variable it was not getting updated.
Switch all topic variable usages in that funtion so that we can restore
working source unpacking.
Regression introduced in commmit 0d5e17af7391fb0d3a3c695dac40f8df41f8b11c.
Closes: #764206
Addresses BuiltinFunctions::ProhibitUselessTopic.
Warned-by: perlcritic
|
|
Addresses Subroutines::RequireArgUnpacking.
Warned-by: perlcritic
|
|
Addresses RegularExpressions::ProhibitFixedStringMatches.
Warned-by: perlcritic
|
|
Addresses RegularExpressions::ProhibitFixedStringMatches.
Warned-by: perlcritic
|
|
Make it clear that these are the addon tarballs.
|
|
Fixes BuiltinFunctions::ProhibitUselessTopic
and RegularExpressions::ProhibitUselessTopic.
Warned-by: perlcritic
|
|
Switch code that uses roughly more explicit instances of the topic
variable than implicit ones.
Addresses BuiltinFunctions::ProhibitUselessTopic.
Warned-by: perlcritic
|
|
When prompting the user for a patch name, if they type Ctrl-D the
variable reading from STDIN will be initialized to undef, but we were
acting on it anyway. Catch that case.
|
|
This reverts some of the unsafe assignments, as the variable might have
contained a value evaluating to false, and we are assigning non-false
values.
This specifically fixes dpkg-source --commit and -b not working any
longer.
Regression introduced in commit b0337f001bee1f3791cb87505b1330c9bf83e2be.
Closes: #758426
Reported-by: Neil Williams <codehelp@debian.org>
|
|
In these cases we are not interested if the variables are defined, but
if they have actual content.
|
|
Explicitly instruct Dpkg::Source::Archive to use the gnu format when
creating archives. Some versions of tar (specifically on openSUSE >= 12.2)
have a different default tar format. This change makes the archive
creation more consistent.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
This makes some call sites more natural.
|
|
With some archives, the tar process will terminate prematurely if it
finds trailing zeros, but the compressor will try to keep feeding it
with data, although the other end of the pipe will now be gone. We
handle this already by ignoring processes terminated by SIGPIPE, but
if the process is ignoring SIGPIPE it might get terminated due to the
error from the write(2) call, which we are not handling. Reset the
SIGPIPE disposition to its default setting.
Closes: #756526
|
|
Replace only safe usages, i.e. those that fallback on initialization
values that evaluate to false anyway. Or when the API is explicit about
the variable being undefined.
|
|
Replace only safe usages, i.e. those that fallback on initialization
values that evaluate to false anyway. Or when the API is explicit about
the variable being undefined.
|
|
|
|
When removing a binary file and using --include-removal, we get a bogus
error message about including a pathname relative to /dev/null in
debian/source/include-binaries.
Closes: #755166
|
|
There are other reasons besides patches with no fuzz, mention that the
patch could be malformed too, to make the error message less confusing.
|
|
|
|
Switch more URLs, now that these services have had SSL enabled.
|
|
The code parsing the patches was not taking into account that patches
w/ partial or no pathname headers are still valid patches, and that
they can specify the pathname in the Index: pseudo-header or in a
single «+++ » pathname header, which allows doing directory traversal
when unpacking source packages.
The first vector is due to how the Index: pseudo-header is handled by
patch. Its value gets used (on non-POSIX mode) only when both «+++ »
and «--- » pathname headers do not provide a pathname, by either having
an empty pathname or by the header being completely absent. The minimal
fix for this is to just consider that we've parsed the header when we
see a hunk header marker «@@ -». This is CVE-2014-3865 and #749183.
The other vector is due to patches with only a «+++ » pathname header,
which get skipped by the parser as it only checks for «--- » pathname
header lines. The minimal fix for this is to also check for «+++ » when
parsing the patch header. This is CVE-2014-3864 and #746498.
The first issue is a superset of the second, and its fix is sufficient
and covers and fixes too the second vector, as the «@@ -» marker is
mandatory for a patch to be valid.
An unspecified directory traversal vulnerability was initially reported
in #746498 by Javier Serrano Polo <javier@jasp.net>, and while no
information had been provided, I independently found #749183 and what
was supposed to be #746498, which was later on published.
Fixes: CVE-2014-3864, CVE-2014-3865
Closes: #746498, #749183
|
|
|
|
This command is very Debian specific, fallback to try to use
VISUAL, EDITOR or vi if the previous are either unset or not found.
|
|
Refactor the code out from Dpkg::Source::Package::V3::Quilt into two new
methods that take care of registering and unregistering a patch from the
series and applied_patches in-core and on-disk lists.
|
|
Do not mangle the series files when the last line is missing a newline,
by loading and saving the file with the added patch. This is quite ugly
in general, but fixes the immediate problem. The code will be getting a
general overhaul in due time.
Closes: #584233
|
|
|
|
This is the normal counterpart to load actions.
|
|
|
|
These have better runtime performance, not that it matters in many of
the instances here though.
Addresses RegularExpressions::ProhibitUnusedCapture.
Warned-by: perlcritic
|
|
Reported-by: Samuel Bronson <naesten@gmail.com>
Closes: #747148
|
|
Because patch only started recognizing C-style filenames in diffs
in version 2.7, it's not safe to assume one behaviour or the other,
as the system might or might not have a recent enough version, or
a GNU patch program at all. There's also no reason we should be
supporting this kind of strange encoded filenames in patches, when
we have not done so up to now.
Let's just ban these types of diffs and be done with it.
Fixes: CVE-2014-0471
Closes: #746306
|
|
We need to strip the surrounding quotes, and unescape any escape
sequence, so that we check the same files that the patch program will
be using, otherwise a malicious package could overpass those checks,
and perform directory traversal attacks on source package unpacking.
Fixes: CVE-2014-0471
Reported-by: Jakub Wilk <jwilk@debian.org>
|
|
This allows to extract ancient source packages with broken versions,
that used to be accepted at some point in time by dpkg-source.
Closes: #740883
|
|
Hint at the --include-removal option in the warning to direct the user
to it.
Closes: #738310
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
|
|
|
|
This way we make sure we don't affect the $_ value for the caller,
in case it was being used.
|
|
This does not affect V1.0, which only supports gzip compression.
|
|
This paves the way to be able to set package format specific defaults,
and fixes a problem with the default compression level on “3.0 (native)”
packages, as it was being set in dpkg-source but not reset when the
compressor was changed.
Closes: #733326
|
|
When creating a Dpkg::Source::Archive or a Dpkg::Source::Patch, always
be explicit about the compression level instead of relying on the global
default level.
|
|
Closes: #719348, #733746
|
|
|
|
|
|
If the users are modifying this variable, just copying the real one to
the public one will not do it, because changes will not be seen by the
module code. Instead create a real alias.
Regression introduced in commit 5ae4ce9c2dfddbb36e2e0fc24dde3a27196f00f1.
|
|
Add gnupg2 and gpgv2 as alternative Recommends to gnupg and gpgv (to
not pull them by default, as that would change the current default
build environment pulled in by dpkg-dev), but prefer gpgv2 over gpgv,
and gpg2 over gpg at run-time if they are available, so that users
installing the alternatives can benefit from the new implementations.
|
|
Fixes InputOutput::RequireBracedFileHandleWithPrint.
Warned-by: perlcritic
|
|
Addresses InputOutput::RequireBracedFileHandleWithPrint.
Warned-by: perlcritic
|
|
Remove now unused internerr() function, replaced by croak which does a
way better job.
Addresses ErrorHandling::RequireCarping.
Warned-by: perlcritic
|
|
This will make it safe to remove parenthesis around builtins.
|
|
Using boolean operators after predicates for error checking makes the
code flow slightly confusing, do that only after actions, to check if
they succeeded and error out otherwise.
|