Bug 246808

Summary: Kmail messes up gpg.conf if changing debug-level
Product: [Applications] kmail Reporter: envite
Component: encryptionAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: diego.ml, gregor, sejd
Priority: NOR    
Version: 1.13.5   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description envite 2010-08-05 14:53:26 UTC
Version:           1.13.5 (using KDE 4.4.5) 
OS:                Linux

If changing the debug level option to basic in gpg options, gpg stops working

Reproducible: Always

Steps to Reproduce:
Go to Configure Kmail -> Security -> Encryption engines -> OpenGPG (gpg) -> Set debug level to -> Basic
(actual names may not be exactly that, I don't have kmail localized in english)

Actual Results:  
$HOME/.gnupg/gpg.conf file gets these lines added:

###+++--- GPGConf ---+++###
utf8-strings
debug-level basic
###+++--- GPGConf ---+++### jue 05 ago 2010 13:40:36 WEST
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.

These lines cause gpg binary to crash:

user@host$ gpg --list-keys
gpg: NOTA: se ignora el antiguo fichero de opciones predefinidas `/home/user/.gnupg/options'
gpg: /home/user/.gnupg/gpg.conf:242: invalid option

Thus, encryption and signing become unusable both from inside Kmail and at command line until these lines are deleted by hand.

Expected Results:  
Kmail should have set up a correct set of gpg options in $HOME/.gnupg/gpg.conf

gpg (GnuPG) 1.4.10
Comment 1 Diego 2011-11-09 12:48:04 UTC
Same here with KMail 1.13.7.

$ gpg
gpg: /home/diego/.gnupg/gpg.conf:5: argument not expected
gpg: /home/diego/.gnupg/gpg.conf:6: invalid option

because I have:
$ cat .gnupg/gpg.conf
# GnuPG config file created by KGpg

###+++--- GPGConf ---+++###
utf8-strings
debug-level basic
log-file socket:///home/diego/.gnupg/log-socket
keyserver hkp://keys.gnupg.net
###+++--- GPGConf ---+++### mar 18 gen 2011 15:33:08 CET
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.



Commenting debug-level and log-file line fixes the problem. Can anybody check the problem with KMail 2?

Diego
Comment 2 Diego 2011-11-09 12:50:29 UTC
Mmm... duplicate of bug #226630
Comment 3 Gregor Tätzner 2013-04-04 07:16:12 UTC

*** This bug has been marked as a duplicate of bug 226630 ***