dpkg/guillem.git
2 years agoaaapu/lax-parser
Guillem Jover [Sun, 3 Nov 2019 18:35:48 +0000 (3 19:35 +0100)]
aaa

2 years agoDpkg::Source::Package: Honor require_valid_signature option
Guillem Jover [Tue, 26 Nov 2019 12:17:45 +0000 (26 13:17 +0100)]
Dpkg::Source::Package: Honor require_valid_signature option

We need to pass this option forward to the verify_signature() calls,
otherwise we use the default.

Fixes: commit 139dfc4c78593d995610c0aa180300a9a7dd94ac
Fixes: commit 3821f024d92aabf24a333025c1c1956d8a45e718

2 years agopo: Remove previous msgids for up-to-date translations
Guillem Jover [Wed, 27 Nov 2019 02:37:08 +0000 (27 03:37 +0100)]
po: Remove previous msgids for up-to-date translations

This was causing unit test failures.

2 years agoUpdate German translation of manual pages
Helge Kreutzmann [Tue, 26 Nov 2019 18:42:31 +0000 (26 19:42 +0100)]
Update German translation of manual pages

Update to 3016t.

2 years agoUpdate German scripts translation
Helge Kreutzmann [Tue, 26 Nov 2019 17:27:48 +0000 (26 18:27 +0100)]
Update German scripts translation

Update to 609t.

2 years agoDpkg::Source::Package::V3::Native: Do not say v1.0 for 3.0 formats
Guillem Jover [Tue, 5 Nov 2019 11:59:17 +0000 (5 12:59 +0100)]
Dpkg::Source::Package::V3::Native: Do not say v1.0 for 3.0 formats

2 years agoDpkg::Changelog: Clarify inheritance and implementation references
Guillem Jover [Tue, 5 Nov 2019 11:57:13 +0000 (5 12:57 +0100)]
Dpkg::Changelog: Clarify inheritance and implementation references

Make it clear that these classes inherit from some other base class,
which will contain the missing documentation.

Prompted-by: intrigeri <intrigeri@debian.org>
2 years agoDpkg: Say class instead of object when appropriate
Guillem Jover [Wed, 6 Nov 2019 01:07:17 +0000 (6 02:07 +0100)]
Dpkg: Say class instead of object when appropriate

These were referring to the type and not the instance, which makes
using the incorrect nomenclature confusing.

2 years agoDpkg::Exit: Register exit handlers also for __DIE__
Guillem Jover [Sat, 5 Oct 2019 02:28:30 +0000 (5 04:28 +0200)]
Dpkg::Exit: Register exit handlers also for __DIE__

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.

2 years agoDpkg::Exit: Unregister all signal handlers once we have executed them
Guillem Jover [Sat, 5 Oct 2019 02:26:23 +0000 (5 04:26 +0200)]
Dpkg::Exit: Unregister all signal handlers once we have executed them

We should cleanup the handlers to the previous state otherwise we
end up changing the behavior globally, when this should be a local
cleanup behavior.

Closes: #932841

2 years agodpkg-source: Remove backwards compatibility code for legacy build-profiles
Guillem Jover [Wed, 6 Nov 2019 23:01:46 +0000 (7 00:01 +0100)]
dpkg-source: Remove backwards compatibility code for legacy build-profiles

2 years agoDpkg::Vendor: Remove obsolete 'keyrings' hook
Guillem Jover [Fri, 15 Nov 2019 23:41:57 +0000 (16 00:41 +0100)]
Dpkg::Vendor: Remove obsolete 'keyrings' hook

This hook has been obsoleted for a while and been emitting deprecation
warnings, so it's safe to remove now.

2 years agoDpkg::Conf: Remove obsolete methods and obsolete croak for method option
Guillem Jover [Fri, 15 Nov 2019 23:40:03 +0000 (16 00:40 +0100)]
Dpkg::Conf: Remove obsolete methods and obsolete croak for method option

We do not bump the module version to 2.00, as these functions and option
have croak'ed almost since their introduction.

