summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* mark internal interfaces as hiddenDavid Kalnischkies2014-11-0817-497/+72
| | | | | | | We have a bunch of classes which are of no use for the outside world, but were still exported and so needed to preserve ABI/API. Marking them as hidden to not export them any longer is a big API break in theory, but in practice nobody is using them – as if they would its a bug.
* better non-virtual metaIndex.LocalFileName() implementationDavid Kalnischkies2014-11-086-50/+51
| | | | | | | | We can't add a new virtual method without breaking the ABI, but we can freely add new methods, so for older ABIs we just implement this method with a dynamic_cast, so that clients can be more ignorant about the API here and especially don't need to pull a very dirty trick by assuming internal knowledge (like apt-get did here).
* guard ABI changes for LFS in apt-instDavid Kalnischkies2014-11-086-4/+49
| | | | Git-Dch: Ignore
* use a abi version check similar to the gcc checkDavid Kalnischkies2014-11-0810-19/+20
| | | | Git-Dch: Ignore
* replace ignore-deprecated #pragma dance with _PragmaDavid Kalnischkies2014-11-0813-236/+76
| | | | | | | | | For compatibility we use/provide and fill quiet some deprecated methods and fields, which subsequently earns us a warning for using them. These warnings therefore have to be disabled for these codeparts and that is what this change does now in a slightly more elegant way. Git-Dch: Ignore
* (style) Variable 'res' is assigned a value that is never usedDavid Kalnischkies2014-11-081-13/+16
| | | | | | | | Checking the return value of this (and many other calls) in this testcase is a good idea, so we do it now. Reported-By: cppcheck Git-Dch: Ignore
* Division by result of sizeof(). memset() expects a size in bytesDavid Kalnischkies2014-11-081-2/+7
| | | | | | | | | "did you intend to multiply instead?" is what cppcheck helpful says and it is absolutely right. Doesn't make a whole lot of a difference though as we are talking about 'char' in this testcase, but just to be sure. Reported-By: cppcheck Git-Dch: Ignore
* Assert statement calls a function which may have desired side effects: ↵David Kalnischkies2014-11-081-2/+2
| | | | | | | | | | 'pos_is_okay' It does not have any desired sideeffect, so we just mark it as const to properly advertise this fact to developer, compiler and linter alike. Reported-By: cppcheck Git-Dch: Ignore
* (error) va_list 'args' was opened but not closed by va_end()David Kalnischkies2014-11-081-4/+8
| | | | | | | | | | | | | The manpage of va_start and co additionally says: On some systems, va_end contains a closing '}' matching a '{' in va_start, so that both macros must occur in the same function, and in a way that allows this. So instead of return/breaking instantly, we save the return, make a proper turndown with va_end in all cases and only end after that. Reported-By: cppcheck Git-Dch: Ignore
* tests: silence clang on uninitilized variablesDavid Kalnischkies2014-11-082-2/+3
| | | | | | | | The testcases have far worse problems if these ever end up being NULL and/or are not given a value by the method called, but clang is right to warn about it, just that we don't want to fix it in testcases… Git-Dch: Ignore
* reenable patchsize limit option for pdiffsDavid Kalnischkies2014-11-082-1/+35
| | | | | | | | One word: "doh!" Commit f6d4ab9ad8a2cfe52737ab620dd252cf8ceec43d disabled the check to prevent apt from downloading bigger patches than the index it tries to patch. Happens rarly of course, but still. Detected by scan-build complaining about a dead assignment. To make up for the mistake a test is included as well.
* releasing package apt version 1.1~exp8Michael Vogt2014-11-061-0/+21
|
* Run ./prepare-release pre-exportMichael Vogt2014-11-0655-50476/+53220
| | | | Git-dch: ignore
* Update symbols fileMichael Vogt2014-11-061-10/+1
| | | | Git-Dch: ignore
* Merge remote-tracking branch 'mvo/feature/no-more-acquire-guessing' into ↵Michael Vogt2014-11-068-204/+55
|\ | | | | | | debian/experimental
| * Merge remote-tracking branch 'upstream/debian/experimental' into ↵Michael Vogt2014-11-0641-341/+868
| |\ | | | | | | | | | | | | | | | | | | feature/no-more-acquire-guessing Conflicts: apt-pkg/acquire-item.cc
| * | apt-pkg/deb/debindexfile.{cc,h}: kill GetIndexes()Michael Vogt2014-11-052-14/+0
| | |
| * | test/integration/test-bug-624218-Translation-file-handling: clarify when ↵Michael Vogt2014-11-051-1/+2
| | | | | | | | | | | | Translation-* is guessed
| * | Only support Translation-* that are listed in the {In,}Release fileMichael Vogt2014-10-295-174/+46
| | | | | | | | | | | | | | | | | | | | | | | | Handle Translation-* files exactly like Packages files (with the expection that it is ok if a download of them fails). Remove all "guessing" on apts side. This will elimimnate a bunch of errors releated to captive portals and similar. Its also more correct and removes another potential attack vector.
* | | Bump ABI to 4.15Michael Vogt2014-11-054-2/+2
| | |
* | | prepare ABI for feature/socketpairMichael Vogt2014-11-052-0/+6
| | |
* | | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-11-053-4/+39
|\ \ \ | |_|/ |/| | | | | | | | Conflicts: debian/changelog
| * | Fix incorrect comparison between signed/unsignedMichael Vogt2014-10-231-1/+1
| | | | | | | | | | | | Git-Dch: ignore
| * | Use sysconf(_SC_ARG_MAX) to find the size of Dpkg::MaxArgBytesMichael Vogt2014-10-231-2/+21
| | | | | | | | | | | | | | | Instead of hardcoding Dpkg::MaxArgBytes find out about it using the sysconf(_SC_ARG_MAX) call.
| * | doc/examples/configure-index: make "Dpkg::Max{Arg,ArgBytes} match realityMichael Vogt2014-10-221-2/+2
| | | | | | | | | | | | Git-Dch: ignore
| * | releasing package apt version 1.0.9.3Michael Vogt2014-10-151-0/+16
| | |
* | | test/integration/test-apt-update-filesize-mismatch: use "basename file ↵Michael Vogt2014-11-041-1/+1
| | | | | | | | | | | | suffix" instead of -s for compatibility with older systems
* | | apt-pkg/acquire-item.h: make friend declaration compatible with older gccMichael Vogt2014-11-041-1/+1
| | |
* | | Call "Dequeue()" for items in AbortTransaction() to fix raceMichael Vogt2014-11-042-0/+5
| | | | | | | | | | | | | | | | | | The pkgAcquire::Run() code works uses a while(ToFetch > 0) loop over the items queued for fetching. This means that we need to Deqeueue the item if we call AbortTransaction() to avoid a hang.
* | | move permission changing from -item to -workerDavid Kalnischkies2014-10-262-45/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The worker is the part closest to the methods, which will call the item methods according to what it gets back from the methods, it is therefore a better place to change permissions as it is very central and can do it now at the point the item is assigned to a method rather than then it is queued for download (and as before while dequeued via Done/Failure). Git-Dch: Ignore
* | | tests: enhance output of grep and test failsDavid Kalnischkies2014-10-266-42/+64
| | | | | | | | | | | | Git-Dch: Ignore
* | | rewrite ReadMessages()David Kalnischkies2014-10-262-58/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Central methods of our infrastructure like this one responsible for communication with our methods shouldn't be more complicated then they have to and not claim to have (albeit unlikely) bugs. While I am not sure about having improved the first part, the bug is now gone and a few explicit tests check that it stays that way, so nobody will notice the difference (hopefully) – expect that this should a very tiny bit faster as well as we don't manually proceed through the string. Git-Dch: Ignore
* | | promote filesize to a hashstringDavid Kalnischkies2014-10-2410-16/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is a very simple hashstring, which is why it isn't contributing to the usability of a list of them, but it is also trivial to check and calculate, so it doesn't hurt checking it either as it can combined even with the simplest other hashes greatly complicate attacks on them as you suddenly need a same-size hash collision, which is usually a lot harder to achieve.
* | | tests: support 'installed' release in insertpackageDavid Kalnischkies2014-10-236-45/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is sometimes handy to have an installed package also in the archive, but this was until now harder than it should as you had to duplicate the lines, which is especially dangerous while writing the tests as it easily happens that these two lines divert and so the same-but-different version detection kicks in. Git-Dch: Ignore
* | | switch tests to Translation-en usageDavid Kalnischkies2014-10-231-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | We can use either and some tests exercise this, but the default should be what we want to use and that is a split out long description file which is properly mentioned in the Release file. Git-Dch: Ignore
* | | add test for Basic Authentication schemeDavid Kalnischkies2014-10-235-16/+219
| | | | | | | | | | | | Git-Dch: Ignore
* | | chown finished partial files earlierDavid Kalnischkies2014-10-2319-141/+229
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | partial files are chowned by the Item baseclass to let the methods work with them. Now, this baseclass is also responsible for chowning the files back to root instead of having various deeper levels do this. The consequence is that all overloaded Failed() methods now call the Item::Failed base as their first step. The same is done for Done(). The effect is that even in partial files usually don't belong to _apt anymore, helping sneakernets and reducing possibilities of a bad method modifying files not belonging to them. The change is supported by the framework not only supporting being run as root, but with proper permission management, too, so that privilege dropping can be tested with them.
* | check that auth.conf exists before chowning itDavid Kalnischkies2014-10-221-3/+4
| | | | | | | | Git-Dch: Ignore
* | Ensure /etc/apt/auth.conf has _apt:root ownerMichael Vogt2014-10-212-7/+10
| | | | | | | | | | Ensure in SetupAPTPartialDirectory() that the /etc/apt/auth.conf file can be read by the priv sep apt methods.
* | debian/apt.postinst: chown _apt:root /etc/apt/auth.confMichael Vogt2014-10-211-0/+5
| | | | | | | | | | If the methods drop privileges we need to ensure that /etc/apt/apt.conf is still readable by the _apt user.
* | test if TMPDIR is accessible before usingDavid Kalnischkies2014-10-205-6/+24
| | | | | | | | | | | | | | | | | | | | Private temporary directories as created by e.g. libpam-tmpdir are nice, but they are also very effective in preventing our priviledge dropping to work as TMPDIR will be set to a directory only root has access to, so working with it as _apt will fail. We circumvent this by extending our check for a usable TMPDIR setting by checking access rights. Closes: 765951
* | testcases: do not allow warnings in testsuccessDavid Kalnischkies2014-10-2012-28/+60
| | | | | | | | | | | | | | | | | | | | Adds a new testwarning which tests for zero exit and the presents of a warning in the output, failing if either is not the case or if an error is found, too. This allows us to change testsuccess to accept only totally successful executions (= without warnings) which should help finding regressions. Git-Dch: Ignore
* | check for failure message in testsuccess/failureDavid Kalnischkies2014-10-209-92/+66
| | | | | | | | | | | | | | | | These functions check the exit code of the command, but for apt commands we can go further and require an error message for non-zero exits and none for zero exits. Git-Dch: Ignore
* | use c++ style instead of the last two c-arraysDavid Kalnischkies2014-10-201-21/+21
| | | | | | | | Git-Dch: Ignore
* | check lists/ content in tests doing rollbackDavid Kalnischkies2014-10-209-53/+75
| | | | | | | | Git-Dch: Ignore
* | autorun permission tests for all apt-get update callsDavid Kalnischkies2014-10-204-16/+41
| | | | | | | | | | | | | | | | Adds some infrastructure to run tests automatically for certain commands. The first command being 'apt-get update' (and 'apt update') which check for correct permission and owner of the files in lists/. Git-Dch: Ignore
* | aborted reverify restores file owner and permissionDavid Kalnischkies2014-10-203-31/+94
| | | | | | | | | | | | | | | | | | | | If we get an IMS hit for an InRelease file we use the file we already have and pass it into reverification, but this changes the permissions and on abort of the transaction they weren't switched back. This is now done, additionally, every file in partial which hasn't failed gets permission and owner changed for root access as well, as it is very well possible that the next invocation will (re)use these files.
* | run acquire transactions only onceDavid Kalnischkies2014-10-201-0/+2
| | | | | | | | | | | | | | | | | | | | Transactions are run and completed from multiple places, so it happens for unsigned repos that the Release file was commited even if it was previously aborted (due to --no-allow-insecure-repositories). The reason is simply that the "failure" of getting an InRelease/Release.gpg is currently ignored, so that the acquire process believes that nothing bad happened and commits the transaction even though the same transaction was previously aborted.
* | mark --allow-insecure-repositories message as translateableDavid Kalnischkies2014-10-201-18/+15
| | | | | | | | | | | | | | Refactors a bit to ensure the same message is used in all three cases as well. Git-Dch: Ignore
* | reenable support for -s (and co) in apt-get sourceDavid Kalnischkies2014-10-202-1/+5
| | | | | | | | | | | | | | | | The conversion to accept only relevant options for commands has forgotten another one, so adding it again even through the usecase might very well be equally good served by --print-uris. Closes: 742578