dpkg/guillem.git
10 years agolibdpkg: Remove union in buffer_data and just use ptrpu/buffer-api-file
Guillem Jover [Tue, 3 May 2011 08:46:48 +0000 (3 10:46 +0200)]
libdpkg: Remove union in buffer_data and just use ptr

10 years agolibdpkg: Switch buffer API internally from descriptors to the file API
Guillem Jover [Tue, 3 May 2011 08:41:31 +0000 (3 10:41 +0200)]
libdpkg: Switch buffer API internally from descriptors to the file API

10 years agolibdpkg: New file based api
Guillem Jover [Thu, 2 Dec 2010 03:42:46 +0000 (2 04:42 +0100)]
libdpkg: New file based api

10 years agoFix bug closure for “dpkg-deb: Do not warn on strange timestamps”
Guillem Jover [Sat, 10 Sep 2011 16:32:30 +0000 (10 18:32 +0200)]
Fix bug closure for “dpkg-deb: Do not warn on strange timestamps”

Spotted-by: Carl Fürstenberg <azatoth@gmail.com>
10 years agoGerman dpkg translation update
Sven Joachim [Fri, 9 Sep 2011 09:35:18 +0000 (9 11:35 +0200)]
German dpkg translation update

Update to 1022t.

10 years agobuild: Ship debian/dpkg.prerm in the dist tarball
Guillem Jover [Fri, 9 Sep 2011 07:02:27 +0000 (9 09:02 +0200)]
build: Ship debian/dpkg.prerm in the dist tarball

Regression introduced in commit cf6b98d3738d1fe8b3119b71fd8321c12feb618c.

10 years agodpkg-buildflags(1): Escape minus sign
Guillem Jover [Fri, 9 Sep 2011 04:24:19 +0000 (9 06:24 +0200)]
dpkg-buildflags(1): Escape minus sign

10 years agolibdpkg: Do not generate the unused infodir in modstatdb_init()
Guillem Jover [Fri, 9 Sep 2011 03:55:37 +0000 (9 05:55 +0200)]
libdpkg: Do not generate the unused infodir in modstatdb_init()

10 years agodpkg: Refactor control directory creation on unpack
Guillem Jover [Wed, 7 Sep 2011 04:38:41 +0000 (7 06:38 +0200)]
dpkg: Refactor control directory creation on unpack

10 years agoDo not include trailing slash for directory string literals
Guillem Jover [Wed, 7 Sep 2011 04:20:43 +0000 (7 06:20 +0200)]
Do not include trailing slash for directory string literals

This makes it more natural to manage the directory names, and avoids
some doubled slashes.

10 years agolibdpkg: Move trigger note support to a new trignote module
Guillem Jover [Mon, 5 Sep 2011 14:08:51 +0000 (5 16:08 +0200)]
libdpkg: Move trigger note support to a new trignote module

This detangles the trigger note support from triglib and avoids code
using parsedb() to end up pulling the triglib and dbmodify modules.
This reduces the dpkg-deb binary size.

10 years agolibdpkg: Refactor trig_awaited_pend_head processing into new functions
Guillem Jover [Tue, 6 Sep 2011 03:59:13 +0000 (6 05:59 +0200)]
libdpkg: Refactor trig_awaited_pend_head processing into new functions

This will allow accessing trig_awaited_pend_head from a different
module, w/o needing to pull in triglib.

10 years agolibdpkg: Rename trig_enqueue_awaited_pend to trig_awaited_pend_enqueue
Guillem Jover [Tue, 6 Sep 2011 03:54:36 +0000 (6 05:54 +0200)]
libdpkg: Rename trig_enqueue_awaited_pend to trig_awaited_pend_enqueue

10 years agolibdpkg: Move trig_name_is_illegal to a new trigname module
Guillem Jover [Mon, 5 Sep 2011 14:03:21 +0000 (5 16:03 +0200)]
libdpkg: Move trig_name_is_illegal to a new trigname module

This detangles the function from the triglib module, avoiding
dpkg-trigger to pull it, and reducing its size.