2 years agoDpkg::Checksums: Remove obsolete 'program' property warning
Guillem Jover [Fri, 15 Nov 2019 23:38:37 +0000 (16 00:38 +0100)]
Dpkg::Checksums: Remove obsolete 'program' property warning

2 years agoDpkg::Version: Remove deprecation warning from semantic change in bool overload
Guillem Jover [Fri, 15 Nov 2019 23:37:17 +0000 (16 00:37 +0100)]
Dpkg::Version: Remove deprecation warning from semantic change in bool overload

2 years agoDpkg::Index: Change default value for unique_tuple_key to 1
Guillem Jover [Fri, 15 Nov 2019 23:33:52 +0000 (16 00:33 +0100)]
Dpkg::Index: Change default value for unique_tuple_key to 1

Bump module version to 2.00.

2 years agoDpkg::Substvars: Remove obsolete no_warn() method
Guillem Jover [Fri, 15 Nov 2019 23:32:44 +0000 (16 00:32 +0100)]
Dpkg::Substvars: Remove obsolete no_warn() method

Bump module version to 2.00.

2 years agoDpkg::Source::Package: Remove and hide internal lowercase variables
Guillem Jover [Fri, 15 Nov 2019 23:32:09 +0000 (16 00:32 +0100)]
Dpkg::Source::Package: Remove and hide internal lowercase variables

Bump module version to 2.00.

2 years agoDpkg::Gettext: Remove obsolete _g() function
Guillem Jover [Fri, 15 Nov 2019 23:31:07 +0000 (16 00:31 +0100)]
Dpkg::Gettext: Remove obsolete _g() function

Bump module version to 2.00.

2 years agoDpkg::Exit: Hide internal lowercase @handlers variable
Guillem Jover [Fri, 15 Nov 2019 23:30:40 +0000 (16 00:30 +0100)]
Dpkg::Exit: Hide internal lowercase @handlers variable

Bump module version to 2.00.

2 years agoDpkg::Deps::KnownFacts: Remove obsolete check_package() method
Guillem Jover [Fri, 15 Nov 2019 23:30:04 +0000 (16 00:30 +0100)]
Dpkg::Deps::KnownFacts: Remove obsolete check_package() method

Bump module version to 2.00.

2 years agoDpkg::Compression: Hide internal lowercase variables
Guillem Jover [Fri, 15 Nov 2019 23:29:13 +0000 (16 00:29 +0100)]
Dpkg::Compression: Hide internal lowercase variables

Bump module version to 2.00.

2 years agoDpkg::Changelog::Parse: Remove warnings for obsolete options and functions
Guillem Jover [Sat, 10 Aug 2019 00:51:10 +0000 (10 02:51 +0200)]
Dpkg::Changelog::Parse: Remove warnings for obsolete options and functions

Remove warnings for obsolete options forceplugin and libdir. Remove
obsolete functions changelog_parse_debian() and changelog_parse_plugin().

Bump module version to 2.00.

2 years agoDpkg::Changelog::Parse: Remove $ sigil from option names in POD
Guillem Jover [Fri, 15 Nov 2019 23:25:33 +0000 (16 00:25 +0100)]
Dpkg::Changelog::Parse: Remove $ sigil from option names in POD

These are not actual variables, but option passed in a hash, so using
the $ sigil here is very confusing.

2 years agoDpkg::Changelog::Entry::Debian: Remove obsolete methods and hide variables
Guillem Jover [Sat, 10 Aug 2019 00:51:10 +0000 (10 02:51 +0200)]
Dpkg::Changelog::Entry::Debian: Remove obsolete methods and hide variables

Remove obsolete methods check_header() and check_trailer(). Hide internal
lowercase variables $regex_header and $regex_trailer.

Bump module version to 2.00.

2 years agoDpkg::Changelog: Remove obsolete methods dpkg() and rfc822()
Guillem Jover [Sat, 10 Aug 2019 00:51:10 +0000 (10 02:51 +0200)]
Dpkg::Changelog: Remove obsolete methods dpkg() and rfc822()

Bump module version to 2.00.

2 years agoDpkg: Remove internal lowercase variables
Guillem Jover [Sat, 10 Aug 2019 00:51:10 +0000 (10 02:51 +0200)]
Dpkg: Remove internal lowercase variables

