When calling SourcesList.add don't duplicate disabled sources. Continue
to permit enabling disabled sources during addition, but not disabling
enabled sources.
Tests are included for both duplicate suppression and the enabling
functionality (which didn't seem to be covered by the existing tests),
as well as tests for pos.
* SECURITY UPDATE: Check that repository is trusted before downloading
files from it (LP: #1858973)
- apt/cache.py: Add checks to fetch_archives() and commit()
- apt/package.py: Add checks to fetch_binary() and fetch_source()
- CVE-2019-15796
* SECURITY UPDATE: Do not use MD5 for verifying downloadeds
(Closes: #944696) (#LP: #1858972)
- apt/package.py: Use all hashes when fetching packages, and
check that we have trusted hashes when downloading
- CVE-2019-15795
* To work around the new checks, the parameter allow_unauthenticated=True
can be passed to the functions. It defaults to the value of the
APT::Get::AllowUnauthenticated option.
- Bump Breaks aptdaemon (<< 1.1.1+bzr982-0ubuntu14.2), as it will have
to set that parameter after having done validation.
* Necessary backports:
- turn elements in apt_pkg.SourceRecords.files into a class, rather than
a tuple (w/ legacy compat), so we can get to their hashes
- add apt_pkg.HashStringList
- add apt_pkg.Hashes.hashes
* Automatic changes and fixes for external regressions:
- Adjustments to test suite and CI to fix CI regressions
- Automatic mirror list update
test_signed_usable.py: Add test case for security bugs
This checks all 4 variants of signed x usable hashes, by builting
a package each. And then checks for all variants of the
allow_unauthenticated parameter.
We need to provide assertRaisesRegex for Pythons < 3.1, so we
can test there as well.
(cherry picked from commit 8b527257c55b88310c315b5c588940626cf206ef)
(cherry picked from commit 315ec78ab98d16de2f8c36e8646bb9e11c26bcc6)
Backport to xenial: Set trusted=yes for signed repo, as signing check
does not work, because apt-key always uses host keys.
(cherry picked from commit 59a26938489af8bf4e4c326c4d50ff5ba2ba9f85)
(cherry picked from commit 51eac2e007911b52630881bc228d8bb2505962a3)
(cherry picked from commit 5f4d7114dc578142364c4cec05b0937856f5317b)