<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/test, branch 2.9.21</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.9.21</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.9.21'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2025-01-01T21:27:31Z</updated>
<entry>
<title>test: Check "${METHODSDIR}/sqv" not "/usr/bin/sqv"</title>
<updated>2025-01-01T21:27:31Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-01-01T21:20:25Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=12a3dfe6b86ca01ac2d643086b8f30e5b9189290'/>
<id>urn:sha1:12a3dfe6b86ca01ac2d643086b8f30e5b9189290</id>
<content type='text'>
This is the correct check to find out whether we have built
with sqv support.
</content>
</entry>
<entry>
<title>sqv: Avoid propagating errors between files</title>
<updated>2025-01-01T13:23:35Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2025-01-01T13:23:35Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=02c8e57304f5bded10f7b16207469f9bc9bf3e96'/>
<id>urn:sha1:02c8e57304f5bded10f7b16207469f9bc9bf3e96</id>
<content type='text'>
We inadvertently did not discard pending errors when the
fallback to Dir::Etc::trusted succeeded, do so.

Also add some quick safety checks to make sure we enter the
verification in a good state, and that if somehow errors are
pending after a verification we return false.

Closes: #1091679
</content>
</entry>
<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>Use sq in the test suite, remove apt-key</title>
<updated>2024-12-19T22:41:01Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-12-19T21:11:04Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=a00fbbdb28cc31e78882301c2efe7218583ab4cb'/>
<id>urn:sha1:a00fbbdb28cc31e78882301c2efe7218583ab4cb</id>
<content type='text'>
Remove the test case for MD5 and expired signatures, as we can't
create them (can't set signing digest, and can't set signature
expiry).

Tests for them have been added to test-method-gpgv instead.

We override sq in a function with cert-store and key-store
set to none.

This supports both sq 0.40 and sq 1.0.
</content>
</entry>
<entry>
<title>Remove legacy apt-key tests</title>
<updated>2024-12-19T18:35:52Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-12-19T18:35:52Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=d5961016ffa5e22f1997d94d797800796ddb613b'/>
<id>urn:sha1:d5961016ffa5e22f1997d94d797800796ddb613b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>apt show: Add pinning information for --full</title>
<updated>2024-12-19T17:24:37Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-10-29T13:06:51Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=71727c2a761889855b3c1aaf4243649e98032f67'/>
<id>urn:sha1:71727c2a761889855b3c1aaf4243649e98032f67</id>
<content type='text'>
Add new fields `APT-Pin`, `APT-Candidate`, and `APT-Release` to the
output, same as in EDSP (limited to one release for now).
</content>
</entry>
<entry>
<title>Be more strict about which PAGER to execvp() directly</title>
<updated>2024-12-19T16:56:49Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-12-19T16:49:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f6198e45b4cd924f390f977077d96b4545da0c91'/>
<id>urn:sha1:f6198e45b4cd924f390f977077d96b4545da0c91</id>
<content type='text'>
There could be | or ; or other stuff in PAGER that needs
special handling, let's encode a list of known-good characters
instead. This covers all known pagers.

You could also try to execvp() PAGER in its entirety and if
it fails with ENOENT fall back to the shell but then you
don't get correct error handling if the pager really doesn't
exist (in which case we should abort trying to page).
</content>
</entry>
<entry>
<title>Introduce automatic pager for read commands</title>
<updated>2024-12-18T09:25:24Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2024-12-16T16:05:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=6e260e26e4cd671f781151e24d89a17b29a55530'/>
<id>urn:sha1:6e260e26e4cd671f781151e24d89a17b29a55530</id>
<content type='text'>
Automatically show the output of `show`, `policy`, `list`,
`search`, `showsrc` in a pager.

The pager setup is inspired by git's pager setup. Notably,
the pager is found using APT_PAGER and PAGER variables.

We wait for the pager to be setup somewhat correctly by
using a notify pipe to figure out whether execvp() was
succesful - then the pipe will read EOF as the other end
got closed by CLOEXEC during exec - or not, then the pipe
will contain an errno.

We set up the correct handlers for signals and exit to close
the fds and wait for the pager. Notably inside the signal
handler we cannot flush our streams, only close them, so
there is some duplication.

We call the InitOutputPager() function from inside the
various Do...() functions rather than setting it up
generally in InitOutput(). Doing so allows us to first
render the progress without a pager, and then setup
the pager for the content only which improves user
experience.

When we setup a pager we also take care to disable
standard input, as we should not be prompting users
while a pager is running (the pager will be reading
from the tty directly). We do this by dup2-ing() a
/dev/null over it; if we just close()d the fd, another
open() might reuse the fd number and problems could
occur.
</content>
</entry>
<entry>
<title>Fix out-of-bounds read in `apt show :`</title>
<updated>2024-12-16T12:15:28Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2024-12-16T12:15:28Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=19000fab15ab0b30c95a1bf6e034aa3c6bdc36cb'/>
<id>urn:sha1:19000fab15ab0b30c95a1bf6e034aa3c6bdc36cb</id>
<content type='text'>
We tried to access str.size() - 1 on a 0-sized string, which
does not work, and now that we build with assertions triggers
it.

Closes: #1090068
</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>
</feed>