Bump module version to 2.00.

2 years agoDpkg::Deps: Check for valid virtual package version relations
Guillem Jover [Sun, 3 Nov 2019 16:36:02 +0000 (3 17:36 +0100)]
Dpkg::Deps: Check for valid virtual package version relations

Do not allow non-equal version relations in virtual provides.

Closes: #930317

2 years agoDpkg::Vendor::Debian: Do not set -Werror=implicit-function-declaration for C++
Guillem Jover [Sun, 3 Nov 2019 15:29:05 +0000 (3 16:29 +0100)]
Dpkg::Vendor::Debian: Do not set -Werror=implicit-function-declaration for C++

Closes: #939969

2 years agoDpkg::Vendor::Debian: Only scan /usr/local/ directories that exist
Guillem Jover [Sun, 3 Nov 2019 00:34:29 +0000 (3 01:34 +0100)]
Dpkg::Vendor::Debian: Only scan /usr/local/ directories that exist

Closes: #932967

2 years agoman: Move template symbol documentation into new deb-src-symbols(5)
Guillem Jover [Sat, 5 Oct 2019 03:01:59 +0000 (5 05:01 +0200)]
man: Move template symbol documentation into new deb-src-symbols(5)

Having the template symbols file format described in the dpkg-gensymbols
has been a continuous source of confusion for users, and makes
discovering it more difficult. Move it to its own man page, and link to
it from the various relevant man pages.

2 years agoman: Describe the SONAME formats supported in deb-shlibs
Guillem Jover [Fri, 4 Oct 2019 03:36:42 +0000 (4 05:36 +0200)]
man: Describe the SONAME formats supported in deb-shlibs

2 years agodselect: Remove methods state files on purge
Guillem Jover [Sun, 3 Nov 2019 00:12:49 +0000 (3 01:12 +0100)]
dselect: Remove methods state files on purge

Ref: #930788
Spotted-by: Sven Joachim <svenjoac@gmx.de>
2 years agodpkg: Use DPKG_ADMINDIR to set the admindir
Guillem Jover [Tue, 5 Nov 2019 01:55:04 +0000 (5 02:55 +0100)]
dpkg: Use DPKG_ADMINDIR to set the admindir

This was done in the name of security, but it does not make much sense
as root should make sure to be running in a clean environment. This is
problematic as it makes the interface hard to understand, and produces
unexpected behavior as dpkg can be called from within itself, or as a
wrapper for dpkg-query, which will then not inherit the admindir value.

Closes: #900071

2 years agodpkg: Fix and clarify behavior for packages marked to be on “hold”
Guillem Jover [Sun, 3 Nov 2019 00:08:21 +0000 (3 01:08 +0100)]
dpkg: Fix and clarify behavior for packages marked to be on “hold”

A package marked to be on hold, denotes that the package should be kept
in its current version and should not be automatically installed, upgraded
or removed. The same applies to frontends. This behavior does not apply
when the user explicitly requested one of these actions, or the
--force-hold option is used.

It should never prevent dpkg from processing these for configuration (if
they were already in unpacked state) or from trigger processing, otherwise
we might get into trigger loops. Some of the code was already doing this,
but this was not consistently done. We update also the help output and
documentation to clarify the fixed behavior.

Closes: #926472

2 years agodpkg-gencontrol: Take hardlinks into account when computing Installed-Size
Sven Joachim [Sat, 2 Nov 2019 23:18:19 +0000 (3 00:18 +0100)]
dpkg-gencontrol: Take hardlinks into account when computing Installed-Size

We should not add up the size of each hardlink into the final sum,
otherwise we will get a size in excess.

Closes: #923475
Co-Authored-by: Guillem Jover <guillem@debian.org>
Signed-off-by: Guillem Jover <guillem@debian.org>
2 years agodpkg-query: Try to use the description from the available file if not installed
Guillem Jover [Mon, 4 Mar 2019 22:00:18 +0000 (4 23:00 +0100)]
dpkg-query: Try to use the description from the available file if not installed

