]> git.saurik.com Git - apt.git/commitdiff
add and use 'apt-key verify' which prefers gpgv over gpg
authorDavid Kalnischkies <david@kalnischkies.de>
Mon, 14 Apr 2014 16:24:17 +0000 (18:24 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Fri, 26 Sep 2014 22:12:14 +0000 (00:12 +0200)
gnupg/gnupg2 can do verify just fine of course, so we don't need to use
gpgv here, but it is what we always used in the past, so there might be
scripts expecting a certain output and more importantly the output of
apt-cdrom contains messages from gpg and even with all the settings we
activate to prevent it, it still shows (in some versions) a quiet scary:
"gpg: WARNING: Using untrusted key!" message. Keeping the use of gpgv is
the simplest way to prevent it.

We are increasing also the "Breaks: apt" version from libapt as it
requires a newer apt-key than might be installed in partial upgrades.

apt-pkg/contrib/gpgv.cc
cmdline/apt-key.in
debian/control

index cd17cd5368bde831397468f2d6ed08ab53badbae..9d798cca986713faf5bbbeb9cc94ea9e799bfd24 100644 (file)
@@ -55,7 +55,7 @@ void ExecGPGV(std::string const &File, std::string const &FileGPG,
    Args.push_back(aptkey.c_str());
    Args.push_back("--quiet");
    Args.push_back("--readonly");
-   Args.push_back("adv");
+   Args.push_back("verify");
 
    char statusfdstr[10];
    if (statusfd != -1)
@@ -77,7 +77,6 @@ void ExecGPGV(std::string const &File, std::string const &FileGPG,
         Args.push_back(Opts->Value.c_str());
       }
    }
-   Args.push_back("--verify");
 
    enum  { DETACHED, CLEARSIGNED } releaseSignature = (FileGPG != File) ? DETACHED : CLEARSIGNED;
    std::vector<std::string> dataHeader;
index a9a729cce7dd42198f92282dff4add0056411c77..83a7a31b9b9c8295e341b7414c430c1ab6e7a302 100644 (file)
@@ -450,6 +450,14 @@ case "$command" in
        $GPG "$@"
        merge_back_changes
        ;;
+    verify)
+       setup_merged_keyring
+       if which gpgv >/dev/null 2>&1; then
+           gpgv --homedir "${GPGHOMEDIR}" --keyring "${GPGHOMEDIR}/pubring.gpg" --ignore-time-conflict "$@"
+       else
+           $GPG --verify "$@"
+       fi
+       ;;
     help)
         usage
         ;;
index b86e828c59806e078f47d9c5801dd29580fa1e09..6d29b02506ba625946b1882c94352749463b16ec 100644 (file)
@@ -43,7 +43,7 @@ Architecture: any
 Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Breaks: apt (<< 0.9.4~), libapt-inst1.5 (<< 0.9.9~)
+Breaks: apt (<< 1.0.2~), libapt-inst1.5 (<< 0.9.9~)
 Section: libs
 Description: package management runtime library
  This library provides the common functionality for searching and