summaryrefslogtreecommitdiff
path: root/dpkg-deb
AgeCommit message (Collapse)AuthorFilesLines
2017-10-17dpkg-deb: Fix capitalization of Debian in output messagesGuillem Jover1-4/+4
Here Debian refers to the distribution and in English this needs to be capitalized. No translation will be unfuzzed, as the capitalization rules change among locales. Warned-by: spellintian
2017-10-16dpkg-deb: Make --uniform-compression the new default behaviorGuillem Jover1-2/+3
Add support for negating the option via --no-uniform-compression.
2017-09-24dpkg-deb: Add support for rootless buildsGuillem Jover3-0/+9
This sets the control member entries always to root:root, and makes it possible to do the same for the data member entries via the new --root-onwer-group option. Closes: #291320 Based-on-patch-by: Niels Thykier <niels@thykier.net> Signed-off-by: Guillem Jover <guillem@debian.org>
2017-09-24dpkg-deb: Refactor tarball_pack options into a new structGuillem Jover1-6/+16
2017-09-24dpkg-deb: Sanity check config maintainer script file type and permissionsGuillem Jover1-0/+1
This is a well-known executable maintainer script, that ideally should be handled by dpkg itself. But for now we will at least sanity check its file type and permissions.
2017-05-06doc: Spelling fixesJosh Soref1-1/+1
Signed-off-by: Guillem Jover <guillem@debian.org>
2016-10-30libdpkg: Use our own dpkg_ar_hdr instead of relying on the system oneGuillem Jover1-1/+1
The ar format is not standardized and some systems might provide a different format than the one used by dpkg. For example on AIX.
2016-10-30Cast off_t variables to intmax_t when printing them with %jdGuillem Jover1-1/+1
Warned-by: clang
2016-10-30dpkg-deb: Generate reproducible file modes for the .deb control memberGuillem Jover1-8/+14
Closes: #787980
2016-10-30dpkg-deb: Remove obsolete --old and --new optionsGuillem Jover1-22/+0
2016-10-30dpkg-deb: Obsolete bzip2 and lzma compression methodsGuillem Jover1-3/+3
2016-07-31dpkg-deb: Fix typo in code commentGuillem Jover1-1/+1
2016-07-03build: Uniformize library build optionsGuillem Jover1-2/+2
Make all of them consistently follow the pattern --with-lib<name>. Rename the m4 macros, preprocessor defines, and automake _LIBS flags.
2016-07-03dpkg-deb: Set ar timestamp and tar mtime clamping to SOURCE_DATE_EPOCHGuillem Jover1-1/+20
The ar and tar file entries contain a timestamp which is usually filled with the current build time and the file mtime respectively. This causes the generated deb(5) packages to not be reproducible for the same source package and same build environment. We now check if the environment variable SOURCE_DATE_EPOCH is defined, parse that and use it as the timestamp for ar and to clamp the mtime in the tar file entries. This variable is specified to contain the timestamp of the source release date in seconds since the epoch. Closes: #759999 Base-on-patch-by: Jérémy Bobbio <lunar@debian.org>
2016-07-03dpkg-deb: Use same timestamp for the ar container as for tar mtime clampingGuillem Jover1-0/+2
We use the same timestamp for all ar members, and the tarball mtime clamping for each tar file entry.
2016-07-03dpkg-deb: Use new GNU tar --clamp-mtime optionGuillem Jover1-3/+15
This will guarantee that no file in binary packages has an mtime later than the specified time. Which will be required to make binary packages reproducible. The option was officially added in GNU tar 1.29, but in Debian it was introduced as a vendor patch in 1.28, so on Debian we depend on the latter instead of the former version. Closes: #759886
2016-07-03libdpkg: Add new struct dpkg_ar and basic operationsGuillem Jover2-44/+35
Switch current code to use dpkg_ar instead of taking a filename and a file descriptor arguments.
2016-05-02dpkg-deb: Promote a print to a warning for missing control filesGuillem Jover1-1/+1
2016-05-02dpkg-deb: Use info() instead of plain printf()Guillem Jover1-3/+2
2016-04-01dpkg-deb, scripts: Make the Architecture field mandatory on package buildsGuillem Jover1-10/+5
We still accept source and binary packages with missing or empty Architecture fields, but when building either of these, we require the field to be present.
2016-02-27dpkg-deb: Use the treewalk module to build the .deb control memberGuillem Jover1-23/+25
We reduce external dependencies on commands, and get sorted file lists. Closes: #719845
2016-02-27dpkg-deb: Use the treewalk module to build the .deb data memberGuillem Jover1-65/+21
We reduce external dependencies on commands, avoid a read syscall per byte on the pipe, reduce code substantially, and get sorted file lists.
2015-12-19dpkg-deb: Fix off-by-one write access on ctrllenbuf variableHanno Böck1-1/+1
This affects old format .deb packages. Fixes: CVE-2015-0860 Warned-by: afl Signed-off-by: Guillem Jover <guillem@debian.org> Stable-Candidate: 1.16.x 1.17.x
2015-12-12Use new str_fmt() instead of m_asprintf()Guillem Jover3-11/+8
It should make the code more clear, and in many cases it avoids having to use a temporary variable.
2015-10-18dpkg-deb: Refactor tarball packing into a new functionGuillem Jover1-31/+56
2015-10-18dpkg-deb: Generate the control build dir just onceGuillem Jover1-17/+19
2015-10-18Update Ian Jackson's email addressGuillem Jover5-5/+5
2015-09-14dpkg-deb: Fix off-by-one write access on versionbuf variableGuillem Jover1-1/+1
Closes: #798324 Warned-by: afl Reported-by: Jacek Wielemborek <d33tah@gmail.com> Stable-Candidate: 1.16.x 1.17.x
2015-07-30dpkg-deb: Move tar option --no-recursion before -TRichard Purdie1-1/+1
With tar > 1.28 the --no-recursion option is now positional, and needs to be passed before the -T option, otherwise the tarball will end up with duplicated entries. Stable-Candidate: 1.16.x 1.17.x Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Guillem Jover <guillem@debian.org>
2015-05-30dpkg-deb: Set correct default compression value for control.tar.gz memberGuillem Jover1-0/+2
Regression introduced in commit f1f9887b8f96965d6046857d12fda24c053c6d4b. The compressor independent way to denote the default value has been to use -1, but that needs to be fixed up to the actual default value per compressor, before the compressor specific setup. When using the gzip command-line tool this is a fatal error as it does not recognize the argument «-c-1». When using the zlib shared library this makes the code always default to the compression level 1, as ‘-’ is ignored by gzdopen(). The current minimal fix is to call compressor_check_params() when setting up the default control.tar compressor paramaters, although that makes the API hard to use correctly. This will be improved in the future. Closes: #786654
2015-05-30libdpkg: Rename DPKG_VERSION_ARCH to PACKAGE_RELEASEGuillem Jover1-1/+1
This avoids confusing the project-wide macro with the DPKG_VERSION_ namespaced ones.
2015-05-19dpkg-deb, dpkg: Do not allow pathnames with embedded newlinesGuillem Jover1-0/+2
None of the deb toolchain supports embedded newlines in filenames, we could try to escape them but then we'd need to add support in other tools to unescape these too, and this does not sem worth the trouble. Closes: #720761
2015-04-21Remove some unnecessary includes of assert.hNiels Thykier2-2/+0
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-21dpkg: Use badusage() instead of ohshit() for command-line errorsGuillem Jover1-2/+2
2015-04-18debian: Update my copyright yearsGuillem Jover2-1/+2
2015-04-10Consistently use proper quotation marks all over the placeGuillem Jover4-29/+30
That is "" or '', and not the unbalanced `' pair.
2015-04-01dpkg-deb: Use path_remove_tree() instead of direcly calling «rm -rf»Guillem Jover1-15/+1
2015-02-11dpkg-deb: Add support for reading the archive from standard inputGuillem Jover1-1/+7
All commands reading archives support this, except for --raw-extract that does not. Closes: #616614 Based-on-patch-by: Johannes Schauer <j.schauer@email.de>
2015-02-11dpkg-deb: Fix compressor subprocess nameGuillem Jover1-2/+2
This has not been a gzip-only compressor for a long time, update the code to reflect this.
2015-02-11dpkg-deb: Avoid an intermediate variable for the version stringGuillem Jover1-3/+3
2015-02-11dpkg-deb: Handle properly missing and empty architecture fieldsGuillem Jover1-1/+6
The parser always converts the value from DPKG_ARCH_NONE to DPKG_ARCH_EMPTY, so we will handle both here to avoid any such problem in the future. Regression introduced in commit 0238c795df88925c6579f740c7681ade22e88625.
2015-02-11dpkg-deb: Factor out check_control_file() from check_control_area()Guillem Jover1-5/+21
2015-02-11dpkg-deb: Rename check_new_pkg() to check_control_area()Guillem Jover1-3/+3
2015-02-11dpkg-deb, libdpkg: Fix short-lived memory leaksGuillem Jover2-0/+4
Closes: #769515
2015-02-11dpkg-deb: Rename pkg_get_pathname() to gen_dest_pathname_from_pkg()Guillem Jover1-3/+3
2015-02-11dpkg-deb: Move destination pathname generation into a new functionGuillem Jover1-26/+46
Always allocate the pathname, and return NULL in case we cannot generate one, delegating it to the code that parses the control file.
2015-01-28Switch code to use the new C locale character type functionsGuillem Jover2-4/+4
2015-01-26Remove unused <ctype.h> includesGuillem Jover2-2/+0
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