When we have been requested to load the available file, and that
contains a description for a package that is not installed, we should
use that instead of printing the confusing string stating that the
description is not available.

Closes: #43573

2 years agolibdpkg: Add missing symbols to the version map
Guillem Jover [Sat, 2 Nov 2019 23:00:18 +0000 (3 00:00 +0100)]
libdpkg: Add missing symbols to the version map

Several of these are used by the test suite.

2 years agodebian: Replace custom rule for 'configure' with call to dh_autoreconf
Dan Streetman [Sat, 2 Nov 2019 23:27:00 +0000 (3 00:27 +0100)]
debian: Replace custom rule for 'configure' with call to dh_autoreconf

Having this custom rule to create the «configure» file means that it
might end up not being rebuilt if the timestamps of some other files
are off compared to the debian/changelog date. Using dh_autoreconf
guarantees that even if these timestamps got updated incorrectly,
the file will always be rebuilt as expected.

The historic rationale for not doing this before, even though this has
been considered a best packaging practice, was that because dpkg needs
explicit support for new architectures, which is the main reason to
get autotools updated to pull in new config.* files, we would get
reports so that we could add such support and release a new upstream
version. But this has never happened, and it's causing other problems.

Closes: #939516
Signed-off-by: Guillem Jover <guillem@debian.org>
2 years agopo: Fix typo in Simplified Chinese programs translation
Mo Zhou [Sun, 3 Nov 2019 18:07:24 +0000 (3 19:07 +0100)]
po: Fix typo in Simplified Chinese programs translation

Closes: #942195
Signed-off-by: Guillem Jover <guillem@debian.org>
2 years agopo: Update Portuguese programs translation
Miguel Figueiredo [Sun, 3 Nov 2019 18:06:04 +0000 (3 19:06 +0100)]
po: Update Portuguese programs translation

Closes: #935695
Signed-off-by: Guillem Jover <guillem@debian.org>
2 years agoGerman dpkg translation update
Sven Joachim [Tue, 5 Nov 2019 20:00:37 +0000 (5 21:00 +0100)]
German dpkg translation update

Update to 1135t.

2 years agoFix a typo
Helge Kreutzmann [Fri, 1 Nov 2019 06:19:29 +0000 (1 07:19 +0100)]
Fix a typo

2 years agoUpdate German translation of manual pages
Helge Kreutzmann [Fri, 1 Nov 2019 05:51:07 +0000 (1 06:51 +0100)]
Update German translation of manual pages

Update to 3000t.

2 years agoUpdate German scripts translation
Helge Kreutzmann [Fri, 1 Nov 2019 05:12:46 +0000 (1 06:12 +0100)]
Update German scripts translation

Update to 608t.

2 years agodpkg, u-a: Make variables static
Guillem Jover [Mon, 7 Oct 2019 01:55:19 +0000 (7 03:55 +0200)]
dpkg, u-a: Make variables static

Warned-by: sparse
2 years agotest: Suppress new bogus cppcheck 1.89 false positives
Guillem Jover [Wed, 2 Oct 2019 02:17:05 +0000 (2 04:17 +0200)]
test: Suppress new bogus cppcheck 1.89 false positives

Warned-by: cppcheck
2 years agodpkg: Remove redudant condition for sourcefile in updateavailable()
Guillem Jover [Wed, 2 Oct 2019 02:15:24 +0000 (2 04:15 +0200)]
dpkg: Remove redudant condition for sourcefile in updateavailable()

The preceding “if” already checks exclusively whether this variable
is NULL, so in this branch it will always be non-NULL.

Warned-by: cppcheck
Fixes: knownConditionTrueFalse

2 years agolibdpkg: Use p instead of name in dpkg_arch_name_is_illegal()
Guillem Jover [Wed, 2 Oct 2019 02:13:19 +0000 (2 04:13 +0200)]
libdpkg: Use p instead of name in dpkg_arch_name_is_illegal()

We assign name to p, which we operate on everywhere in this function
except for the first check which we still perform on name. This confuses
at least cppcheck, and it's in any case inconsistent.

Warned-by: cppcheck
Fixes: nullPointerRedundantCheck

