<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/acquire-item.cc, branch 2.9.2</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.9.2</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.9.2'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2024-04-19T18:54:54Z</updated>
<entry>
<title>Add an audit message for missing InRelease files</title>
<updated>2024-04-19T18:54:54Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-01-23T18:01:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=858a551b50ea3871748d9196896e54b361c3d545'/>
<id>urn:sha1:858a551b50ea3871748d9196896e54b361c3d545</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Change the default log level from debug to notice</title>
<updated>2024-04-19T18:11:22Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-01-23T17:37:42Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=3cd6eacd1ab42e414f0d899a3f74fc60140f0e8a'/>
<id>urn:sha1:3cd6eacd1ab42e414f0d899a3f74fc60140f0e8a</id>
<content type='text'>
We never used the debug level before, so we can do that. This
allows us to have the new audit level.

We did call DumpErrors() with DEBUG in two debug code paths,
so don't touch those.

debug
</content>
</entry>
<entry>
<title>Modernize standard library includes</title>
<updated>2024-02-20T12:49:04Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-02-20T12:43:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=40a75722c43ae24cb9a99d6730a3b25b65819c49'/>
<id>urn:sha1:40a75722c43ae24cb9a99d6730a3b25b65819c49</id>
<content type='text'>
This was automated with sed and git-clang-format, and then I had to
fix up the top of policy.cc by hand as git-clang-format accidentally
indented it by two spaces.
</content>
</entry>
<entry>
<title>Do not store .diff_Index files in update</title>
<updated>2024-01-03T16:59:11Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2024-01-03T16:25:35Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=afcdbcf895284efd76903b2b3ba5cc849059ce50'/>
<id>urn:sha1:afcdbcf895284efd76903b2b3ba5cc849059ce50</id>
<content type='text'>
Nowadays we only download the index file if we have a non-current file
on disk which we want to patch. If that is the case, any index file for
patches we could have stored is by definition outdated, so storing those
files just takes up disk space.

At least, that is the case if we have a Release file – if we don't this
commit introduces a needless redownload for such repositories but such
repositories are an error by default and if they can't be bothered to
provide a Release file its very unlikely they actually ship diffs, so
adding detection code for this seems pointless at best.
</content>
</entry>
<entry>
<title>Do not store trusted=yes Release file unconditionally</title>
<updated>2023-03-04T12:07:00Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2023-03-04T10:55:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=937221fde2a5ca989a0b80728cd3ba3639f9f20e'/>
<id>urn:sha1:937221fde2a5ca989a0b80728cd3ba3639f9f20e</id>
<content type='text'>
A source marked with trusted=yes can still fail verification of the
Release file, mostly for Date related issues, like being too new or too
old, which have other options to force them in.

The update code was not using the Release file (which was a InRelease
file but failed verification – which was overridden by trusted=yes) as
intended, but it marked it for storage, so that this "bad" Release file
would end up being moved into lists/, which is bad as the indexes it
refers to aren't updated while the next update run assumes that the
indexes are in the state the Release file claims them to be in.

Fixed simply by making the storage conditional on the usage as intended,
which also resolves a second issue: The verification can also detect that
a Release file we got is older than what we already have to avoid down-
grade attacks. The more likely explanation is a slightly outdated mirror
in a rotation/CDN through, so this gets the silent treatment to avoid
scaring users by handling it as if we had got the same Release file we
already have stored locally, removing the freshly received older file
in the process alongside setting some variables. Those variables were
already modified in the trusted=yes case though resulting in the stored
Release file being removed instead. Not modifying the variables too early
resolves this problem as well.

Both seem to exist since at least 2015 as traces are visible in 448c38bdcd
already, which shuffled lots of code around including the bad ones, but
as we are in trusted=yes land, security is of no concern here, this
"just" leads to failed pinning, hashsum mismatches and other strange
problems in follow-up calls depending on how out of sync the Release
file (if its still present) is with the rest of the trusted data.

Reported-By: Dima Kogan &lt;dkogan@debian.org&gt; on IRC
Tested-By: Dima Kogan &lt;dkogan@debian.org&gt;
</content>
</entry>
<entry>
<title>Detect trimmed changelogs and pick online instead</title>
<updated>2023-03-03T16:51:05Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2023-01-28T21:17:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=acbfdf0533602a05de066aa86d1f756b5fe0f4a3'/>
<id>urn:sha1:acbfdf0533602a05de066aa86d1f756b5fe0f4a3</id>
<content type='text'>
We only check the start of these lines to avoid hard coding the exact
command and we pick 150 as maximum line length as the longest package
name on my system is apparently 75 characters long. We could choose
longer or shorter without much issue as over-length just means we
mishandle the rest of the line as a new line and it should be really
unlikely that a) lines are that long in this file and b) that such long
lines contain one of our trigger sequences – but even if, all we do is
start a download of an online file. Could be worse.

This auto-detection can be avoided by setting
Acquire::Changelogs::AlwaysOnline (or Origin specific sub options)
to "true" if you always want the changelog from an online source.
The reverse – setting it to "false" in the hope it would not get the
changelog from an online source – was not and is still not possible.

Closes: #1024457
</content>
</entry>
<entry>
<title>Typo fix</title>
<updated>2022-12-13T06:48:30Z</updated>
<author>
<name>Egon Willighagen</name>
<email>egon.willighagen@gmail.com</email>
</author>
<published>2022-12-13T06:48:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=d9ffa93a8ef9d8e8c39d1dcbd6b41315858799c7'/>
<id>urn:sha1:d9ffa93a8ef9d8e8c39d1dcbd6b41315858799c7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Avoid .c_str() on strings feed into pkgTagSection::FindS</title>
<updated>2022-04-01T12:16:19Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-03-28T16:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=0b156cd1711a5e27643b941f5a321a62e5a9b628'/>
<id>urn:sha1:0b156cd1711a5e27643b941f5a321a62e5a9b628</id>
<content type='text'>
FindS has a APT::StringView based API nowadays, so we can avoid these
explicit calls also allowing us to avoid the std::string in input or
output entirely or at least move it a few branches down.
</content>
</entry>
<entry>
<title>Spelling fixes</title>
<updated>2021-11-27T10:22:38Z</updated>
<author>
<name>Ville Skyttä</name>
<email>ville.skytta@iki.fi</email>
</author>
<published>2021-11-03T22:08:07Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=01eed4234440d82fc52c8186cf4268517bcd28bc'/>
<id>urn:sha1:01eed4234440d82fc52c8186cf4268517bcd28bc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>acquire-item: Quote Signed-By before sending it</title>
<updated>2021-10-18T13:49:10Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-06-09T11:09:38Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=c8e5008794f07afa1e9c139249c682eb5745fc25'/>
<id>urn:sha1:c8e5008794f07afa1e9c139249c682eb5745fc25</id>
<content type='text'>
This currently has no effect, as there are no quotable characters
inside it, but it will allow us to send embedded keys through to
the method.
</content>
</entry>
</feed>