10 years agodpkg-deb: Do not warn on strange timestamps
Guillem Jover [Sun, 4 Sep 2011 14:07:29 +0000 (4 16:07 +0200)]
dpkg-deb: Do not warn on strange timestamps

The external extractor is only used on dpkg-deb -x (and friends), which
is only used by dpkg when extracting the control member. The internal
dpkg tar extractor never warns on timestamps, and there's no point for
dpkg to induce those warnings on the control extraction either.

Closes: #640298

10 years agodpkg: Fix double “error:” string in missing PATH error output
Guillem Jover [Thu, 1 Sep 2011 13:17:35 +0000 (1 15:17 +0200)]
dpkg: Fix double “error:” string in missing PATH error output

Closes: #639997

10 years agou-a: Update alternative links only if they change
Guillem Jover [Fri, 19 Aug 2011 16:07:13 +0000 (19 18:07 +0200)]
u-a: Update alternative links only if they change

There's no point in changing the links to the same target. This also
helps when systems might have a read-only file system mounted, but a
writable database.

Closes: #636700

Based-on-patch-by: Salvatore Bonaccorso <carnil@debian.org>
Signed-off-by: Guillem Jover <guillem@debian.org>
10 years agou-a: Refactor alternative_path_classify from alternative_can_replace_path
Guillem Jover [Thu, 8 Sep 2011 08:19:28 +0000 (8 10:19 +0200)]
u-a: Refactor alternative_path_classify from alternative_can_replace_path

10 years agou-a: Do not try to readlink() a non-symlink
Guillem Jover [Thu, 8 Sep 2011 17:12:20 +0000 (8 19:12 +0200)]
u-a: Do not try to readlink() a non-symlink

Return early in case the path is not a symlink, there's no point in
calling readlink() if we know it's going to fail.

10 years agou-a: Use xreadlink() instead of areadlink() in alternative_evolve()
Guillem Jover [Thu, 8 Sep 2011 08:10:06 +0000 (8 10:10 +0200)]
u-a: Use xreadlink() instead of areadlink() in alternative_evolve()

The function does not expect the readlink call to fail.

10 years agou-a: Split xreadlink() allocation code into areadlink()
Guillem Jover [Tue, 6 Sep 2011 02:19:03 +0000 (6 04:19 +0200)]
u-a: Split xreadlink() allocation code into areadlink()

Using a bool as an argument for a function already taking several
arguments is almost never a good interface, it's not clear from
the call sites what it refers to and as such prone to confusion.

Split the main xreadlink() code into a function that allocates but
can return NULL, and make xreadlink() use the common semantics of
never failing.

10 years agodpkg: Print a message instead of asserting on readlink/stat size discrepancy
Guillem Jover [Thu, 25 Aug 2011 18:40:42 +0000 (25 20:40 +0200)]
dpkg: Print a message instead of asserting on readlink/stat size discrepancy

This will help the user diagnose which file was affected and in
correcting the situation, which in most cases is due to file system
breakage, or non POSIX compliance.

Closes: #639229

10 years agodpkg: Change type of variable r from int to ssize_t in conffderef()
Guillem Jover [Thu, 25 Aug 2011 18:40:02 +0000 (25 20:40 +0200)]
dpkg: Change type of variable r from int to ssize_t in conffderef()

10 years agolibdpkg: Detangle buffer filter logic from write logic
Guillem Jover [Mon, 2 May 2011 19:51:47 +0000 (2 21:51 +0200)]
libdpkg: Detangle buffer filter logic from write logic

10 years agolibdpkg: Add new BUFFER_FILTER_NULL filter action
Guillem Jover [Mon, 2 May 2011 19:51:47 +0000 (2 21:51 +0200)]
libdpkg: Add new BUFFER_FILTER_NULL filter action

10 years agolibdpkg: Rename BUFFER_WRITE_MD5 to BUFFER_FILTER_MD5
Guillem Jover [Fri, 17 Jun 2011 12:11:43 +0000 (17 14:11 +0200)]
libdpkg: Rename BUFFER_WRITE_MD5 to BUFFER_FILTER_MD5