2 years agodselect: Make baselist::draw_column_*() col arguments const
Guillem Jover [Wed, 2 Oct 2019 02:04:59 +0000 (2 04:04 +0200)]
dselect: Make baselist::draw_column_*() col arguments const

Warned-by: cppcheck
Fixes: constParameter

2 years agoman: Split dselect(1) --color from --colour option items
Guillem Jover [Mon, 30 Sep 2019 02:36:24 +0000 (30 04:36 +0200)]
man: Split dselect(1) --color from --colour option items

These become too long to fit in a 80-char terminal for many
translations, so let's split them, as we do anyway for the preferred
formatting to avoid the mandb warning.

2 years agoman: Globally adjust left and disable hyphenation
Guillem Jover [Mon, 30 Sep 2019 02:08:22 +0000 (30 04:08 +0200)]
man: Globally adjust left and disable hyphenation

These were being applied in the SEE ALSO section, but not consistently.
The output is more clear this way.

2 years agobuild: Bump minimal gettext version to 0.19.8
Guillem Jover [Thu, 26 Sep 2019 01:45:43 +0000 (26 03:45 +0200)]
build: Bump minimal gettext version to 0.19.8

The GNU gettext macros used to check for symbols that were only provided
by the GNU gettext implementation, but not by other implementations such
as the one in musl.

Starting with GNU gettext 0.19.8 these internal symbols are not required
anymore.

2 years agotest: Update stopwords for codespell 1.16.0
Guillem Jover [Sun, 15 Sep 2019 15:22:42 +0000 (15 17:22 +0200)]
test: Update stopwords for codespell 1.16.0

2 years agotest: Skip build directories from codespell
Guillem Jover [Sun, 15 Sep 2019 15:21:42 +0000 (15 17:21 +0200)]
test: Skip build directories from codespell

These contain files that are not currently skept, and might contain
spelling errors from external sources.

Warned-by: codespell
2 years agotest: Fix typos
Guillem Jover [Sun, 15 Sep 2019 15:20:18 +0000 (15 17:20 +0200)]
test: Fix typos

Warned-by: codespell
2 years agolibdpkg, dpkg: Use new versiondescribe_c() for non-localizable call sites
Guillem Jover [Mon, 2 Sep 2019 11:03:31 +0000 (2 13:03 +0200)]
libdpkg, dpkg: Use new versiondescribe_c() for non-localizable call sites

The output on log files must not be localized.

Reported-by: Julien Cristau <jcristau@debian.org>
2 years agolibdpkg: Add new versiondescribe_c() to force a C locale
Guillem Jover [Mon, 2 Sep 2019 11:00:40 +0000 (2 13:00 +0200)]
libdpkg: Add new versiondescribe_c() to force a C locale

In some contexts we need output in the C locale, such as log files.
We add a new versiondescribe_c() that wraps the locale-dependant
versiondescribe() function and switches to the C locale and back
to the previous one before returning.

2 years agolibdpkg: Add new C locale switch over support
Guillem Jover [Mon, 2 Sep 2019 11:00:40 +0000 (2 13:00 +0200)]
libdpkg: Add new C locale switch over support

This will make it possible to select either the current locale or a
specified one, currently only C is selectable.

We use this because the uselocale(3) POSIX API is recent, and the system
might not have it available, so we might need to fallback to use
setlocale(3) instead, which even though is not thread-safe, it's better
than nothing.

2 years agodebian: Remove obsolete Breaks satisfied since oldstable
Guillem Jover [Mon, 2 Sep 2019 02:11:36 +0000 (2 04:11 +0200)]
debian: Remove obsolete Breaks satisfied since oldstable

2 years agoscripts: Match ~deb also as a backport marker in versions
Guillem Jover [Sat, 28 Sep 2019 21:02:07 +0000 (28 23:02 +0200)]
scripts: Match ~deb also as a backport marker in versions

Closes: #934980

2 years agoscripts: Remove support for ~vola versioning
Guillem Jover [Thu, 29 Aug 2019 00:22:21 +0000 (29 02:22 +0200)]
scripts: Remove support for ~vola versioning

This was part of the volatile.debian.org archive, which was
decommissioned some time ago.

