apt-key does not print "Key fingerprint =" in front of fingerprints

Bug #1716190 reported by Jon Gorrono
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

A common idiom for checking fingerprints for keys begins with:
' apt-key fingerprint $key|grep fingerprint|...'
... this works up to thru jessie at least.. in zesty apt-key gives a 'warning' but produces no output.

"Warning: apt-key output should not be parsed (stdout is not a terminal)"
If the lack of output is intended and is meant to be a proscription, it is overreaching at best. A warning makes perfect sense.

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: apt 1.4
ProcVersionSignature: Ubuntu 4.10.0-32.36-generic 4.10.17
Uname: Linux 4.10.0-32-generic x86_64
ApportVersion: 2.20.4-0ubuntu4.5
Architecture: amd64
Date: Sun Sep 10 01:23:46 2017
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jon Gorrono (ccjon) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt (Ubuntu):
status: New → Confirmed
Revision history for this message
Julian Andres Klode (juliank) wrote :

Works for me:

 docker run --rm -it ubuntu:zesty sh -c 'apt-key fingerprint | grep Ubu'
Warning: apt-key output should not be parsed (stdout is not a terminal)
uid [ unknown] Ubuntu Archive Automatic Signing Key (2012) <email address hidden>
uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) <email address hidden>

Changed in apt (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Julian Andres Klode (juliank) wrote :

Does it output anything to your terminal?

Revision history for this message
Julian Andres Klode (juliank) wrote :

Notably, the word fingerprint does not appear anywhere in the output, so if you search for literally that, then that's your problem.

Revision history for this message
Julian Andres Klode (juliank) wrote :

gpg changed the output format later on to remove "Key fingerprint=".

jak@jak-x230:~/Projects/Debian/apt:master$ docker run --rm -it ubuntu:xenial sh -c 'apt-key fingerprint'
/etc/apt/trusted.gpg
--------------------
pub 1024D/437D05B5 2004-09-12
      Key fingerprint = 6302 39CC 130E 1A7F D81A 27B1 4097 6EAF 437D 05B5
uid Ubuntu Archive Automatic Signing Key <email address hidden>
sub 2048g/79164387 2004-09-12

pub 4096R/C0B21F32 2012-05-11
      Key fingerprint = 790B C727 7767 219C 42C8 6F93 3B4F E6AC C0B2 1F32
uid Ubuntu Archive Automatic Signing Key (2012) <email address hidden>

pub 4096R/EFE21092 2012-05-11
      Key fingerprint = 8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092
uid Ubuntu CD Image Automatic Signing Key (2012) <email address hidden>

pub 1024D/FBB75451 2004-12-30
      Key fingerprint = C598 6B4F 1257 FFA8 6632 CBA7 4618 1433 FBB7 5451
uid Ubuntu CD Image Automatic Signing Key <email address hidden>

jak@jak-x230:~/Projects/Debian/apt:master$ docker run --rm -it ubuntu:zesty sh -c 'apt-key fingerprint'
/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-archive.gpg
------------------------------------------------------
pub rsa4096 2012-05-11 [SC]
      790B C727 7767 219C 42C8 6F93 3B4F E6AC C0B2 1F32
uid [ unknown] Ubuntu Archive Automatic Signing Key (2012) <email address hidden>

/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg
------------------------------------------------------
pub rsa4096 2012-05-11 [SC]
      8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092
uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) <email address hidden>

Revision history for this message
Julian Andres Klode (juliank) wrote :

Or maybe we did, but I'm not sure where.

Changed in apt (Ubuntu):
status: Incomplete → Triaged
summary: - apt-key does not output to non-terminals
+ apt-key does not print Key fingerprint = in front of fingerprints
summary: - apt-key does not print Key fingerprint = in front of fingerprints
+ apt-key does not print "Key fingerprint =" in front of fingerprints
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.