FS#42972 - [emacs] does not work with gnupg-2.1

Attached to Project: Arch Linux
Opened by Sree Harsha Totakura (tsh) - Monday, 01 December 2014, 09:24 GMT
Last edited by Gaetan Bisson (vesath) - Sunday, 18 January 2015, 21:16 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Gaetan Bisson (vesath)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 8
Private No

Details

The latest gnupg-2.1.0-4 update breaks encryption functionality in Emacs and also some other applications (see:
https://bbs.archlinux.org/viewtopic.php?id=190497). Decryption works as intended.

The common error output we get seems to be something like this:
Opening output file: [pub f 1024 17 3B6F8AF143C21F3B 1320594077 1509822256 nil u nil ...], 15

Additional info:
* gnupg-2.1.0-4
* emacs-24.4-1


Steps to reproduce:
1. Open an PGP-encrypted text file in Emacs
2. Change the contents of the file
3. Try to save the file now
This task depends upon

Closed by  Gaetan Bisson (vesath)
Sunday, 18 January 2015, 21:16 GMT
Reason for closing:  Fixed
Additional comments about closing:  emacs-24.4-2 in [extra]
Comment by Sree Harsha Totakura (tsh) - Monday, 01 December 2014, 09:35 GMT
Just found that gnupg is updated to 2.1.0-6. Nevertheless, it also has this issue.
Comment by Gaetan Bisson (vesath) - Monday, 01 December 2014, 22:55 GMT
GnuPG-2.1 works well on its own. Please file a bug against emacs.
Comment by Jacob Joseph (jacobjjoseph.org) - Tuesday, 02 December 2014, 21:18 GMT
This change corrects the issue when saving. Subsequent patches make other changes for gnupg, and I have not looked into them in any detail.

https://lists.gnu.org/archive/html/emacs-diffs/2014-11/msg00088.html

~Jacob
Comment by Joerg Behrmann (lobachevsky) - Tuesday, 30 December 2014, 23:24 GMT
Yes, this commit (the one from the mailing list post above) seems to do the trick

http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/epg.el?id=135a9f4b5aead507c030fb7e3e8ad13aaa91f403

and looking through the commits regarding all epg and epa related files, seem to be the only change needed. It would be nice if this patch could be cherrypicked for the arch package.

There are a few nice changes regarding gnupg 2.1 in epa.el and epa-file.el and other gpg-related changes (in epg.el and related files), that might be worth a look, too, but are of no concern for this bug.
Comment by Francis Moreau (fmoreau) - Thursday, 15 January 2015, 15:09 GMT
Got the same issue.

Could arch folk fix this please ?

A fix has been reported, so it's just a matter of importing it and releasing a new package...

Please.
Comment by Joerg Behrmann (lobachevsky) - Friday, 16 January 2015, 15:28 GMT
Ok, I tested it yesterday and the fix from commit 135a9f4b5aead507c030fb7e3e8ad13aaa91f403 is sufficient to fix the issue at hand. My problem of not being able to open .gpg files remains, but at least now is with my config, because it works with emacs -q. ;)

I attached the patch, the md5 hash is 9eb2bfd4cbec16cdeac817b9766f9f19.
Comment by Gaetan Bisson (vesath) - Saturday, 17 January 2015, 20:52 GMT
Could you confirm that emacs-24.4-2 from [testing] fixes your issue? Cheers.
Comment by Joerg Behrmann (lobachevsky) - Sunday, 18 January 2015, 17:25 GMT
I can confirm, that it does.

Loading...