diff options
author | lawrance <lawrance@FreeBSD.org> | 2005-09-09 22:00:10 +0800 |
---|---|---|
committer | lawrance <lawrance@FreeBSD.org> | 2005-09-09 22:00:10 +0800 |
commit | c494ab4030160cb654110f81036940cd762c8e11 (patch) | |
tree | 576a9bbab1744af5b491ffe637e4b687799be096 /security/pks | |
parent | 50ad8ff64c46889dc19b2ba947b2b71b6151fcf2 (diff) | |
download | freebsd-ports-gnome-c494ab4030160cb654110f81036940cd762c8e11.tar.gz freebsd-ports-gnome-c494ab4030160cb654110f81036940cd762c8e11.tar.zst freebsd-ports-gnome-c494ab4030160cb654110f81036940cd762c8e11.zip |
Update to 0.9.6
- Add rcng startup
- No longer touch pksd.conf, only pksd.conf.sample
- Ensure the port builds against db2 from ports by deleting the included
version. Add post-patch bits to help this happen.
- Submitter takes maintainership
PR: ports/85802
Submitted by: Graham Todd <gtodd@bellanet.org> (new maintainer)
Approved by: Jason Harris <jharris@widomaker.com> (maintainer)
Diffstat (limited to 'security/pks')
-rw-r--r-- | security/pks/Makefile | 52 | ||||
-rw-r--r-- | security/pks/distinfo | 8 | ||||
-rw-r--r-- | security/pks/files/patch-aa | 61 | ||||
-rw-r--r-- | security/pks/files/patch-ab | 9 | ||||
-rw-r--r-- | security/pks/files/patch-ac | 55 | ||||
-rw-r--r-- | security/pks/files/patch-ad | 9 | ||||
-rw-r--r-- | security/pks/files/patch-ae | 14 | ||||
-rw-r--r-- | security/pks/files/patch-af | 14 | ||||
-rw-r--r-- | security/pks/files/patch-ag | 15 | ||||
-rw-r--r-- | security/pks/files/patch-ah | 14 | ||||
-rw-r--r-- | security/pks/files/patch-ai | 20 | ||||
-rw-r--r-- | security/pks/files/patch-aj | 18 | ||||
-rw-r--r-- | security/pks/files/patch-ak | 53 | ||||
-rw-r--r-- | security/pks/files/patch-al | 15 | ||||
-rw-r--r-- | security/pks/files/patch-am | 71 | ||||
-rw-r--r-- | security/pks/files/patch-an | 32 | ||||
-rw-r--r-- | security/pks/files/patch-ao | 14 | ||||
-rw-r--r-- | security/pks/files/pksd.sh | 52 | ||||
-rw-r--r-- | security/pks/files/pksd.sh.in | 63 | ||||
-rw-r--r-- | security/pks/pkg-deinstall | 4 | ||||
-rw-r--r-- | security/pks/pkg-install | 2 | ||||
-rw-r--r-- | security/pks/pkg-message | 11 | ||||
-rw-r--r-- | security/pks/pkg-plist | 15 |
23 files changed, 118 insertions, 503 deletions
diff --git a/security/pks/Makefile b/security/pks/Makefile index 7dfa9959e08a..c06ff6935899 100644 --- a/security/pks/Makefile +++ b/security/pks/Makefile @@ -6,41 +6,47 @@ # 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 -PATCH_DIST_STRIP=-p1 - -MAINTAINER= jharris@widomaker.com +MAINTAINER= gtodd@bellanet.org COMMENT= PGP Public Key Server 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 -MAKE_ENV+= LDFLAGS=-L${LOCALBASE}/lib - -MAN5= pksd.conf.5 -MAN8= pks-intro.8 pksclient.8 pksd.8 pksdctl.8 - -post-build: - ${SED} -e "s,@PREFIX@,${PREFIX},g" \ - < ${FILESDIR}/pksd.sh > ${WRKDIR}/pksd.sh + --libdir=${LOCALBASE}/lib --with-libwrap +CFLAGS+= -I/usr/local/include/db2 +MAKE_ENV+= LDFLAGS=-L${LOCALBASE}/lib SUBDIRS= + +USE_RC_SUBR= pksd.sh +MAN5= pksd.conf.5 +MAN8= pks-intro.8 pksclient.8 pksd.8 pksdctl.8 +USE_REINPLACE= yes + +# remove embedded sleepycat, remove associated build commands, make +# the build use the headers and libraries from the db2 port +post-patch: + ${RM} -rf ${WRKSRC}/db2-sleepycat + ${REINPLACE_CMD} 's|SUBDIRS =.*|SUBDIRS =|; \ + s|LIBDB =.*|LIBDB = -L/usr/local/lib -ldb2|; \ + s|DBDIR =.*|DBDIR = /usr/local/include/db2|' \ + ${WRKSRC}/Makefile.in post-install: ${INSTALL_SCRIPT} ${WRKDIR}/pksd.sh ${PREFIX}/etc/rc.d/pksd.sh -.if !exists(${PREFIX}/etc/pksd.conf) - ${INSTALL_DATA} ${WRKSRC}/pksd.conf ${PREFIX}/etc/pksd.conf -.endif + ${INSTALL_DATA} ${WRKSRC}/pksd.conf ${PREFIX}/etc/pksd.conf.sample +.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} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL +.endif + @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/security/pks/distinfo b/security/pks/distinfo index 16e4d607bae3..3dee33fe2921 100644 --- a/security/pks/distinfo +++ b/security/pks/distinfo @@ -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 --git a/security/pks/files/patch-aa b/security/pks/files/patch-aa deleted file mode 100644 index 8d2f9b083b4a..000000000000 --- a/security/pks/files/patch-aa +++ /dev/null @@ -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 --git a/security/pks/files/patch-ab b/security/pks/files/patch-ab deleted file mode 100644 index 75a39a1cdc0c..000000000000 --- a/security/pks/files/patch-ab +++ /dev/null @@ -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 --git a/security/pks/files/patch-ac b/security/pks/files/patch-ac deleted file mode 100644 index 0f3f06a0f1cb..000000000000 --- a/security/pks/files/patch-ac +++ /dev/null @@ -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 --git a/security/pks/files/patch-ad b/security/pks/files/patch-ad deleted file mode 100644 index fa726f684e9d..000000000000 --- a/security/pks/files/patch-ad +++ /dev/null @@ -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 --git a/security/pks/files/patch-ae b/security/pks/files/patch-ae deleted file mode 100644 index 8f41658185ec..000000000000 --- a/security/pks/files/patch-ae +++ /dev/null @@ -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 --git a/security/pks/files/patch-af b/security/pks/files/patch-af deleted file mode 100644 index bcfba40b019f..000000000000 --- a/security/pks/files/patch-af +++ /dev/null @@ -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 --git a/security/pks/files/patch-ag b/security/pks/files/patch-ag deleted file mode 100644 index f5d9039a2101..000000000000 --- a/security/pks/files/patch-ag +++ /dev/null @@ -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 --git a/security/pks/files/patch-ah b/security/pks/files/patch-ah deleted file mode 100644 index 272bc9a4701a..000000000000 --- a/security/pks/files/patch-ah +++ /dev/null @@ -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 --git a/security/pks/files/patch-ai b/security/pks/files/patch-ai deleted file mode 100644 index e04211b957d9..000000000000 --- a/security/pks/files/patch-ai +++ /dev/null @@ -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 --git a/security/pks/files/patch-aj b/security/pks/files/patch-aj deleted file mode 100644 index c55fd3491e2f..000000000000 --- a/security/pks/files/patch-aj +++ /dev/null @@ -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 --git a/security/pks/files/patch-ak b/security/pks/files/patch-ak deleted file mode 100644 index a22d40e97d27..000000000000 --- a/security/pks/files/patch-ak +++ /dev/null @@ -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 --git a/security/pks/files/patch-al b/security/pks/files/patch-al deleted file mode 100644 index 696a734b1e8a..000000000000 --- a/security/pks/files/patch-al +++ /dev/null @@ -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 --git a/security/pks/files/patch-am b/security/pks/files/patch-am deleted file mode 100644 index 57c8b7728f82..000000000000 --- a/security/pks/files/patch-am +++ /dev/null @@ -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 --git a/security/pks/files/patch-an b/security/pks/files/patch-an deleted file mode 100644 index abd1aff0976e..000000000000 --- a/security/pks/files/patch-an +++ /dev/null @@ -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 --git a/security/pks/files/patch-ao b/security/pks/files/patch-ao deleted file mode 100644 index 9b5052ea0d01..000000000000 --- a/security/pks/files/patch-ao +++ /dev/null @@ -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 --git a/security/pks/files/pksd.sh b/security/pks/files/pksd.sh deleted file mode 100644 index d78041b8fe5f..000000000000 --- a/security/pks/files/pksd.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# -# $NetBSD: pksd.sh,v 1.1.1.1 2000/07/27 16:10:24 jlam Exp $ -# -# PROVIDE: pksd -# REQUIRE: DAEMON - -name="pksd" -command=${1:-start} - -case ${command} in -start) - if [ ! -f @PREFIX@/etc/${name}.conf ] - then - exit 0 - else - dbdir=`awk '/db_dir/ { print $2 }' < @PREFIX@/etc/${name}.conf` - 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 & - sleep 5 - @PREFIX@/bin/pks-queue-run.sh @PREFIX@/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 diff --git a/security/pks/files/pksd.sh.in b/security/pks/files/pksd.sh.in new file mode 100644 index 000000000000..cb6d748db220 --- /dev/null +++ b/security/pks/files/pksd.sh.in @@ -0,0 +1,63 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# +# PROVIDE: pksd +# REQUIRE: DAEMON + +. %%RC_SUBR%% + +name="pksd" +rcvar=`set_rcvar` +command="%%PREFIX%%/sbin/pksd" +command_args="%%PREFIX%%/etc/${name}.conf &" +required_files="%%PREFIX%%/etc/${name}.conf" +start_precmd="pksd_precmd" +start_postcmd="pksd_runqueue" +stop_command="pksd_clean_stop" + +pksd_precmd() +{ + if [ ! -f %%PREFIX%%/etc/${name}.conf ] + then + exit 0 + else + dbdir=`awk '/db_dir/ { print $2 }' < %%PREFIX%%/etc/${name}.conf` + fi + if [ ! -f ${dbdir}/keydb000 -a -x %%PREFIX%%/bin/pksclient ] + then + %%PREFIX%%/bin/pksclient ${dbdir} create + fi +} + +pksd_runqueue() +{ + if [ -x %%PREFIX%%/bin/${name} -a -x %%PREFIX%%/bin/pks-queue-run.sh ] + then + echo "Doing queue run for ${name}." + sleep 5 + %%PREFIX%%/bin/pks-queue-run.sh %%PREFIX%%/etc/${name}.conf + fi +} + +pksd_clean_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 "Shutting down ${name} socket connections using pksdctl." + %%PREFIX%%/bin/${name}ctl ${socket} shutdown + else + echo "couldn't stop ${name}." + fi +} + + +load_rc_config $name +run_rc_command "$1" diff --git a/security/pks/pkg-deinstall b/security/pks/pkg-deinstall index f3949fc343f6..9fc2e9fddf84 100644 --- a/security/pks/pkg-deinstall +++ b/security/pks/pkg-deinstall @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD$ +# $FreeBSD$ PKGNAME=$1 STAGE=$2 @@ -14,7 +14,7 @@ POST-DEINSTALL) 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 --git a/security/pks/pkg-install b/security/pks/pkg-install index d2c772b14e80..ae5534f0e2ae 100644 --- a/security/pks/pkg-install +++ b/security/pks/pkg-install @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD$ +# $FreeBSD$ PKGNAME=$1 STAGE=$2 diff --git a/security/pks/pkg-message b/security/pks/pkg-message new file mode 100644 index 000000000000..b96a749917f7 --- /dev/null +++ b/security/pks/pkg-message @@ -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 --git a/security/pks/pkg-plist b/security/pks/pkg-plist index 1c2e2b924dd5..d533db70c3d0 100644 --- a/security/pks/pkg-plist +++ b/security/pks/pkg-plist @@ -2,11 +2,16 @@ bin/pgpsplit bin/pks-mail.sh bin/pks-queue-run.sh bin/pksclient -bin/pksd +sbin/pksd bin/pksdctl -etc/rc.d/pksd.sh -@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 +etc/pksd.conf.sample share/pks/mail_intro -share/pks/pks_help.en +%%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%%@dirrm %%DOCSDIR%% @dirrm share/pks |