ports/52459: security/gpgme: add conditional support for gpgsm

Michael Nottebrock michaelnottebrock at gmx.net
Tue May 20 10:30:22 UTC 2003


The following reply was made to PR ports/52459; it has been noted by GNATS.

From: Michael Nottebrock <michaelnottebrock at gmx.net>
To: freebsd-gnats-submit at FreeBSD.org
Cc: TERAMOTO Masahiro <markun at onohara.to>, arved at FreeBSD.org
Subject: Re: ports/52459: security/gpgme: add conditional support for gpgsm
Date: Tue, 20 May 2003 12:20:28 +0200

 Okay, patches done. Since gpgme is security related software, I'll explain the patches a bit:
 
 All the patches are for the assuan subdir in the gpgme distribution. "Assuan"
 is a communication protocol used by the aegypten project for their various tools
 (newpg, pinentry, etc). The latest gpgme version updated their import of the
 assuan bits and inherited the same incompatibilites is has with FreeBSD as the
 assuan bits in the pinentry, newpg & dirmngr ports. Therefore the patches to cure
 them are the same as in pinentry, newpg & dirmngr. I've contacted the aegypten
 folks long ago to have those fixed upstream, maybe it will happen one day...
 
 Anyway, what is important about the patches as far as code integrity of gpgme
 is concerned:
 
 	- They _only_ touch assuan.
 
 	- They are _only_ compiled when gpgsm support is enabled.
 
 That said, I hope this can be committed quickly. Patch against current gpgme in
 ports complete with patches below.
 
 
 diff -urN /mnt/nfs/ports/security/gpgme/Makefile gpgme/Makefile
 --- /mnt/nfs/ports/security/gpgme/Makefile	Tue May 20 12:07:01 2003
 +++ gpgme/Makefile	Tue May 20 12:02:12 2003
 @@ -7,6 +7,7 @@
  
  PORTNAME=	gpgme
  PORTVERSION=	0.3.15
 +PORTREVISION=	1
  CATEGORIES=	security
  MASTER_SITES=	${MASTER_SITE_GNUPG}
  MASTER_SITE_SUBDIR=	gpgme
 @@ -18,7 +19,6 @@
  LIB_DEPENDS=	pth.20:${PORTSDIR}/devel/pth
  
  USE_LIBTOOL=	yes
 -CONFIGURE_ARGS=	--without-gpgsm
  CONFIGURE_ENV=	MAKEINFO="makeinfo --no-split"
  USE_GMAKE=	yes
  INSTALLS_SHLIB=	yes
 diff -urN /mnt/nfs/ports/security/gpgme/files/patch-assuan::assuan-handler.c gpgme/files/patch-assuan::assuan-handler.c
 --- /mnt/nfs/ports/security/gpgme/files/patch-assuan::assuan-handler.c	Thu Jan  1 01:00:00 1970
 +++ gpgme/files/patch-assuan::assuan-handler.c	Tue May 20 11:54:08 2003
 @@ -0,0 +1,27 @@
 +--- assuan/assuan-handler.c.orig	Thu Jan 30 07:58:09 2003
 ++++ assuan/assuan-handler.c	Thu Jan 30 07:58:27 2003
 +@@ -29,6 +29,24 @@
 + #define digitp(a) ((a) >= '0' && (a) <= '9')
 + 
 + 
 ++#if !HAVE_FOPENCOOKIE
 ++/* Provide structure for our dummy replacement function.  Usually this
 ++   is defined in ../common/util.h but assuan should be self
 ++   contained. */
 ++/* Fixme: Remove fopencoookie :-(( */
 ++typedef struct
 ++{
 ++  ssize_t (*read)(void*,char*,size_t);
 ++  ssize_t (*write)(void*,const char*,size_t);
 ++  int (*seek)(void*,off_t*,int);
 ++  int (*close)(void*);
 ++} _IO_cookie_io_functions_t;
 ++typedef _IO_cookie_io_functions_t cookie_io_functions_t;
 ++FILE *fopencookie (void *cookie, const char *opentype,
 ++                   cookie_io_functions_t funclist);
 ++#endif /*!HAVE_FOPENCOOKIE*/
 ++
 ++
 + static int
 + dummy_handler (ASSUAN_CONTEXT ctx, char *line)
 + {
 diff -urN /mnt/nfs/ports/security/gpgme/files/patch-assuan::assuan-socket-connect.c gpgme/files/patch-assuan::assuan-socket-connect.c
 --- /mnt/nfs/ports/security/gpgme/files/patch-assuan::assuan-socket-connect.c	Thu Jan  1 01:00:00 1970
 +++ gpgme/files/patch-assuan::assuan-socket-connect.c	Tue May 20 11:56:51 2003
 @@ -0,0 +1,10 @@
 +--- assuan/assuan-socket-connect.c.orig	Wed Jan 29 15:30:12 2003
 ++++ assuan/assuan-socket-connect.c	Wed Jan 29 15:30:28 2003
 +@@ -23,6 +23,7 @@
 + #include <stddef.h>
 + #include <stdio.h>
 + #include <errno.h>
 ++#include <sys/types.h>
 + #include <sys/socket.h>
 + #include <sys/un.h>
 + #include <unistd.h>
 diff -urN /mnt/nfs/ports/security/gpgme/files/patch-assuan::assuan-socket-server.c gpgme/files/patch-assuan::assuan-socket-server.c
 --- /mnt/nfs/ports/security/gpgme/files/patch-assuan::assuan-socket-server.c	Thu Jan  1 01:00:00 1970
 +++ gpgme/files/patch-assuan::assuan-socket-server.c	Tue May 20 11:55:58 2003
 @@ -0,0 +1,10 @@
 +--- assuan/assuan-socket-server.c.orig	Wed Jan 29 15:27:13 2003
 ++++ assuan/assuan-socket-server.c	Wed Jan 29 15:27:38 2003
 +@@ -22,6 +22,7 @@
 + #include <stdlib.h>
 + #include <stdio.h>
 + #include <errno.h>
 ++#include <sys/types.h>
 + #include <sys/socket.h>
 + #include <sys/un.h>
 + #include <unistd.h>
 
 



More information about the freebsd-ports-bugs mailing list