10 years agolibdpkg: Namespace buffer init and done functions with buffer_filter_
Guillem Jover [Mon, 2 May 2011 08:25:38 +0000 (2 10:25 +0200)]
libdpkg: Namespace buffer init and done functions with buffer_filter_

This makes it clear these functions are not to initialize normal
buffer operations, but just for when a filter is in place.

10 years agolibdpkg: Rename fd_null_copy() to fd_skip()
Guillem Jover [Tue, 3 May 2011 08:55:45 +0000 (3 10:55 +0200)]
libdpkg: Rename fd_null_copy() to fd_skip()

10 years agolibdpkg: Add a test case for fd_md5()
Guillem Jover [Fri, 9 Sep 2011 05:19:27 +0000 (9 07:19 +0200)]
libdpkg: Add a test case for fd_md5()

10 years agoConvert translation files to UTF-8
Guillem Jover [Wed, 7 Sep 2011 02:53:25 +0000 (7 04:53 +0200)]
Convert translation files to UTF-8

Consolidating the charset used for all files in the repository makes
diff actually useful, otherwise when showing a patch involving distinct
charsets it's not possible to display them correctly due to the mixture.

10 years agodpkg-buildflags(1): add initial hardening documentation
Kees Cook [Tue, 6 Sep 2011 06:34:49 +0000 (5 23:34 -0700)]
dpkg-buildflags(1): add initial hardening documentation

Document the various hardening options that can be enabled/disabled
via DEB_BUILD_MAINT_OPTIONS.

Improved-by: Raphaël Hertzog <hertzog@debian.org>
Signed-off-by: Kees Cook <kees@debian.org>
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
10 years agodpkg-buildflags: emit hardening build flags by default
Raphaël Hertzog [Wed, 27 Jul 2011 20:10:49 +0000 (27 22:10 +0200)]
dpkg-buildflags: emit hardening build flags by default

