Age | Commit message (Collapse) | Author | Files | Lines |
|
The limit was lifted when the code switched from a constant sized string
to a dynamic one via varbuf.
|
|
|
|
|
|
The rest of the tools, particularly the ones in dpkg-dev, do not emit
such warnings, so doing it when building the binary packages is a bit
pointless, and usually annoys maintainers or downstream developers who
end up disabling this code anyway.
This might have served a purpose some time ago, to easily spot typos
in field names, but we do have other means to check for those now,
like more strict parsing in dpkg, which will warn or error on required
fields, or tools like lintian which do a thorough check on the produced
packages.
|
|
This allows to easily extract the entire control member in tar format,
for further processing.
|
|
Reported-by: Trần Ngọc Quân <vnwildman@gmail.com>
|
|
This makes sure any field fixup and sanity check is performed on
the input, and gets reflected on the output.
|
|
|
|
|
|
|
|
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
|
|
We get the filenames from find(1), so we should not be letting tar
mangle them, or it might create unexpected results.
Closes: #743687
Reported-by: Niels Thykier <niels@thykier.net>
|
|
This compressor has been superseded by xz when it comes to compression
ratio, and in cases where higher compatibility or raw speed is desired
gzip is still the better option.
Issue a warning for now for the -Zbzip2 option value, the support for
that value will get disabled at a later point.
|
|
We cannot portably assign a compound literal to a static variable,
as the expression is not constant. GCC accepts these for backwards
compatibility in its C89 mode, but not in its C99 mode.
|
|
|
|
Add a new --uniform-compression, that allows to use the same compression
parameters on the control.tar member as for the data.tar member.
This is a transitional need, once a dpkg-deb supporting other control.tar
compressions is widely deployed, ideally on stable distribution releases,
then the default could possibly get switched.
|
|
This includes no compression (control.tar) or xz compression
(control.tar.xz).
There's really no point allowing the deprecated lzma, or the inferior
bzip2 at this time, when gzip and xz are superior in either speed or
compression ratio.
|
|
Use the global default, instead of setting it explicitly in the code.
|
|
Clarify the error message, by stating it's either too long or missing a
final newline, and unify it to be the same on both dpkg-deb and dpkg.
Closes: #108196
|
|
Such packages will not be accepted by dpkg at install time anyway, so
catch this early on, and don't let it through.
|
|
Update and unfuzzy translation strings.
|
|
|
|
|
|
This adds the basic infrastructure support for a new class of generic
build-time dependency restrictions, and in particular implements the
specific build profiles, which will allow to cull build dependencies
depending on the profile being used. There's several things this can
be used for, like new port bootstrapping, reduced package builds, and
similar. In the future other kinds of restrictions could be added as
the build profiles are namespaced with “profile.”. An example field
could be:
Build-Depends: exotic-compiler, libneeded-dev, tool-tiny,
tool-huge (>= 1.0) [linux-any] <!profile.embedded !profile.bootstrap>
or even stuff like:
Depends: net-tools <profile.network>, plugin-curl <!profile.no-plugins>
The generated binary packages and .changes files will get a new
Built-For-Profiles field containing the active profiles during the build.
In addition the build profile can be selected using the environment
variable DEB_BUILD_PROFILES, with space separated values, such as:
DEB_BUILD_PROFILES="embedded bootstrap"
The management and possible registration in the profile namespace is
currently out of scope in dpkg, this should probably be handled by a
distribution specific process.
See draft <http://www.hadrons.org/~guillem/debian/docs/embedded.proposal>.
Closes: #661538
Based-on-patch-by: Patrick "P. J." McDermott <pjm@nac.net>
Based-on-patch-by: Wookey <wookey@debian.org>
Based-on-patch-by: Johannes Schauer <j.schauer@email.de>
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
This is unneeded since commit c13a013fd8778f9f558bedfb532c011dcb304394
where float handling was replaced by struct deb_version. But in any
case the call had been ineffective for a very long time (since commit
3dc5dd229b5044494db300e6fef7fd47363ce0b6, May 2002), because setting
LC_ALL got moved from before to after setting LC_NUMERIC.
|
|
Switch all program to use the new function instead of open-coding it.
|
|
|
|
|
|
Test against an explicit major version 2 instead of just assuming the
alternate branch of major version 0 will be 2. This is more future-proof
and makes the code clearer.
Reported-by: Jérémy Bobbio <lunar@debian.org>
|
|
Although this is currently a very short-lived leak.
Reported-by: Jérémy Bobbio <lunar@debian.org>
|
|
This makes sure the commands will not produce strange output due to
environment settings. The cleaned environment variables are XZ_DEFAULTS,
XZ_OPT, BZIP and BZIP2, depending on the compressor used.
Move GZIP environment variable cleanup to libdpkg, as there's nothing
inherently dpkg-deb specific in resetting the environment variables for
a specific compressor so that the output is reproducible and a bit more
consistent with the code using the specific compressor library.
|
|
|
|
These will perform any necessary action when starting and exiting a
dpkg-based program.
|
|
Make clear that the command requires two arguments, instead of
suggesting only a deb filename is needed, to then requesting a directory
name on a second invocation.
Closes: #718899
|
|
Although the two call sites are doing almost the same, they need
different argument parsing logic, and inlining the code will allow
to print more meaningful bad usage messages.
|
|
|
|
This is not allowed by the format defined in deb(5), but dpkg-deb has
been very lenient all this time. Enforce the correct format by erroring
out in case of misplaced members.
|
|
Print a message when we've found the data member but do not know the
compression, and another one when there's an unknown member before the
data member.
This also stops resetting adminmember to -1 as a temporary sentinel,
so that we don't lose previous state.
|
|
Suggested-by: Ma Xiaojun <damage3025@gmail.com>
|
|
This adds support for filtered, huffman, rle and fixed strategies. Those
are only usable when dpkg-deb uses zlib, because the command line tool
gzip does not have any way to specify them.
|
|
This will allow downstreams to choose something better than gzip as
their default compressor, for example xz. Or when xz becomes the
default to revert back to something else.
|
|
These just clutter the code base, as adding modelines for each possible
editor out there does not scale, and they are currently not exhaustive
anyway.
|
|
|
|
The named options are not future-proof, as they will not allow to easily
create packages with specific formats once a future new version gets
introduced. The new option will also allow to request specific minor
revision of a major format, for testing purposes for example.
This also makes the code more explicit as it now refers to specific
format versions when building it.
|
|
This clarifies the call sites as to what they want from the extractor,
and abstracts the code to allow for a future switch to an internal tar
extractor instead of requiring an external tar program.
|
|
|
|
|
|
|
|
|
|
This switch frees the -h option to be used in the distant future for
other purposes, it also uses a character that does not have any other
obvious meaning for help output, and which is pretty safe to be used
blindly by the user in the same way as --help.
|