pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/security/mozilla-rootcerts mozilla-rootcerts: Cope wit...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5deecd0fcc7c
branches:  trunk
changeset: 414599:5deecd0fcc7c
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Mon Mar 30 16:38:03 2020 +0000

description:
mozilla-rootcerts: Cope with missing certs dir

While the certs dir should exist, pkg_delete of
mozilla-rootcerts-openssl currently removes it, despite it not having
been created by the corresponding pkg_add.  Instead of failing if the
directory does not exist, simply emit a warning and create it.

diffstat:

 security/mozilla-rootcerts/Makefile                   |  3 ++-
 security/mozilla-rootcerts/files/mozilla-rootcerts.sh |  9 +++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 189877dd87cb -r 5deecd0fcc7c security/mozilla-rootcerts/Makefile
--- a/security/mozilla-rootcerts/Makefile       Mon Mar 30 16:36:47 2020 +0000
+++ b/security/mozilla-rootcerts/Makefile       Mon Mar 30 16:38:03 2020 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.34 2019/12/07 18:29:31 sevan Exp $
+# $NetBSD: Makefile,v 1.35 2020/03/30 16:38:03 gdt Exp $
 
 DISTNAME=      mozilla-rootcerts-1.0.${CERTDATA_DATE}
+PKGREVISION=   1
 CATEGORIES=    security
 MASTER_SITES=  -https://hg.mozilla.org/mozilla-central/raw-file/491b05117886ece80b94c88f7107e6e12c1394be/security/nss/lib/ckfw/builtins/certdata.txt
 DISTFILES=     ${CERTDATA}
diff -r 189877dd87cb -r 5deecd0fcc7c security/mozilla-rootcerts/files/mozilla-rootcerts.sh
--- a/security/mozilla-rootcerts/files/mozilla-rootcerts.sh     Mon Mar 30 16:36:47 2020 +0000
+++ b/security/mozilla-rootcerts/files/mozilla-rootcerts.sh     Mon Mar 30 16:38:03 2020 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: mozilla-rootcerts.sh,v 1.19 2017/07/06 00:58:35 gdt Exp $
+# $NetBSD: mozilla-rootcerts.sh,v 1.20 2020/03/30 16:38:03 gdt Exp $
 #
 # This script is meant to be used as follows:
 #
@@ -189,10 +189,11 @@
        }'
        ;;
 install)
-       # Insist on e.g. /etc/openssl/certs existing.
+       # ${WHATEVER}/etc/openssl/certs should exist, but an
+       # install/removal cycle of mozilla-rootcerts-openssl might have removed it.
        if [ ! -d $destdir$certdir ]; then
-               ${ECHO} 1>&2 "ERROR: $destdir$certdir does not exist, aborting."
-               exit 1
+               ${ECHO} 1>&2 "WARNING: $destdir$certdir does not exist.  Creating it."
+               ${MKDIR} -p $destdir$certdir
        fi
        cd $destdir$certdir
        if [ -n "`${LS}`" ]; then



Home | Main Index | Thread Index | Old Index