summaryrefslogtreecommitdiff
path: root/cmdline
Commit message (Collapse)AuthorAgeFilesLines
* dispose http(s) 416 error page as non-contentDavid Kalnischkies2014-12-221-12/+23
| | | | | | | | | | | | | | | | | | | | | | | Real webservers (like apache) actually send an error page with a 416 response, but our client didn't expect it leaving the page on the socket to be parsed as response for the next request (http) or as file content (https), which isn't what we want at all… Symptom is a "Bad header line" as html usually doesn't parse that well to an http-header. This manifests itself e.g. if we have a complete file (or larger) in partial/ which isn't discarded by If-Range as the server doesn't support it (or it is just newer, think: mirror rotation). It is a sort-of regression of 78c72d0ce22e00b194251445aae306df357d5c1a, which removed the filesize - 1 trick, but this had its own problems… To properly test this our webserver gains the ability to reply with transfer-encoding: chunked as most real webservers will use it to send the dynamically generated error pages. (The tests and their binary helpers had to be slightly modified to apply, but the patch to fix the issue itself is unchanged.) Closes: 768797
* support long keyids in "apt-key del" instead of ignoring themJames McCoy2014-11-281-1/+1
| | | | | | | | | | | apt-key given a long keyid reports just "OK" all the time, but doesn't delete the mentioned key as it doesn't find the key. Note: In debian/experimental this was closed with 29f1b977100aeb6d6ebd38923eeb7a623e264ffe which just added the testcase as the rewrite of apt-key had fixed this as well. Closes: 754436
* use 'best' hash for source authenticationDavid Kalnischkies2014-11-101-12/+16
| | | | | | | | | | | | | | | | Collect all hashes we can get from the source record and put them into a HashStringList so that 'apt-get source' can use it instead of using always the MD5sum. We therefore also deprecate the MD5 struct member in favor of the list. While at it, the parsing of the Files is enhanced so that records which miss "Files" (aka MD5 checksums) are still searched for other checksums as they include just as much data, just not with a nice and catchy name. This is a cherry-pick of 1262d35 with some dirty tricks to preserve ABI. LP: 1098738
* apt-get: Create the temporary downloaded changelog inside tmpdirGuillem Jover2014-10-021-1/+1
| | | | | | | | The code is creating a secure temporary directory, but then creates the changelog alongside the tmpdir in the same base directory. This defeats the secure tmpdir creation, making the filename predictable. Inject a '/' between the tmpdir and the changelog filename.
* generalize Acquire::GzipIndexMichael Vogt2014-09-211-1/+1
|
* Use heap to allocate PatternMatch to avoid potential stack overflowMichael Vogt2014-09-021-2/+3
| | | | | | | | | | | When apt-cache search with many args (> 130) is given the allocation of PatternMatch on the stack may fail resulting in a segmentation fault. By using the heap the max size is much bigger and we also get a bad_alloc expection instead of a segfault (which we can catch *if* this ever becomes a pratical problem). No test for the crash as its not reproducable with the MALLOC_ settings in framework. Closes: 759612
* Make Proxy-Auto-Detect check for each hostMichael Vogt2014-09-021-0/+16
| | | | | | | | | When doing Acquire::http{,s}::Proxy-Auto-Detect, run the auto-detect command for each host instead of only once. This should make using "proxy" from libproxy-tools feasible which can then be used for PAC style or other proxy configurations. Closes: #759264
* add dpkg::source-options for dpkg-source invocationDavid Kalnischkies2014-08-261-16/+17
| | | | | | | | | | | dpkg-source can be told to enforce signature checks with --require-valid-signature, but while this isn't feasible as default for Debian itself at the moment, a local admin should be able to use it. This commit also fixes the size limit on the construction of the command being called for dpkg-source and dpkg-buildpackage. Closes: 757534
* show our broken packages message in 'apt' solverDavid Kalnischkies2014-06-182-20/+24
|
* Merge remote-tracking branch 'mvo/feature/apt-update-info' into debian/sidMichael Vogt2014-06-101-0/+1
|\
| * show upgradable packages after apt updateMichael Vogt2014-05-221-0/+1
| | | | | | | | Closes: 748389
* | Merge remote-tracking branch ↵Michael Vogt2014-06-101-0/+9
|\ \ | | | | | | | | | 'mvo/bugfix/apt-get-source-unauthenticated-warning' into debian/sid
| * | Show unauthenticated warning for source packages as wellMichael Vogt2014-06-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This will show the same unauthenticated warning for source packages as for binary packages and will not download a source package if it is unauthenticated. This can be overridden with --allow-unauthenticated Closes: #749795
* | | support Acquire::GzipIndexes in dumpavailDavid Kalnischkies2014-06-101-1/+1
| | | | | | | | | | | | Closes: 742835
* | | cmdline/apt-helper.cc: use less generic description/short-descriptionMichael Vogt2014-06-061-1/+2
| | |
* | | print error stack on failure of 'apt' solverDavid Kalnischkies2014-05-301-18/+18
|/ / | | | | | | Git-Dch: ignore
* | fix screen width detection for apt/apt-get listsSebastian Schmidt2014-05-221-1/+0
| | | | | | | | | | | | | | 3163087b moved SigWinch(int) from apt-get.cc to private-output.cc without moving #include <sys/ioctl.h>, making SigWinch a nop. Closes: 748430, 747942
* | Fix missing ScreenWidth check in apt.ccMichael Vogt2014-04-282-19/+7
| |
* | remove unused duplicated acqprogress.{cc,h} filesDavid Kalnischkies2014-04-262-345/+0
|/ | | | | | Those files are in apt-private and used from there. Git-Dch: Ignore
* Fix crash in "apt list" when a sources.list file is unreableMichael Vogt2014-04-041-1/+1
| | | | Closes: 743413
* enable DPkg::Progress-Fancy by defaultMichael Vogt2014-04-011-1/+1
|
* Use mkstemp() in apt-extracttemplaes (closes: #741627)Michael Vogt2014-03-271-6/+9
| | | | | Use mkstemp() in apt-extractemplates and add a integrationtest for apt-extracttemplates too. Thanks to Steve Kemp for the report.
* fix test/integration/test-apt-helperMichael Vogt2014-03-1413-365/+315
|\
| * cmdline parsing: apt-config is not apt-cdromDavid Kalnischkies2014-03-131-1/+1
| |
| * improve debug output in case downloadfile failsDavid Kalnischkies2014-03-131-8/+7
| | | | | | | | Git-Dch: Ignore
| * remove code duplication for Add & Ident in apt-cdromDavid Kalnischkies2014-03-131-121/+81
| | | | | | | | | | | | | | | | | | The preparation code to deal with auto-detection and co is the same for both methods, so not sharing them would be bad. Deals also with the prevention of side effects triggered by the auto-detection like disabling mounting for the fallback. Git-Dch: Ignore
| * use SPtrArray handling instead of explicit delete[]David Kalnischkies2014-03-131-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | The warning message from gcc doesn't make that much sense in my reading as there is no loop which could overflow here, but it is better to use our SPtrArray wrapping anyway which fixes the warning as well. warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations] delete[] Dsc; Git-Dch: Ignore Reported-By: gcc -Wunsafe-loop-optimizations
| * follow method attribute suggestions by gccDavid Kalnischkies2014-03-132-2/+2
| | | | | | | | | | Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
| * cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-1313-132/+130
| | | | | | | | | | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
| * warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies2014-03-139-18/+18
| | | | | | | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
| * warning: no previous declaration for foobar() [-Wmissing-declarations]David Kalnischkies2014-03-1311-66/+66
| | | | | | | | | | Git-Dch: Ignore Reported-By: gcc -Wmissing-declarations
| * warning: extra ‘;’ [-Wpedantic]David Kalnischkies2014-03-131-13/+13
| | | | | | | | | | Git-Dch: Ignore Reported-By: gcc -Wpedantic
| * fix -Wmissing-field-initializers warningsDavid Kalnischkies2014-03-131-1/+1
| | | | | | | | | | Reported-By: gcc Git-Dch: Ignore
| * support DEB_BUILD_PROFILES and -P for build profilesDavid Kalnischkies2014-03-132-0/+11
| | | | | | | | | | | | | | | | | | | | Inspired by the rest of the patch in 661537, but abstract the parsing of various ways of setting the build profiles more so it can potentially be reused and all apt parts have the same behaviour. Especially config options, cmdline options and environment will not be combined as proposed as this isn't APTs usual behaviour and dpkg doesn't do it either, so one overrides the other as it normally does.
* | Merge remote-tracking branch 'upstream/debian/sid' into ↵Michael Vogt2014-03-121-1/+2
|\| | | | | | | | | | | | | | | | | feature/apt-download-file Conflicts: cmdline/apt-helper.cc test/integration/framework test/integration/test-apt-https-no-redirect
| * initial version of apt-helperMichael Vogt2014-02-272-0/+134
| |
* | add hashsum support in apt-file download and add more testsMichael Vogt2014-03-121-0/+11
| |
* | initial version of apt-helperMichael Vogt2014-02-272-0/+134
|/
* Add support for data.tar, control.tar and control.tar.xzGuillem Jover2014-02-221-14/+4
| | | | | | | | Sync the deb(5) format support with latest dpkg, by allowing uncompressed tar members and xz compressed control.tar. This also refactors the control.tar member extraction by using ExtractTarMember(), which also means future changes only need to be implemented in a single place.
* Fix typos in documentation (codespell)Michael Vogt2014-02-224-8/+8
|
* remove auto-generated apt-key and sources.list on clean (closes: 739749)Michael Vogt2014-02-221-14/+19
|
* trivial indent fixMichael Vogt2014-02-131-1/+1
|
* Merge remote-tracking branch 'mvo/debian/sid' into debian/sidMichael Vogt2014-02-122-6/+0
|\ | | | | | | | | Conflicts: test/integration/test-apt-get-download
| * Use a APT::VersionSet instead of a VersionListMichael Vogt2014-02-121-3/+3
| | | | | | | | | | | | | | Use a APT::VersionSet instead of a APT::VersionList in DoDownload() to ensure that there is only one version in the set even if the user passes multiple identical name/versions on the commandline (Bug#738103)
| * move isatty() check into InitOutput()Michael Vogt2014-02-052-6/+0
| |
* | apt-cdrom should succeed if any drive succeedsJohn Ogness2014-02-121-17/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there are multiple CD-ROM drives, `apt-cdrom add` will abort with an error if any of the drives do not contain a Debian CD which is against the documentation we have saying "a CD-ROM" and also scripts do not expect it this way. This patch modifies apt-cdrom to return success if any of the drives succeeded. If failures occur, apt-cdrom will still continue trying all the drives and report the last failure (if none of them succeeded). The 'ident' command was also changed to match the new 'add' behavior. Closes: 728153
* | use VersionSet in download to handle repeatsDavid Kalnischkies2014-02-101-3/+3
|/ | | | Closes: 738103
* fix apt-get download truncation (closes: #736962)Michael Vogt2014-01-291-3/+6
|
* Merge remote-tracking branch 'donkult/debian/sid' into debian/sidMichael Vogt2014-01-261-13/+14
|\ | | | | | | | | | | | | Conflicts: apt-private/private-list.cc doc/po/de.po test/integration/framework
| * use gpg --homedir instead of explicit file placementDavid Kalnischkies2014-01-161-13/+14
| | | | | | | | | | | | Avoids that gpg gets the idea it could use files from the user which weren't overridden specifically like secret keyring and trustdb as before.