Subject: pkg/23426: psi doesn't work with gpg-1.2.3
To: None <gnats-bugs@gnats.netbsd.org>
From: None <lha@netbsd.org>
List: netbsd-bugs
Date: 11/13/2003 18:06:13
>Number: 23426
>Category: pkg
>Synopsis: psi doesn't work with gpg-1.2.3
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 13 17:07:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Love
>Release: NetBSD 1.6ZD
>Organization:
Stacken Computer Club
>Environment:
System: NetBSD nutcracker.stacken.kth.se 1.6ZD NetBSD 1.6ZD (NUTCRACKER) #3: Mon Oct 20 22:51:20 CEST 2003 lha@nutcracker.stacken.kth.se:/usr/src/sys/arch/i386/compile/NUTCRACKER i386
Architecture: i386
Machine: i386
>Description:
psi-0.9 doesn't work with gpg-1.2.3
>How-To-Repeat:
use psi-0.9nb2
>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/chat/psi/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- Makefile 11 Aug 2003 17:28:20 -0000 1.13
+++ Makefile 13 Nov 2003 16:30:23 -0000
@@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.13 2003/08/11 17:28:20 jdolecek Exp $
DISTNAME= psi-0.9
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= chat
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=psi/}
EXTRACT_SUFX= .tar.bz2
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/chat/psi/distinfo,v
retrieving revision 1.7
diff -u -r1.7 distinfo
--- distinfo 18 Sep 2003 19:58:08 -0000 1.7
+++ distinfo 13 Nov 2003 16:30:23 -0000
@@ -2,6 +2,7 @@
SHA1 (psi-0.9.tar.bz2) = 66ab7a6b540f60c9e117bc964a70c126b30aff47
Size (psi-0.9.tar.bz2) = 968348 bytes
+SHA1 (patch-aa) = 7cb3505e80c180411257ea5755a351e57d77de9b
SHA1 (patch-ab) = d7f9fc5f183117d3f81912ef73f27c0f2fa8c6a0
SHA1 (patch-ac) = a3b0f87f54f4d7397c8be6f152209bef3a14d4a6
SHA1 (patch-ad) = 8d255aa9de01ccb39d2cdc7b0074b5dec0e3c0cb
Index: patches/patch-aa
===================================================================
RCS file: patches/patch-aa
diff -N patches/patch-aa
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-aa 13 Nov 2003 16:30:23 -0000
@@ -0,0 +1,62 @@
+$NetBSD$
+
+Patch from Martin Ehmsen to make psi work with gpg-1.2.3 (and
+versions before that).
+
+--- cutestuff/openpgp/gpgop.cpp 2003-05-26 19:40:28.000000000 +0200
++++ cutestuff/openpgp/gpgop.cpp 2003-08-28 00:20:59.000000000 +0200
+@@ -543,18 +543,33 @@
+ return false;
+
+ QStringList::ConstIterator it = lines.begin();
++ QString keyring;
++ int ver = 0;
+
+- // first line is keyring file
+- QString keyring = *(it++);
+-
+- // skip past the divider
++ // check if gnupg version is 1.2.3 or below
+ for(; it != lines.end(); ++it) {
+- if((*it).at(0) == '-')
+- break;
++ if((*it).at(0) == '-') {
++ ver = 1;
++ break;
++ }
++ }
++
++ it = lines.begin();
++
++ // if gnupg version is 1.2.2 and below first line is keyring
++ if(ver) {
++ // first line is keyring file
++ keyring = *(it++);
++
++ // skip past the divider
++ for(; it != lines.end(); ++it) {
++ if((*it).at(0) == '-')
++ break;
++ }
++ if(it == lines.end())
++ return false;
++ ++it;
+ }
+- if(it == lines.end())
+- return false;
+- ++it;
+
+ OpenPGP::Key *k = 0;
+ for(; it != lines.end(); ++it) {
+@@ -620,8 +635,9 @@
+
+ if(_keylist)
+ *_keylist = keyList;
+- if(_keyring)
+- *_keyring = keyring;
++ if(ver)
++ if(_keyring)
++ *_keyring = keyring;
+
+ return true;
+ }
>Release-Note:
>Audit-Trail:
>Unformatted: