Guillem Jover [Thu, 20 Nov 2008 17:13:09 +0000 (20 19:13 +0200)]
Add a new real parsed Tag field
Guillem Jover [Wed, 14 May 2014 02:16:57 +0000 (14 04:16 +0200)]
Dpkg::Source::Quilt: Refactor register() and unregister() methods
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.
Guillem Jover [Sat, 17 May 2014 01:34:04 +0000 (17 03:34 +0200)]
Dpkg::Source::Package::V3::Quilt: Handle series files with no final newline
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
Guillem Jover [Sat, 17 May 2014 01:33:04 +0000 (17 03:33 +0200)]
Dpkg::Source::Package::V3::Quilt: Refactor _load_file()
Guillem Jover [Wed, 14 May 2014 02:00:41 +0000 (14 04:00 +0200)]
Dpkg::Source::Quilt: Rename write_db() to save_db()
This is the normal counterpart to load actions.
Guillem Jover [Wed, 14 May 2014 01:56:51 +0000 (14 03:56 +0200)]
Dpkg::Source::Quilt: Refactor write_patch_list()
Guillem Jover [Fri, 16 May 2014 23:14:32 +0000 (17 01:14 +0200)]
Dpkg::Source::Quilt: Add minimal test case
Guillem Jover [Thu, 15 May 2014 02:08:44 +0000 (15 04:08 +0200)]
Dpkg::Deps::Multiple: Add profile_is_concerned() and reduce_profiles() methods
These got missed in commit
7662e0937bb064a0754d12605d80a96a17e2aadf.
The current dpkg code is not using those methods, but external programs
might need them.
Guillem Jover [Thu, 15 May 2014 02:07:59 +0000 (15 04:07 +0200)]
Dpkg::Deps: Add test cases for OR relationships
Guillem Jover [Thu, 15 May 2014 04:22:33 +0000 (15 06:22 +0200)]
Dpkg: Update and fix CHANGES POD sections
Do not use actual POD =item, just normal paragraphs. Split items in
different paragraphs. Sort versions in decreasing order. Document
missing changes in public interfaces. Qualify methods with the
variable.
Guillem Jover [Thu, 15 May 2014 04:26:22 +0000 (15 06:26 +0200)]
Dpkg::Deps: Bump VERSION to 1.03
This was missed in commit
e8950d7e2d4a58f96c74782825e2edf7ceb583ca.
Guillem Jover [Thu, 15 May 2014 04:09:50 +0000 (15 06:09 +0200)]
Dpkg::Path: Bump VERSION to 1.03
This was missed in commit
eb4bb268ab954748d015626a216f46f632f2371a.
Guillem Jover [Wed, 14 May 2014 00:53:55 +0000 (14 02:53 +0200)]
dpkg-buildpackage: Add support for automatic parallel jobs selection
This adds support to automatically set the number of jobs to be used by
the build process to match the number of online processors, with the new
-j argument «auto».
It will try to infer the number of processors from getconf(1), but the
system might not support the configuration variable, in which case it
will fallback to not having any limit when passing the -j option to
make.
Guillem Jover [Tue, 13 May 2014 21:57:59 +0000 (13 23:57 +0200)]
dpkg-buildpackage(1): Document that the -j argument is optional
This was clear from the --help output, but not from the man page.
Guillem Jover [Wed, 14 May 2014 02:40:35 +0000 (14 04:40 +0200)]
dpkg-gensymbols(1): Improve symbols file maintenance documentation
Add notes about checking for backwards compatibility.
Closes: #746973
Based-on-patch-by: "Bernhard R. Link" <brlink@debian.org>
Guillem Jover [Thu, 8 May 2014 16:23:51 +0000 (8 18:23 +0200)]
dpkg-deb(1): Mention deprecation of bzip2 and lzma compressors
Guillem Jover [Thu, 8 May 2014 16:20:34 +0000 (8 18:20 +0200)]
deb(5): Change control.tar.gz reference to simply control.tar
Guillem Jover [Mon, 5 May 2014 04:31:37 +0000 (5 06:31 +0200)]
deb-src-control(5): Expand Vcs-* into each supported field
This makes it easier to search for the fields in the man page.
Guillem Jover [Mon, 12 May 2014 18:24:41 +0000 (12 20:24 +0200)]
man: Remove spurious trailing space from msgstr
This makes po4a emit a warning.
Guillem Jover [Mon, 5 May 2014 23:32:17 +0000 (6 01:32 +0200)]
man: Attempt to clarify and improve wording of some strange constructs
Reported-by: Helge Kreutzmann
Helge Kreutzmann [Mon, 5 May 2014 23:32:17 +0000 (6 01:32 +0200)]
man: Fix typo
Signed-off-by: Guillem Jover <guillem@debian.org>
Guillem Jover [Mon, 5 May 2014 23:33:17 +0000 (6 01:33 +0200)]
perl: Fix unused capture groups false positives
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
Guillem Jover [Thu, 3 Jan 2013 02:46:39 +0000 (3 03:46 +0100)]
scripts: Switch unused capturing groups to non-capturing ones
These have better runtime performance, not that it matters in many of
the instances here though.
Addresses RegularExpressions::ProhibitUnusedCapture.
Warned-by: perlcritic
Guillem Jover [Mon, 5 May 2014 01:17:41 +0000 (5 03:17 +0200)]
scripts: Use character classes instead of single character alternations
Fixes RegularExpressions::ProhibitSingleCharAlternation.
Warned-by: perlcritic
Guillem Jover [Sun, 4 May 2014 14:25:21 +0000 (4 16:25 +0200)]
scripts: Add template test cases for most modules
This at least tests if the module in question can be use'ed correctly,
and gives a more realistic code coverage report.
The remaining modules should be covered by one of their parents.
Guillem Jover [Fri, 4 Apr 2014 19:59:10 +0000 (4 21:59 +0200)]
perl: Do not use global match variables
Fixes Variables::ProhibitMatchVars.
Warned-by: perlcritic
Guillem Jover [Thu, 3 Jan 2013 01:30:23 +0000 (3 02:30 +0100)]
test: Add labels to Test::More tests
Fixes TestingAndDebugging::RequireTestLabels.
Warned-by: perlcritic
Guillem Jover [Thu, 8 May 2014 17:05:58 +0000 (8 19:05 +0200)]
dpkg-maintscript-helper: Print only once that we are moving a conffile
Move the printing to the final phase, and skip the intermediate message
that we are moving the file aside for later processing. This information
is redundant and really unnecessary. It also does not match the other
actions in the script.
Closes: #747370
Guillem Jover [Tue, 22 Apr 2014 06:24:44 +0000 (22 08:24 +0200)]
dpkg-buildpackage: Move code inside s///eg into a function
By using a closure, we makes the code more clear.
Guillem Jover [Sun, 11 May 2014 03:28:43 +0000 (11 05:28 +0200)]
dpkg-architecture: Move -L argument to the Commands --help output section
The -L argument is not an option, it's a full blown command.
Guillem Jover [Wed, 30 Apr 2014 19:48:23 +0000 (30 21:48 +0200)]
dpkg: Switch an assert() on a volatile variable to an internerr()
The assert() has a side-effect as the variable is volatile, switch it
to an internerr() so that we always get the same result regardless of
the build settings, NDEBUG in this case.
Warned-by: coverity
Guillem Jover [Wed, 14 May 2014 02:27:31 +0000 (14 04:27 +0200)]
s-s-d: Cope with bogus OpenVZ kernels that prepend the " (deleted)" marker
There are OpenVZ Linux kernels that instead of appending, prepend the
deleted marker, making the exec check fail to match. Add a workaround
so that those systems do not get affected.
This will still be affecting any other userland tool that checks the
/proc/PID/exe symlink, and might end up helping this behaviour to get
entrenched, but better this than the getting strange system failures.
Closes: #731530
Guillem Jover [Wed, 30 Apr 2014 20:17:33 +0000 (30 22:17 +0200)]
u-a: Switch from alternative_has_choice() to checking if fs is NULL
We are performing the same search twice, let's just reuse the fs pointer
to decide if we have found the choice.
This was confusing coverity, and making it think that
alternative_has_broken_slave() could get fs with a NULL value.
Warned-by: coverity
Guillem Jover [Sat, 3 May 2014 01:48:01 +0000 (3 03:48 +0200)]
u-a: Fix TOCTOU race in rename_mv()
This does not have any security implications, but it makes the code
more robust.
Warned-by: coverity
Guillem Jover [Sat, 3 May 2014 01:39:02 +0000 (3 03:39 +0200)]
u-a: Fix TOCTOU race when loading an alternative
This does not have any security implications, but it makes the code
more robust.
Warned-by: coverity
Guillem Jover [Sat, 3 May 2014 01:59:54 +0000 (3 03:59 +0200)]
libdpkg: Fix TOCTOU race in triggers database loading
This is not security sensitive.
Warned-by: coverity
Guillem Jover [Thu, 1 May 2014 02:04:42 +0000 (1 04:04 +0200)]
libdpkg: Improve branch coverage for string module
Guillem Jover [Wed, 30 Apr 2014 20:32:15 +0000 (30 22:32 +0200)]
libdpkg: Fix memory leaks in buffer_copy() on error conditions
Check for errors from subfunctions and break out of the loop to be able
to release resources. Check also for unexpected EOF only after freeing
resources, so that we don't end up leaking them.
Warned-by: coverity
Guillem Jover [Sun, 11 May 2014 06:11:22 +0000 (11 08:11 +0200)]
libdpkg: Swap deb name and member name in dpkg_ar_member_get_size()
Otherwise we might perform an out of bounds buffer read access in the
error output on bogus member sizes.
Guillem Jover [Thu, 15 May 2014 06:37:15 +0000 (15 08:37 +0200)]
libdpkg: Make dpkg_locales_init() a public symbol
Guillem Jover [Mon, 12 May 2014 18:23:26 +0000 (12 20:23 +0200)]
libdpkg: Add missing dpkg_program_ symbols to the version script
Guillem Jover [Thu, 1 May 2014 01:44:33 +0000 (1 03:44 +0200)]
dselect: Fix word wrapping logic
The switch from integer literal to boolean literals botched one of the
assignments, which was turned from 1 to false, fix that now, and stop
turning parts of the code path dead.
Regression introduced in commit
cf21cccb98bdb31a84bbe1aa1217c712b47aedd2.
Warned-by: coverity
Guillem Jover [Mon, 12 May 2014 05:33:56 +0000 (12 07:33 +0200)]
build: Switch to use libtool for the static libraries
This makes it possible to embed libcompat inside libdpkg, so that the
static library that we ship is self contained with the required
compatibility code, specifically the MD5 functions.
This also prepares the build system for when we start building a
shared library, although it disables it by default.
Closes: #746122
Guillem Jover [Sun, 4 May 2014 17:56:53 +0000 (4 19:56 +0200)]
build: Fix lcov-inject to consider different coverage percentages
The current code was not taking into account the different coverage
ranges, with their different colors, and different images for the
completion bar. Refactor the code into functions, while we are at it.
Guillem Jover [Thu, 1 May 2014 19:44:10 +0000 (1 21:44 +0200)]
build: Do not use lcov-inject first argument as target directory
All arguments are files to modify.
Raphaël Hertzog [Tue, 6 May 2014 08:25:53 +0000 (6 10:25 +0200)]
dpkg-source: unpack additional tarballs in a deterministic order
Reported-by: Samuel Bronson <naesten@gmail.com>
Closes: #747148
Helge Kreutzmann [Wed, 30 Apr 2014 19:06:59 +0000 (30 21:06 +0200)]
Update German translation of manual pages
Update to 2243t.
Guillem Jover [Wed, 30 Apr 2014 06:56:43 +0000 (30 08:56 +0200)]
Bump version to 1.17.10
Guillem Jover [Wed, 30 Apr 2014 03:46:12 +0000 (30 05:46 +0200)]
Release 1.17.9
Guillem Jover [Wed, 30 Apr 2014 03:55:24 +0000 (30 05:55 +0200)]
Regenerate .pot files and merge .po files with them
Guillem Jover [Wed, 30 Apr 2014 03:40:33 +0000 (30 05:40 +0200)]
build: Make test suite errors fatal again
We need to check in the aggregated results if any test had any problem,
and die accordingly.
Regression introduced in commit
34b26c7db232b300991df5fb6f52707b381df28f.
Closes: #746331
Guillem Jover [Wed, 30 Apr 2014 03:35:39 +0000 (30 05:35 +0200)]
libdpkg: Mark the command_get_pager() tests on a tty as TODO
The build daemon environment does not expose a controlling terminal.
Mark these as possibly failing and as such non-fatal.
Guillem Jover [Mon, 28 Apr 2014 20:15:58 +0000 (28 22:15 +0200)]
s-s-d: Fix off-by-one stack buffer overrun on GNU/Linux and GNU/kFreeBSD
This might happen if the executable pathname is longer than
_POSIX_PATH_MAX. Although this should not have security implications
as the buffer is surrounded by two arrays (so those catch accesses
even if the stack grows up or down), and we are compiling with
-fstack-protector anyway.
We just need to always leave room for the final NUL character.
Warned-by: coverity
Guillem Jover [Mon, 28 Apr 2014 20:07:29 +0000 (28 22:07 +0200)]
u-a: Fix memory leaks in alternative_parse_fileset()
Free prio_str and master_file.
Warned-by: coverity
Guillem Jover [Tue, 29 Apr 2014 01:12:21 +0000 (29 03:12 +0200)]
dselect: Assign desc->desc instead of checking if desc is not nullptr
If we've not found any description we end up in the sentinel entry that
contains nullptr for desc->action and desc->desc, but definitely not
nullptr for desc. Just assigning desc->desc will do the right thing.
Warned-by: coverity
Guillem Jover [Mon, 28 Apr 2014 19:44:17 +0000 (28 21:44 +0200)]
dselect: Fix memory leak in set_color()
Warned-by: coverity
Guillem Jover [Mon, 28 Apr 2014 19:34:53 +0000 (28 21:34 +0200)]
dselect: Do not leak keybindings from describenext()
The code affected is currently unused.
Warned-by: coverity
Guillem Jover [Mon, 28 Apr 2014 19:20:16 +0000 (28 21:20 +0200)]
dpkg-split: Fix short lived memory leaks in mksplit()
Warned-by: coverity
Guillem Jover [Tue, 29 Apr 2014 01:02:08 +0000 (29 03:02 +0200)]
dpkg: Annotate case statements that fall through with a comment
Be explicit, so that code readers or static analyzers do not get
confused.
Warned-by: coverity
Guillem Jover [Mon, 28 Apr 2014 19:54:52 +0000 (28 21:54 +0200)]
dpkg: Do not leak the filepackages_iterator in dir_is_used_by_others()
Warned-by: coverity
Guillem Jover [Mon, 28 Apr 2014 18:48:14 +0000 (28 20:48 +0200)]
libdpkg: Do not leak long tar names on bogus tar archives
Make sure we free the long names, in case of a bogus or truncated
tar archive with long entries not followed by a normal entry.
Warned-by: coverity
Guillem Jover [Tue, 29 Apr 2014 04:36:44 +0000 (29 06:36 +0200)]
libcompat: Make sure P_tmpdir is always defined
This will guarantee the macro constant is always defined, which allows
us to remove an equivalent code branch, which in normal conditions is
dead code.
As a side effect this unconfuses static code analyzers like cppcheck or
coverity.
Guillem Jover [Tue, 29 Apr 2014 12:51:54 +0000 (29 14:51 +0200)]
debian: Switch alternative database backups from xz to gzip
Switch the alternatives database backups from xz to gzip, as the latter
is Essential and we can rely on it being always present, using xz here
is not worth the trouble, disk space savings, or possible additional
dependencies.
Closes: #746354
Guillem Jover [Wed, 30 Apr 2014 00:28:45 +0000 (30 02:28 +0200)]
Dpkg::Source::Patch: Outright reject C-style filenames in patches
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
Steve Petruzzello [Wed, 30 Apr 2014 01:19:10 +0000 (30 03:19 +0200)]
Update French scripts translation
Closes: #746350
Signed-off-by: Guillem Jover <guillem@debian.org>
Helge Kreutzmann [Tue, 29 Apr 2014 19:35:41 +0000 (29 21:35 +0200)]
Fix debian/changelog formatting
Helge Kreutzmann [Tue, 29 Apr 2014 19:34:34 +0000 (29 21:34 +0200)]
Update German translation of manual pages
Update to 2234t4f5u.
Helge Kreutzmann [Mon, 28 Apr 2014 19:07:42 +0000 (28 21:07 +0200)]
Update German scripts translation
Update to 541t.
Helge Kreutzmann [Mon, 28 Apr 2014 17:57:26 +0000 (28 19:57 +0200)]
Update German scripts translation
Update to 541t.
Guillem Jover [Mon, 28 Apr 2014 13:41:58 +0000 (28 15:41 +0200)]
Bump version to 1.17.9
Guillem Jover [Mon, 28 Apr 2014 11:33:26 +0000 (28 13:33 +0200)]
Release 1.17.8
Guillem Jover [Mon, 28 Apr 2014 12:55:28 +0000 (28 14:55 +0200)]
Regenerate .pot files and merge .po files with them
Guillem Jover [Tue, 15 Apr 2014 06:15:44 +0000 (15 08:15 +0200)]
Dpkg::Source::Patch: Correctly parse C-style diff filenames
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>
Guillem Jover [Mon, 28 Apr 2014 04:24:46 +0000 (28 06:24 +0200)]
build: Enable failed test case reporting from the TAP::Harness
Set the «failures» argument for the harness, so that we can get the
failing test case entries, particularly important for the C test suite,
as perl will not report a line number for those.
Guillem Jover [Sun, 27 Apr 2014 02:51:08 +0000 (27 04:51 +0200)]
build: Use the perl TAP::Harness for the C test suite
The automake TAP driver only appeared once the parallel test runner
allowed custom drivers after 1.11, which we were not requesting in
the AM_INIT_AUTOMAKE call.
But simply requesting a later version is not good enough, as Debian
stable (wheezy) is still only shipping automake 1.11. Instead just switch
to use the perl TAP::Harness infrastructure for the C test suite too.
Regression introduced in commit
d9833ac0b6b66e9dfaff272f6d0a25373bfff091.
Guillem Jover [Mon, 28 Apr 2014 12:11:48 +0000 (28 14:11 +0200)]
build: Add new TEST_PREFIX variable to control test case execution paths
This is required as the perl test cases are in srcdir, but C based test
cases are going to be in builddir.
Guillem Jover [Mon, 28 Apr 2014 04:24:46 +0000 (28 06:24 +0200)]
build: Switch test runner from Test::Harness to TAP::Harness
The latter is the recommended module for new code, the former being just
a compatibility wrapper around it. And it will allow to set more detailed
options for the harness that are not exposed through the Test::Harness
wrapper.
We use a make variable instead of inlining the perl code in the make
recipe due to the way make escapes backslashes inside single-quotes
in recipes, which disturbs the semantics of the perl code.
Guillem Jover [Mon, 28 Apr 2014 11:02:15 +0000 (28 13:02 +0200)]
dpkg(1): Improve wording for --verify and --verify-format
Closes: #733057
Guillem Jover [Mon, 28 Apr 2014 05:32:55 +0000 (28 07:32 +0200)]
dpkg-maintscript-helper: Document environment requirements for supports
Closes: #739634
Trần Ngọc Quân [Mon, 28 Apr 2014 02:15:52 +0000 (28 09:15 +0700)]
Update and review Vietnamese program translations
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
Signed-off-by: Guillem Jover <guillem@debian.org>
Sven Joachim [Sun, 27 Apr 2014 12:42:02 +0000 (27 14:42 +0200)]
German dpkg translation update
Update to 1088t2u.
Yuri Kozlov [Sun, 27 Apr 2014 00:51:37 +0000 (27 02:51 +0200)]
Update Russian program translations
Closes: #745869
Signed-off-by: Guillem Jover <guillem@debian.org>
Guillem Jover [Tue, 22 Apr 2014 08:37:37 +0000 (22 10:37 +0200)]
libcompat: Fix comparison between signed and unsigned in strsignal()
Guillem Jover [Thu, 24 Apr 2014 14:18:06 +0000 (24 16:18 +0200)]
libcompat: Declare strnlen() prototype in compat.h
Remove now unused strnlen.h header.
Guillem Jover [Tue, 22 Apr 2014 08:10:17 +0000 (22 10:10 +0200)]
libdpkg: Add missing <string.h> header
These are currently shadowed by the <string.h> inclusion from
<compat/strnlen.h>.
Guillem Jover [Sat, 26 Apr 2014 13:32:04 +0000 (26 15:32 +0200)]
libdpkg: Add test cases for str_is_set() and str_is_unset()
Guillem Jover [Sat, 26 Apr 2014 01:15:16 +0000 (26 03:15 +0200)]
libdpkg: Add test cases for dpkg_error functions
Guillem Jover [Sat, 26 Apr 2014 01:12:56 +0000 (26 03:12 +0200)]
libdpkg: Use new DPKG_VERSION_OBJECT instead of local version macro
Use the new macro instead of the local one with a generic and
ambiguous name.
Guillem Jover [Sat, 26 Apr 2014 01:12:56 +0000 (26 03:12 +0200)]
libdpkg: Add new DPKG_VERSION_OBJECT macro
Guillem Jover [Sat, 26 Apr 2014 01:11:59 +0000 (26 03:11 +0200)]
libdpkg: Move test_warn() and test_error() to dpkg/test.h
These are generic test macros that can be reused by other test cases.
Guillem Jover [Sat, 26 Apr 2014 13:39:46 +0000 (26 15:39 +0200)]
libdpkg: Handle space-only strings when parsing versions
Consider these empty strings too.
Guillem Jover [Fri, 25 Apr 2014 18:11:18 +0000 (25 20:11 +0200)]
libdpkg: Add test cases for parseversion() branch coverage
Guillem Jover [Thu, 24 Apr 2014 01:05:12 +0000 (24 03:05 +0200)]
libdpkg: Add test cases for dpkg_ar_member_is_illegal()
Guillem Jover [Thu, 24 Apr 2014 00:53:21 +0000 (24 02:53 +0200)]
libdpkg: Add test cases for unmatched str_match_end()
Guillem Jover [Thu, 24 Apr 2014 00:52:56 +0000 (24 02:52 +0200)]
libdpkg: Add test cases for growing command argv
Guillem Jover [Thu, 24 Apr 2014 00:37:11 +0000 (24 02:37 +0200)]
libdpkg: Add test cases for command_get_pager()
Guillem Jover [Thu, 24 Apr 2014 00:18:39 +0000 (24 02:18 +0200)]
libdpkg: Add test cases for dpkg_arch_describe()
Guillem Jover [Thu, 24 Apr 2014 01:36:39 +0000 (24 03:36 +0200)]
Dpkg::Vendor: Add test cases for get_vendor_dir()
Guillem Jover [Thu, 24 Apr 2014 01:36:18 +0000 (24 03:36 +0200)]
Dpkg::Deps: Add test cases for deps_concat()
Guillem Jover [Thu, 24 Apr 2014 01:22:57 +0000 (24 03:22 +0200)]
Dpkg::Dist:Files: Add test cases for get_file()