]> git.saurik.com Git - apt.git/log
apt.git
10 years agorefactor and add pkgAcqIndex::ValidateFile()
Michael Vogt [Wed, 1 Oct 2014 20:41:52 +0000 (22:41 +0200)] 
refactor and add pkgAcqIndex::ValidateFile()

10 years agofix leftover files from Acquire::GzipIndex
Michael Vogt [Wed, 1 Oct 2014 16:01:14 +0000 (18:01 +0200)] 
fix leftover files from Acquire::GzipIndex

10 years agohack around test-apt-update-unauth failure
Michael Vogt [Wed, 1 Oct 2014 15:13:33 +0000 (17:13 +0200)] 
hack around test-apt-update-unauth failure

10 years agofix test-apt-update-nofallback test
Michael Vogt [Wed, 1 Oct 2014 12:22:46 +0000 (14:22 +0200)] 
fix test-apt-update-nofallback test

10 years agoupdate test/integration/test-releasefile-verification
Michael Vogt [Wed, 1 Oct 2014 12:06:01 +0000 (14:06 +0200)] 
update test/integration/test-releasefile-verification

10 years agoUse Acquire::Allow{InsecureRepositories,DowngradeToInsecureRepositories}
Michael Vogt [Wed, 1 Oct 2014 10:21:55 +0000 (12:21 +0200)] 
Use Acquire::Allow{InsecureRepositories,DowngradeToInsecureRepositories}

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).

10 years agoadd verify for the .diff/Index download and add FIXME for pkgAcqIndexDiffs/pkgAcqMerg...
Michael Vogt [Wed, 1 Oct 2014 09:20:08 +0000 (11:20 +0200)] 
add verify for the .diff/Index download and add FIXME for pkgAcqIndexDiffs/pkgAcqMergeDiffs

10 years agocleanup
Michael Vogt [Mon, 29 Sep 2014 15:38:23 +0000 (17:38 +0200)] 
cleanup

10 years agoMerge remote-tracking branch 'debian/debian/experimental' into feature/acq-trans
Michael Vogt [Mon, 29 Sep 2014 09:47:20 +0000 (11:47 +0200)] 
Merge remote-tracking branch 'debian/debian/experimental' into feature/acq-trans

10 years agomore test fixes
Michael Vogt [Mon, 29 Sep 2014 09:47:03 +0000 (11:47 +0200)] 
more test fixes

10 years agoTest if TMPDIR is a directory in apt-key and if not unset it
Michael Vogt [Mon, 29 Sep 2014 09:43:37 +0000 (11:43 +0200)] 
Test if TMPDIR is a directory in apt-key and if not unset it

This prevents a failure in mktemp -d - it will blindly trust
TMPDIR and not use something else if the dir is not there.

10 years agofix DestFile ext
Michael Vogt [Mon, 29 Sep 2014 09:26:30 +0000 (11:26 +0200)] 
fix DestFile ext

10 years agotest fixes
Michael Vogt [Mon, 29 Sep 2014 09:03:02 +0000 (11:03 +0200)] 
test fixes

10 years agorefactor
Michael Vogt [Mon, 29 Sep 2014 08:43:00 +0000 (10:43 +0200)] 
refactor

10 years agoAdjust DestFile in ReverifyAfterIMS() to not include compr Extension
Michael Vogt [Mon, 29 Sep 2014 08:41:31 +0000 (10:41 +0200)] 
Adjust DestFile in ReverifyAfterIMS() to not include compr Extension

10 years agoMerge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans
Michael Vogt [Mon, 29 Sep 2014 07:58:38 +0000 (09:58 +0200)] 
Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans

Conflicts:
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h
methods/gpgv.cc

10 years agoAdd missing "adduser" dependency (for the new _apt user)
Michael Vogt [Mon, 29 Sep 2014 06:37:48 +0000 (08:37 +0200)] 
Add missing "adduser" dependency (for the new _apt user)

Closes: #763004
Thanks: Russ Allbery

10 years agoMerge branch 'debian/sid' into debian/experimental
Michael Vogt [Mon, 29 Sep 2014 06:33:33 +0000 (08:33 +0200)] 
Merge branch 'debian/sid' into debian/experimental

Conflicts:
apt-pkg/acquire-item.cc

