aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2022-06-02 21:26:24 +0000
committerMatthias Andree <mandree@FreeBSD.org>2022-06-02 21:29:43 +0000
commit0a0dd568d8ab0a5598b7d0ccc6d560102418f512 (patch)
tree8595069c8dd9d01a6d441986541deedf4e50636c
parentf3b181530fcb74df2165caa2c65fab3d45d3d050 (diff)
downloadports-0a0dd568d8ab0a5598b7d0ccc6d560102418f512.tar.gz
ports-0a0dd568d8ab0a5598b7d0ccc6d560102418f512.zip
security/easy-rsa: fix confusion of vars file
...and no longer package it as @sample. It is per-PKI, and easyrsa init-pki will copy vars.example from the distribution, and create a PKI-local copy named vars. Should fix grembo@'s bug report [1] add a new pkg-message file to explain this. while here, add a convenience hardlink easy-rsa to the easyrsa wrapper, to have an executable matching the package name. PR: 264415 Reported by: grembo@ (Michael Gmelin)
-rw-r--r--security/easy-rsa/Makefile2
-rw-r--r--security/easy-rsa/pkg-message15
-rw-r--r--security/easy-rsa/pkg-plist3
3 files changed, 19 insertions, 1 deletions
diff --git a/security/easy-rsa/Makefile b/security/easy-rsa/Makefile
index b1a0304f579e..7cbe849e9b68 100644
--- a/security/easy-rsa/Makefile
+++ b/security/easy-rsa/Makefile
@@ -1,5 +1,6 @@
PORTNAME= easy-rsa
DISTVERSION= 3.1.0
+PORTREVISION= 1
CATEGORIES= security net-mgmt
MASTER_SITES= https://github.com/OpenVPN/easy-rsa/releases/download/v${DISTVERSION}/
DISTNAME= EasyRSA-${DISTVERSION}
@@ -33,6 +34,7 @@ do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/bin
${MKDIR} ${STAGEDIR}${DATADIR}/x509-types/
${INSTALL_SCRIPT} ${WRKDIR}/easyrsa ${STAGEDIR}${PREFIX}/bin/
+ ${LN} -fh ${STAGEDIR}${PREFIX}/bin/easyrsa ${STAGEDIR}${PREFIX}/bin/easy-rsa
${INSTALL_SCRIPT} ${WRKSRC}/easyrsa ${STAGEDIR}${DATADIR}/easyrsa.real
${INSTALL_DATA} ${WRKSRC}/vars.example ${STAGEDIR}${DATADIR}/
${INSTALL_DATA} ${WRKSRC}/openssl-easyrsa.cnf ${STAGEDIR}${DATADIR}/openssl-easyrsa.cnf.example
diff --git a/security/easy-rsa/pkg-message b/security/easy-rsa/pkg-message
new file mode 100644
index 000000000000..64008e57eb92
--- /dev/null
+++ b/security/easy-rsa/pkg-message
@@ -0,0 +1,15 @@
+NOTE: easy-rsa will require you to initialize a pki ONLY UPON FIRST USE.
+The packaging itself no longer does this because that would confuse easy-rsa,
+and easy-rsa expects the vars not to be per-installation, but per-PKI.
+
+ONLY for the very first run for a new PKI, do something such as:
+
+ easyrsa --pki-dir=~/my_new_pki init-pki # DANGEROUS - DESTROYS ~/my_new_pki
+ which will copy vars.example both into ~/my_new_pki
+ and create another copy named ~/my/new_pki/vars for you to edit for this PKI.
+
+ Then, edit ~/my/new_pki/vars to set the defaults.
+
+After upgrades, use other commands, explained by running: easyrsa help.
+to explain options such as --pki-dir (see above), run: easyrsa help options
+
diff --git a/security/easy-rsa/pkg-plist b/security/easy-rsa/pkg-plist
index a98f2b0dcdf6..af2c06e18188 100644
--- a/security/easy-rsa/pkg-plist
+++ b/security/easy-rsa/pkg-plist
@@ -1,4 +1,5 @@
bin/easyrsa
+bin/easy-rsa
%%DATADIR%%/easyrsa.real
@sample %%DATADIR%%/openssl-easyrsa.cnf.example %%DATADIR%%/openssl-easyrsa.cnf
-@sample %%DATADIR%%/vars.example %%DATADIR%%/vars
+%%DATADIR%%/vars.example