Ref: https://lists.debian.org/debian-volatile-announce/2012/msg00000.html

2 years agodpkg: Initialize flagdeppossi in check_conflict()
Guillem Jover [Wed, 28 Aug 2019 23:34:19 +0000 (29 01:34 +0200)]
dpkg: Initialize flagdeppossi in check_conflict()

We only use this variable as a sentinel pointer so that we can make
sure the pdep pointer is not NULL in subsequent checks. But cppcheck
gets confused, so let's initialize it to make the code more
future-proof.

Warned-by: cppcheck
2 years agodpkg-deb: Fold two adjacent if conditionals into a single one
Guillem Jover [Wed, 28 Aug 2019 23:33:14 +0000 (29 01:33 +0200)]
dpkg-deb: Fold two adjacent if conditionals into a single one

Warned-by: cppcheck
2 years agodselect: Reduce scope of variable
Guillem Jover [Wed, 28 Aug 2019 23:35:57 +0000 (29 01:35 +0200)]
dselect: Reduce scope of variable

The variable was being assigned in one side of an if branch, but the
result never used. Let's reduce the scope to the if branch that actually
assigns and uses it.

Warned-by: cppcheck
2 years agolibdpkg: Use the totalwritten variable for a consistency check
Guillem Jover [Wed, 28 Aug 2019 23:33:41 +0000 (29 01:33 +0200)]
libdpkg: Use the totalwritten variable for a consistency check

The variable was written to but never used.

Warned-by: cppcheck
2 years agolibdpkg: Use the variable instead of a type as sizeof() argument
Guillem Jover [Wed, 28 Aug 2019 23:32:15 +0000 (29 01:32 +0200)]
libdpkg: Use the variable instead of a type as sizeof() argument

This is more future proof, and in this particular case it was tripping
over cppcheck and emitting a false positive for constArgument.

Warned-by: cppcheck
2 years agotest: Clarify cppcheck va_list_usedBeforeStarted suppression
Guillem Jover [Wed, 28 Aug 2019 23:30:47 +0000 (29 01:30 +0200)]
test: Clarify cppcheck va_list_usedBeforeStarted suppression

This is actually due to our local va_copy() compatibility code, which
cppcheck does not understand. Using the same code w/o the local macro
does not emit the false positive.

2 years agotest: Remove perlcritic Documentation::RequirePodLinksIncludeText suppression
Guillem Jover [Wed, 28 Aug 2019 23:29:53 +0000 (29 01:29 +0200)]
test: Remove perlcritic Documentation::RequirePodLinksIncludeText suppression

This bogus test has been removed from upstream perlcritic, and now the
code complains about an uninstalled check.

Warned-by: perlcritic
2 years agoDpkg::Changelog: Document methods provided by subclasses
Guillem Jover [Fri, 9 Aug 2019 02:30:42 +0000 (9 04:30 +0200)]
Dpkg::Changelog: Document methods provided by subclasses

Reported-by: Felix Lechner <felix.lechner@lease-up.com>
2 years agoDpkg::Source::Package::V2: Emit a special patch header on single-debian-patch
Guillem Jover [Tue, 30 Jul 2019 02:57:47 +0000 (30 04:57 +0200)]
Dpkg::Source::Package::V2: Emit a special patch header on single-debian-patch

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

2 years agoDpkg::BuildFlags: Add new unset() method
Guillem Jover [Tue, 30 Jul 2019 02:45:57 +0000 (30 04:45 +0200)]
Dpkg::BuildFlags: Add new unset() method

This makes it possible to unset variables, so that they do not get
output by the various tools.

Requested-by: Daniel Schepler <dschepler@gmail.com>
2 years agoDpkg::BuildFlags: Remove unused hash keys
Guillem Jover [Tue, 30 Jul 2019 02:45:36 +0000 (30 04:45 +0200)]
Dpkg::BuildFlags: Remove unused hash keys

2 years agodpkg-shlibdeps: Document split_soname() function
Guillem Jover [Fri, 28 Jun 2019 00:54:32 +0000 (28 02:54 +0200)]
dpkg-shlibdeps: Document split_soname() function

