Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

2
security/pks/DESCR Normal file
View File

@@ -0,0 +1,2 @@
This program implements a standard PGP Key Server, which can be assumed
to be in addition to the public key server at MIT.

79
security/pks/Makefile Normal file
View File

@@ -0,0 +1,79 @@
# $NetBSD: Makefile,v 1.31 2013/04/08 11:17:21 rodent Exp $
DISTNAME= pks-0.9.4
PKGREVISION= 4
CATEGORIES= security www
MASTER_SITES+= http://www.mit.edu/people/marc/pks/ \
${MASTER_SITE_SOURCEFORGE:=pks/}
PATCH_SITES= http://www.mit.edu/people/marc/pks/
PATCHFILES= pks094-patch2 \
pks094-patch3
PATCH_DIST_STRIP= -p1
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.mit.edu/people/marc/pks/
COMMENT= PGP Public Key Server
LICENSE= original-bsd
GNU_CONFIGURE= YES
PKG_GROUPS_VARS+= PKS_GROUP
PKG_USERS_VARS+= PKS_USER
PKS_USER= pks
PKS_GROUP= pks
PKS_SERVER?= localhost
PKS_HOME= ${VARBASE}/pks
PKG_GROUPS= ${PKS_GROUP}
PKG_USERS= ${PKS_USER}:${PKS_GROUP}
PKG_GECOS.${PKS_USER}= PGP Key Server
PKG_HOME.${PKS_USER}= ${PKS_HOME}
BDB_ACCEPTED= db2
BUILD_DEFS+= PKS_SERVER
EGDIR= ${PREFIX}/share/examples
CONF_FILES= ${EGDIR}/pksd.conf ${PKG_SYSCONFDIR}/pksd.conf
RCD_SCRIPTS= pksd
FILES_SUBST+= PKS_USER=${PKS_USER:Q}
FILES_SUBST+= PKS_GROUP=${PKS_GROUP:Q}
OWN_DIRS_PERMS+= ${PKS_HOME} ${PKS_USER} ${PKS_GROUP} 0770
OWN_DIRS_PERMS+= ${PKS_HOME}/db ${PKS_USER} ${PKS_GROUP} 0770
OWN_DIRS_PERMS+= ${PKS_HOME}/incoming ${PKS_USER} ${PKS_GROUP} 0770
CONFIGURE_ARGS+= --datadir=${PREFIX}/share/pks
CONFIGURE_ARGS+= --localstatedir=${PKS_HOME:Q}
#
# pksd doesn't actually look for its config file anywhere; it must be
# specified directly on the command-line. Setting sysconfdir here just
# causes the example pksd.conf file to be installed at the named location.
#
CONFIGURE_ARGS+= --sysconfdir=${EGDIR:Q}
SUBST_CLASSES+= paths
SUBST_MESSAGE.paths= Fixing hardcoded paths.
SUBST_STAGE.paths= post-patch
SUBST_FILES.paths= pks-commands.html
SUBST_SED.paths= -e "s|localhost|${PKS_SERVER}|g"
INSTALL_MAKE_FLAGS+= prefix=${DESTDIR}${PREFIX}
INSTALL_MAKE_FLAGS+= datadir=${DESTDIR}${PREFIX}/share/pks
INSTALL_MAKE_FLAGS+= localstatedir=${DESTDIR}${PKS_HOME}
INSTALL_MAKE_FLAGS+= man5dir=${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
INSTALL_MAKE_FLAGS+= man8dir=${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
INSTALL_MAKE_FLAGS+= sysconfdir=${DESTDIR}${EGDIR:Q}
.include "../../databases/db/buildlink3.mk"
post-install:
${INSTALL_DATA} ${WRKSRC}/pks-commands.html ${DESTDIR}${EGDIR}
CONF_FILES_PERMS= ${EGDIR}/pks-commands.html ${PKS_HOME}/db/index.html \
${PKS_USER} ${PKS_GROUP} ${SHAREMODE}
.include "../../mk/bsd.pkg.mk"

17
security/pks/PLIST Normal file
View File

@@ -0,0 +1,17 @@
@comment $NetBSD: PLIST,v 1.4 2011/03/19 09:18:02 obache Exp $
bin/pgpsplit
bin/pks-mail.sh
bin/pks-queue-run.sh
bin/pksclient
bin/pksd
bin/pksdctl
man/man5/pksd.conf.5
man/man8/pks-intro.8
man/man8/pksclient.8
man/man8/pksd.8
man/man8/pksdctl.8
share/examples/pks-commands.html
share/examples/pksd.conf
share/examples/rc.d/pksd
share/pks/mail_intro
share/pks/pks_help.en

15
security/pks/distinfo Normal file
View File

@@ -0,0 +1,15 @@
$NetBSD: distinfo,v 1.4 2005/02/24 13:10:11 agc Exp $
SHA1 (pks-0.9.4.tar.gz) = 07ab106fc77182187019343843f4f63464b7ac26
RMD160 (pks-0.9.4.tar.gz) = 52085aabf2f81642dc83bfb6f748dc0fdda3925a
Size (pks-0.9.4.tar.gz) = 509043 bytes
SHA1 (pks094-patch2) = 8b46fd91a21dce27d4d6dc0a7ad066e928470c39
RMD160 (pks094-patch2) = 2b431ab87adf47dd15df40b7d4bf617844030297
Size (pks094-patch2) = 52843 bytes
SHA1 (pks094-patch3) = 06849efc45f8c36708057a15c893c5694adc9278
RMD160 (pks094-patch3) = f294b58f257969e6f46d994ddee6db465d2413c6
Size (pks094-patch3) = 11120 bytes
SHA1 (patch-aa) = 4fade73ba6268cf5112b897475a9fb0d95ad8da1
SHA1 (patch-ab) = 2a6918f4e0620090d733147bdd093b370065dce1
SHA1 (patch-ac) = 9d214cfb14ab7790b768ac4e7a184b3a4a09c6c0
SHA1 (patch-ad) = 7f82a8277d8c958ec2791e0ad1dcafa67971b4ff

View File

@@ -0,0 +1,80 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: pksd.sh,v 1.8 2005/10/23 17:45:39 adrianp Exp $
#
# PROVIDE: pksd
# REQUIRE: DAEMON
if [ -f /etc/rc.subr ]
then
. /etc/rc.subr
fi
name="pksd"
rcvar=${name}
command="@PREFIX@/bin/pksd"
run_command="@PREFIX@/bin/pks-queue-run.sh"
ctl_command="@PREFIX@/bin/pksdctl"
client_command="@PREFIX@/bin/pksclient"
conf_file="@PKG_SYSCONFDIR@/${name}.conf"
required_files="${conf_file}"
extra_commands="dbinit"
pksd_user="@PKS_USER@"
pksd_group="@PKS_GROUP@"
pksd_dbinit()
{
(
umask 007
if [ -r ${conf_file} ]
then
dbdir=`@AWK@ '/db_dir/ { print $2 }' < ${conf_file}`
if [ ! -f ${dbdir}/keydb000 -a -x ${client_command} ]
then
@SU@ -m ${pksd_user} -c "${client_command} ${dbdir} create"
fi
fi
)
}
pksd_start()
{
if [ -r ${conf_file} -a -x ${command} -a -x ${run_command} ]
then
@ECHO@ "Starting ${name} (local)."
@ECHO@ "${command} ${conf_file}"
@SU@ -m ${pksd_user} -c "${command} ${conf_file} &"
sleep 5
@SU@ -m ${pksd_user} -c "${run_command} ${conf_file}"
fi
}
pksd_stop()
{
if [ -r ${conf_file} -a -x ${ctl_command} ]
then
socket=`@AWK@ '/socket_name/ { print $2 }' < ${conf_file}`
if [ -S ${socket} ]
then
@ECHO@ "Stopping ${name} (local)."
@SU@ -m ${pksd_user} -c "${ctl_command} ${socket} shutdown"
fi
fi
}
dbinit_cmd=pksd_dbinit
start_precmd=pksd_dbinit
start_cmd=pksd_start
stop_cmd=pksd_stop
if [ -f /etc/rc.subr ]
then
load_rc_config $name
run_rc_command "$1"
else
@ECHO@ -n " ${name}"
pksd_dbinit
pksd_start
fi

View File

@@ -0,0 +1,64 @@
$NetBSD: patch-aa,v 1.2 2003/10/11 12:06:04 grant Exp $
--- Makefile.in.orig 2003-10-11 21:56:03.000000000 +1000
+++ Makefile.in
@@ -10,10 +10,11 @@ SHELL = /bin/sh
## this does recursion for db2, if it's in the tree
-SUBDIRS = db2-sleepycat/dist
-
-depend all install check clean distclean maintainer-clean::
- for i in ${SUBDIRS}; do (test -d $$i && cd $$i && ${MAKE} $@) || exit 1; done
+# We use the installed db2, so we don't need this stuff anymore
+#SUBDIRS = db2-sleepycat/dist
+#
+#depend all install check clean distclean maintainer-clean::
+# for i in ${SUBDIRS}; do (test -d $$i && cd $$i && ${MAKE} $@) || exit 1; done
## this builds the keyserver
@@ -32,12 +33,13 @@ all:: $(ALL) $(SYSCONF)
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 +62,7 @@ DBG = -DDEBUG
DEFINES = $(DBG) @DEFS@
CFLAGS = @gcc_cflags@ -g -O $(INCLUDES) $(DEFINES)
-LIBDB = $(DBDIR)/libdb.a
+LIBDB = -ldb2
CLEAN = rm -f
@@ -118,6 +120,8 @@ wwwtest: $(O9)
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 +142,7 @@ installdirs::
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

View File

@@ -0,0 +1,12 @@
$NetBSD: patch-ab,v 1.1.1.1 2000/07/27 16:10:24 jlam Exp $
--- 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;

View File

@@ -0,0 +1,55 @@
$NetBSD: patch-ac,v 1.1.1.1 2000/07/27 16:10:24 jlam Exp $
--- 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);
}

View File

@@ -0,0 +1,12 @@
$NetBSD: patch-ad,v 1.1.1.1 2000/07/27 16:10:24 jlam Exp $
--- 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;