<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/methods, branch 2.9.20</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.9.20</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.9.20'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2024-12-22T22:51:22Z</updated>
<entry>
<title>methods: Add new sqv method</title>
<updated>2024-12-22T22:51:22Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2024-12-07T15:44:18Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=da9a05e0b0b2150dbb67090e8b0c3922e46bd5cf'/>
<id>urn:sha1:da9a05e0b0b2150dbb67090e8b0c3922e46bd5cf</id>
<content type='text'>
The new sqv method uses sequoia's sqv tool to verify files. The
tool's interface is quite simple: It returns 0 on success, and
prints one line per good signer with the fingerprint.

sqv has a configurable crypto policy. We have defined apt-specific
override mechanisms for sequoia's standard policy, allowing both
users, distributions, and apt package to provide overrides for
Sequoia's default policy in meaningful ways.

The sqv method will be built and be the standard method for
verifying OpenPGP signatures provided that `sqv` is in the
PATH during building. It is not built if there was no sqv
at build time, so you need a rebuild to enable sqv later
on.

On the flip side, the gpgv method is always built, but it
does need to be always built: If APT::Key::GPGVCommand is
set, we need to fallback to it - this is important to
support existing users of that interface such as
mmdebstrap. Also we want to fall back to it when /usr/bin/sqv
disappears - for example in our CI :D

A couple of concessions have been made for test suite purposes:

- Failure to split a clearsigned file only shows the summary,
  as the gpgv method also only showed it, and no details why
  it failed.
- We write "Got GOODSIG &lt;fingerprint&gt;" in debug mode to mimic
  the gpgv code to keep the test suite happy.

- In various places in the test suite we assert minimal output
  from sqv, but sqv's human output is not intended to be stable.
  This will incur additional work when it breaks. However we do
  not _parse_ the output, so actual operation of apt is unaffected.

A couple of things are suboptimal here:

- We are still doing clearsigned splitting ourselves. sqv only
  has support for detached signatures right now, whereas sqopv
  has support for clearsigned files as well (but sqopv does not
  provide any reasons for why signature verification fails or
  means to set a policy).

- Deprecation of algorithms happens on a timebomb basis in
  sequoia. We have no means to give users warnings ahead of
  time if their configuration is outdated.

We have implemented various bits that probably should be going away:

- Fallback to trusted.gpg
  This is just annoying...
- Support for fingerprints in Signed-By (no subkey matching though)
  The extra work here is arguably less compared to gpgv.
- Check the keyring for correctness.
  With Signed-By everywhere, we should just error out rather than
  skip broken keyrings.

Moo
</content>
</entry>
<entry>
<title>Remove GnuTLS and gcrypt support</title>
<updated>2024-12-22T22:45:15Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-12-21T14:26:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=7b1fb90b93ced7c0772d726e512da01fad456852'/>
<id>urn:sha1:7b1fb90b93ced7c0772d726e512da01fad456852</id>
<content type='text'>
OpenSSL is mandatory now, it is no longer possible to build
without https support either.
</content>
</entry>
<entry>
<title>hashes, methods: Add OpenSSL backends</title>
<updated>2024-12-22T21:55:39Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-12-18T18:37:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=90270f0959d490d56db891809d83c91b3d4b9bf0'/>
<id>urn:sha1:90270f0959d490d56db891809d83c91b3d4b9bf0</id>
<content type='text'>
Introduce an OpenSSL::Crypto backend for the hashes library
and an OpenSSL::SSL backend for the TLS support in our https
method.

Many thanks to curl for showing the way with how to handle
a CRL file. There are some memory leaks here with the
TlsFd itself as well as the proxy support; and we should
reorganize the code to generate the ssl object as late
as possible.