All the hardening build flags supported by hardening-includes
are supported except that PIE is not enabled by default (just like
the corresponding gcc patch doesn't enable it by default).

Inspired by the work of Kees Cook <kees@debian.org>.

10 years agoDpkg::BuildOptions: enable usage of alternative variable names
Raphaël Hertzog [Tue, 2 Aug 2011 12:15:17 +0000 (2 14:15 +0200)]
Dpkg::BuildOptions: enable usage of alternative variable names

10 years agoUpdate German translation of manual pages
Helge Kreutzmann [Thu, 8 Sep 2011 15:53:13 +0000 (8 17:53 +0200)]
Update German translation of manual pages

Update to 2038t.

10 years agodpkg-source(1): add example of extend-diff-ignore's usage
Raphaël Hertzog [Sat, 3 Sep 2011 12:34:31 +0000 (3 14:34 +0200)]
dpkg-source(1): add example of extend-diff-ignore's usage

Suggested-by: Christoph Berg <myon@debian.org>
Closes: #640198

10 years agoUpdate Swedish translation.
Peter Krefting [Sun, 4 Sep 2011 17:57:23 +0000 (4 18:57 +0100)]
Update Swedish translation.

man/po/sv.po: 2044t0f0u.

10 years agoUpdate German translation of manual pages
Helge Kreutzmann [Wed, 24 Aug 2011 17:35:38 +0000 (24 19:35 +0200)]
Update German translation of manual pages

Update to 2038t.

10 years agodpkg-source: Make single-debian-patch not abort on upstream changes
Guillem Jover [Tue, 23 Aug 2011 03:24:39 +0000 (23 05:24 +0200)]
dpkg-source: Make single-debian-patch not abort on upstream changes

The single-debian-patch option usage in Dpkg::Source::Package::V2
was typoed as single_debian_patch, and thus not avoiding aborting
on upstream changes. Instead of fixing the typo, let's just not
expose single-debian-patch in Dpkg::Source::Package::V2, as it's
Dpkg::Source::Package::V3::quilt specific and as such a layer
violation, the code will just set auto_commit when single-debian-patch
is specified, which is the actual intended behaviour. Reflect this
explicitly in the man page.

Regression introduced in commit 46b688e4824f00842568b517b119eec34a5f7286.

Reported-by: Bernhard R. Link <brlink@debian.org>
10 years agoDpkg::Source::Package: Use “-z” instead of “not -s”
Guillem Jover [Tue, 23 Aug 2011 01:55:27 +0000 (23 03:55 +0200)]
Dpkg::Source::Package: Use “-z” instead of “not -s”

10 years agoUpdate German scripts translation
Helge Kreutzmann [Mon, 22 Aug 2011 18:57:14 +0000 (22 20:57 +0200)]
Update German scripts translation

Update to 523t.

10 years agoUpdate German translation of manual pages
Helge Kreutzmann [Mon, 22 Aug 2011 18:33:18 +0000 (22 20:33 +0200)]
Update German translation of manual pages

Update to 2038t.

10 years agodpkg: correctly handle a hardlink pointing to a conffile
Raphaël Hertzog [Sun, 21 Aug 2011 09:11:02 +0000 (21 11:11 +0200)]
dpkg: correctly handle a hardlink pointing to a conffile

Normal files tagged as a conffile are not tagged with
fnnf_deferred_rename and due to this the hardlinking code
was assuming that the target is in its final location
already. This is obviously not the case for a conffile.

Fix the code so that the hardlinking logic takes into account
the fact that conffiles are unpacked in .dpkg-new and stay
there until the configuration phase.

Reported-by: Igor Pashev <pashev.igor@gmail.com>
10 years agoGerman dpkg translation update
Sven Joachim [Sun, 21 Aug 2011 16:37:50 +0000 (21 18:37 +0200)]
German dpkg translation update

Update to 1022t.

10 years agoUpdate Swedish translation.
Peter Krefting [Sat, 20 Aug 2011 21:08:09 +0000 (20 22:08 +0100)]
Update Swedish translation.

man/po/sv.po: 1978t50f16u (WIP).

10 years agou-a: Do not build strings from parts in alternative_check_install_args
Guillem Jover [Sat, 20 Aug 2011 13:36:00 +0000 (20 15:36 +0200)]
u-a: Do not build strings from parts in alternative_check_install_args

This makes the work of translators harder.

10 years agou-a: Refactor alternative argument checks into new function
Guillem Jover [Sat, 20 Aug 2011 10:55:33 +0000 (20 12:55 +0200)]
u-a: Refactor alternative argument checks into new function

10 years agou-a: Refactor --install argument checking into a new function
Guillem Jover [Fri, 19 Aug 2011 20:59:53 +0000 (19 22:59 +0200)]
u-a: Refactor --install argument checking into a new function

10 years agou-a: Move alternative map loading to the actions that make use of them
Guillem Jover [Fri, 19 Aug 2011 20:32:19 +0000 (19 22:32 +0200)]
u-a: Move alternative map loading to the actions that make use of them

This will reduce start up time, by not doing unneeded operations.

10 years agou-a: Split alternative map loading into two functions
Guillem Jover [Fri, 19 Aug 2011 16:38:10 +0000 (19 18:38 +0200)]
u-a: Split alternative map loading into two functions

This will allow only loading them when needed, instead of doing it
for any action.

10 years agou-a: Refactor scandir() namelist free into new altdb_free_namelist()
Guillem Jover [Sat, 20 Aug 2011 10:21:22 +0000 (20 12:21 +0200)]
u-a: Refactor scandir() namelist free into new altdb_free_namelist()

10 years agou-a: Rename get_all_alternatives() to altdb_get_namelist()
Guillem Jover [Sat, 20 Aug 2011 10:30:35 +0000 (20 12:30 +0200)]
u-a: Rename get_all_alternatives() to altdb_get_namelist()

This makes it clear we are referring to the filenames in the database
directory.

10 years agou-a: Do not check if linknames can be updated if --force is in use
Guillem Jover [Fri, 19 Aug 2011 15:50:25 +0000 (19 17:50 +0200)]
u-a: Do not check if linknames can be updated if --force is in use

The action is going to proceed in any case, no point wasting resources
doing the checks. Also this removes a possible point of non-overridable
failure.

10 years agoDpkg::Compression: Change default values depending on the compressor used
Guillem Jover [Fri, 19 Aug 2011 10:59:35 +0000 (19 12:59 +0200)]
Dpkg::Compression: Change default values depending on the compressor used

This makes dpkg-source use more appropriate default compression values
depending on the compressor used.

Prompted-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
10 years agoDo not use possessive «'s» after ‘s’ or ‘x’
Guillem Jover [Sat, 20 Aug 2011 07:51:13 +0000 (20 09:51 +0200)]
Do not use possessive «'s» after ‘s’ or ‘x’

10 years agoFix spelling errors
Guillem Jover [Wed, 17 Aug 2011 14:44:18 +0000 (17 16:44 +0200)]
Fix spelling errors

Found by codespell.

10 years agodpkg: Clarify --update-avail usage error message
Guillem Jover [Sun, 14 Aug 2011 22:03:00 +0000 (15 00:03 +0200)]
dpkg: Clarify --update-avail usage error message

Unify the reference to the Packages-file to match the one used on the
man pages and on the --help output.

Closes: #628055

10 years agodpkg-parsechangelog: Remove duplicate program name from usage error output
Guillem Jover [Sun, 14 Aug 2011 22:01:53 +0000 (15 00:01 +0200)]
dpkg-parsechangelog: Remove duplicate program name from usage error output

10 years agoExpand numeric literals and word abbreviation in usage error output
Guillem Jover [Sun, 14 Aug 2011 21:45:36 +0000 (14 23:45 +0200)]
Expand numeric literals and word abbreviation in usage error output

This avoids unneeded abbreviations, uses correct english, and should
help translators.

10 years agodpkg-deb(1): Clarify the default compression-levels
Guillem Jover [Sun, 14 Aug 2011 21:28:07 +0000 (14 23:28 +0200)]
dpkg-deb(1): Clarify the default compression-levels

10 years agodeb-src-control(5): Use linux-any in example control stanza
Guillem Jover [Sun, 14 Aug 2011 20:45:20 +0000 (14 22:45 +0200)]
deb-src-control(5): Use linux-any in example control stanza

Instead of using the negated list of not supported architectures, just
use the positive form, which should be considered current best practice.

10 years agodselect(1): Correct configuration directory reference
Guillem Jover [Sun, 14 Aug 2011 20:43:05 +0000 (14 22:43 +0200)]
dselect(1): Correct configuration directory reference

Use /etc/dpkg/dselect.cfg.d/ instead of /etc/dpkg/dpkg.cfg.d/.

10 years agoman: Use minus signs and hyphens consistently
Guillem Jover [Sun, 14 Aug 2011 20:41:16 +0000 (14 22:41 +0200)]
man: Use minus signs and hyphens consistently

Any string that can be copy & pasted into control files or into a
terminal, for example, needs to correctly use minus signs (escaped
dashes), instead of the default hyphen.

10 years agoRegenerate .pot files and merge .po files with them
Helge Kreutzmann [Sat, 20 Aug 2011 06:31:37 +0000 (20 08:31 +0200)]
Regenerate .pot files and merge .po files with them

10 years agoUpdate Swedish translation.
Peter Krefting [Wed, 17 Aug 2011 19:59:37 +0000 (17 20:59 +0100)]
Update Swedish translation.

po/sv.po: 1023t0f0u.
man/po/sv.po: 1824t180f40u (WIP).
scripts/po/sv.po: 524t0f0u

10 years agodpkg: Defer hardlink renames to avoid breakage on unpack
Guillem Jover [Sat, 13 Aug 2011 01:19:24 +0000 (13 03:19 +0200)]
dpkg: Defer hardlink renames to avoid breakage on unpack

This fixes two issues related to making the new file contents available
through an alternative but final path before

1) the one "carrying" the content has been fsync()ed, to avoid getting
garbage on system failure.

