Skip to content

Commit decf02f

Browse files
markjdbxbeaudouin
authored andcommitted
security/ca_root_nss: Make the certctl command overridable
For some purposes it's useful to be able to build the ca_root_nss with a custom certctl command. It may be desireable for instance to run certctl rehash at the end of a package upgrade rather than in the middle, in which case it's sufficient to substitute CERTCTL_CMD=:. Make the certctl command name a variable so that one can override it at port build time. No functional change intended. PR: 290115 Approved by: maintainer (timeout, 1 month) Sponsored by: OPNsense Sponsored by: Klara, Inc.
1 parent 1622680 commit decf02f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

‎security/ca_root_nss/Makefile‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PORTNAME= ca_root_nss
22
PORTVERSION= ${VERSION_NSS}
3-
PORTREVISION= 1
3+
PORTREVISION= 2
44
CATEGORIES= security
55
MASTER_SITES= MOZILLA/security/nss/releases/${DISTNAME:tu:C/[-.]/_/g}_RTM/src
66
DISTNAME= nss-${VERSION_NSS}${NSS_SUFFIX}
@@ -34,8 +34,10 @@ VERSION_NSS= 3.117
3434
CERTDATA_TXT_PATH= lib/ckfw/builtins/certdata.txt
3535
BUNDLE_PROCESSOR= MAca-bundle.pl
3636

37+
CERTCTL_CMD?= /usr/sbin/certctl
38+
3739
SUB_FILES= MAca-bundle.pl pkg-deinstall pkg-install pkg-message
38-
SUB_LIST= VERSION_NSS=${VERSION_NSS}
40+
SUB_LIST= CERTCTL_CMD=${CERTCTL_CMD} VERSION_NSS=${VERSION_NSS}
3941

4042
do-build:
4143
@${SETENV} PATH=${LOCALBASE}/bin:$${PATH} \

‎security/ca_root_nss/files/pkg-deinstall.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
if [ "$2" = POST-DEINSTALL ]; then
44
CERTCTL_ARGS="-D ${PKG_ROOTDIR}"
5-
certctl ${CERTCTL_ARGS} rehash
5+
%%CERTCTL_CMD%% ${CERTCTL_ARGS} rehash
66
fi

‎security/ca_root_nss/files/pkg-install.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if [ "$2" = POST-INSTALL ]; then
55
if [ -n "${PKG_METALOG}" ]; then
66
CERTCTL_ARGS="${CERTCTL_ARGS} -U -M ${PKG_METALOG}"
77
fi
8-
certctl ${CERTCTL_ARGS} rehash
8+
%%CERTCTL_CMD%% ${CERTCTL_ARGS} rehash
99

1010
[ ! -e %%LOCALBASE%%/bin/cert-sync ] || \
1111
%%LOCALBASE%%/bin/cert-sync --quiet %%PREFIX%%/share/certs/ca-root-nss.crt

0 commit comments

Comments
 (0)