10 years agoSet STRIP_FROM_PATH for doxygen
Trần Ngọc Quân [Sun, 28 Sep 2014 08:33:19 +0000 (15:33 +0700)] 
Set STRIP_FROM_PATH for doxygen

Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
10 years agoreplace c-string Mode with c++-string ActiveSubprocess
David Kalnischkies [Sat, 27 Sep 2014 23:57:49 +0000 (01:57 +0200)] 
replace c-string Mode with c++-string ActiveSubprocess

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

10 years agoallow options between command and -- on commandline
David Kalnischkies [Sat, 27 Sep 2014 23:25:21 +0000 (01:25 +0200)] 
allow options between command and -- on commandline

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
10 years agocleanup partial directory of lists in apt-get clean
David Kalnischkies [Sat, 27 Sep 2014 18:09:44 +0000 (20:09 +0200)] 
cleanup partial directory of lists in apt-get clean

Not really the intended usecase for apt-get clean, but users expect it
to help them in recovery and it can't really hurt as this directory
should be empty if everything was fine and proper anyway.

Closes: #762889
10 years agoallow fetcher setup without directory creation
David Kalnischkies [Sat, 27 Sep 2014 17:45:30 +0000 (19:45 +0200)] 
allow fetcher setup without directory creation

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
10 years agoJapanese program translation update
Kenshi Muto [Sat, 27 Sep 2014 17:37:30 +0000 (19:37 +0200)] 
Japanese program translation update

Closes: 763033
10 years agostore source name and version in binary cache
David Kalnischkies [Fri, 20 Jun 2014 17:34:40 +0000 (19:34 +0200)] 
store source name and version in binary cache

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.

10 years agofix: %i in format string (no. 1) requires 'int' but the argument type is
David Kalnischkies [Fri, 26 Sep 2014 23:00:14 +0000 (01:00 +0200)] 
fix: %i in format string (no. 1) requires 'int' but the argument type is
'unsigned int'

Git-Dch: Ignore
Reported-By: cppcheck
10 years agofix: The class 'pkgSourceList' defines member variable with name 'SrcList' also defin...
David Kalnischkies [Fri, 26 Sep 2014 22:51:03 +0000 (00:51 +0200)] 
fix: The class 'pkgSourceList' defines member variable with name 'SrcList' also defined in its parent class 'pkgSource'

Git-Dch: Ignore
Reported-By: cppcheck
10 years agofix: Prefer prefix ++/-- operators for non-primitive types
David Kalnischkies [Fri, 26 Sep 2014 22:49:25 +0000 (00:49 +0200)] 
fix: Prefer prefix ++/-- operators for non-primitive types

Git-Dch: Ignore
Reported-By: cppcheck
10 years agofix: Consecutive return, break, continue, goto or throw statements are unnecessary.
David Kalnischkies [Fri, 26 Sep 2014 22:46:43 +0000 (00:46 +0200)] 
fix: Consecutive return, break, continue, goto or throw statements are unnecessary.

Git-Dch: Ignore
Reported-By: cppcheck
10 years agoMerge branch 'feature/gnupglimit' into debian/experimental
David Kalnischkies [Fri, 26 Sep 2014 22:12:44 +0000 (00:12 +0200)] 
Merge branch 'feature/gnupglimit' into debian/experimental

10 years agoadd gnupg and gnupg2 as test-dependency
David Kalnischkies [Fri, 26 Sep 2014 21:09:01 +0000 (23:09 +0200)] 
add gnupg and gnupg2 as test-dependency

apt can work with both, so it has an or-dependency on them,
but the tests want to play with both of them.

Git-Dch: Ignore

10 years agoensure apt-key del handles 16-byte key ids
James McCoy [Mon, 18 Aug 2014 10:54:19 +0000 (12:54 +0200)] 
ensure apt-key del handles 16-byte key ids

The original patch does not apply against the rewritten apt-key,
but an additional test doesn't hurt.

Closes: 754436
10 years agoremove empty keyrings in trusted.gpg.d on upgrade
David Kalnischkies [Fri, 24 Jan 2014 14:45:09 +0000 (15:45 +0100)] 
remove empty keyrings in trusted.gpg.d on upgrade

Adding and deleting many repositories could cause (empty) keyring files
to pill up in older apt-key versions, which in the end might cause gnupg
to run into its internal limit of at most 40 keyrings

