Bug#618781: signing-party: [gpgsigs] please support UTF-8-encoded files
tags 618781 patch thanks I think the problem is not with gpgsigs per se, but rather with the LaTeX output it produces. (As Tanguy hinted at, the text output of UTF-8 encoded input files seems to be rendered properly.) LaTeX is in fact known for its poor support of Unicode characters in input files (‘\usepackage[utf8x]{inputenc}‘ slightly improves that, but it's not a panacea in any way). On the other hand, other typesetting engines such as LuaLaTeX or XeLaTeX perform much better. So, as Postscript files poorly support Unicode characters, why bother at all with the LaTeX engine? I propose the enclosed patch, which makes --latex produce an output compatible with pdfLaTex, LuaLaTeX and XeLaTeX. As for the font rendered in the PDF in the two latter cases, I chose Droid which has very good Unicode coverage and IMHO is much better looking than GNU Unifont. * pdfLaTex (no dependencies beside common texlive packages): renders latin1 characters properly, but fails to render Cyrillic and CJK characters. * luaLaTeX (depends on core texlive packages, texlive-luatex, luatex and fonts-droid): I believe only CJK are not properly rendered. * XeLaTeX (depends on core texlive packages, texlive-xetex and fonts-droid): so far I didn't find any character that wasn't properly rendered. Also, since the 3 LaTeX typesetting engines above produce a PDF, and since JPG images can be embedded in PDF files, the conversion from JPG to EPS (or PDF for that matter) is no longer needed. I therefore renamed ‘gpgsigs-eps-helper’ as ‘gpgsigs-helper’. If this patch is accepted, I'll try to port it to gpg-key2ps(1) which I believe should solve #412512 and #316131/454405. Cheers, -- Guilhem. diff -ru a/gpgsigs/gpgsigs b/gpgsigs/gpgsigs --- a/gpgsigs/gpgsigs +++ b/gpgsigs/gpgsigs @@ -181,8 +181,8 @@ next if $uidstatus eq r; if ($latex and not $photocount) { # call once per key my ($shortkey) = substr $key, -8; - system rm -f $shortkey.[1-9]*.eps; - system gpg --photo-viewer 'gpgsigs-eps-helper $shortkey' --list-options show-photos --list-key $key /dev/null; + system rm -f $shortkey.[1-9]*.jpg; + system gpg --photo-viewer 'gpgsigs-helper $shortkey' --list-options show-photos --list-key $key /dev/null; $photocount = 1; } my ($shortkey) = substr $key, -8; @@ -307,8 +307,19 @@ \documentclass{article} \usepackage[margin=2cm]{geometry} \usepackage{alltt} -\usepackage{graphicx} -\usepackage{grffile} +\usepackage{graphicx,grffile} +\usepackage{ifluatex,ifxetex} +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 + \usepackage[utf8x]{inputenc} +\else + \usepackage[log-declarations=false]{xparse} + \usepackage{fontspec} + \setmonofont{Droid Sans Mono} + \ifxetex +\usepackage[quiet]{xeCJK} +\CJKfontspec{Droid Sans Fallback} + \fi +\fi \begin{document} \begin{alltt} EOF @@ -388,6 +399,9 @@ print WRITE print_tag($key, $uid) . $_; next; } + if ( /^[_-]{50,}$/ and $latex ) { + $_ = \n\\hrule\n; + } print WRITE; } Only in a/gpgsigs: gpgsigs-eps-helper diff -ru a/gpgsigs/gpgsigs-eps-helper b/gpgsigs/gpgsigs-eps-helper --- a/gpgsigs/gpgsigs-eps-helper +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -ID=$1 -NUM=1 - -while test -e $ID.$NUM.eps ; do - NUM=`expr $NUM + 1` -done - -convert - $ID.$NUM.eps Only in b/gpgsigs: gpgsigs-helper diff -ru a/gpgsigs/gpgsigs-helper b/gpgsigs/gpgsigs-helper --- /dev/null +++ b/gpgsigs/gpgsigs-helper @@ -0,0 +1,10 @@ +#!/bin/sh + +ID=$1 +NUM=1 + +while test -e $ID.$NUM.jpg ; do +NUM=$(( $NUM + 1 )) +done + +cat $ID.$NUM.jpg diff -ru a/gpgsigs/Makefile b/gpgsigs/Makefile --- a/gpgsigs/Makefile +++ b/gpgsigs/Makefile @@ -5,8 +5,8 @@ install: install -D gpgsigs $(DESTDIR)/usr/bin/gpgsigs - install -D gpgsigs-eps-helper \ - $(DESTDIR)/usr/share/signing-party/gpgsigs-eps-helper + install -D gpgsigs-helper \ + $(DESTDIR)/usr/share/signing-party/gpgsigs-helper install -d $(DESTDIR)/usr/share/doc/signing-party/examples/gpgsigs install -m644 gpgsigs-lt2k5*.txt \ $(DESTDIR)/usr/share/doc/signing-party/examples/gpgsigs signature.asc Description: Digital signature
Bug#618781: signing-party: [gpgsigs] please support UTF-8-encoded files
Luca Capello, 2011-03-18 14:09+0100: I was preparing for the key signing party at Chemnitzer Linux-Tage 2011 http://chemnitzer.linux-tage.de/2011/addons/pgp and discovered that gpgsigs does not work with UTF-8-encoded files: I think it does. Just call it with “-f UTF-8” to tell it it is dealing with UTF-8 encoded input. -- ,--. : /` ) Tanguy Ortolo xmpp:tan...@ortolo.eu | `-'Debian Developer irc://irc.oftc.net/Tanguy \_ signature.asc Description: Digital signature
Bug#618781: signing-party: [gpgsigs] please support UTF-8-encoded files
Package: signing-party Version: 1.1.3-1 Severity: important Hi there! This should probably be merged with #412512 (and FWIW #596377 as well), but I decided to submit a new bug instead given that it is in another component. IMHO Severity: important because Debian had UTF-8 as a Release Goal since etch IIRC, which means that signing-party not being UTF-8 ready could be considered an RC bug. I was preparing for the key signing party at Chemnitzer Linux-Tage 2011 http://chemnitzer.linux-tage.de/2011/addons/pgp and discovered that gpgsigs does not work with UTF-8-encoded files: --8---cut here---start-8--- --- CLT11-keys.txt.ORG 2011-03-18 11:47:46.667555183 +0100 +++ CLT11-keys.txt.gpgsigs 2011-03-18 12:18:24.665447201 +0100 @@ -1,4 +1,4 @@ -Samstag, März 19, 2011; 18:15 +Samstag, März 19, 2011; 18:15 Frank Lanitz @@ -9,16 +9,16 @@ Version 1.0 Drucke diese Liste ein bis zwei Tage vor Chemnitzer Linux-Tagen aus -(aber auf alle Fälle *nach* dem 2011-03-15) aus. +(aber auf alle Fälle *nach* dem 2011-03-15) aus. Bilde den MD5-, SHA1- oder SHA256-Hash der Datei und trage den Wert unten ein (nach dem Ausdruck). Bringe diese Liste, Deinen Ausweis und einen Stift zum Keysigning mit. [...] --8---cut here---end---8--- There are also errors while matching UIDs with the keys: = luca@gismo:~$ gpgsigs -r E397832F CLT11-keys.txt CLT11-keys.txt.gpgsigs Requesting keys from keyserver [...] gpg: Total number processed: 59 gpg: unchanged: 59 Running --list-sigs, this will take a while ... Annotating CLT11-keys.txt, writing into CLT11-keys.txt.gpgsigs.NEW uid 'Martin Ebnöther (Linux Users Group Switzerland) martin.ebnoet...@lugs.ch' not found on key 37901254 uid 'Martin Ebnöther (Linux Users Group Switzerland) martin.ebnoet...@lugs.ch' not found on key 37901254 uid 'André Langer andre.lan...@googlemail.com' not found on key 59CFA2B8 uid 'André Langer andre.lan...@googlemail.com' not found on key 59CFA2B8 [...] = Thx, bye, Gismo / Luca -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (990, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.38-rc8-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages signing-party depends on: ii gnupg 1.4.11-3 GNU privacy guard - a free PGP rep ii libc6 2.11.2-13Embedded GNU C Library: Shared lib ii libclass-methodmaker-perl 2.15-2 Perl module for creating generic m ii libgnupg-interface-perl 0.43-1 Perl interface to GnuPG ii libmailtools-perl 2.07-1 Manipulate email in perl programs ii libmime-tools-perl 5.502-1 Perl5 modules for MIME-compliant m ii libterm-readkey-perl2.30-4 A perl module for simple terminal ii libtext-template-perl 1.45-2 Text::Template perl module ii perl5.10.1-18Larry Wall's Practical Extraction ii qprint 1.0.dfsg.2-2 encoder and decoder for quoted-pri Versions of packages signing-party recommends: pn libgd-gd2-noxpm-perl | libgd- none (no description available) pn libpaper-utilsnone (no description available) ii libtext-iconv-perl1.7-2 converts between character sets in ii postfix [mail-transport-agent 2.8.1-1High-performance mail transport ag ii whiptail 0.52.11-2 Displays user-friendly dialog boxe Versions of packages signing-party suggests: ii imagemagick8:6.6.0.4-3 image manipulation programs ii mutt 1.5.20-9+squeeze1 text-based mailreader supporting M ii texlive-latex-recommen 2009-11 TeX Live: LaTeX recommended packag ii wipe 0.21-9Secure file deletion -- no debconf information pgpLZQuDjQzDi.pgp Description: PGP signature