From e14417db27771ad85f45880974c8f59f05d138f1 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 20 Jan 2025 12:31:55 +0100 Subject: Remove superseded warning about trusted.gpg fallback This warning has been superseded by the missing sources.list notice (which will also become a warning shortly) Adjust the sqv exit to avoid introducing a new spurious "No good signature" that we did not reach before. moo --- apt-pkg/contrib/gpgv.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/gpgv.cc b/apt-pkg/contrib/gpgv.cc index 237ddc856..173bfdf22 100644 --- a/apt-pkg/contrib/gpgv.cc +++ b/apt-pkg/contrib/gpgv.cc @@ -399,8 +399,8 @@ void ExecGPGV(std::string const &File, std::string const &FileGPG, if (not FoundKeyring) { Parts = GetListOfFilesInDir(_config->FindDir("Dir::Etc::TrustedParts"), std::vector{"gpg", "asc"}, true); - if (char *env = getenv("APT_KEY_NO_LEGACY_KEYRING"); env == nullptr || not StringToBool(env, false)) - Parts.insert(Parts.begin(), _config->FindFile("Dir::Etc::Trusted")); + if (auto trusted = _config->FindFile("Dir::Etc::Trusted"); not trusted.empty()) + Parts.push_back(trusted); for (auto &Part : Parts) { if (Debug) -- cgit v1.2.3-70-g09d2 From 6f618323d2d1cea47df0952a9ed2cebcda6c7193 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 20 Jan 2025 13:08:06 +0100 Subject: Unset Dir::Etc::trusted The trusted.gpg file has been deprecated since February 2022 and can no longer be managed easily without apt-key, so we should not be falling back to it by default. We do not remove the actual code to fall back to it, such that code that passes Dir::Etc::trusted explicitly continues to work for the time being (with the warnings in update), as the overhead is now rather trivial. --- apt-pkg/init.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index d71d9541f..d56973eeb 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -159,7 +159,6 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.CndSet("Dir::Etc::parts","apt.conf.d"); Cnf.CndSet("Dir::Etc::preferences","preferences"); Cnf.CndSet("Dir::Etc::preferencesparts","preferences.d"); - Cnf.CndSet("Dir::Etc::trusted", "trusted.gpg"); Cnf.CndSet("Dir::Etc::trustedparts","trusted.gpg.d"); Cnf.CndSet("Dir::Bin::methods", LIBEXEC_DIR "/methods"); Cnf.CndSet("Dir::Bin::solvers::",LIBEXEC_DIR "/solvers"); -- cgit v1.2.3-70-g09d2