10 years agoadd and use 'apt-key verify' which prefers gpgv over gpg
David Kalnischkies [Mon, 14 Apr 2014 16:24:17 +0000 (18:24 +0200)] 
add and use 'apt-key verify' which prefers gpgv over gpg

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.

10 years agomiscellaneous small cleanups in apt-key
David Kalnischkies [Thu, 6 Feb 2014 17:43:55 +0000 (18:43 +0100)] 
miscellaneous small cleanups in apt-key

Git-Dch: Ignore

10 years agoadd --readonly option for apt-key adv
David Kalnischkies [Thu, 6 Feb 2014 16:56:28 +0000 (17:56 +0100)] 
add --readonly option for apt-key adv

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

10 years agouse only one --keyring in gpg interactions
David Kalnischkies [Mon, 27 Jan 2014 21:07:16 +0000 (22:07 +0100)] 
use only one --keyring in gpg interactions

We were down to at most two keyrings before, but gnupg upstream plans
dropping support for multiple keyrings in the longrun, so with a
single keyring we hope to be future proof – and 'apt-key adv' isn't a
problem anymore as every change to the keys is merged back, so we have
now the same behavior as before, but support an unlimited amount of
trusted.gpg.d keyrings.

10 years agoadd --secret-keyring option for apt-key
David Kalnischkies [Mon, 27 Jan 2014 17:26:44 +0000 (18:26 +0100)] 
add --secret-keyring option for apt-key

For some advanced usecases it might be handy to specify the secret
keyring to be used (e.g. as it is used in the testcases), but specifying
it via a normal option for gnupg might not be available forever:
http://lists.gnupg.org/pipermail/gnupg-users/2013-August/047180.html

Git-Dch: Ignore

10 years agoallow to specify fingerprints in 'apt-key del'
David Kalnischkies [Mon, 27 Jan 2014 16:04:53 +0000 (17:04 +0100)] 
allow to specify fingerprints in 'apt-key del'

10 years agoadd a test for apt-key export{,all}
David Kalnischkies [Mon, 27 Jan 2014 15:59:46 +0000 (16:59 +0100)] 
add a test for apt-key export{,all}

Git-Dch: Ignore

10 years agouse apt-key to wrap gpg calls in testcases
David Kalnischkies [Sun, 26 Jan 2014 18:23:58 +0000 (19:23 +0100)] 
use apt-key to wrap gpg calls in testcases

beside testing apt-key a bit it also avoids duplicating gpghome setup
code in apt-key and the test framework

Git-Dch: Ignore

10 years agorespect --keyring also in merged keyring commands
David Kalnischkies [Sun, 26 Jan 2014 18:14:13 +0000 (19:14 +0100)] 
respect --keyring also in merged keyring commands

Git-Dch: Ignore

10 years agosupport gnupg2 as drop-in replacement for gnupg
David Kalnischkies [Sun, 26 Jan 2014 17:28:50 +0000 (18:28 +0100)] 
support gnupg2 as drop-in replacement for gnupg

If both are available APT will still prefer gpg over gpg2 as it is a bit
more lightweight, but it shouldn't be a problem to use one or the other
(at least at the moment, who knows what will happen in the future).

10 years agodelay gnupg setup in apt-key until it is needed
David Kalnischkies [Sun, 26 Jan 2014 16:37:00 +0000 (17:37 +0100)] 
delay gnupg setup in apt-key until it is needed

'apt-key help' and incorrect usage do not need a functioning gnupg
setup, as well as we shouldn't try to setup gnupg before we actually
test if it is available (and print a message if it is not).

10 years agocorrect the error messages to refer to apt-key instead of gpgv
David Kalnischkies [Sun, 26 Jan 2014 16:23:50 +0000 (17:23 +0100)] 
correct the error messages to refer to apt-key instead of gpgv

Git-Dch: Ignore

10 years agouse apt-key adv (+ gnupg) instead of gpgv for verify
David Kalnischkies [Fri, 24 Jan 2014 22:48:11 +0000 (23:48 +0100)] 
use apt-key adv (+ gnupg) instead of gpgv for verify

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.

10 years agomerge fragment keyrings in apt-key to avoid hitting gpg limits
David Kalnischkies [Fri, 24 Jan 2014 21:40:52 +0000 (22:40 +0100)] 
merge fragment keyrings in apt-key to avoid hitting gpg limits