2) the deferred fsync() on the main path has been performed, avoiding
a possible error when reopening the file for writing if it's currently
under execution.

Deferring the hardlink is safe as they are always after the tar entry
containing the actual file data.

Regression introduced in commit 9cd41fdda1c27169c52d73b3b3ce71991d724994.

Closes: #635683

Reported-by: Niko Tyni <ntyni@debian.org>
Based-on-patch-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Guillem Jover <guillem@debian.org>
10 years agoDpkg::Deps: fix simplification logic of union dependencies
Raphaël Hertzog [Fri, 12 Aug 2011 20:35:46 +0000 (12 22:35 +0200)]
Dpkg::Deps: fix simplification logic of union dependencies

The code merging dependencies was wrongly updating the dependency that's
not integrated in the resulting field.

Reported-by: Andreas Metzler <ametzler@downhill.at.eu.org>
10 years agolibdpkg: Use a generic pointer to pass the parsed object data around
Guillem Jover [Tue, 9 Aug 2011 05:19:09 +0000 (9 07:19 +0200)]
libdpkg: Use a generic pointer to pass the parsed object data around

This will allow code not parsing binary package control files to be
able to easily reuse the parser, by supplying their own object
structure.

Unfortunately this sacrifices the type-safety of the parse_stanza()
and parse_field() functions, but that only affects one variable,
which should be an acceptable tradeoff given the gain in code reuse.

