summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorgdt <gdt@pkgsrc.org>2017-06-19 00:10:21 +0000
committergdt <gdt@pkgsrc.org>2017-06-19 00:10:21 +0000
commit0351c9ae13ec01a84b2458af0eb6adb925361679 (patch)
tree99e9fb50e610f9b6bceecf697fbf878f11d2553b /security
parent9aa888aa9b081afcfb32101c23f6cf20e0fb858b (diff)
downloadpkgsrc-0351c9ae13ec01a84b2458af0eb6adb925361679.tar.gz
Substitute path to openssl more thoroughly
This package can depend on builtin openssl or pkgsrc openssl. However, it had paths from the base system hardcoded. Be more thorough about using builtin vs pkgsrc paths. This is a minimal change to use builtin/pkgsrc paths; future commits will note latent issues uncovered in the process. Based on a report to pkgsrc-users by J. Lewis Muir.
Diffstat (limited to 'security')
-rw-r--r--security/mozilla-rootcerts/Makefile9
-rw-r--r--security/mozilla-rootcerts/files/mozilla-rootcerts.sh16
2 files changed, 13 insertions, 12 deletions
diff --git a/security/mozilla-rootcerts/Makefile b/security/mozilla-rootcerts/Makefile
index 43545438e3b..1fbf30dd133 100644
--- a/security/mozilla-rootcerts/Makefile
+++ b/security/mozilla-rootcerts/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.26 2017/03/15 18:52:55 jperkin Exp $
+# $NetBSD: Makefile,v 1.27 2017/06/19 00:10:21 gdt Exp $
DISTNAME= mozilla-rootcerts-1.0.${CERTDATA_DATE}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= security
MASTER_SITES= -https://hg.mozilla.org/mozilla-central/raw-file/052b90b5414f/security/nss/lib/ckfw/builtins/certdata.txt
DISTFILES= ${CERTDATA}
@@ -21,13 +21,14 @@ CERTDATA= certdata-${CERTDATA_DATE}.txt
WRKSRC= ${WRKDIR}
DATADIR= ${PREFIX}/share/${PKGBASE}
+# Set paths depending on whether we depend on builtin or pkgsrc openssl.
CHECK_BUILTIN.openssl= yes
.include "../../security/openssl/builtin.mk"
CHECK_BUILTIN.openssl= no
.if !empty(USE_BUILTIN.openssl:M[yY][eE][sS])
-SSLDIR= /etc/openssl/certs
+SSLDIR= /etc/openssl
.else
-SSLDIR= ${PKG_SYSCONFDIR}/openssl/certs
+SSLDIR= ${PKG_SYSCONFDIR}/openssl
.endif
CERT_SCRIPT= mozilla-rootcerts.sh
diff --git a/security/mozilla-rootcerts/files/mozilla-rootcerts.sh b/security/mozilla-rootcerts/files/mozilla-rootcerts.sh
index 6c210dac9d5..9b3bb6f23f0 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.13 2017/03/15 18:52:56 jperkin Exp $
+# $NetBSD: mozilla-rootcerts.sh,v 1.14 2017/06/19 00:10:21 gdt Exp $
#
# This script is meant to be used as follows:
#
@@ -21,9 +21,9 @@
self="@LOCALBASE@/sbin/mozilla-rootcerts"
certfile="@DATADIR@/certdata.txt"
-certdir="/etc/ssl/certs"
+certdir=${SSLDIR}/certs
destdir=
-conffile="/etc/openssl/openssl.cnf"
+conffile="@SSLDIR@/openssl.cnf"
usage()
{
@@ -192,13 +192,13 @@ install)
# quell warnings for a missing config file
touch $destdir$conffile
fi
- if [ ! -d $destdir$SSLDIR ]; then
- ${ECHO} 1>&2 "ERROR: $destdir$SSLDIR does not exist, aborting."
+ if [ ! -d $destdir$certdir ]; then
+ ${ECHO} 1>&2 "ERROR: $destdir$certdir does not exist, aborting."
exit 1
fi
- cd $destdir$SSLDIR
+ cd $destdir$certdir
if [ -n "`${LS}`" ]; then
- ${ECHO} 1>&2 "ERROR: $destdir$SSLDIR already contains certificates, aborting."
+ ${ECHO} 1>&2 "ERROR: $destdir$certdir already contains certificates, aborting."
exit 1
fi
set -e
@@ -211,5 +211,5 @@ install)
fi
set -e
$MKDIR $destdir$certdir
- cat $destdir$SSLDIR/*.pem > $destdir$certdir/ca-certificates.crt
+ cat $destdir$certdir/*.pem > $destdir$certdir/ca-certificates.crt
esac