gnupg has a hardlimit of 40 (at the moment) keyrings per invocation,
which can be exceeded with (many) repositories. That is rather
misfortune as the longrun goal was to drop gnupg dependency at some
point in the future, but this can now be considered missed and dropped.

It also means that 'apt-key adv' commands might not have the behaviour
one would expect it to have as it mainly operates on a big temporary
keyring, so commands modifying keys will break. Doing this was never a
good idea anyway through, so lets just hope nothing break too badly.

Closes: 733028
10 years agorefactor key removal code to reuse it in next step
David Kalnischkies [Fri, 24 Jan 2014 17:24:43 +0000 (18:24 +0100)] 
refactor key removal code to reuse it in next step

Git-Dch: Ignore

10 years agoset a primary-keyring only if we have access to it
David Kalnischkies [Fri, 24 Jan 2014 16:41:35 +0000 (17:41 +0100)] 
set a primary-keyring only if we have access to it

10 years agosupport (multiple) arguments properly in apt-key
David Kalnischkies [Fri, 24 Jan 2014 16:24:56 +0000 (17:24 +0100)] 
support (multiple) arguments properly in apt-key

10 years agoonly create new trusted.gpg if directory is writeable
David Kalnischkies [Fri, 24 Jan 2014 16:14:52 +0000 (17:14 +0100)] 
only create new trusted.gpg if directory is writeable

10 years agoall errors should be printed to stderr
David Kalnischkies [Fri, 24 Jan 2014 15:44:49 +0000 (16:44 +0100)] 
all errors should be printed to stderr

Git-Dch: Ignore

10 years agoadd a (hidden) --quiet option for apt-key
David Kalnischkies [Fri, 24 Jan 2014 15:43:19 +0000 (16:43 +0100)] 
add a (hidden) --quiet option for apt-key

10 years agorename postrm to apt.postrm
David Kalnischkies [Fri, 24 Jan 2014 14:18:14 +0000 (15:18 +0100)] 
rename postrm to apt.postrm

It helps in identifying its affiliation.
Also removes the old postinst which was hidden by apt.postinst for a
long time now and would just install a sources.list in edgecases which
is probably not a good idea (e.g. on my system /etc/apt/sources.list
does not exist). It is better done by the installer of the distro.

Git-Dch: Ignore

10 years agoremove leftover debug output from multikey softlink
David Kalnischkies [Fri, 24 Jan 2014 14:02:39 +0000 (15:02 +0100)] 
remove leftover debug output from multikey softlink

Git-Dch: Ignore

10 years agofix: warning: extra ‘;’ [-Wpedantic]
David Kalnischkies [Fri, 26 Sep 2014 20:55:56 +0000 (22:55 +0200)] 
fix: warning: extra ‘;’ [-Wpedantic]

Reported-By: gcc -Wpedantic
Git-Dch: Ignore

10 years agofix: Member variable 'X' is not initialized in the constructor.
David Kalnischkies [Fri, 26 Sep 2014 20:16:26 +0000 (22:16 +0200)] 
fix: Member variable 'X' is not initialized in the constructor.

Reported-By: cppcheck
Git-Dch: Ignore

10 years agofix occurrence typo in tagfile comment
David Kalnischkies [Fri, 26 Sep 2014 19:47:59 +0000 (21:47 +0200)] 
fix occurrence typo in tagfile comment

Reported-By: codespell
Git-Dch: Ignore

10 years agoremove outdated and unused po/ChangeLog
David Kalnischkies [Fri, 26 Sep 2014 19:46:41 +0000 (21:46 +0200)] 
remove outdated and unused po/ChangeLog

Git-Dch: Ignore

10 years agoadd an API for cache filters/matcher
David Kalnischkies [Sun, 7 Sep 2014 17:16:56 +0000 (19:16 +0200)] 
add an API for cache filters/matcher

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

10 years agomove PCI::From* methods into CacheSetHelper class
David Kalnischkies [Thu, 4 Sep 2014 17:01:12 +0000 (19:01 +0200)] 
move PCI::From* methods into CacheSetHelper class

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
10 years agoadapt to the new CacheSetHelper API
David Kalnischkies [Wed, 3 Sep 2014 17:02:05 +0000 (19:02 +0200)] 
adapt to the new CacheSetHelper API

Git-Dch: Ignore

