ports/85802: Update port: security/pks - update source to 0.9.6

Graham Todd gtodd at bellanet.org
Tue Sep 6 15:30:16 UTC 2005


>Number:         85802
>Category:       ports
>Synopsis:       Update port: security/pks - update source to 0.9.6
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 06 15:30:14 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Graham Todd
>Release:        5.4
>Organization:
Bellanet
>Environment:
FreeBSD localhost 5.4-RELEASE-p4 FreeBSD 5.4-RELEASE-p4 #2: Thu Jul  7 08:44:31 EDT 2005  root at localhost:/usr/obj/usr/src/sys/SMP  i386
>Description:
      - Update to latest stable release version 0.9.6 (upstream maintainers recommend not using 0.9.4 due to security issues).

- First pass at converting startup script (pksd.sh) to use rc.subr and new rc.d subsystem.
>How-To-Repeat:
      Patch included.

diff -urN security/pks-orig/ security/pks/

A shell archive of the updated port is also available at:

http://www.opendevelopment.net/Software/FreeBSD/
>Fix:
diff -urN security/pks-orig/Makefile security/pks/Makefile
--- security/pks-orig/Makefile	Tue May 25 15:19:58 2004
+++ security/pks/Makefile	Tue Sep  6 10:16:27 2005
@@ -1,21 +1,18 @@
 # New ports collection makefile for:	pks
-# Date created:		15 Jan 2001
-# Whom:			kris at FreeBSD.org
+# Date created:		30 Jul 2005
+# Whom:			gtodd at bellanet.org
 #
-# $FreeBSD: ports/security/pks/Makefile,v 1.7 2004/05/25 19:19:58 pav Exp $
+# $FreeBSD$
 #
 
 PORTNAME=	pks
-PORTVERSION=	0.9.4
-PORTREVISION=	1
+PORTVERSION=	0.9.6
 CATEGORIES=	security www
-MASTER_SITES=	${PATCH_SITES} \
-		${MASTER_SITE_SOURCEFORGE}
+MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
 
 PATCH_SITES=	http://www.mit.edu/people/marc/pks/
-PATCHFILES=	pks094-patch2 \
-		x509patch
+PATCHFILES=
 PATCH_DIST_STRIP=-p1
 
 MAINTAINER=	jharris at widomaker.com
@@ -24,14 +21,16 @@
 LIB_DEPENDS=	db2.0:${PORTSDIR}/databases/db2
 
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS= --datadir=${PREFIX}/share/pks --localstatedir=/var/pks \
+CONFIGURE_ARGS=	--datadir=${PREFIX}/share/pks --localstatedir=/var/pks \
 		--sysconfdir=${PREFIX}/share/examples \
-		--libdir=${LOCALBASE}/lib
+		--libdir=${LOCALBASE}/lib --with-libwrap
 MAKE_ENV+=	LDFLAGS=-L${LOCALBASE}/lib
 
 MAN5=	pksd.conf.5
 MAN8=	pks-intro.8 pksclient.8 pksd.8 pksdctl.8
 
+PORTDOCS=	${WRKSRC}pks_help.*
+
 post-build:
 	${SED} -e "s, at PREFIX@,${PREFIX},g" \
 		< ${FILESDIR}/pksd.sh > ${WRKDIR}/pksd.sh
@@ -41,6 +40,16 @@
 .if !exists(${PREFIX}/etc/pksd.conf)
 	${INSTALL_DATA} ${WRKSRC}/pksd.conf ${PREFIX}/etc/pksd.conf
 .endif