10 years agoChangelog for French translation update
Christian PERRIER [Mon, 8 Aug 2011 18:29:13 +0000 (8 20:29 +0200)]
Changelog for French translation update

10 years agoFix Sylvestre's translation
Christian PERRIER [Mon, 8 Aug 2011 18:27:40 +0000 (8 20:27 +0200)]
Fix Sylvestre's translation

10 years agoUpdate of the french localization
Sylvestre Ledru [Mon, 8 Aug 2011 13:44:01 +0000 (8 15:44 +0200)]
Update of the french localization

10 years agoFix a french typo
Sylvestre Ledru [Mon, 8 Aug 2011 13:42:56 +0000 (8 15:42 +0200)]
Fix a french typo

10 years agolibdpkg: Initialize ps->pkg and ps->pkgbin to NULL in parse_open()
Guillem Jover [Fri, 5 Aug 2011 04:23:59 +0000 (5 06:23 +0200)]
libdpkg: Initialize ps->pkg and ps->pkgbin to NULL in parse_open()

This guarantees the parsedb_state variable is in a sane state after
the parse_open() call.

10 years agolibdpkg: Refactor parse_open() and parse_close() from parsedb()
Guillem Jover [Fri, 5 Aug 2011 03:21:01 +0000 (5 05:21 +0200)]
libdpkg: Refactor parse_open() and parse_close() from parsedb()

This will allow code using parse_stanza() to avoid having to reimplement
the opening and closing logic.

10 years agolibdpkg: Close the file descriptor just after slurping it in parsedb()
Guillem Jover [Fri, 5 Aug 2011 04:03:02 +0000 (5 06:03 +0200)]
libdpkg: Close the file descriptor just after slurping it in parsedb()

10 years agodpkg-source: simplify message pointing to dpkg-source --commit
Raphaël Hertzog [Thu, 4 Aug 2011 19:33:23 +0000 (4 21:33 +0200)]
dpkg-source: simplify message pointing to dpkg-source --commit

The supplementary arguments suggested are awkward and are generally not
needed unless your package is huge and takes a long time to uncompress
and diff.

The best advice is thus “dpkg-source --commit” without any parameter.
Maintainers of big packages will read the manual package and learn
by themselves how to reuse the generated patch.

10 years agodpkg-source: don't always print "local changes have been recorded in a new patch"
Raphaël Hertzog [Wed, 3 Aug 2011 20:02:33 +0000 (3 22:02 +0200)]
dpkg-source: don't always print "local changes have been recorded in a new patch"

The message should only be printed if such a patch has really
been created.

Reported-by: Sven Joachim
10 years agoFix typo
Helge Kreutzmann [Wed, 3 Aug 2011 19:19:38 +0000 (3 21:19 +0200)]
Fix typo

10 years agoUpdate German translation of manual pages
Helge Kreutzmann [Wed, 3 Aug 2011 19:14:41 +0000 (3 21:14 +0200)]
Update German translation of manual pages