10 years agorework cachesets API to allow future extension
David Kalnischkies [Wed, 3 Sep 2014 16:16:16 +0000 (18:16 +0200)] 
rework cachesets API to allow future extension

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

10 years agoadd APT::PackageUniverse as a pkgCache wrapper
David Kalnischkies [Wed, 3 Sep 2014 09:11:10 +0000 (11:11 +0200)] 
add APT::PackageUniverse as a pkgCache wrapper

Git-Dch: Ignore

10 years agoadd specialisations for std::vector
David Kalnischkies [Tue, 2 Sep 2014 22:26:13 +0000 (00:26 +0200)] 
add specialisations for std::vector

Git-Dch: Ignore

10 years agomark pkg(All|Dist)Upgrade as deprecated
David Kalnischkies [Sun, 17 Aug 2014 11:27:59 +0000 (13:27 +0200)] 
mark pkg(All|Dist)Upgrade as deprecated

The comment above their definition marks them already as such, so this
is only a formalisation of the deprecation and fixes the occurances we
have in our own code together with removing a magic number.

Git-Dch: Ignore

10 years agofix progress output for (dist-)upgrade calculation
David Kalnischkies [Sun, 17 Aug 2014 10:30:21 +0000 (12:30 +0200)] 
fix progress output for (dist-)upgrade calculation

Previously, we had a start and a done of the calculation printed by
higher-level code, but this got intermixed by progress reporting from an
external solver or the output of autoremove code…

The higherlevel code is now only responsible for instantiating a
progress object of its choosing (if it wants progress after all) and the
rest will be handled by the upgrade code. Either it is used to show the
progress of the external solver or the internal solver will give some
hints about its overall progress. The later isn't really a proper
progress as it will jump forward after each substep, but that is at
least a bit better than before without any progress indication.

Fixes also the 'strange' non-display of this progress line in -q=1, while
all others are shown, which is reflected by all testcase changes.

10 years agode-duplicate version strings in the cache
David Kalnischkies [Wed, 23 Jul 2014 12:52:11 +0000 (14:52 +0200)] 
de-duplicate version strings in the cache

Turns out that version numbers aren't as random as you might guess.
In my cache for example, I have:
  Total package names: 69513 (1390 k)
  Total package structures: 188259 (9036 k)
  Total distinct versions: 186345 (13.4 M)
  Total dependencies: 2052242 (57.5 M)
which amounts to 1035873 (10,1 M) strings.
Reusing version strings reduces this to 161465 (3.479 k).

This comes at a cost of course: Generation is slightly slower, but we
are still faster than what we started with and it makes room (also cache
size wise) for further changes.

10 years agodrop stored StringItems in favor of in-memory mappings
David Kalnischkies [Fri, 20 Jun 2014 19:33:56 +0000 (21:33 +0200)] 
drop stored StringItems in favor of in-memory mappings

Strings like Section names or architectures are needed vary often.
Instead of writing them each time we need them, we deploy sharing for
these special strings. Until now, this was done with a linked list of
strings in which we would search, which was stored in the cache.
It turns out we can do this just as well in memory as well with a bunch
of std::map's.

In memory means here that it isn't available anymore if we have a partly
invalid cache, but that isn't much of a problem in practice as the
status file is compared to the other files we parse very small and includes
mostly duplicates, so the space we would gain by storing is more or less
equal to the size of the stored linked list…

10 years agocount strings more accurately for stats
David Kalnischkies [Fri, 20 Jun 2014 18:28:54 +0000 (20:28 +0200)] 
count strings more accurately for stats

So far, only the few strings stored in stringitems were counted, but
many more strings are directly inserted into the cache. We account for
this now by identifying all these different strings and measure their
length. We are still not at the correct size of the cache in 'stats'
this way, but we are now again a bit closer.

Git-Dch: Ignore

10 years agopackages in the cache are sorted by name so noise-free
David Kalnischkies [Thu, 19 Jun 2014 10:23:10 +0000 (12:23 +0200)] 
packages in the cache are sorted by name so noise-free

Commit aa0fe657e46b87cc692895a36df12e8b74bb27bb sorts the package names
in the hashtable. We make use of this already in these functions, but as
a minor sideeffect it also means that we don't have 'noise' anymore
between packages belonging to the same group. We therefore don't need to
check for a matching name in Grp.FindPkg anymore.