Explain what each different pattern means, and what it maps to.

Prompted-by: Christopher Crim <christopher.crim@quoininc.com>
2 years agoman: Clarify that the pager is called via «$SHELL -c»
Guillem Jover [Fri, 28 Jun 2019 00:18:07 +0000 (28 02:18 +0200)]
man: Clarify that the pager is called via «$SHELL -c»

2 years agoman: Use a minus sign for a literal string
Guillem Jover [Fri, 28 Jun 2019 00:10:36 +0000 (28 02:10 +0200)]
man: Use a minus sign for a literal string

2 years agolibdpkg: Clarify lock contender error message
Guillem Jover [Sat, 22 Jun 2019 23:04:22 +0000 (23 01:04 +0200)]
libdpkg: Clarify lock contender error message

Print the PID of the lock contender, switch the tense to past as the lock
might not be locked anymore by the time we finish, and add a warning
explaining that removing the lock file is never the correct solution.

2 years agobuild: Install m4 files into system aclocal directory
Guillem Jover [Tue, 16 Jul 2019 00:34:35 +0000 (16 02:34 +0200)]
build: Install m4 files into system aclocal directory

This makes it possible to publish these files so that other dpkg-related
projects can use them, instead of either embedding copies, or
duplicating the macros.

2 years agobuild: Add a serial versioning to the m4 files
Guillem Jover [Tue, 16 Jul 2019 00:34:35 +0000 (16 02:34 +0200)]
build: Add a serial versioning to the m4 files

aclocal uses this to determine whether it needs to update m4 files in
local trees.

2 years agoDpkg::Source::Package: Verify original tarball signatures at build time
Guillem Jover [Wed, 1 May 2019 21:23:03 +0000 (1 23:23 +0200)]
Dpkg::Source::Package: Verify original tarball signatures at build time

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.

2 years agoDpkg::OpenPGP: Add support for importing an OpenPGP key into a keyring
Guillem Jover [Wed, 1 May 2019 21:23:03 +0000 (1 23:23 +0200)]
Dpkg::OpenPGP: Add support for importing an OpenPGP key into a keyring

This is needed, for example, to verify original tarball signatures.

2 years agoDpkg::OpenPGP: Make it possible to verify detached signatures
Guillem Jover [Sat, 31 Aug 2019 01:55:10 +0000 (31 03:55 +0200)]
Dpkg::OpenPGP: Make it possible to verify detached signatures

This is required to be able to verify original upstream tarball
signatures, as they are expected to be ASCII armored detached
signatures for the upstream tarballs.

2 years agoDpkg::OpenPGP: Refactor signature verification into a new function
Guillem Jover [Wed, 1 May 2019 21:20:38 +0000 (1 23:20 +0200)]
Dpkg::OpenPGP: Refactor signature verification into a new function

2 years agoperl: Use File::Copy instead of spawning mv/cp commands
Guillem Jover [Wed, 1 May 2019 21:19:17 +0000 (1 23:19 +0200)]
perl: Use File::Copy instead of spawning mv/cp commands

We use cp() in Dpkg::Source::Package to preserve the file attributes,
but just move() in dpkg-buildpackage where it does not matter.

2 years agoDpkg::Source::Package: Refactor original tarball handling
Guillem Jover [Wed, 1 May 2019 21:18:34 +0000 (1 23:18 +0200)]
Dpkg::Source::Package: Refactor original tarball handling

2 years agoscripts: Remove support for versioned GnuPG 2 program and packages
Guillem Jover [Thu, 2 May 2019 00:58:32 +0000 (2 02:58 +0200)]
scripts: Remove support for versioned GnuPG 2 program and packages

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.

2 years agodpkg-shlibdeps: Add support for new Build-Depends-Packages
Guillem Jover [Mon, 22 Apr 2019 23:18:05 +0000 (23 01:18 +0200)]
dpkg-shlibdeps: Add support for new Build-Depends-Packages

This makes it possible to specify more than one package, which might be
needed during transition periods for example.

