Bug 52459 - security/gpgme: add conditional support for gpgsm
Summary: security/gpgme: add conditional support for gpgsm
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-20 10:10 UTC by Michael Nottebrock
Modified: 2003-05-22 02:30 UTC (History)
1 user (show)

See Also:


Attachments
gpgme.diff (547 bytes, patch)
2003-05-20 10:10 UTC, Michael Nottebrock
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Nottebrock 2003-05-20 10:10:04 UTC
	My diff in the last PR missed a tiny yet important bit. :-( Here it is.
Comment 1 Michael Nottebrock 2003-05-20 10:51:21 UTC
*sigh* Please put this PR on hold. The updated gpgme doesn't like gpgsm 
support anymore. I need to make a patch first.


-- 
Regards,
	Michael Nottebrock
Comment 2 Michael Nottebrock 2003-05-20 11:20:28 UTC
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>
Comment 3 markun 2003-05-21 15:20:40 UTC
Hi

I'm maintainer of this port.
Thank you for your fix patch, and please commit this.

-- 
TERAMOTO Masahiro
   markun@onohara.to
Comment 4 Mario Sergio Fujikawa Ferreira freebsd_committer freebsd_triage 2003-05-22 02:30:15 UTC
State Changed
From-To: open->closed

Committed, thanks!