Git-Dch: Ignore

10 years agosearch for pkg names in the cache case-sensitive
David Kalnischkies [Thu, 19 Jun 2014 09:59:41 +0000 (11:59 +0200)] 
search for pkg names in the cache case-sensitive

Package names have to be lowercase (debian-policy §5.6.1) and in as
lowlevel as these method are it would be quiet strange to treat an
invalid package "suddently" as a valid one which other tools might or
might not accept. If case-insensitivity is really needed the frontend
should ensure this rather than these methods waste cpu cycles by
default.

Git-Dch: Ignore

10 years agodeprecate Pkg->Name in favor of Grp->Name
David Kalnischkies [Thu, 19 Jun 2014 09:00:02 +0000 (11:00 +0200)] 
deprecate Pkg->Name in favor of Grp->Name

They both store the same information, so this field just takes up space
in the Package struct for no good reason. We mark it "just" as deprecated
instead of instantly removing it though as it isn't misleading like
Section was and is potentially used in the wild more often.

10 years agotest fixes
Michael Vogt [Fri, 26 Sep 2014 20:45:18 +0000 (22:45 +0200)] 
test fixes

10 years agoDo not allow going from authenticated to unauthenticated repo
Michael Vogt [Fri, 26 Sep 2014 18:59:31 +0000 (20:59 +0200)] 
Do not allow going from authenticated to unauthenticated repo

Also rework the way we load the Release file, so it only after
Release.gpg verified the Release file. The rational is that we
never want to load untrusted data into our parsers. Only stuff
verified with gpg or by its hashes get loaded. To load untrusted
data you now need to use apt-get update --allow-unauthenticated.

10 years agoPrint warning for unauthenticated repositories
Michael Vogt [Fri, 26 Sep 2014 18:59:56 +0000 (20:59 +0200)] 
Print warning for unauthenticated repositories

10 years agoDo not download Packages/Sources files on I-M-S hit of the Release file
Michael Vogt [Fri, 26 Sep 2014 16:13:48 +0000 (18:13 +0200)] 
Do not download Packages/Sources files on I-M-S hit of the Release file

With this branch we know that the data in the lists directory is always
what the release file says, so if the Release file is unchanged, then
there is no need to queue the download of the other indexfiles as they
will be unchanged too (or broken :)

10 years agoMerge remote-tracking branch 'donkult/feature/generalize-gzipindex' into debian/sid
Michael Vogt [Fri, 26 Sep 2014 16:09:32 +0000 (18:09 +0200)] 
Merge remote-tracking branch 'donkult/feature/generalize-gzipindex' into debian/sid

10 years agoDisable Mth.DropPrivsOrDie() in copy.cc for now
Michael Vogt [Fri, 26 Sep 2014 15:50:18 +0000 (17:50 +0200)] 
Disable Mth.DropPrivsOrDie() in copy.cc for now

Dch-Ignore: true

10 years agorewrite compressed indexes test to check with all compressors
David Kalnischkies [Thu, 25 Sep 2014 09:52:41 +0000 (11:52 +0200)] 
rewrite compressed indexes test to check with all compressors

Git-Dch: Ignore

10 years agoMerge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans
Michael Vogt [Thu, 25 Sep 2014 10:33:26 +0000 (12:33 +0200)] 
Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans

10 years agoRemove check for "Translation-" from pkgAcqIndex::Custom600Headers()
Michael Vogt [Thu, 25 Sep 2014 10:26:22 +0000 (12:26 +0200)] 
Remove check for "Translation-" from pkgAcqIndex::Custom600Headers()

This unneeded because pkgAcqIndexTrans has its own Custom600Headers()
method.

10 years agoRevert making pkgAcquire::Item::DescURI() "const"
Michael Vogt [Thu, 25 Sep 2014 09:49:16 +0000 (11:49 +0200)] 
Revert making pkgAcquire::Item::DescURI() "const"

Revert because its a API change and the gain does not justify the
extra work to make the required changes in the consumers of this
interface at this point.

10 years agoUse /var/empty as the homedir for _apt
Michael Vogt [Thu, 25 Sep 2014 09:39:16 +0000 (11:39 +0200)] 
Use /var/empty as the homedir for _apt

Thanks to Axel Beckert

