summaryrefslogtreecommitdiff
path: root/apt-pkg
Commit message (Collapse)AuthorAgeFilesLines
* UpperCase some functions for consistencyMichael Vogt2014-10-071-25/+25
| | | | | | | | changeOwnerAndPermissionOfFile->ChangeOwnerAndPermissionOfFile preparePartialFile->GetPartialFileName preparePartialFileFromURI->GetPartialFileNameFromURI Git-Dch: ignore
* display errortext for all Err as well as Ign logsDavid Kalnischkies2014-10-071-41/+36
| | | | | | | consistently using Item::Failed in all specializec classes helps setting up some information bits otherwise unset, so some errors had an empty reason as an error. Ign is upgraded to display the error message we ignored to further help in understanding what happens.
* use _apt:root only for partial directoriesDavid Kalnischkies2014-10-073-59/+84
| | | | | | | | | | | | | | | | Using a different user for calling methods is intended to protect us from methods running amok (via remotely exploited bugs) by limiting what can be done by them. By using root:root for the final directories and just have the files in partial writeable by the methods we enhance this in sofar as a method can't modify already verified data in its parent directory anymore. As a side effect, this also clears most of the problems you could have if the final directories are shared without user-sharing or if these directories disappear as they are now again root owned and only the partial directories contain _apt owned files (usually none if apt isn't running) and the directory itself is autocreated with the right permissions.
* ensure partial dirs are 0700 and owned by _apt:rootDavid Kalnischkies2014-10-073-31/+70
| | | | | | | | | Reworks the API involved in creating and setting up the fetcher to be a bit more pleasent to look at and work with as e.g. an empty string for no lock isn't very nice. With the lock we can also stop creating all our partial directories "just in case". This way we can also be a bit more aggressive with the partial directory itself as with a lock, we know we will gone need it.
* fixup foldmarkers in acquire-item.ccDavid Kalnischkies2014-10-071-91/+51
| | | | Git-Dch: Ignore
* fix warningsMichael Vogt2014-10-061-3/+3
|
* rename StopAuthentication -> CheckStopAuthentication and make it protectedMichael Vogt2014-10-062-9/+11
|
* rename AuthDone() -> CheckAuthDone()Michael Vogt2014-10-062-6/+4
|
* cleanup pkgAcq*::Failed()Michael Vogt2014-10-062-72/+54
|
* add missing TransactionStageCopy() in pkgAcqDiffIndex::Done()Michael Vogt2014-10-061-12/+5
|
* Rework pkgAcqMeta{Index,Sig,ClearSig}::Done() for readabilityMichael Vogt2014-10-062-209/+127
| | | | | | Move common code out but do not use subclassing for ::Done to make it easier to understand what each class is doing when its done
* fix incorrect docstrings for ↵Michael Vogt2014-10-061-2/+2
| | | | AcqMetaBase::TransactionStageRemoval/AcqMetaBase::TransactionStageCopy
* add new "SetActiveSubprocess()Michael Vogt2014-10-062-46/+25
|
* really do not download Release if InRelease does not verifyMichael Vogt2014-10-031-20/+24
|
* cleanup around pkgAcqMetaSig and improved testsMichael Vogt2014-10-022-47/+47
|
* add a bunch of docstrings etcMichael Vogt2014-10-022-14/+40
|
* fix crashMichael Vogt2014-10-022-11/+14
|
* donkults fixesMichael Vogt2014-10-022-40/+37
|
* Cleanup pkgAcqIndexMichael Vogt2014-10-022-135/+171
|
* refactor and add pkgAcqIndex::ValidateFile()Michael Vogt2014-10-012-25/+39
|
* fix leftover files from Acquire::GzipIndexMichael Vogt2014-10-011-1/+1
|
* hack around test-apt-update-unauth failureMichael Vogt2014-10-011-0/+9
|
* update test/integration/test-releasefile-verificationMichael Vogt2014-10-011-9/+9
|
* Use Acquire::Allow{InsecureRepositories,DowngradeToInsecureRepositories}Michael Vogt2014-10-012-11/+28
| | | | | | | | | | | The configuration key Acquire::AllowInsecureRepositories controls if apt allows loading of unsigned repositories at all. The configuration Acquire::AllowDowngradeToInsecureRepositories controls if a signed repository can ever become unsigned. This should really never be needed but we provide it to avoid having to mess around in /var/lib/apt/lists if there is a use-case for this (which I can't think of right now).
* add verify for the .diff/Index download and add FIXME for ↵Michael Vogt2014-10-011-0/+19
| | | | pkgAcqIndexDiffs/pkgAcqMergeDiffs
* cleanupMichael Vogt2014-09-292-31/+54
|
* fix DestFile extMichael Vogt2014-09-291-1/+1
|
* refactorMichael Vogt2014-09-292-37/+33
|
* Adjust DestFile in ReverifyAfterIMS() to not include compr ExtensionMichael Vogt2014-09-292-1/+8
|
* Merge remote-tracking branch 'upstream/debian/experimental' into ↵Michael Vogt2014-09-2935-642/+1383
|\ | | | | | | | | | | | | | | | | feature/acq-trans Conflicts: apt-pkg/acquire-item.cc apt-pkg/acquire-item.h methods/gpgv.cc
| * Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-09-292-36/+65
| |\ | | | | | | | | | | | | Conflicts: apt-pkg/acquire-item.cc
| | * Merge remote-tracking branch 'donkult/feature/generalize-gzipindex' into ↵Michael Vogt2014-09-262-37/+67
| | |\ | | | | | | | | | | | | debian/sid
| | | * generalize Acquire::GzipIndexMichael Vogt2014-09-212-37/+67
| | | |
| * | | replace c-string Mode with c++-string ActiveSubprocessDavid Kalnischkies2014-09-282-4/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A long-lasting FIXME in the acquire code points out the problem that we e.g. for decompressors assign c-string representations of c++-strings to the Mode variable, which e.g. cppcheck points out as very bad. In practice, nothing major happens as the c++-strings do not run out of scope until Mode would do, but that is bad style and fragile, so the obvious proper fix is to use a c++ string for storage to begin with. The slight complications stems from the fact that progress reporting code in frontends potentially uses Mode and compares it with NULL, which can't be done with std::string, so instead of just changing the type we introduce a new variable and deprecate the old one. Git-Dch: Ignore
| * | | allow options between command and -- on commandlineDavid Kalnischkies2014-09-281-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This used to work before we implemented a stricter commandline parser and e.g. the dd-schroot-cmd command constructs commandlines like this. Reported-By: Helmut Grohne
| * | | allow fetcher setup without directory creationDavid Kalnischkies2014-09-272-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | apt-get download and changelog as well as apt-helper reuse the acquire system for their own proposes without requiring the directories the fetcher wants to create, which is a problem if you run them as non-root and the directories do not exist as it greets you with: E: Archives directory /var/cache/apt/archives/partial is missing. - Acquire (13: Permission denied) Closes: 762898
| * | | store source name and version in binary cacheDavid Kalnischkies2014-09-275-11/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Accessing the package records to acquire this information is pretty costly, so that information wasn't used so far in many places. The most noticeable user by far is EDSP at the moment, but there are ideas to change that which this commit tries to enable.
| * | | fix: The class 'pkgSourceList' defines member variable with name 'SrcList' ↵David Kalnischkies2014-09-271-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | also defined in its parent class 'pkgSource' Git-Dch: Ignore Reported-By: cppcheck
| * | | fix: Prefer prefix ++/-- operators for non-primitive typesDavid Kalnischkies2014-09-272-5/+5
| | | | | | | | | | | | | | | | | | | | Git-Dch: Ignore Reported-By: cppcheck
| * | | fix: Consecutive return, break, continue, goto or throw statements are ↵David Kalnischkies2014-09-271-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | unnecessary. Git-Dch: Ignore Reported-By: cppcheck
| * | | add and use 'apt-key verify' which prefers gpgv over gpgDavid Kalnischkies2014-09-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gnupg/gnupg2 can do verify just fine of course, so we don't need to use gpgv here, but it is what we always used in the past, so there might be scripts expecting a certain output and more importantly the output of apt-cdrom contains messages from gpg and even with all the settings we activate to prevent it, it still shows (in some versions) a quiet scary: "gpg: WARNING: Using untrusted key!" message. Keeping the use of gpgv is the simplest way to prevent it. We are increasing also the "Breaks: apt" version from libapt as it requires a newer apt-key than might be installed in partial upgrades.
| * | | add --readonly option for apt-key advDavid Kalnischkies2014-09-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some advanced commands can be executed without the keyring being modified like --verify, so this adds an option to disable the mergeback and uses it for our gpg calling code. Git-Dch: Ignore
| * | | use apt-key adv (+ gnupg) instead of gpgv for verifyDavid Kalnischkies2014-09-271-45/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | apt-key does the keyring merge as we need it, so we just call it instead of reimplementing it to do the merging before gpgv. This means we don't use gpgv anymore (we never depended on it explicitly - bad style), but it also means that the message in apt-cdrom add is a bit less friendly as it says loudly "untrusted key", but for a one-time command its okay.
| * | | fix: warning: extra ‘;’ [-Wpedantic]David Kalnischkies2014-09-272-3/+3
| | | | | | | | | | | | | | | | | | | | Reported-By: gcc -Wpedantic Git-Dch: Ignore
| * | | fix: Member variable 'X' is not initialized in the constructor.David Kalnischkies2014-09-2710-26/+23
| | | | | | | | | | | | | | | | | | | | Reported-By: cppcheck Git-Dch: Ignore
| * | | fix occurrence typo in tagfile commentDavid Kalnischkies2014-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | Reported-By: codespell Git-Dch: Ignore
| * | | add an API for cache filters/matcherDavid Kalnischkies2014-09-272-52/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of code deals with iterating over packages and checking for specific states. At the moment these are all handcrafted inplace, but that makes sharing common code which just differs in the states it checks rather difficult and is error prune. Having an API to construct arbitrary complex filters will come in handy for those. Git-Dch: Ignore
| * | | move PCI::From* methods into CacheSetHelper classDavid Kalnischkies2014-09-272-87/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The methods itself deal with the helper a lot, so it makes sense to move them to the helper itself, which helps also if we want to override some of these methods, the FromString mentioned in the bugreport being the obvious example. VCI is spared from this change for now as while it would fit with the same reasoning it much heavier entangled with the previous CacheSetHelper change, so moving it now would mean breaking the API. The PCI change is worthwhile on its own though as it is used by VCI. Closes: 686221
| * | | rework cachesets API to allow future extensionDavid Kalnischkies2014-09-272-144/+484
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduction of Fnmatch showed that each new selector would require multiple new virtual methods in the CacheSetHelper to work correctly, which isn't that great. We now flip to a single virtual method which handles all cases separated by an enum – as new enum values can be added without an ABI break. Great care was taken to make old code work with the new way of organisation, which means in return that you might be bombarded with deprecation warnings now if you don't adapt, but code should still compile and work as before as can be seen in apt itself with this commit. Git-Dch: Ignore
| * | | add APT::PackageUniverse as a pkgCache wrapperDavid Kalnischkies2014-09-271-0/+38
| | | | | | | | | | | | | | | | Git-Dch: Ignore