+.if !defined(NOPORTDOCS)
+	${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/pks_help.en ${WRKSRC}/pks_help.es ${WRKSRC}/pks_help.fr \
+       	${WRKSRC}/pks_help.cz ${WRKSRC}/pks_help.de ${WRKSRC}/pks_help.ja \
+	${WRKSRC}/mail_intro ${DOCSDIR}
+.endif
+.if !defined(NOPORTDOCS)
+	${MKDIR} ${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/pksd.conf ${EXAMPLESDIR}
 	PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.endif
 
 .include <bsd.port.mk>
diff -urN security/pks-orig/distinfo security/pks/distinfo
--- security/pks-orig/distinfo	Tue Mar 30 22:11:09 2004
+++ security/pks/distinfo	Tue Sep  6 10:16:27 2005
@@ -1,6 +1,2 @@
-MD5 (pks-0.9.4.tar.gz) = 365d062bbc3f7bfda745474693d0fdec
-SIZE (pks-0.9.4.tar.gz) = 509043
-MD5 (pks094-patch2) = 33effba52c7a195d02d42ae41ba2795e
-SIZE (pks094-patch2) = 52843
-MD5 (x509patch) = 87625aac1b984410cc22c2ca530a95d8
-SIZE (x509patch) = 1617
+MD5 (pks-0.9.6.tar.gz) = 19427b543972c23fbc1c167d5408d3a9
+SIZE (pks-0.9.6.tar.gz) = 559872
diff -urN security/pks-orig/files/patch-aa security/pks/files/patch-aa
--- security/pks-orig/files/patch-aa	Sun Jan 14 23:40:11 2001
+++ security/pks/files/patch-aa	Wed Dec 31 19:00:00 1969
@@ -1,61 +0,0 @@
-$NetBSD$
-
---- Makefile.in.orig	Thu Jul 27 11:11:28 2000
-+++ Makefile.in	Thu Jul 27 11:24:02 2000
-@@ -9,9 +9,9 @@
- SHELL = /bin/sh
- 
- ## this does recursion for db2, if it's in the tree
--
--SUBDIRS = db2-sleepycat/dist
--
-+#
-+# We use the installed db2, so we don't need this line anymore
-+#
- depend all install check clean distclean maintainer-clean::
- 	for i in ${SUBDIRS}; do (test -d $$i && cd $$i && ${MAKE} $@) || exit 1; done
- 
-@@ -32,12 +32,13 @@
- all-pure:: $(ALL_PURE)
- all-utils:: $(UTILS)
- 
--DBDIR = db2-sleepycat/dist
-+DBDIR = ${LOCALBASE}/include/db2
- 
- CC = @CC@
- INSTALL = @INSTALL@
--INSTALL_PROGRAM = $(INSTALL)
--INSTALL_DATA = $(INSTALL)
-+INSTALL_PROGRAM = $(BSD_INSTALL_PROGRAM)
-+INSTALL_DATA = $(BSD_INSTALL_DATA)
-+INSTALL_SCRIPT = $(BSD_INSTALL_SCRIPT)
- SOCKLIBS = @LIBS@
- VPATH = @srcdir@
- 
-@@ -60,7 +61,7 @@
- DEFINES = $(DBG) @DEFS@
- CFLAGS = @gcc_cflags@ -g -O $(INCLUDES) $(DEFINES)
- 
--LIBDB = $(DBDIR)/libdb.a
-+LIBDB = -ldb2
- 
- CLEAN = rm -f
- 
-@@ -118,6 +119,8 @@
- pgpdump: pgpdump.o pgpfile.o $(PGPOBJS) $(UTILOBJS)
- 
- pgpsplit: pgpsplit.o $(PGPOBJS) $(UTILOBJS)
-+	$(CC) -o $@ pgpsplit.o $(PGPOBJS) $(UTILOBJS) $(LDFLAGS) \
-+	    $(SOCKLIBS) $(LIBDB)
- 
- kvcv: kvcv.o pgpfile.o logging.o $(PGPOBJS) $(UTILOBJS)
- 
-@@ -138,7 +141,7 @@
- install:: all installdirs
- 	for f in $(ALL); do $(INSTALL_PROGRAM) $$f $(bindir); done
- 	for f in $(SYSCONF); do $(INSTALL_DATA) $$f $(sysconfdir); done
--	for f in $(ALL_SH); do $(INSTALL_PROGRAM) $(srcdir)/$$f $(bindir); done
-+	for f in $(ALL_SH); do $(INSTALL_SCRIPT) $(srcdir)/$$f $(bindir); done
- 	for f in $(DATA); do $(INSTALL_DATA) $(srcdir)/$$f $(datadir); done
- 	for f in $(MAN5); do $(INSTALL_DATA) $(srcdir)/$$f $(man5dir); done
- 	for f in $(MAN8); do $(INSTALL_DATA) $(srcdir)/$$f $(man8dir); done
diff -urN security/pks-orig/files/patch-ab security/pks/files/patch-ab
--- security/pks-orig/files/patch-ab	Sun Jan 14 23:40:11 2001
+++ security/pks/files/patch-ab	Wed Dec 31 19:00:00 1969
@@ -1,9 +0,0 @@
---- pksd.c.orig	Thu Jul 27 10:16:19 2000
-+++ pksd.c	Thu Jul 27 10:17:34 2000
-@@ -85,6 +85,7 @@
-    psc.mrc = &mrc;
- 
-    pwc.port = pc.www_port;
-+   pwc.db_dir = pc.db_dir;
-    pwc.max_reply_keys = pc.max_reply_keys;
-    pwc.pic = &pic;
diff -urN security/pks-orig/files/patch-ac security/pks/files/patch-ac
--- security/pks-orig/files/patch-ac	Sun Jan 14 23:40:11 2001
+++ security/pks/files/patch-ac	Wed Dec 31 19:00:00 1969
@@ -1,55 +0,0 @@
-$NetBSD$
-
---- pks_www.c.orig	Wed Jun  2 02:06:01 1999
-+++ pks_www.c	Thu Jul 27 10:17:35 2000
-@@ -113,6 +113,9 @@
-    w_error(fd, vers, (unsigned char *) str, strlen(str));
- }
- 
-+static const char homepage_str[] = "/";
-+static int homepage_len = sizeof(homepage_str)-1;
-+
- static const char lookup_str[] = "/pks/lookup";
- static int lookup_len = sizeof(lookup_str)-1;
- 
-@@ -291,6 +294,34 @@
-    search = -1;
-    search_len = 0;
- 
-+   if (is_token(uri, urilen, homepage_str, homepage_len, 1)) {
-+      FILE *homepage;
-+      char homepage_path[2048];
-+      char buf[1024];
-+      unsigned char *line;
-+      xbuffer xb;
-+
-+      strncpy(homepage_path, conf->db_dir, 2035);
-+      strncat(homepage_path, "/index.html", 2046);
-+      if ((homepage = fopen(homepage_path,"r")) == NULL) {
-+         log_fatal("pks_www", "non-existent homepage");
-+	 return;
-+      }
-+
-+      xbuffer_alloc(&xb);
-+
-+      while (line = (unsigned char *) fgets(buf,sizeof(buf), homepage)) {
-+         if (!xbuffer_append_str(&xb, line)) {
-+            log_fatal("pks_www", "displaying home page");
-+	    return;
-+         }
-+      }
-+   
-+      w_reply(fd, vers, xb.buf, xb.len);
-+
-+      xbuffer_free(&xb);
-+      return;
-+   } 
-    if (is_token(uri, urilen, lookup_str, lookup_len, 1)) {
-       long op, op_len, exact, exact_len, fingerprint, fingerprint_len;
-       int flags;
-@@ -498,4 +529,5 @@
- void pks_www_init(pks_www_conf *conf)
- {
-    www_init(conf->port, pks_www, conf);
-+   www_init(conf->db_dir, pks_www, conf);
- }
diff -urN security/pks-orig/files/patch-ad security/pks/files/patch-ad
--- security/pks-orig/files/patch-ad	Sun Jan 14 23:40:11 2001
+++ security/pks/files/patch-ad	Wed Dec 31 19:00:00 1969
@@ -1,9 +0,0 @@
---- pks_www.h.orig	Wed May 19 23:39:52 1999
-+++ pks_www.h	Thu Jul 27 10:17:35 2000
-@@ -13,6 +13,7 @@
- typedef struct _pks_www_conf {
-    int port;
-    int max_reply_keys;
-+   char *db_dir;
-    pks_incr_conf *pic;
- } pks_www_conf;
diff -urN security/pks-orig/files/patch-ae security/pks/files/patch-ae
--- security/pks-orig/files/patch-ae	Fri Apr 19 18:23:32 2002
+++ security/pks/files/patch-ae	Wed Dec 31 19:00:00 1969
@@ -1,14 +0,0 @@
-===================================================================
-RCS file: pks_www.c,v
-retrieving revision 1.19
-diff -u -r1.19 pks_www.c
---- pks_www.c	1999/06/02 06:06:01	1.19
-+++ pks_www.c	2001/09/02 04:14:22
-@@ -529,5 +529,6 @@
- void pks_www_init(pks_www_conf *conf)
- {
-    www_init(conf->port, pks_www, conf);
--   www_init(conf->db_dir, pks_www, conf);
-+   //www_init(conf->db_dir, pks_www, conf); // wtf?  This snuck in via
-+                                            // NetBSD's patch-ac...
- }
diff -urN security/pks-orig/files/patch-af security/pks/files/patch-af
--- security/pks-orig/files/patch-af	Fri Apr 19 18:23:32 2002
+++ security/pks/files/patch-af	Wed Dec 31 19:00:00 1969
@@ -1,14 +0,0 @@
-===================================================================
-RCS file: pks_www.h,v
-retrieving revision 1.4
-diff -u -r1.4 pks_www.h
---- pks_www.h	1999/05/20 03:39:52	1.4
-+++ pks_www.h	2001/09/02 04:15:06
-@@ -12,6 +12,7 @@
- 
- typedef struct _pks_www_conf {
-    int port;
-+  int readonly;
-    int max_reply_keys;
-    char *db_dir;
-    pks_incr_conf *pic;
diff -urN security/pks-orig/files/patch-ag security/pks/files/patch-ag
--- security/pks-orig/files/patch-ag	Fri Apr 19 18:23:32 2002
+++ security/pks/files/patch-ag	Wed Dec 31 19:00:00 1969
@@ -1,15 +0,0 @@
-===================================================================
-RCS file: pksd.8,v
-retrieving revision 1.3
-diff -u -r1.3 pksd.8
---- pksd.8	1999/06/02 06:07:30	1.3
-+++ pksd.8	2001/09/02 04:15:53
-@@ -17,7 +17,7 @@
- 
- The server takes a single argument, which is the name of the
- configuration file.  The format of this file is documented in
--\fBpksd.conf(8)\fR.
-+\fBpksd.conf(5)\fR.
- 
- The server supports queries via the web and via an email interface.
- The web interface implements a few form URI's which are described in
diff -urN security/pks-orig/files/patch-ah security/pks/files/patch-ah
--- security/pks-orig/files/patch-ah	Fri Apr 19 18:23:32 2002
+++ security/pks/files/patch-ah	Wed Dec 31 19:00:00 1969
@@ -1,14 +0,0 @@
-===================================================================
-RCS file: pksd.c,v
-retrieving revision 1.24
-diff -u -r1.24 pksd.c
---- pksd.c	1999/05/31 20:21:20	1.24
-+++ pksd.c	2001/09/02 04:17:59
-@@ -84,6 +84,7 @@
-    psc.mrc = &mrc;
- 
-    pwc.port = pc.www_port;
-+   pwc.readonly = pc.www_readonly;
-    pwc.db_dir = pc.db_dir;
-    pwc.max_reply_keys = pc.max_reply_keys;
-    pwc.pic = &pic;
diff -urN security/pks-orig/files/patch-ai security/pks/files/patch-ai
--- security/pks-orig/files/patch-ai	Fri Apr 19 18:23:32 2002
+++ security/pks/files/patch-ai	Wed Dec 31 19:00:00 1969
@@ -1,20 +0,0 @@
-===================================================================
-RCS file: pksd.conf.5,v
-retrieving revision 1.7
-diff -u -r1.7 pksd.conf.5
---- pksd.conf.5	1999/05/17 05:20:20	1.7
-+++ pksd.conf.5	2001/09/02 04:19:53
-@@ -42,6 +42,13 @@
- .BR 0 ,
- then HTTP connections are not accepted on any port.
- .TP
-+.B www_readonly
-+This controls key updates/submissions via HTTP.  If it is
-+.BR 0 ,
-+then keys may be submitted via HTTP.  The DEFAULT is
-+.BR 1,
-+which DOES NOT allow key updates/submissions via HTTP.
-+.TP
- .B socket_name
- This is the name of the unix domain socket on which
- .B pksd(8)
diff -urN security/pks-orig/files/patch-aj security/pks/files/patch-aj
--- security/pks-orig/files/patch-aj	Fri Apr 19 18:23:32 2002
+++ security/pks/files/patch-aj	Wed Dec 31 19:00:00 1969
@@ -1,18 +0,0 @@
-===================================================================
-RCS file: pksdctl.c,v
-retrieving revision 1.11
-diff -u -r1.11 pksdctl.c
---- pksdctl.c	1999/05/17 05:20:20	1.11
-+++ pksdctl.c	2001/09/02 04:20:57
-@@ -20,6 +20,11 @@
- void usage(char *argv0)
- {
-    fprintf(stderr, "usage: %s socket string\n", argv0);
-+   fprintf(stderr, "usage:  %s <pksd socket> <command> [arg]\n", argv0);
-+   fprintf(stderr, "  commands:  mail <msg>\n");
-+   fprintf(stderr, "             disable <userid>\n");
-+   fprintf(stderr, "             shutdown\n");
-+
-    exit(1);
- }
- 
diff -urN security/pks-orig/files/patch-ak security/pks/files/patch-ak
--- security/pks-orig/files/patch-ak	Fri Apr 19 18:23:32 2002
+++ security/pks/files/patch-ak	Wed Dec 31 19:00:00 1969
@@ -1,53 +0,0 @@
-===================================================================
-RCS file: www.c,v
-retrieving revision 1.25
-diff -u -r1.25 www.c
---- www.c	1999/06/02 06:08:16	1.25
-+++ www.c	2001/09/02 04:26:28
-@@ -21,6 +21,7 @@
- #include "www.h"
- #include "globals.h"
- #include "parse.h"
-+#include "pks_www.h"
- 
- static const long hexchar[] = {
-    256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-@@ -140,6 +141,7 @@
- typedef struct _hh_state {
-    httphandler h;
-    xbuffer xb;
-+  unsigned int readonly;
-    void *c;
-    long ptr;
-    long method, uri, method_len, uri_len;
-@@ -148,10 +150,12 @@
- 
- static void reader(int fd, unsigned char *input, long len, int done, void *c)
- {
--   hh_state *s = (hh_state *) c;
- 
-+   hh_state *s = (hh_state *) c;
-    long ptr, cnt;
-    long dummy, dummy_len;
-+   unsigned int readonly = s->readonly;
-+
- 
-    if (done < 0) {
-       xbuffer_free(&(s->xb));
-@@ -360,7 +364,7 @@
- 	 }
-       }
-    } else if (is_token(input+s->method, s->method_len, post, post_len, 0)) {
--      if (s->content_length == 0) {
-+      if ((s->content_length == 0) || readonly) {
- 	 www_reply(fd, 1000, 400, bad_request, NULL, 0);
- 	 mp_delete_read(fd);
- 	 xbuffer_free(&(s->xb));
-@@ -484,6 +488,7 @@
- 
-    hhs->h = h;
-    hhs->c = c;
-+   hhs->readonly = ((pks_www_conf *)c)->readonly;
-    xbuffer_alloc(&(hhs->xb));
-    hhs->ptr = 0;
-    hhs->uri = -1;
diff -urN security/pks-orig/files/patch-al security/pks/files/patch-al
--- security/pks-orig/files/patch-al	Fri Apr 19 18:23:32 2002
+++ security/pks/files/patch-al	Wed Dec 31 19:00:00 1969
@@ -1,15 +0,0 @@
-===================================================================
-RCS file: globals.h,v
-retrieving revision 1.15
-diff -u -r1.15 globals.h
---- globals.h	1999/07/20 05:02:45	1.15
-+++ globals.h	2001/09/02 03:43:32
-@@ -13,7 +13,7 @@
-    "42.17.2+magicfeature", or "42.17.3+joe".  Don't remove any
-    existing modifiers. */
- 
--#define PKS_VERSION "0.9.4+patch2"
-+#define PKS_VERSION "0.9.4+patch2+JHpatch1"
- 
- #ifdef DEBUG
- extern int debug;
diff -urN security/pks-orig/files/patch-am security/pks/files/patch-am
--- security/pks-orig/files/patch-am	Fri Apr 19 18:23:32 2002
+++ security/pks/files/patch-am	Wed Dec 31 19:00:00 1969
@@ -1,71 +0,0 @@
-===================================================================
-RCS file: kd_index.c,v
-retrieving revision 1.16
-diff -u -r1.16 kd_index.c
---- kd_index.c	1999/09/23 03:19:36	1.16
-+++ kd_index.c	2001/09/02 04:00:23
-@@ -122,6 +122,7 @@
- 
- int keys_elem_genindex(void *e, void *c)
- {
-+
-    keys_elem *ke = (keys_elem *) e;
-    keg_state *s = (keg_state *) c;
-    gi_state gis;
-@@ -131,6 +132,8 @@
-    SHS_CTX sha;
-    unsigned char hash[20];
-    int i;
-+   unsigned int pos = 0;
-+
- 
-    /* pgp does gmtime, so we do, too */
-    c_tm = gmtime(&(ke->create_time));
-@@ -163,24 +166,33 @@
-          MD5Final(hash, &md5ctx);
-       }
- 
--      for (i=0; i<8; i++)
--         sprintf(buf+i*3, "%02X ", hash[i]);
--      buf[24] = ' ';
--      for (i=8; i<16; i++)
--	 sprintf(buf+1+i*3, "%02X ", hash[i]);
-+      pos = 0;
-+      // print longer SHA-1 hashes differently
-       if (ke->keytype == 16 || ke->keytype == 17) {
--         buf[49] = ' ';
--         for (i=16; i<20; i++)
--	    sprintf(buf+2+i*3, "%02X ", hash[i]);
--         buf[62] = '\n';
--      } else {
--         buf[48] = '\n';
--      }
-+	for (i = 0; i < 20; i += 2) {
-+	  sprintf (&buf[pos], "%02X%02X ", hash[i], hash[i+1]);
-+	  pos += 5; // just added n chars...
-+	  // add another space halfway through...
-+	  if (i == 8) {
-+	    buf[pos] = ' ';
-+	    pos++;
-+	  }
-+	} // for i
-+	pos--; // remove last space
-+	buf[pos] = '\n';
-+      } else { // if keytype != 16 or 17
-+	for (i=0; i<8; i++)
-+	  sprintf(buf+i*3, "%02X ", hash[i]);
-+	buf[24] = ' ';
-+	for (i=8; i<16; i++)
-+	  sprintf(buf+1+i*3, "%02X ", hash[i]);
-+	buf[48] = '\n';
-+      } // if else on keytype
- 
--      if (!xbuffer_append_str(s->xb, "          Key fingerprint =  "))
-+      if (!xbuffer_append_str(s->xb, "     Key fingerprint = "))
- 	 return(0);
-       if (ke->keytype == 16 || ke->keytype == 17) {
--         if (!xbuffer_append(s->xb, (unsigned char *) buf, 63))
-+         if (!xbuffer_append(s->xb, (unsigned char *) buf, 51))
- 	    return(0);
-       } else {
-          if (!xbuffer_append(s->xb, (unsigned char *) buf, 49))
diff -urN security/pks-orig/files/patch-an security/pks/files/patch-an
--- security/pks-orig/files/patch-an	Fri Apr 19 18:23:32 2002
+++ security/pks/files/patch-an	Wed Dec 31 19:00:00 1969
@@ -1,32 +0,0 @@
-===================================================================
-RCS file: pks_config.c,v
-retrieving revision 1.13
-diff -u -r1.13 pks_config.c
---- pks_config.c	1999/05/20 03:39:51	1.13
-+++ pks_config.c	2001/09/02 04:05:57
-@@ -20,6 +20,7 @@
- const pks_config default_config = {
-    "/var/spool/pks/etc/db",
-    0,
-+   1,
-    "/var/spool/pks/pksd_socket",
-    "",
-    "root",
-@@ -40,6 +41,9 @@
- const char www_port_str[] = "www_port";
- long www_port_len = sizeof(www_port_str)-1;
- 
-+const char www_readonly_str[] = "www_readonly";
-+long www_readonly_len = sizeof(www_readonly_str)-1;
-+
- const char sockname_str[] = "socket_name";
- long sockname_len = sizeof(sockname_str)-1;
- 
-@@ -147,6 +151,7 @@
- 
-       if (str_conf(db_dir_str, db_dir_len, pc->db_dir))
-       else if (num_conf(www_port_str, www_port_len, pc->www_port))
-+     else if (num_conf(www_readonly_str, www_readonly_len, pc->www_readonly))
-       else if (str_conf(sockname_str, sockname_len, pc->socket_name))
-       else if (str_conf(mdc_str, mdc_len, pc->mail_delivery_client))
-       else if (str_conf(maint_str, maint_len, pc->maintainer_email))
diff -urN security/pks-orig/files/patch-ao security/pks/files/patch-ao
--- security/pks-orig/files/patch-ao	Fri Apr 19 18:23:32 2002
+++ security/pks/files/patch-ao	Wed Dec 31 19:00:00 1969
@@ -1,14 +0,0 @@
-===================================================================
-RCS file: pks_config.h,v
-retrieving revision 1.11
-diff -u -r1.11 pks_config.h
---- pks_config.h	1999/05/20 03:39:52	1.11
-+++ pks_config.h	2001/09/02 04:07:18
-@@ -16,6 +16,7 @@
- 
-    /* web server stuff */
-    int www_port;
-+  int www_readonly;
- 
-    /* mail server stuff */
-    char socket_name[1024];
diff -urN security/pks-orig/files/pksd.sh security/pks/files/pksd.sh
--- security/pks-orig/files/pksd.sh	Mon Jan 15 00:26:00 2001
+++ security/pks/files/pksd.sh	Tue Sep  6 10:16:27 2005
@@ -1,52 +1,66 @@
 #!/bin/sh
 #
-# $NetBSD: pksd.sh,v 1.1.1.1 2000/07/27 16:10:24 jlam Exp $
+# Switch to using new rc.d system.
+#
+# $Log: pksd.sh,v $
+# Revision 1.2  2005/06/07 21:25:38  root
+# Attempt to switch to using new rc.d system.
+#
 #
 # PROVIDE: pksd
 # REQUIRE: DAEMON
 
+. /etc/rc.subr
+
 name="pksd"
-command=${1:-start}
+rcvar=`set_rcvar`
+command="/usr/local/sbin/pksd"
+command_args="/usr/local/etc/${name}.conf &"
+start_precmd="pksd_precmd"
+start_postcmd="pksd_runqueue"
+stop_command="pksd_clean_stop"
 
-case ${command} in
-start)
-	if [ ! -f @PREFIX@/etc/${name}.conf ]
-	then
-		exit 0
-	else
-		dbdir=`awk '/db_dir/ { print $2 }' < @PREFIX@/etc/${name}.conf`
+pksd_precmd()
+{
+	if [ ! -f /usr/local/etc/${name}.conf ]
+        then
+                exit 0
+        else
+                dbdir=`awk '/db_dir/ { print $2 }' < /usr/local/etc/${name}.conf`
+        fi
+        if [ ! -f ${dbdir}/keydb000 -a -x /usr/local/bin/pksclient ]
+        then
+                /usr/local/bin/pksclient ${dbdir} create
 	fi
-	if [ ! -f ${dbdir}/keydb000 -a -x @PREFIX@/bin/pksclient ]
-	then
-		@PREFIX@/bin/pksclient ${dbdir} create
-	fi
-	if [ -x @PREFIX@/bin/${name} -a -x @PREFIX@/bin/pks-queue-run.sh ]
-	then
-		echo "Starting ${name}."
-		@PREFIX@/bin/${name} @PREFIX@/etc/${name}.conf &
+}
+
+pksd_runqueue()
+{
+	if [ -x /usr/local/bin/${name} -a -x /usr/local/bin/pks-queue-run.sh ]
+        then
+        	echo "Doing queue run for ${name}."
 		sleep 5
-		@PREFIX@/bin/pks-queue-run.sh @PREFIX@/etc/${name}.conf
+        	/usr/local/bin/pks-queue-run.sh /usr/local/etc/${name}.conf
 	fi
-	;;
-stop)
-	if [ ! -f @PREFIX@/etc/${name}.conf ]
-	then
-		exit 0
-	else
-		socket=`awk '/socket_name/ { print $2 }' < @PREFIX@/etc/${name}.conf`
-	fi
-	if [ -x @PREFIX@/bin/${name}ctl -a -S ${socket} ]
-	then
-		echo "Stopping ${name}."
-		@PREFIX@/bin/${name}ctl ${socket} shutdown
-	else
-		echo "couldn't stop ${name}."
-	fi
-	;;
-restart)
-	( $0 stop )
-	sleep 1
-	$0 start
-	;;
-esac
-exit 0
+}
+
+pksd_clean_stop()
+{
+        if [ ! -f /usr/local/etc/${name}.conf ]
+        then
+                exit 0
+        else
+                socket=`awk '/socket_name/ { print $2 }' < /usr/local/etc/${name}.conf`
+        fi
+        if [ -x /usr/local/bin/${name}ctl -a -S ${socket} ]
+        then
+                echo "Shutting down ${name} socket connections using pksdctl."
+                /usr/local/bin/${name}ctl ${socket} shutdown
+        else
+                echo "couldn't stop ${name}."
+        fi
+}
+
+
+load_rc_config $name
+run_rc_command "$1"
diff -urN security/pks-orig/pkg-deinstall security/pks/pkg-deinstall
--- security/pks-orig/pkg-deinstall	Sun Jan 14 23:40:10 2001
+++ security/pks/pkg-deinstall	Tue Sep  6 10:16:27 2005
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD$
+# $FreeBSD$
 
 PKGNAME=$1
 STAGE=$2
@@ -14,7 +14,7 @@
 If you won't be using ${PKGNAME} any longer, you may want to remove the
 following directories and files:
 
-	/usr/local/etc/pksd.conf
+        ${PREFIX}/etc/pksd.conf
 	/var/pks
 ===========================================================================
 EOF
diff -urN security/pks-orig/pkg-install security/pks/pkg-install
--- security/pks-orig/pkg-install	Sun Jan 14 23:40:10 2001
+++ security/pks/pkg-install	Tue Sep  6 10:16:27 2005
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD$
+# $FreeBSD$
 
 PKGNAME=$1
 STAGE=$2
diff -urN security/pks-orig/pkg-message security/pks/pkg-message
--- security/pks-orig/pkg-message	Wed Dec 31 19:00:00 1969
+++ security/pks/pkg-message	Tue Sep  6 10:16:27 2005
@@ -0,0 +1,11 @@
+
+
+	##################################
+
+	  To enable adding keys via the
+	  web interface please edit the
+	  configuration file at:
+
+	   /usr/local/etc/pks/pksd.conf
+
+	##################################
diff -urN security/pks-orig/pkg-plist security/pks/pkg-plist
--- security/pks-orig/pkg-plist	Sun Jan 14 23:40:10 2001
+++ security/pks/pkg-plist	Tue Sep  6 10:16:27 2005
@@ -2,11 +2,18 @@
 bin/pks-mail.sh
 bin/pks-queue-run.sh
 bin/pksclient
-bin/pksd
+sbin/pksd
 bin/pksdctl
 etc/rc.d/pksd.sh
- at unexec if cmp -s %D/etc/pksd.conf %D/share/examples/pksd.conf; then rm -f %D/etc/pksd.conf; fi
-share/examples/pksd.conf
 share/pks/mail_intro
-share/pks/pks_help.en
- at dirrm share/pks
+ at unexec if cmp -s %D/etc/pksd.conf %D/share/examples/pksd.conf; then rm -f %D/etc/pksd.conf; fi
+%%PORTDOCS%%%%EXAMPLESDIR%%/pksd.conf
+%%PORTDOCS%%%%DOCSDIR%%/mail_intro
+%%PORTDOCS%%%%DOCSDIR%%/pks_help.en
+%%PORTDOCS%%%%DOCSDIR%%/pks_help.es
+%%PORTDOCS%%%%DOCSDIR%%/pks_help.fr
+%%PORTDOCS%%%%DOCSDIR%%/pks_help.de
+%%PORTDOCS%%%%DOCSDIR%%/pks_help.cz
+%%PORTDOCS%%%%DOCSDIR%%/pks_help.ja
+%%PORTDOCS%%@unexec %D/%%DOCSDIR%% 2>/dev/null || true
+%%PORTDOCS%%@dirrm share/pks

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list