10 years agoreleasing package apt version 1.1~exp3
Michael Vogt [Wed, 24 Sep 2014 18:14:55 +0000 (20:14 +0200)] 
releasing package apt version 1.1~exp3

10 years agoDropPrivs: Document what it does
Julian Andres Klode [Wed, 24 Sep 2014 20:28:44 +0000 (22:28 +0200)] 
DropPrivs: Document what it does

Git-Dch: ignore

10 years agoDropPrivs: Use APT::Sandbox::User instead of Apt::User::Nobody
Julian Andres Klode [Wed, 24 Sep 2014 20:26:41 +0000 (22:26 +0200)] 
DropPrivs: Use APT::Sandbox::User instead of Apt::User::Nobody

Git-Dch: ignore

10 years agoDropPrivs: Hard-fail if the user does not exist
Julian Andres Klode [Wed, 24 Sep 2014 20:07:27 +0000 (22:07 +0200)] 
DropPrivs: Hard-fail if the user does not exist

Git-Dch: ignore

10 years agoDropPrivs: Add some comments for the more obscure setuid/setgid functions
Julian Andres Klode [Wed, 24 Sep 2014 20:00:33 +0000 (22:00 +0200)] 
DropPrivs: Add some comments for the more obscure setuid/setgid functions

Git-Dch: ignore

10 years agoDropPrivs: Move the re-set uid/gid thing to the end of the function
Julian Andres Klode [Wed, 24 Sep 2014 19:53:45 +0000 (21:53 +0200)] 
DropPrivs: Move the re-set uid/gid thing to the end of the function

Git-Dch: ignore

10 years agomethods: Fail if we cannot drop privileges
Julian Andres Klode [Wed, 24 Sep 2014 19:49:19 +0000 (21:49 +0200)] 
methods: Fail if we cannot drop privileges

10 years agoDropPrivs: Improve comments
Julian Andres Klode [Wed, 24 Sep 2014 18:59:53 +0000 (20:59 +0200)] 
DropPrivs: Improve comments

Git-Dch: ignore

10 years agoDropPrivs: Also check for saved set-user-ID and set-group-ID
Julian Andres Klode [Wed, 24 Sep 2014 18:57:30 +0000 (20:57 +0200)] 
DropPrivs: Also check for saved set-user-ID and set-group-ID

10 years agoDropPrivs: Do not use an invalid return check for setgroups()
Julian Andres Klode [Wed, 24 Sep 2014 18:02:54 +0000 (20:02 +0200)] 
DropPrivs: Do not use an invalid return check for setgroups()

setgroups() returns 0 on success

Git-Dch: ignore

10 years agoUse _apt as our unprivileged user name
Julian Andres Klode [Wed, 24 Sep 2014 15:29:53 +0000 (17:29 +0200)] 
Use _apt as our unprivileged user name

Some people want to standardize on it, and BSDs do it too, so let's
do the same.

Reported-by: Paul Wise <pabs@debian.org>
10 years agoDropPriv: Really call seteuid and not setuid, and add more checks
Julian Andres Klode [Wed, 24 Sep 2014 14:47:55 +0000 (16:47 +0200)] 
DropPriv: Really call seteuid and not setuid, and add more checks

The only thing we are missing is non-portable saved ids support.

10 years agoDrop Privileges to "Debian-apt" in most acquire methods
Michael Vogt [Wed, 24 Sep 2014 14:22:05 +0000 (16:22 +0200)] 
Drop Privileges to "Debian-apt" in most acquire methods

Add a new "Debian-apt" user that owns the /var/lib/apt/lists
and /var/cache/apt/archive directories. The methods
http, https, ftp, gpgv, gzip switch to this user when they
start.

Thanks to Julian and "ioerror" and tors "switch_id()" code.

10 years agomake pdiff transactional (but at the cost of a CopyFile()
Michael Vogt [Tue, 23 Sep 2014 21:48:19 +0000 (23:48 +0200)] 
make pdiff transactional (but at the cost of a CopyFile()

10 years agocleanup, fix test-apt-update-unauth as the behavior of apt changed
Michael Vogt [Tue, 23 Sep 2014 16:08:53 +0000 (18:08 +0200)] 
cleanup, fix test-apt-update-unauth as the behavior of apt changed

10 years agocleanup
Michael Vogt [Tue, 23 Sep 2014 15:18:30 +0000 (17:18 +0200)] 
cleanup