pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/mozilla-rootcerts Substitute path to openssl ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b2fbf00499c1
branches:  trunk
changeset: 363937:b2fbf00499c1
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Mon Jun 19 00:10:21 2017 +0000

description:
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:

 security/mozilla-rootcerts/Makefile                   |   9 +++++----
 security/mozilla-rootcerts/files/mozilla-rootcerts.sh |  16 ++++++++--------
 2 files changed, 13 insertions(+), 12 deletions(-)

diffs (78 lines):

diff -r df13d8bf18cc -r b2fbf00499c1 security/mozilla-rootcerts/Makefile
--- a/security/mozilla-rootcerts/Makefile       Sun Jun 18 23:52:57 2017 +0000
+++ b/security/mozilla-rootcerts/Makefile       Mon Jun 19 00:10:21 2017 +0000
@@ -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 @@
 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 -r df13d8bf18cc -r b2fbf00499c1 security/mozilla-rootcerts/files/mozilla-rootcerts.sh
--- a/security/mozilla-rootcerts/files/mozilla-rootcerts.sh     Sun Jun 18 23:52:57 2017 +0000
+++ b/security/mozilla-rootcerts/files/mozilla-rootcerts.sh     Mon Jun 19 00:10:21 2017 +0000
@@ -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 @@
                # 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 @@
        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



Home | Main Index | Thread Index | Old Index