Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 106962 - Trying to add gpg keys with keychain-2.5.5 from the command line breaks the terminal
Summary: Trying to add gpg keys with keychain-2.5.5 from the command line breaks the t...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Keychain Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-23 00:56 UTC by Petteri Räty (RETIRED)
Modified: 2006-09-08 14:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petteri Räty (RETIRED) gentoo-dev 2005-09-23 00:56:35 UTC
I sometimes need to use my gpg key over ssh so I can't use the qt or gtk
versions of pinentry programs. With the pinentry-qt I haven't had the following
problems. Keychain is able to start gpg-agent without problems but trying to add
keys using pinentry-curses breaks the terminal. After that no input from the
keyboard is shown. I have to type reset and press enter to get a working my
console/terminal working again. The error message I get from keychain is the Is
pinentry installed message? which comes after the key adding fails. I was able
to go around this problem with the following setup in my .bashrc. I took the gpg
parameters from repoman.

startgpg() {
        keychain || return 1
        [[ -f $HOME/.keychain/$HOSTNAME-sh-gpg ]] && \
                source  $HOME/.keychain/$HOSTNAME-sh-gpg
        gpg --sign --clearsign --yes --default-key 1D3AE92E /home/betelgeuse/empty
}

betelgeuse@pena ~ $ emerge info
Portage 2.0.52-r1 (!/usr/portage/profiles/default-linux/x86/2005.1, gcc-3.4.4,
glibc-2.3.5-r1, 2.6.13-gentoo-r1 i686)
=================================================================
System uname: 2.6.13-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.12.0_pre8
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.13
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe -mfpmath=sse -ffast-math -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env
/usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe -mfpmath=sse -ffast-math -fomit-frame-pointer"
DISTDIR="/usr/src/distfiles"
FEATURES="autoaddcvs autoconfig ccache cvs distlocks fixpackages noauto sandbox
sfperms sign strict"
GENTOO_MIRRORS=" http://trumpetti.atm.tut.fi/gentoo 
http://lame.lut.fi/linux/gentoo "
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LINGUAS="fi"
MAKEOPTS="-j2"
PKGDIR="/home/pkg/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/mnt/checkouts/gentoo-x86"
PORTDIR_OVERLAY="/mnt/checkouts/overlays/betelgeuse
/mnt/checkouts/overlays/gentopia"
SYNC="cvs://betelgeuse@cvs.gentoo.org:/var/cvsroot"
USE="x86 X aac acl acpi alsa apm arts audiofile avi bash-completion berkdb
bitmap-fonts bluetooth browserplugin bzip2 bzlib cdb cddb cdparanoia cdr crypt
cups dbus divx4linux dts dvd dvdr dvdread emboss esd fam foomaticdb freetype gif
gstreamer gtk2 hal java jpeg kde kdeenablefinal libg++ libwww logitech-mouse lzo
mad makecheck mikmod mjpeg mmx mmx2 mp3 mpeg ncurses network nptl nptlonly
nsplugin nvidia offensive ogg oggvorbis opengl pam pdflib png qt quicktime
readline real rtc ruby samba slang spell sse sse2 ssl subversion svg symlink
tcpd tiff truetype truetype-fonts type1-fonts unicode usb userlocales vorbis
win32codecs xine xml xml2 xv xvid zlib video_cards_nvidia linguas_fi
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS
Comment 1 Petteri Räty (RETIRED) gentoo-dev 2005-10-13 14:57:39 UTC
My fix is missing --use-agent by they way but adding that keeps it working.
Comment 2 Aron Griffis (RETIRED) gentoo-dev 2006-03-20 11:28:37 UTC
Is this still a problem?  I don't see it here.

$ epm -q keychain gnupg gpg-agent pinentry
keychain-2.6.2
gnupg-1.4.2.1
gpg-agent-1.9.19
pinentry-0.7.2-r3

$ keychain --clear --agents gpg 20104EB0

KeyChain 2.6.2; http://www.gentoo.org/proj/en/keychain/
Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL

 * Found existing gpg-agent (677)
 * gpg-agent: All identities removed.
 * Adding 1 gpg key(s)...
[pinentry-curses runs]

$ [terminal is fine]
Comment 3 Timothy Stotts 2006-05-30 21:11:35 UTC
(In reply to comment #0)
Just a thought from a wondering bystander.  This may solve your problem (or may not).  I'll post if for the sake of others.

To use 'pinentry-curses' 100% correctly, you need, in every terminal, to set the environment variable GPG_TTY to the output of `tty`.

Example for ~/.bashrc:
    export GPG_TTY=`tty`

Example for ~/.cshrc:
    setenv GPG_TTY `tty`
Comment 4 Aron Griffis (RETIRED) gentoo-dev 2006-09-08 14:41:20 UTC
No response, assuming fixed