Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 619585 - pinentry-gtk2: no LC_CTYPE known - assuming UTF-8
pinentry-gtk2: no LC_CTYPE known - assuming UTF-8
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: pinentry (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Rex Dieter
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-29 16:55 EDT by Steve Tyler
Modified: 2011-06-29 08:47 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-06-29 08:47:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Steve Tyler 2010-07-29 16:55:10 EDT
Description of problem:
When pinentry is run from a console, spurious error messages are displayed. The pinentry dialog works as expected.

When pinentry is invoked indirectly by the gpg command, the messages are also displayed, but no pinentry dialog is displayed. This makes the gpg command unusable on a console in its simplest form:
gpg -d < x.asc

This occurs after a fresh install of F13.

Version-Release number of selected component (if applicable):
pinentry-0.8.0-3.fc13.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Switch to a console (e.g. ctrl-alt-f2)
2. Type "pinentry"
3. Type "getpin"
  
Actual results:
The message
pinentry-gtk2: no LC_CTYPE known - assuming UTF-8
is displayed three times.
The curses pinentry dialog is also displayed
and works as expected.

Expected results:
No error messages are displayed.

Additional info:
Also occurs with "pinentry-curses"
Adding a dummy argument for the lc-ctype suppresses the error messages:
pinentry --lc-ctype asdf

LC_CTYPE is set in the console:
$ locale | grep LC_CTYPE
LC_CTYPE="en_US.UTF-8"
Comment 1 Stanislav Ochotnicky 2010-07-30 03:31:22 EDT
(In reply to comment #0)
> Description of problem:
> When pinentry is run from a console, spurious error messages are displayed. The
> pinentry dialog works as expected.
> 
> When pinentry is invoked indirectly by the gpg command, the messages are also
> displayed, but no pinentry dialog is displayed. This makes the gpg command
> unusable on a console in its simplest form:
> gpg -d < x.asc

Simple workaround for now:
gpg -d x.asc

This seemed to work for me
Comment 2 Steve Tyler 2010-07-30 07:45:37 EDT
(In reply to comment #1)
...
> Simple workaround for now:
> gpg -d x.asc
> 
> This seemed to work for me    

Thanks. That works fine.
Comment 3 Daiki Ueno 2010-08-06 02:33:48 EDT
Alternatively you can do "export GPG_TTY=`tty`" before using gpg.

I suspect the original problem ("can't use gpg -d < x.asc on terminal") cannot be resolved in either pinentry or gnupg2, since there is no way for a Unix process to tell the current terminal device if stdin is not a tty.
(actually gpg could check stdout/stderr if stdin is not a tty.  But in that case, "gpg -d < x.asc 2> /dev/null 1> y.txt" won't work)

Can we close this as notabug or wontfix?
Comment 4 Steve Tyler 2010-08-07 09:37:41 EDT
(In reply to comment #3)
> Alternatively you can do "export GPG_TTY=`tty`" before using gpg.

Thanks. That works fine.
I can't find "GPG_TTY" in the gpg man page.
Is that a gpg documentation bug?

gnupg2-2.0.14-4.fc13.x86_64
Comment 5 Daiki Ueno 2010-08-07 23:47:54 EDT
It is documented in the info manual (try "info gnupg2" and "s GPG_TTY"):

 You should always add the following lines to your `.bashrc' or whatever
 initialization file is used for all shell invocations:

      GPG_TTY=$(tty)
      export GPG_TTY
Comment 6 Bug Zapper 2011-06-01 08:31:25 EDT
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Bug Zapper 2011-06-29 08:47:21 EDT
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.