summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authordholland <dholland>2015-04-18 20:11:35 +0000
committerdholland <dholland>2015-04-18 20:11:35 +0000
commit186583a6d82233813f14d8ae2e84d46066cecf05 (patch)
tree4677965158359986bc992ea3e3583a1df0130603 /security
parentd091a96dcea20c739a4e70d76b3b1d76fa1a5f52 (diff)
downloadpkgsrc-186583a6d82233813f14d8ae2e84d46066cecf05.tar.gz
Add support for -d destdir to the mozilla-rootcerts installer script.
Diffstat (limited to 'security')
-rw-r--r--security/mozilla-rootcerts/Makefile3
-rw-r--r--security/mozilla-rootcerts/files/mozilla-rootcerts.sh22
2 files changed, 14 insertions, 11 deletions
diff --git a/security/mozilla-rootcerts/Makefile b/security/mozilla-rootcerts/Makefile
index cac43378220..cbce0bc20f7 100644
--- a/security/mozilla-rootcerts/Makefile
+++ b/security/mozilla-rootcerts/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.17 2015/02/16 13:09:10 tnn Exp $
+# $NetBSD: Makefile,v 1.18 2015/04/18 20:11:35 dholland Exp $
DISTNAME= mozilla-rootcerts-1.0.${CERTDATA_DATE}
+PKGREVISION= 1
CATEGORIES= security
MASTER_SITES= -https://hg.mozilla.org/mozilla-central/raw-file/7f6a55544bb3/security/nss/lib/ckfw/builtins/certdata.txt
DISTFILES= ${CERTDATA}
diff --git a/security/mozilla-rootcerts/files/mozilla-rootcerts.sh b/security/mozilla-rootcerts/files/mozilla-rootcerts.sh
index bcfe89d70bf..e90daabc647 100644
--- a/security/mozilla-rootcerts/files/mozilla-rootcerts.sh
+++ b/security/mozilla-rootcerts/files/mozilla-rootcerts.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: mozilla-rootcerts.sh,v 1.8 2015/01/27 13:54:10 jperkin Exp $
+# $NetBSD: mozilla-rootcerts.sh,v 1.9 2015/04/18 20:11:35 dholland Exp $
#
# This script is meant to be used as follows:
#
@@ -22,15 +22,17 @@
self="@LOCALBASE@/sbin/mozilla-rootcerts"
certfile="@DATADIR@/certdata.txt"
certdir="/etc/ssl/certs"
+destdir=
usage()
{
- ${ECHO} 1>&2 "usage: $self [-f certfile] extract|rehash|install"
+ ${ECHO} 1>&2 "usage: $self [-d destdir] [-f certfile] extract|rehash|install"
exit $1
}
while [ $# -gt 0 ]; do
case "$1" in
+ -d) destdir="$2"; shift 2;;
-f) certfile="$2"; shift 2 ;;
--) shift; break ;;
-*) ${ECHO} 1>&2 "$self: unknown option -- $1"
@@ -181,24 +183,24 @@ extract)
}'
;;
install)
- if [ ! -d $SSLDIR ]; then
- ${ECHO} 1>&2 "ERROR: $SSLDIR does not exist, aborting."
+ if [ ! -d $destdir$SSLDIR ]; then
+ ${ECHO} 1>&2 "ERROR: $destdir$SSLDIR does not exist, aborting."
exit 1
fi
- cd $SSLDIR
+ cd $destdir$SSLDIR
if [ -n "`${LS}`" ]; then
- ${ECHO} 1>&2 "ERROR: $SSLDIR already contains certificates, aborting."
+ ${ECHO} 1>&2 "ERROR: $destdir$SSLDIR already contains certificates, aborting."
exit 1
fi
set -e
$self extract
$self rehash
set +e
- if [ -d $certdir ]; then
- ${ECHO} 1>&2 "ERROR: $certdir already exists, aborting."
+ if [ -d $destdir$certdir ]; then
+ ${ECHO} 1>&2 "ERROR: $destdir$certdir already exists, aborting."
exit 1
fi
set -e
- $MKDIR $certdir
- cat $SSLDIR/*.pem > $certdir/ca-certificates.crt
+ $MKDIR $destdir$certdir
+ cat $destdir$SSLDIR/*.pem > $destdir$certdir/ca-certificates.crt
esac