Update to 2047t.

10 years agoUpdate German translation of manual pages
Helge Kreutzmann [Tue, 2 Aug 2011 19:55:50 +0000 (2 21:55 +0200)]
Update German translation of manual pages

Update to 2037t7f3u.

10 years agoUpdate German scripts translation
Helge Kreutzmann [Tue, 2 Aug 2011 17:32:57 +0000 (2 19:32 +0200)]
Update German scripts translation

Update to 524t.

10 years agoGerman dpkg translation update
Sven Joachim [Tue, 2 Aug 2011 09:57:17 +0000 (2 11:57 +0200)]
German dpkg translation update

Update to 1023t.

10 years agodpkg-source: clean up temporary file in case of interruption
Raphaël Hertzog [Tue, 2 Aug 2011 09:20:54 +0000 (2 11:20 +0200)]
dpkg-source: clean up temporary file in case of interruption

Navite packages (both "1.0" and "3.0 (native)") failed to remove
the temporary tarball if the process is interrupted during its
generation.

Reported-by: Cyril Brulebois <kibi@debian.org>
10 years agoMove changelog entry to attribute it correctly to me
Raphaël Hertzog [Tue, 2 Aug 2011 09:06:11 +0000 (2 11:06 +0200)]
Move changelog entry to attribute it correctly to me

10 years agolibdpkg: Remove obsolete variable references in parsedb() comment
Guillem Jover [Tue, 2 Aug 2011 03:05:30 +0000 (2 05:05 +0200)]
libdpkg: Remove obsolete variable references in parsedb() comment

The warnto and warncount variables were removed in commits
ba908783e306ba38457a84fd6d975ca69e351e56 and
8451065cf85cb8a17dcd17e0cd2ca1fdef7cb749 respectively.

10 years agolibdpkg: Make parse_stanza() a public function
Guillem Jover [Tue, 2 Aug 2011 02:54:42 +0000 (2 04:54 +0200)]
libdpkg: Make parse_stanza() a public function

Make public also the required parse helper macros and structures. At
least parse_EOF() will be needed for other callers to get out of the
loop when parsing multi-stanza files.

10 years agolibdpkg: Detangle fieldinfos from struct field_state
Guillem Jover [Tue, 2 Aug 2011 02:50:09 +0000 (2 04:50 +0200)]
libdpkg: Detangle fieldinfos from struct field_state

Define the fieldencountered array in the stack, and switch the array
in struct field_state to be a pointer to that array. This way we do not
pull the fieldinfos symbol (specific to the parsedb() function) to the
now generic struct field_state.

10 years agolibdpkg: Rename parse helper *_mmap functions to parse_*
Guillem Jover [Tue, 2 Aug 2011 02:24:10 +0000 (2 04:24 +0200)]
libdpkg: Rename parse helper *_mmap functions to parse_*

This abstracts the method used to load the file contents, and it also
namespaces it for the parser.

10 years agolibdpkg: Refactor RFC-822 stanza parsing into new parse_stanza()
Guillem Jover [Thu, 14 Jul 2011 15:21:55 +0000 (14 17:21 +0200)]
libdpkg: Refactor RFC-822 stanza parsing into new parse_stanza()

This generalizes the stanza parsing so that it can be used by other
parts of the code.

10 years agolibdpkg: Move dataptr and endptr from parsedb() to struct parsedb_state
Guillem Jover [Thu, 14 Jul 2011 02:37:31 +0000 (14 04:37 +0200)]
libdpkg: Move dataptr and endptr from parsedb() to struct parsedb_state

10 years agolibdpkg: Add pkg and pkgbin to struct parsedb_state
Guillem Jover [Thu, 14 Jul 2011 01:58:45 +0000 (14 03:58 +0200)]
libdpkg: Add pkg and pkgbin to struct parsedb_state

We are passing these variables as arguments most of the time for
parse_error() and parse_warn() calls which are not run-time frequent,
this also unties somewhat the code from the package structures.