A peculiar aspect of OpenSSL is that SSL_has_pending() returns
1 even if SSL_read() will fail to read anything and return the
equivalent of EAGAIN. We work around this here by also peeking
ahead 1 byte. I was running a very high RTT connection from
Germany to Australia for testing, and with the peeking it's
using negligible amounts of CPU; before that, it was busy
looping at 100%. Bad OpenSSL!
</content>
</entry>
<entry>
<title>methods/gpgv: Remove apt-key mentions</title>
<updated>2024-12-07T14:14:34Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2024-12-07T14:07:35Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=2bb8a2c71c12063e52220c3a3839e063f11a319d'/>
<id>urn:sha1:2bb8a2c71c12063e52220c3a3839e063f11a319d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Detect working gpgv using gpgv --dump-options</title>
<updated>2024-11-28T18:01:36Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2024-11-28T08:55:57Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=86f8353ce7a343db7b19422db0d37379ac45ff4e'/>
<id>urn:sha1:86f8353ce7a343db7b19422db0d37379ac45ff4e</id>
<content type='text'>
This gains us support for not using an absolute path, which
is nice, and we can now cache the invocation across fork() in
the method.

Still keep preferring absolute paths, this avoids execvp() having
to iterate the path and reduces bug potential with custom gpgv in
/usr/local.

Fix the last entry in the list of gpgvs to say gpgv1
</content>
</entry>
<entry>
<title>Do not implode key file name vector for calling gpgv</title>
<updated>2024-11-28T09:17:21Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2024-11-23T16:45:11Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=0e69c1fa5b8a4a1237933fa47113ea839a66f8a0'/>
<id>urn:sha1:0e69c1fa5b8a4a1237933fa47113ea839a66f8a0</id>
<content type='text'>
Converting it to a comma-separated string and back loses precision.
</content>
</entry>
<entry>
<title>Merge branch 'fix/partialfilemirror' into 'main'</title>
<updated>2024-11-22T16:12:34Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2024-11-22T16:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=1818699c1bc8a5be2d6542fe3212f26af7fa912a'/>
<id>urn:sha1:1818699c1bc8a5be2d6542fe3212f26af7fa912a</id>
<content type='text'>
Support uncompressed indexes from partial file:/ mirrors

See merge request apt-team/apt!235</content>
</entry>
<entry>
<title>Look at non by-hash paths in copy and file methods</title>
<updated>2024-11-22T12:40:10Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-05-09T09:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=7adf8c1fa8d519b8b57292763eb7703e7d3cc580'/>
<id>urn:sha1:7adf8c1fa8d519b8b57292763eb7703e7d3cc580</id>
<content type='text'>
Ideally copy and file mirrors would support by-hash as well, but its
harder to setup and maintain especially if you want to cache an online
mirror who has by-hash enabled.

We can avoid unneeded roundtrips (in the best case) and entire cache
misses (in the usual worst case) by "just" telling methods that the URI
we passed it has the requested file perhaps also in other paths.

This is done in pseudo-relative paths as we would otherwise need to
teach redirection code to rewrite those URIs as well. A method like http
can easily ignore this value and await explicit instructions to look at
that file, but inspecting the path in local sources via file or copy is
(comparatively) free, so we just do it immediately. If that ends up
being the wrong version of the file as by-hash would have protected us
from we are in this feature branch now falling back to other mirrors
which are like the ones online and in support of by-hash.
</content>
</entry>
<entry>
<title>Do not assume mirror-URIs end in a filename causing a hang</title>
<updated>2024-11-22T12:40:10Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-04-28T14:44:13Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=afc7b0dbf1114f3d723ff0e1ab9d0796cd799970'/>
<id>urn:sha1:afc7b0dbf1114f3d723ff0e1ab9d0796cd799970</id>
<content type='text'>
In practice most of them will, but making the acquire process hang in
response if they don't seems like an overly excessive response if we can
just support it gracefully to reply with an error (or actually succeed
in the unlikely event this URI is actually correct).
</content>
</entry>
<entry>
<title>Alternatively calculate alternative file hashes in file method</title>
<updated>2024-11-22T12:21:24Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2022-04-23T22:24:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=370e024224b8116840173201d51c0c2a170e0e93'/>
<id>urn:sha1:370e024224b8116840173201d51c0c2a170e0e93</id>
<content type='text'>
If we do not have the requested file we haven't calculated the hashes
for it either and it is likely that the alternative file will be used,
so to save the main thread from being busy with calculating hashes we
do the calculation here in the method.
</content>
</entry>
</feed>
