summaryrefslogtreecommitdiffstats
path: root/security/pks
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2001-01-15 04:40:11 +0000
committerkris <kris@FreeBSD.org>2001-01-15 04:40:11 +0000
commit15d90812fffb890b3d79d60b24a0cee7898c5e87 (patch)
treed9e41206f464793fe296078ca320c82204597290 /security/pks
parente12f948fbde4a242a914ccc81526824ae49a3098 (diff)
downloadFreeBSD-ports-15d90812fffb890b3d79d60b24a0cee7898c5e87.zip
FreeBSD-ports-15d90812fffb890b3d79d60b24a0cee7898c5e87.tar.gz
pks 0.9.4 is a PGP public key server from MIT.
Obtained from: NetBSD
Diffstat (limited to 'security/pks')
-rw-r--r--security/pks/Makefile44
-rw-r--r--security/pks/distinfo3
-rw-r--r--security/pks/files/patch-aa61
-rw-r--r--security/pks/files/patch-ab9
-rw-r--r--security/pks/files/patch-ac55
-rw-r--r--security/pks/files/patch-ad9
-rw-r--r--security/pks/files/pksd.sh52
-rw-r--r--security/pks/pkg-comment1
-rw-r--r--security/pks/pkg-deinstall27
-rw-r--r--security/pks/pkg-descr4
-rw-r--r--security/pks/pkg-install22
-rw-r--r--security/pks/pkg-plist12
12 files changed, 299 insertions, 0 deletions
diff --git a/security/pks/Makefile b/security/pks/Makefile
new file mode 100644
index 0000000..2adaf52
--- /dev/null
+++ b/security/pks/Makefile
@@ -0,0 +1,44 @@
+# New ports collection makefile for: pks
+# Date created: 15 Jan 2001
+# Whom: kris@FreeBSD.org
+#
+# $FreeBSD$
+#
+
+PORTNAME= pks
+PORTVERSION= 0.9.4
+CATEGORIES= security www
+MASTER_SITES+= http://www.mit.edu/people/marc/pks/ \
+ ftp://ftp.neonramp.com/pub/pksd/
+
+PATCH_SITES= http://www.mit.edu/people/marc/pks/ \
+ ftp://ftp.neonramp.com/pub/pksd/
+PATCHFILES= pks094-patch2 \
+ x509patch
+PATCH_DIST_STRIP=-p1
+
+MAINTAINER= kris@FreeBSD.org
+
+LIB_DEPENDS= db2.0:${PORTSDIR}/databases/db
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --datadir=${PREFIX}/share/pks --localstatedir=/var/pks \
+ --sysconfdir=${PREFIX}/share/examples \
+ --libdir=${LOCALBASE}/lib
+CONFIGURE_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
+
+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
+ PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
+.include <bsd.port.mk>
diff --git a/security/pks/distinfo b/security/pks/distinfo
new file mode 100644
index 0000000..e651b3c
--- /dev/null
+++ b/security/pks/distinfo
@@ -0,0 +1,3 @@
+MD5 (pks-0.9.4.tar.gz) = 365d062bbc3f7bfda745474693d0fdec
+MD5 (pks094-patch2) = 33effba52c7a195d02d42ae41ba2795e
+MD5 (x509patch) = 87625aac1b984410cc22c2ca530a95d8
diff --git a/security/pks/files/patch-aa b/security/pks/files/patch-aa
new file mode 100644
index 0000000..8d2f9b0
--- /dev/null
+++ b/security/pks/files/patch-aa
@@ -0,0 +1,61 @@
+$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
new file mode 100644
index 0000000..75a39a1
--- /dev/null
+++ b/security/pks/files/patch-ab
@@ -0,0 +1,9 @@
+--- 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
new file mode 100644
index 0000000..0f3f06a
--- /dev/null
+++ b/security/pks/files/patch-ac
@@ -0,0 +1,55 @@
+$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
new file mode 100644
index 0000000..fa726f6
--- /dev/null
+++ b/security/pks/files/patch-ad
@@ -0,0 +1,9 @@
+--- 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/pksd.sh b/security/pks/files/pksd.sh
new file mode 100644
index 0000000..bf8ce4d
--- /dev/null
+++ b/security/pks/files/pksd.sh
@@ -0,0 +1,52 @@
+#!/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 /etc/${name}.conf ]
+ then
+ exit 0
+ else
+ dbdir=`awk '/db_dir/ { print $2 }' < /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} /etc/${name}.conf &
+ sleep 5
+ @PREFIX@/bin/pks-queue-run.sh /etc/${name}.conf
+ fi
+ ;;
+stop)
+ if [ ! -f /etc/${name}.conf ]
+ then
+ exit 0
+ else
+ socket=`awk '/socket_name/ { print $2 }' < /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/pkg-comment b/security/pks/pkg-comment
new file mode 100644
index 0000000..34cea9e
--- /dev/null
+++ b/security/pks/pkg-comment
@@ -0,0 +1 @@
+PGP Public Key Server
diff --git a/security/pks/pkg-deinstall b/security/pks/pkg-deinstall
new file mode 100644
index 0000000..f3949fc
--- /dev/null
+++ b/security/pks/pkg-deinstall
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# $NetBSD$
+
+PKGNAME=$1
+STAGE=$2
+
+case ${STAGE} in
+DEINSTALL)
+ ;;
+POST-DEINSTALL)
+ cat << EOF
+===========================================================================
+If you won't be using ${PKGNAME} any longer, you may want to remove the
+following directories and files:
+
+ /usr/local/etc/pksd.conf
+ /var/pks
+===========================================================================
+EOF
+ ;;
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/security/pks/pkg-descr b/security/pks/pkg-descr
new file mode 100644
index 0000000..c5fc42c
--- /dev/null
+++ b/security/pks/pkg-descr
@@ -0,0 +1,4 @@
+This program implements a standard PGP Key Server, which can be assumed
+to be in addition to the public key server at MIT.
+
+WWW: http://www.mit.edu/people/marc/pks/
diff --git a/security/pks/pkg-install b/security/pks/pkg-install
new file mode 100644
index 0000000..d2c772b
--- /dev/null
+++ b/security/pks/pkg-install
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# $NetBSD$
+
+PKGNAME=$1
+STAGE=$2
+
+case ${STAGE} in
+PRE-INSTALL)
+ ;;
+POST-INSTALL)
+ DBDIR=/var/pks/db
+ MAILDIR=/var/pks/incoming
+
+ mkdir -p ${DBDIR} ${MAILDIR}
+ ;;
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/security/pks/pkg-plist b/security/pks/pkg-plist
new file mode 100644
index 0000000..1c2e2b9
--- /dev/null
+++ b/security/pks/pkg-plist
@@ -0,0 +1,12 @@
+bin/pgpsplit
+bin/pks-mail.sh
+bin/pks-queue-run.sh
+bin/pksclient
+bin/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
+share/pks/mail_intro
+share/pks/pks_help.en
+@dirrm share/pks
OpenPOWER on IntegriCloud