<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg, branch 1.5_rc1</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=1.5_rc1</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=1.5_rc1'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2017-08-24T14:56:52Z</updated>
<entry>
<title>Replace APT_CONST with APT_PURE everywhere</title>
<updated>2017-08-24T14:56:52Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2017-08-24T14:55:15Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=0e4ac8334d02ea256f750ad61689f28ff1ebdf6c'/>
<id>urn:sha1:0e4ac8334d02ea256f750ad61689f28ff1ebdf6c</id>
<content type='text'>
As a follow up to the last commit, let's replace APT_CONST
with APT_PURE everywhere to clean stuff up.
</content>
</entry>
<entry>
<title>Redefine APT_CONST to mean APT_PURE</title>
<updated>2017-08-24T14:56:48Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2017-08-24T14:50:12Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=03590fb98226bfdf3147eb78effc3fa7987709bb'/>
<id>urn:sha1:03590fb98226bfdf3147eb78effc3fa7987709bb</id>
<content type='text'>
Functions marked with the const attribute may not inspect
any global memory. This includes targets of pointers or
references passed as arguments. A pure function however
is free to inspect memory, but may not have any side
effects.

The function StringSplit() was marked as const, but took
two references to strings. When the second one was passed
as a literal as in StringSplit(name, "::") the compiler
cleverly figured out that we only inspect the address of
"::" (since StringSplit is const) and thus optimized away
the "::" content.

While patching out individual broken uses of APT_CONST
would be possible, this is already the second case, and
there might be more, so let's redefine APT_CONST to use
the pure attribute, so we don't end up with the same
situation again in some time.
</content>
</entry>
<entry>
<title>don't hang if multiple sources use unavailable method</title>
<updated>2017-08-04T12:33:34Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-08-04T10:51:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e250a8d8d8ef2f8f8c5e2041f7645c49fba7aa36'/>
<id>urn:sha1:e250a8d8d8ef2f8f8c5e2041f7645c49fba7aa36</id>
<content type='text'>
APT clients always noticed if a method isn't supported and nowadays
generate a message of the form:
	E: The method driver …/foobar could not be found.
	N: Is the package apt-transport-foobar installed?

This only worked if a single source was using such an unavailable method
through as we were registering the failed config the first round and
the second would try to send requests to the not started method, which
wouldn't work and hang instead (+ hiding the error messages as they would
be shown only at the end of the execution).

Closes: 870675
</content>
</entry>
<entry>
<title>don't keep configuration files open needlessly</title>
<updated>2017-08-04T11:06:10Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-07-31T20:47:58Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=898d53aca8fb26f3861d0efa4d5bef8adb620a7c'/>
<id>urn:sha1:898d53aca8fb26f3861d0efa4d5bef8adb620a7c</id>
<content type='text'>
Regression-Of: 3317ad864c997f4897756c0a2989c4199e9cda62
</content>
</entry>
<entry>
<title>allow the auth.conf to be root:root owned</title>
<updated>2017-07-26T17:09:04Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-07-07T20:21:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=881ec045b6660e2fe0c6953720260e380ceeeb99'/>
<id>urn:sha1:881ec045b6660e2fe0c6953720260e380ceeeb99</id>
<content type='text'>
Opening the file before we drop privileges in the methods allows us to
avoid chowning in the acquire main process which can apply to the wrong
file (imagine Binary scoped settings) and surprises users as their
permission setup is overridden.

There are no security benefits as the file is open, so an evil method
could as before read the contents of the file, but it isn't worse than
before and we avoid permission problems in this setup.
</content>
</entry>
<entry>
<title>reimplement and document auth.conf</title>
<updated>2017-07-26T17:09:04Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-07-07T14:24:21Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=ea408c560ed85bb4ef7cf8f72f8463653501332c'/>
<id>urn:sha1:ea408c560ed85bb4ef7cf8f72f8463653501332c</id>
<content type='text'>
We have support for an netrc-like auth.conf file since 0.7.25 (closing
518473), but it was never documented in apt that it even exists and
netrc seems to have fallen out of usage as a manpage for it no longer
exists making the feature even more arcane.

On top of that the code was a bit of a mess (as it is written in c-style)
and as a result the matching of machine tokens to URIs also a bit
strange by checking for less specific matches (= without path) first.
We now do a single pass over the stanzas.

In practice early adopters of the undocumented implementation will not
really notice the differences and the 'new' behaviour is simpler to
document and more usual for an apt user.

Closes: #811181
</content>
</entry>
<entry>
<title>show warnings instead of errors if files are unreadable</title>
<updated>2017-07-26T17:09:04Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-07-15T13:08:35Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=51751106976b1c6afa8f7991790db87b239fcc84'/>
<id>urn:sha1:51751106976b1c6afa8f7991790db87b239fcc84</id>
<content type='text'>
We used to fail on unreadable config/preferences/sources files, but at
least for sources we didn't in the past and it seems harsh to refuse to
work because of a single file, especially as the error messages are
inconsistent and end up being silly (like suggesting to run apt update
to fix the problem…).

LP: #1701852
</content>
</entry>
<entry>
<title>use FileFd to parse all apt configuration files</title>
<updated>2017-07-26T17:09:04Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-07-15T12:12:50Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=3317ad864c997f4897756c0a2989c4199e9cda62'/>
<id>urn:sha1:3317ad864c997f4897756c0a2989c4199e9cda62</id>
<content type='text'>
Using different ways of opening files means we have different behaviour
and error messages for them, so by the same for all we can have more
uniformity for users and apt developers alike.
</content>
</entry>
<entry>
<title>send weak-only hashes to methods</title>
<updated>2017-07-26T17:07:56Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-07-24T11:04:58Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=85f4a655cdc4d16c1b95de6fad7f3cd955265e46'/>
<id>urn:sha1:85f4a655cdc4d16c1b95de6fad7f3cd955265e46</id>
<content type='text'>
Weak hashes like filesize can be used by methods for basic checks and
early refusals even if we can't use them for hard security proposes.

Normal apt operations are not affected by this as they fail if no strong
hash is available, but if apt is forced to work with weak-only files or
e.g. in apt-helper context it can have benefits as weak is better than
no hash for the methods.
</content>
</entry>
<entry>
<title>don't move failed pdiff indexes out of partial</title>
<updated>2017-07-26T17:07:55Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-07-23T23:15:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=8df85a4fb91bed6c79a3cb9c2000881cc5b42ea7'/>
<id>urn:sha1:8df85a4fb91bed6c79a3cb9c2000881cc5b42ea7</id>
<content type='text'>
The comment says this is intended, but looking at the history reveals
that the comment comes from a different era. Nowadays we don't really
need it anymore (and even back then it was disputeable) as we haven't
used that file for our update in the end and nothing really needs this
file after the update.

Triggered is this by 188f297a2af4c15cb1d502360d1e478644b5b810 which
moves various error conditions forward including this code expecting the
file to exist – but it doesn't need to as download could have failed.
We could fix that by simple checking if the file exists and only stage
it if it does, but instead we don't stage it and instead even rename it
out of the way with our conventional FAILED name (if it exists).

That restores support for partial mirrors (= in this case mirrors which
don't ship pdiff files). Note that apt heals itself even if only such a
mirror is used as the update is successful even if that error is shown.

Closes: 869425
</content>
</entry>
</feed>
