Package: dak
Version: 1.0-7
Severity: normal
Tags: patch

Hi,

The human readable output format has slightly changed between gnupg 
1.2.5 and 1.4.0.  It breaks uma.  I have patched uma in order to make 
it use the output of the --with-colons option of gpg which works for any 
gnupg versions.  I have tested the patch (but I am not a python expert).

Best regards,
Frederic Lehobey

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: sparc (sparc64)
Kernel: Linux 2.4.27-2-sparc64
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages dak depends on:
ii  apt [libapt-pkg-libc6.3-5-3 0.5.28.5     Advanced front-end for dpkg
ii  apt-utils                   0.5.28.5     APT utility programs
ii  bzip2                       1.0.2-5      high-quality block-sorting file co
ii  debconf                     1.4.46       Debian configuration management sy
ii  dpkg-dev                    1.10.27      Package building tools for Debian
ii  exim4-daemon-light [mail-tr 4.50-4       lightweight exim MTA (v4) daemon
ii  gnupg                       1.4.0-3      GNU privacy guard - a free PGP rep
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libgcc1                     1:3.4.3-11   GCC support library
ii  libstdc++5                  1:3.3.5-12   The GNU Standard C++ Library v3
ii  python                      2.3.5-1      An interactive high-level object-o
ii  python-apt                  0.5.10       Python interface to libapt-pkg
ii  python-ldap                 2.0.4-1      A LDAP interface module for Python
ii  python-pygresql             1:3.6.1-1    PostgreSQL module for Python
ii  ucf                         1.14         Update Configuration File: preserv

-- debconf information excluded
Common subdirectories: dak-1.0-deb/contrib and dak-1.0/contrib
Common subdirectories: dak-1.0-deb/debian and dak-1.0/debian
Common subdirectories: dak-1.0-deb/docs and dak-1.0/docs
Common subdirectories: dak-1.0-deb/examples and dak-1.0/examples
Common subdirectories: dak-1.0-deb/templates and dak-1.0/templates
Common subdirectories: dak-1.0-deb/test and dak-1.0/test
diff -u dak-1.0-deb/uma dak-1.0/uma
--- dak-1.0-deb/uma     2005-03-08 15:34:25.000000000 +0100
+++ dak-1.0/uma 2005-03-17 10:03:50.000000000 +0100
@@ -41,10 +41,10 @@
 Katie = None;
 Subst = None;
 
-re_gpg_fingerprint = re.compile(r"^\s+Key fingerprint = (.*)$", re.MULTILINE);
-# The next one is dirty
-re_user_address = re.compile(r"^.*<(.*)@.*>$", re.MULTILINE);
-re_user_mails = re.compile(r"^.*<([EMAIL PROTECTED])>$", re.MULTILINE);
+re_gpg_fingerprint = re.compile(r"^fpr:.*:.*:.*:.*:.*:.*:.*:.*:(.*):", 
re.MULTILINE);
+re_user_address = re.compile(r"^uid:.*:.*:.*:.*:.*:.*:.*:.*:.*<(.*)@.*>:", 
re.MULTILINE);
+re_user_name = re.compile(r"^uid:.*:.*:.*:.*:.*:.*:.*:.*:(.*<[EMAIL 
PROTECTED]>):", re.MULTILINE);
+re_user_mails = re.compile(r"^uid:.*:.*:.*:.*:.*:.*:.*:.*:.*<([EMAIL 
PROTECTED])>:", re.MULTILINE);
 
 
################################################################################
 
@@ -148,7 +148,7 @@
            % (Cnf["Dinstall::GPGKeyring"], Cnf["Uma::Options::Key"]);
     (result, output) = commands.getstatusoutput(cmd);
 
-    cmd = "gpg --no-secmem-warning --no-default-keyring --keyring=%s 
--keyring=%s --with-fingerprint --list-key %s" \
+    cmd = "gpg --no-secmem-warning --no-default-keyring --keyring=%s 
--keyring=%s --with-fingerprint --with-colons --fixed-list-mode --list-key %s" \
            % (Cnf["Dinstall::PGPKeyring"], Cnf["Dinstall::GPGKeyring"],
               Cnf["Uma::Options::Key"]);
     (result, output) = commands.getstatusoutput(cmd);
@@ -159,7 +159,6 @@
                                        % (Cnf["Uma::Options::Key"], 
utils.prefix_multi_line_string(output, \
                                                                                
                                                                                
" [GPG output:] ")));
     primary_key = m.group(1);
-    primary_key = primary_key.replace(" ","");
 
     uid = ""
     if Cnf.has_key("Uma::Options::User") and Cnf["Uma::Options::User"]:
@@ -171,7 +170,7 @@
             utils.fubar("0x%s: No userid found in gpg output but it returned 
0?\n%s" \
                         % (Cnf["Uma::Options::Key"], 
utils.prefix_multi_line_string(output, " [GPG output:] ")));
         uid = u.group(1);
-    name = " ".join(output.split('\n')[0].split()[3:]);
+    name = re_user_name.search(output).group(1);
 
 # Look for all email addresses on the key.
     emails=[];
Common subdirectories: dak-1.0-deb/wanna-build and dak-1.0/wanna-build

Reply via email to