| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Running code in the module scope means that anything importing the
module will execute that code, which is undesirable. Move the
initialization into a _select_objdump() sub, which gets assigned into
a state variable on demand.
|
|
The spawn() call was removed but not the matching import.
Fixes: commit 8ae966ae7d3635b8359829085db4262923ceae96
|
|
The usage in this file is correct, but we are still doing boolean
evaluation.
|
|
We should always assign a proper Dpkg::Version object to the deprecated
variable. Otherwise it can get confused with the scalar value 0 used on
boolean context to denote it is *not* deprecated, instead of it being
a version number 0.
|
|
An ELF executable is defined by whether the object has the EXEC_P flag
defined or an interpreter in the program header. The former applies to
statically linked programs, the latter to dynamically linked programs
and possibly some shared libraries that can be executed, such as the
ones provided by glibc.
This is now more relevant as PIE makes normal executables show up as
shared objects, so they do not contain the EXEC_P flag, and were not
being detected as executables.
|
|
|
|
being defined
Fixes: commit 0d2b3cee25b74dd3fd9ddc3a469b8b144368c963
Closes: #880166
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
|
|
|
|
|
|
Addresses: Subroutines::ProhibitManyArgs
Warned-by: perlcritic
|
|
|
|
Our current minimal Perl version contains a new enough List::Util module
implementing none and any, and several other functions.
|
|
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
If the ELF class or endianness are unknown or bogus, ignore the file.
Reported-by: Niels Thykier <niels@thykier.net>
|
|
Emit an explicit warning whenever we cannot detect the format for
an executable object, instead of delegating this to the subsequent
objdump, and letting it die, which ca be canfusing and is not
future-proof.
Closes: #854536
|
|
The rest of the code handles non-binary files (ELF in this case)
gracefully and ignores them, even though not very explicitly, as
objdump will emit a warning that might be difficult to decrypt.
We will still fail for other read failures that are not just
short-reads, as those imply some actual problem with the passed files.
Closes: #854536
|
|
The affected code in NetBSD was bogus, and has been removed now. So
there is no point in trying to special case the EM_SPARC32PLUS ELF
machine ID depending on the ELF class, for something that should never
happen.
Ref: https//gnats.netbsd.org/51925
|
|
These are too unreliable for exact matches. There are objects with
EABIv4 in the wild, even when the current is EABIv5. The soft and
hard float flags are not always set on armel and armhf respectively,
although the Tag_ABI_VFP_args attribute in the the ARM attribute
section should always be present on armhf. And there are cases were
both soft and hard float flags are set at the same time(!).
Mask all flags on ARM, so that we get back to the previous behavior
with objdump. We can try to revisit this for a better matching during
the dpkg 1.19.x cycle.
Closes: #853793
|
|
Some ELF binaries contain alternative or old ELF machine types, which
should match with their canonical forms. Map those before encoding the
ABI.
We ignore some mappings for things that should certainly never appear
in current systems. Of note are EM_PPC_OLD (17) that conflicts with
EM_VPP550 (17), and EM_PJ_OLD (99) that conflicts with EM_SNP1K (99).
Warned-by: rebootstrap
|
|
This way when unpacking for output, the result gives meaningful results.
|
|
These do not define the ABI, and seem to be set depending on the ISA
used. Mask them for now, and postpone possibly making more fine-grained
matching in the future.
|
|
The previous ELF ABI mismatch detector was very naïve, as the string
returned by «objdump -a» is a very simplistic representation of the
ELF ABI used.
Switch to our own ELF header parser, so that we can distinguish based
on the fields that define the object ABI.
This is still not enough, and we will have collisions with things such
as linux-i386 and hurd-i386, but most of the previously colliding
objects are now filtered.
This also makes us independent of objdump not supporting any unknown
ELF object ABI.
Closes: #849913
|
|
This should make the regular expressions easier to read and understand,
and allows to add comments describing specific parts.
Addresses RegularExpressions::RequireExtendedFormatting.
Warned-by: perlcritic
|
|
The ELF spec does not disallow symbols with embedded spaces, so we
should really be supporting those. This is required by Go shared
libraries.
Closes: #785344
Based-on-patch-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
Conflicts:
debian/changelog
debian/dpkg.manpages
lib/compat/strsignal.c
scripts/Dpkg/Shlibs.pm
|
|
|
|
These markers get instantiated when generating the output files,
replacing them when generating a template is wrong.
|
|
This moves the variables closer to the block they are being used in. And
protects them from external access.
|
|
|
|
|
|
|
|
Place 'use' strict and warnings first, then Exporter 'our' declarations,
then Test module imports, then system module imports, then Dpkg module
imports, then 'use' parent and overload pragmas, separated by a blank
line for each block.
Split each exported symbol declaration into its own line to ease
modifications.
|
|
|
|
The old function name was inconsistent with the other gettext family
of short aliases which has already caused some code typos, and functions
starting with underscore are considered by convention private in Perl.
|
|
These allow to tag symbols as being only relevant on architectures with
specific bits or endianness. The current supported values are 32 and 64
for arch-bits, and little and big for arch-endian.
They can also be combined by using multiple tags on the same symbol.
Closes: #630342
|
|
Stop abusing the Dpkg::Deps object just to get the architecture
computation from it.
|
|
Release 1.17.20
Conflicts:
debian/changelog
scripts/Dpkg/Arch.pm
|
|
Addresses Subroutines::RequireArgUnpacking.
Warned-by: perlcritic
|
|
Addresses Subroutines::RequireArgUnpacking.
Warned-by: perlcritic
|
|
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
|
|
Conflicts:
cputable
debian/changelog
|
|
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>
|
|
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.
|
|
|
|
These are false positives, as when there's no match perl will leave
the subpattern variables untouched. We'll just use the opportunity to
unconfuse perlcritic, making some of those variable usages more clear
by using intermediate variables.
Fixes RegularExpressions::ProhibitUnusedCapture.
Warned-by: perlcritic
|
|
Conflicts:
debian/changelog
utils/start-stop-daemon.c
|