pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/pks Install the index file for the www server
details: https://anonhg.NetBSD.org/pkgsrc/rev/a378a4ae1ee2
branches: trunk
changeset: 501479:a378a4ae1ee2
user: adrianp <adrianp%pkgsrc.org@localhost>
date: Sun Oct 23 17:45:39 2005 +0000
description:
Install the index file for the www server
Don't run as root
Bump to nb3
diffstat:
security/pks/Makefile | 70 ++++++++++++++++++++++++++++++++-------------
security/pks/files/pksd.sh | 14 +++++---
2 files changed, 58 insertions(+), 26 deletions(-)
diffs (144 lines):
diff -r 4aa6d9459a42 -r a378a4ae1ee2 security/pks/Makefile
--- a/security/pks/Makefile Sun Oct 23 17:45:12 2005 +0000
+++ b/security/pks/Makefile Sun Oct 23 17:45:39 2005 +0000
@@ -1,25 +1,48 @@
-# $NetBSD: Makefile,v 1.18 2005/04/11 21:47:17 tv Exp $
+# $NetBSD: Makefile,v 1.19 2005/10/23 17:45:39 adrianp Exp $
-DISTNAME= pks-0.9.4
-PKGREVISION= 2
-CATEGORIES= security www
-MASTER_SITES+= http://www.mit.edu/people/marc/pks/ \
- ftp://ftp.neonramp.com/pub/pksd/
+DISTNAME= pks-0.9.4
+PKGREVISION= 3
+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 \
- pks094-patch3
+PATCH_SITES= http://www.mit.edu/people/marc/pks/ \
+ ftp://ftp.neonramp.com/pub/pksd/
+PATCHFILES= pks094-patch2 \
+ pks094-patch3
PATCH_DIST_STRIP= -p1
-MAINTAINER= burgess%neonramp.com@localhost
-HOMEPAGE= http://www.mit.edu/people/marc/pks/
-COMMENT= PGP Public Key Server
+MAINTAINER= burgess%neonramp.com@localhost
+HOMEPAGE= http://www.mit.edu/people/marc/pks/
+COMMENT= PGP Public Key Server
+
+USE_PKGINSTALL= YES
+GNU_CONFIGURE= YES
+
+PKS_USER= pks
+PKS_GROUP= pks
+PKS_SERVER?= localhost
+PKS_HOME= ${VARBASE}/pks
+
+PKG_USERS= ${PKS_USER}:${PKS_GROUP}::PGP\ Key\ Server:${PKS_HOME}
+
+BDB_ACCEPTED= db2
-USE_PKGINSTALL= YES
-GNU_CONFIGURE= YES
+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}
+FILES_SUBST+= PKS_GROUP=${PKS_GROUP}
+
+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=${VARBASE}/pks
+CONFIGURE_ARGS+= --localstatedir=${PKS_HOME}
#
# pksd doesn't actually look for its config file anywhere; it must be
# specified directly on the command-line. Setting sysconfdir here just
@@ -27,10 +50,17 @@
#
CONFIGURE_ARGS+= --sysconfdir=${EGDIR}
-EGDIR= ${PREFIX}/share/examples
-CONF_FILES= ${EGDIR}/pksd.conf ${PKG_SYSCONFDIR}/pksd.conf
-RCD_SCRIPTS= pksd
-OWN_DIRS= /var/pks /var/pks/db /var/pks/incoming
+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"
.include "../../databases/db/buildlink3.mk"
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/pks-commands.html ${PKS_HOME}/db/index.html
+ @${CHOWN} ${PKS_USER} ${PKS_HOME}/db/index.html
+ @${CHGRP} ${PKS_GROUP} ${PKS_HOME}/db/index.html
+
.include "../../mk/bsd.pkg.mk"
diff -r 4aa6d9459a42 -r a378a4ae1ee2 security/pks/files/pksd.sh
--- a/security/pks/files/pksd.sh Sun Oct 23 17:45:12 2005 +0000
+++ b/security/pks/files/pksd.sh Sun Oct 23 17:45:39 2005 +0000
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: pksd.sh,v 1.7 2002/09/20 02:02:00 grant Exp $
+# $NetBSD: pksd.sh,v 1.8 2005/10/23 17:45:39 adrianp Exp $
#
# PROVIDE: pksd
# REQUIRE: DAEMON
@@ -21,17 +21,19 @@
conf_file="@PKG_SYSCONFDIR@/${name}.conf"
required_files="${conf_file}"
extra_commands="dbinit"
+pksd_user="@PKS_USER@"
+pksd_group="@PKS_GROUP@"
pksd_dbinit()
{
(
- umask 022
+ umask 007
if [ -r ${conf_file} ]
then
dbdir=`@AWK@ '/db_dir/ { print $2 }' < ${conf_file}`
if [ ! -f ${dbdir}/keydb000 -a -x ${client_command} ]
then
- ${client_command} ${dbdir} create
+ @SU@ -m ${pksd_user} -c "${client_command} ${dbdir} create"
fi
fi
)
@@ -43,9 +45,9 @@
then
@ECHO@ "Starting ${name} (local)."
@ECHO@ "${command} ${conf_file}"
- ${command} ${conf_file} &
+ @SU@ -m ${pksd_user} -c "${command} ${conf_file} &"
sleep 5
- ${run_command} ${conf_file}
+ @SU@ -m ${pksd_user} -c "${run_command} ${conf_file}"
fi
}
@@ -57,7 +59,7 @@
if [ -S ${socket} ]
then
@ECHO@ "Stopping ${name} (local)."
- ${ctl_command} ${socket} shutdown
+ @SU@ -m ${pksd_user} -c "${ctl_command} ${socket} shutdown"
fi
fi
}
Home |
Main Index |
Thread Index |
Old Index