NetBSD Problem Report #43244

From www@NetBSD.org  Mon May  3 23:15:15 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 0612363BA59
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  3 May 2010 23:15:15 +0000 (UTC)
Message-Id: <20100503231514.ABC0B63B8FE@www.NetBSD.org>
Date: Mon,  3 May 2010 23:15:14 +0000 (UTC)
From: xtraeme@gmail.com
Reply-To: xtraeme@gmail.com
To: gnats-bugs@NetBSD.org
Subject: security/netpgp fails to build with gcc-4.5.0
X-Send-Pr-Version: www-1.0

>Number:         43244
>Category:       pkg
>Synopsis:       security/netpgp fails to build with gcc-4.5.0
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    agc
>State:          closed
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Mon May 03 23:20:01 +0000 2010
>Closed-Date:    Sat May 08 16:11:20 +0000 2010
>Last-Modified:  Sat May 08 16:11:20 +0000 2010
>Originator:     Juan RP
>Release:        NULL
>Organization:
>Environment:
>Description:
security/netpgp version 20100313 fails to build with gcc-4.5.0, due to this warning:

c1: warnings being treated as errors
verify.c: In function '__ops_pubkey_free':
verify.c:5553:2: error: case value '0' not in enumerated type '__ops_pubkey_alg_t'
make[2]: *** [netpgpverify-verify.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Looking at the code I've seen that verify.c is duplicating a lot of structs, enums, etc, that are defined in src/lib/packet.h already. In that case due to duplicated code the author forgot to add OPS_PKA_NOTHING in __ops_pubkey_alg_t.


>How-To-Repeat:

>Fix:
--- src/netpgpverify/verify.c.orig	2010-05-04 01:00:46.490355473 +0200
+++ src/netpgpverify/verify.c	2010-03-14 00:30:41.000000000 +0100
@@ -569,6 +569,7 @@ typedef struct __ops_ptag_t {
  * \see RFC4880 9.1
  */
 typedef enum {
+	OPS_PKA_NOTHING = 0,
 	OPS_PKA_RSA = 1,	/* RSA (Encrypt or Sign) */
 	OPS_PKA_RSA_ENCRYPT_ONLY = 2,	/* RSA Encrypt-Only (deprecated -
 					 * \see RFC4880 13.5) */
@@ -5551,7 +5550,7 @@ __ops_pubkey_free(__ops_pubkey_t *p)
 		free_BN(&p->key.elgamal.y);
 		break;

+	case OPS_PKA_NOTHING:
-	case 0:
 		/* nothing to free */
 		break;

--

>Release-Note:

>Audit-Trail:
From: "Alistair G. Crooks" <agc@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43244 CVS commit: src/crypto/external/bsd/netpgp/dist/src/netpgpverify
Date: Tue, 4 May 2010 00:02:46 +0000

 Module Name:	src
 Committed By:	agc
 Date:		Tue May  4 00:02:46 UTC 2010

 Modified Files:
 	src/crypto/external/bsd/netpgp/dist/src/netpgpverify: verify.c

 Log Message:
 Make this compile with gcc 4.5 - patch from Juan RP in PR pkg/43244


 To generate a diff of this commit:
 cvs rdiff -u -r1.9 -r1.10 \
     src/crypto/external/bsd/netpgp/dist/src/netpgpverify/verify.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 04 May 2010 22:20:08 +0000
State-Changed-Why:
Fixed?


From: Juan Romero Pardines <xtraeme@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/43244 (security/netpgp fails to build with gcc-4.5.0)
Date: Wed, 5 May 2010 00:21:13 +0200

 2010/5/5  <wiz@netbsd.org>:
 > Synopsis: security/netpgp fails to build with gcc-4.5.0
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: wiz@NetBSD.org
 > State-Changed-When: Tue, 04 May 2010 22:20:08 +0000
 > State-Changed-Why:
 > Fixed?

 Yes, please close it.

From: Alistair Crooks <agc@pkgsrc.org>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, pkgsrc-bugs@NetBSD.org, gnats-admin@NetBSD.org,
        wiz@NetBSD.org, xtraeme@gmail.com
Subject: Re: pkg/43244 (security/netpgp fails to build with gcc-4.5.0)
Date: Wed, 5 May 2010 01:46:40 +0200

 On Tue, May 04, 2010 at 10:20:10PM +0000, wiz@NetBSD.org wrote:
 > Fixed?

 It's fixed in src - I've yet to make a new package out of the sources,
 though, and this PR was raised with a pkg category, so I was going to
 leave the PR open until it was fixed there.

 I'm not averse to having it closed, though :-)

 Thanks,
 Al

From: Juan Romero Pardines <xtraeme@gmail.com>
To: NetBSD GNATS <gnats-bugs@netbsd.org>
Cc: 
Subject: Re: pkg/43244 (security/netpgp fails to build with gcc-4.5.0)
Date: Wed, 5 May 2010 01:49:55 +0200

 2010/5/5 Alistair Crooks <agc@pkgsrc.org>:

 > It's fixed in src - I've yet to make a new package out of the sources,
 > though, and this PR was raised with a pkg category, so I was going to
 > leave the PR open until it was fixed there.
 >
 > I'm not averse to having it closed, though :-)

 I hope you can check out the other PRs before releasing a new version.

 Cheers.

Responsible-Changed-From-To: pkg-manager->agc
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Wed, 05 May 2010 07:07:07 +0000
Responsible-Changed-Why:
Over to author.


State-Changed-From-To: feedback->analyzed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 05 May 2010 07:07:07 +0000
State-Changed-Why:
Fixed in NetBSD CVS repository, waiting for new distfile.


State-Changed-From-To: analyzed->feedback
State-Changed-By: agc@NetBSD.org
State-Changed-When: Sat, 08 May 2010 16:08:07 +0000
State-Changed-Why:
New distfile provided, and package updated.

Can this be closed out?



From: Juan Romero Pardines <xtraeme@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/43244 (security/netpgp fails to build with gcc-4.5.0)
Date: Sat, 8 May 2010 18:08:56 +0200

 2010/5/8  <agc@netbsd.org>:
 > Synopsis: security/netpgp fails to build with gcc-4.5.0
 >
 > State-Changed-From-To: analyzed->feedback
 > State-Changed-By: agc@NetBSD.org
 > State-Changed-When: Sat, 08 May 2010 16:08:07 +0000
 > State-Changed-Why:
 > New distfile provided, and package updated.
 >
 > Can this be closed out?

 Sure, all is ok now. Thanks.

State-Changed-From-To: feedback->closed
State-Changed-By: agc@NetBSD.org
State-Changed-When: Sat, 08 May 2010 16:11:20 +0000
State-Changed-Why:
confirmed fixed, closing now.

Thanks for the bug report!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.