summaryrefslogtreecommitdiff
path: root/dpkg-deb
AgeCommit message (Collapse)AuthorFilesLines
2014-10-06dpkg-deb: Remove arbitrary filename limitGuillem Jover2-4/+0
The limit was lifted when the code switched from a constant sized string to a dynamic one via varbuf.
2014-10-06libdpkg: Namespace and reword subproc flagsGuillem Jover1-1/+1
2014-10-06libdpkg: Rename subproc_wait_check() to subproc_reap()Guillem Jover3-10/+10
2014-10-06dpkg-deb: Stop warning on unknown arbitrary fieldsGuillem Jover1-38/+0
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.
2014-10-06dpkg-deb: Add new --ctrl-tarfile commandGuillem Jover3-0/+20
This allows to easily extract the entire control member in tar format, for further processing.
2014-08-15dpkg-deb: Remove unbalanced trailing single-quote in error messageGuillem Jover1-1/+1
Reported-by: Trần Ngọc Quân <vnwildman@gmail.com>
2014-08-09dpkg-deb: Use parsedb() instead of an ad-hoc deb822 parserGuillem Jover2-53/+30
This makes sure any field fixup and sanity check is performed on the input, and gets reflected on the output.
2014-06-02libdpkg: Uppercase and namespace pkgpriority enum valuesGuillem Jover1-1/+1
2014-05-28libdpkg: Uppercase and namespace dpkg_arch_type enum valuesGuillem Jover1-1/+1
2014-05-28libdpkg: Uppercase compressor enum valuesGuillem Jover3-18/+18
2014-05-17build: Switch to use libtool for the static librariesGuillem Jover1-2/+1
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
2014-04-21dpkg-deb: Use --no-unquote when using -T to avoid mangling filenamesGuillem Jover1-1/+2
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>
2014-04-21dpkg-deb: Deprecate compressing .deb files with bzip2Guillem Jover1-0/+2
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.
2014-04-21libdpkg, dpkg-deb: Fix compound literal usage with C99 compilersGuillem Jover1-2/+2
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.
2014-01-15dpkg-deb: Align long options in --help ouputGuillem Jover1-2/+2
2014-01-15dpkg-deb: Allow to use the same compression for control.tar as data.tarGuillem Jover3-9/+23
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.
2014-01-15dpkg-deb: Accept other compressions for control.tar .deb memberGuillem Jover3-4/+17
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.
2014-01-15dpkg-deb: Use default gzip compression level instead of hardcoding itGuillem Jover1-1/+1
Use the global default, instead of setting it explicitly in the code.
2013-12-17dpkg-deb, dpkg: Unify and clarify conffile name length error messageGuillem Jover1-1/+1
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
2013-12-17dpkg-deb: Change conffile name length warning into an errorGuillem Jover1-9/+3
Such packages will not be accepted by dpkg at install time anyway, so catch this early on, and don't let it through.
2013-12-17dpkg-deb: Remove trailing newlines from warning messageGuillem Jover1-2/+2
Update and unfuzzy translation strings.
2013-12-07Use https:// URLs instead of http:// when possibleGuillem Jover5-5/+5
2013-12-05Rename cmdinfos set functions to have underscores between wordsGuillem Jover1-2/+2
2013-12-05Add experimental build profiles supportGuillem Jover1-0/+1
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>
2013-11-23dpkg-deb: Do not set LC_NUMERIC to POSIXGuillem Jover1-1/+0
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.
2013-11-23libdpkg: New dpkg_locales_init()Guillem Jover1-4/+1
Switch all program to use the new function instead of open-coding it.
2013-11-08libdpkg: Refactor integer parsing into new dpkg_options_parse_arg_int()Guillem Jover1-6/+1
2013-10-17dpkg-deb: Refactor file_treewalk_feed() out from do_build()Guillem Jover1-34/+53
2013-10-17dpkg-deb: Be explicit when handling deb format 2 code branchesGuillem Jover1-2/+7
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>
2013-10-17dpkg-deb: Do not leak the data member file descriptorGuillem Jover1-0/+2
Although this is currently a very short-lived leak. Reported-by: Jérémy Bobbio <lunar@debian.org>
2013-10-17libdpkg: Reset environment variables for all compressors in the filterGuillem Jover1-2/+0
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.
2013-10-14libdpkg: Rename and namespace option parsing and loading functionsGuillem Jover1-1/+1
2013-10-14libdpkg: Add dpkg-based program startup and shutdown functionsGuillem Jover1-4/+2
These will perform any necessary action when starting and exiting a dpkg-based program.
2013-08-10dpkg-deb: Clarify --extract bad usage error message on missing argumentsGuillem Jover1-2/+4
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
2013-08-10dpkg-deb: Inline controlextractvextract() into call sitesGuillem Jover1-27/+33
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.
2013-08-10dpkg-deb: Use badusage() instead of ohshit() for usage errorsGuillem Jover1-2/+4
2013-08-10dpkg-deb: Do not accept deb packages with data and control members swappedGuillem Jover1-1/+6
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.
2013-08-10dpkg-deb: Be more precise on deb member errorsGuillem Jover1-7/+9
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.
2013-07-18Change user-friendly UI recommendation from dselect to aptGuillem Jover1-3/+3
Suggested-by: Ma Xiaojun <damage3025@gmail.com>
2013-07-18dpkg-deb: Add support for gzip compression strategiesGuillem Jover1-1/+2
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.
2013-07-18build: Allow changing the default dpkg-deb compressor on configureGuillem Jover1-1/+1
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.
2013-04-19Remove Emacs and vim modelinesGuillem Jover2-5/+0
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.
2013-04-14Avoid assignments in C conditionalsGuillem Jover1-2/+4
2013-04-14dpkg-deb: Add new --deb-format option and base --new and --old on itGuillem Jover3-8/+54
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.
2013-04-14dpkg-deb: Use an enum instead of a literal string to pass tar optionsGuillem Jover3-16/+45
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.
2013-04-14dpkg-deb: Switch extracthalf() to use struct commandGuillem Jover1-7/+12
2013-03-19dpkg-deb: Do not initialize variable that gets a subsequent valueGuillem Jover1-1/+1
2013-03-18dpkg-deb: Document --debug in --help outputGuillem Jover1-1/+1
2012-06-30Align --version with --help on help outputGuillem Jover1-1/+1
2012-06-30Change all programs to accept -? instead of -h for help outputGuillem Jover1-2/+2
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.