10 years agolibdpkg: Remove trailing semicolons from getc_mmap and ungetc_mmap
Guillem Jover [Tue, 2 Aug 2011 02:56:00 +0000 (2 04:56 +0200)]
libdpkg: Remove trailing semicolons from getc_mmap and ungetc_mmap

Those are unnecessary as these are function macros which need to be
followed by semicolons on the call sites.

10 years agodpkg-deb: Add --raw-extract option combining --control and --extract
Guillem Jover [Tue, 26 Apr 2011 05:35:16 +0000 (26 07:35 +0200)]
dpkg-deb: Add --raw-extract option combining --control and --extract

This allows to extract the control and file system members of a .deb
into a single directory using the same layout dpkg-deb -b expects for
building a package.

Closes: #552123

10 years agodpkg-deb: Add new -v, --verbose option
Guillem Jover [Mon, 20 Jun 2011 17:11:20 +0000 (20 19:11 +0200)]
dpkg-deb: Add new -v, --verbose option

Change --extract to honour --verbose and behave as --vextract.

Closes: #293280

10 years agoRegenerate .pot files and merge .po files with them
Raphaël Hertzog [Mon, 1 Aug 2011 20:27:08 +0000 (1 22:27 +0200)]
Regenerate .pot files and merge .po files with them

10 years agoRevert "dpkg-buildpackage: support for Build-Features: build-arch"
Raphaël Hertzog [Mon, 1 Aug 2011 20:01:20 +0000 (1 22:01 +0200)]
Revert "dpkg-buildpackage: support for Build-Features: build-arch"

This reverts commit 14d48ef9abc2ce2d394e9ae4d69d4ba68b551620. Given
that Guillem does not want this field and that the technical committee
has not yet decided on the proper approach to enable
build-arch/build-indep, it's safer to revert this change for now and allow
us to proceed with a release.

Conflicts:

man/deb-src-control.5

10 years agodebian/rules: use the in-tree dpkg-buildflags to inject build flags
Raphaël Hertzog [Wed, 27 Jul 2011 21:20:00 +0000 (27 23:20 +0200)]
debian/rules: use the in-tree dpkg-buildflags to inject build flags

Note that $(shell ...) does not receive variables defined
within make with "export VAR=foo" so that we have to include
DEB_CFLAGS_MAINT_APPEND in the command-line.

10 years agodpkg-buildflags: support a "strip" operation
Raphaël Hertzog [Wed, 27 Jul 2011 17:18:04 +0000 (27 19:18 +0200)]
dpkg-buildflags: support a "strip" operation

The strip operation is useful to drop some options from the
returned build flags.

10 years agodpkg-buildflags: implement support of DEB_<flag>_MAINT_<op> env variables
Raphaël Hertzog [Wed, 27 Jul 2011 16:49:46 +0000 (27 18:49 +0200)]
dpkg-buildflags: implement support of DEB_<flag>_MAINT_<op> env variables

Those variables are meant to be used by the package maintainer within
debian/rules to alter the resulting build flags if needed.

10 years agodpkg-buildflags: implement --export=configure
Raphaël Hertzog [Wed, 27 Jul 2011 15:45:40 +0000 (27 17:45 +0200)]
dpkg-buildflags: implement --export=configure

The goal is to make it easy to set compilation flags on a ./configure
command line for example like this:
./configure $(shell dpkg-buildflags --export=configure)

The output thus looks like this:
CFLAGS="-g -O2" CPPFLAGS="" CXXFLAGS="-g -O2" FFLAGS="-g -O2" LDFLAGS=""

10 years agoRevert "dpkg-buildflags: support debian/buildflags"
Raphaël Hertzog [Wed, 27 Jul 2011 11:21:53 +0000 (27 13:21 +0200)]
Revert "dpkg-buildflags: support debian/buildflags"

This reverts commit 316df0a76f2ef91badbccb6fef0bfa7ae23fac59.
A recent discussion concluded that it was not a proper interface
for maintainers to override/extend build flags.

See http://lists.debian.org/debian-dpkg/2011/07/msg00033.html

Conflicts:

scripts/Dpkg/BuildFlags.pm