Closes: #926669
Based-on-patch-by: Frank Schaefer <kelledin@gmail.com>
2 years agodpkg: Do not clear selections for unknown packages
Guillem Jover [Mon, 22 Apr 2019 22:42:20 +0000 (23 00:42 +0200)]
dpkg: Do not clear selections for unknown packages

We should not clear the selections for packages that are not already
installed in the system, as they will end up disappearing on the next
operation anyway.

Closes: #927752

2 years agodpkg-genbuildinfo: Do not include irrelevant packages in the Binary field
Guillem Jover [Thu, 21 Mar 2019 02:11:57 +0000 (21 03:11 +0100)]
dpkg-genbuildinfo: Do not include irrelevant packages in the Binary field

This change is the companion to the one in dpkg-genchanges that lists
only relevant packages, instead of all the ones listed in debian/control,
but for the .buildinfo file instead of the .changes file.

2 years agoscripts/mk: Add support for nostrip DEB_BUILD_OPTIONS when setting STRIP
Guillem Jover [Sun, 2 Jun 2019 21:13:02 +0000 (2 23:13 +0200)]
scripts/mk: Add support for nostrip DEB_BUILD_OPTIONS when setting STRIP

2 years agoman: Fix uncommon wording constructs
Guillem Jover [Thu, 23 May 2019 20:04:56 +0000 (23 22:04 +0200)]
man: Fix uncommon wording constructs

Warned-by: codespell
2 years agodpkg-buildpackage: Remove transient backwards R³ compat code
Guillem Jover [Sat, 18 May 2019 23:48:17 +0000 (19 01:48 +0200)]
dpkg-buildpackage: Remove transient backwards R³ compat code

This code got deprecated before the spec had been finalized, but left in
just to make sure no remaining implementations were still using it.

2 years agoscripts: Switch Getopt::Long from bundling to bundling_values
Guillem Jover [Wed, 27 Mar 2019 02:12:04 +0000 (27 03:12 +0100)]
scripts: Switch Getopt::Long from bundling to bundling_values

This got introduced after a request so that we could switch our tools
to a safe subset of the bundling logic, so let's enable it now that it
is available in the minimum supported perl version.

Bundling is in general unsafe, and not future-proof, as new options
might gain arguments which would then get misinterpreted, we should
not really be using it. But bundling the value into the option is a
common pattern and should be allowed.

2 years agobuild: Bump minimal Perl version to 5.24.1
Guillem Jover [Wed, 27 Mar 2019 02:06:25 +0000 (27 03:06 +0100)]
build: Bump minimal Perl version to 5.24.1

The Perl version in Debian stretch is 5.24.1, which is the release that
will be oldstable once 1.20.x gets uploaded to Debian unstable.

2 years agolibdpkg: Do not generate a backup file for the available database
Guillem Jover [Sat, 2 Mar 2019 17:13:14 +0000 (2 18:13 +0100)]
libdpkg: Do not generate a backup file for the available database

This file contains information only valid as long as the downloaded
sources are also available. So it is closer to a cache than a database,
and as such, there is no need for an uncompressed backup, which can
take quite some space.

Closes: #343578

2 years agodebian: Fold man page translation fix into translation section
Guillem Jover [Tue, 3 Sep 2019 23:57:11 +0000 (4 01:57 +0200)]
debian: Fold man page translation fix into translation section

2 years agoFurther fix as discussed in #931135
Helge Kreutzmann [Sun, 1 Sep 2019 10:01:53 +0000 (1 12:01 +0200)]
Further fix as discussed in #931135

And in follow up on debian-l10n-german

2 years agoUpdate German translation of manual pages
Helge Kreutzmann [Sat, 3 Aug 2019 15:04:31 +0000 (3 17:04 +0200)]
Update German translation of manual pages

Update to 2998t.

Improvements from debian-l10n-german

2 years agoFix German man page translation. Closes: #931135
Helge Kreutzmann [Wed, 31 Jul 2019 19:16:11 +0000 (31 21:16 +0200)]
Fix German man page translation. Closes: #931135

3 years agoBump version to 1.20.0
Guillem Jover [Fri, 7 Jun 2019 16:01:47 +0000 (7 18:01 +0200)]
Bump version to 1.20.0