pkgsrc-Changes archive

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

CVS commit: pkgsrc/security/easy-rsa



Module Name:    pkgsrc
Committed By:   leot
Date:           Tue Jun  6 16:15:25 UTC 2023

Modified Files:
        pkgsrc/security/easy-rsa: Makefile distinfo
        pkgsrc/security/easy-rsa/patches: patch-easyrsa

Log Message:
easy-rsa: Add some portability fixes

Gracefully handle date(1) calls on NetBSD and stick with POSIX "basic" regular
expression when using sed(1).

(Not shared upstream because probably both of these problems are solved
by a quick code skim.)

PKGREVISION++


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 pkgsrc/security/easy-rsa/Makefile
cvs rdiff -u -r1.12 -r1.13 pkgsrc/security/easy-rsa/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/security/easy-rsa/patches/patch-easyrsa

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/security/easy-rsa/Makefile
diff -u pkgsrc/security/easy-rsa/Makefile:1.11 pkgsrc/security/easy-rsa/Makefile:1.12
--- pkgsrc/security/easy-rsa/Makefile:1.11      Tue Nov 17 12:14:17 2020
+++ pkgsrc/security/easy-rsa/Makefile   Tue Jun  6 16:15:25 2023
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.11 2020/11/17 12:14:17 adam Exp $
+# $NetBSD: Makefile,v 1.12 2023/06/06 16:15:25 leot Exp $
 
 DISTNAME=      EasyRSA-3.0.8
 PKGNAME=       ${DISTNAME:S/EasyRSA/easy-rsa/}
+PKGREVISION=   1
 CATEGORIES=    security
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=OpenVPN/}
 GITHUB_RELEASE=        v${PKGVERSION_NOREV}

Index: pkgsrc/security/easy-rsa/distinfo
diff -u pkgsrc/security/easy-rsa/distinfo:1.12 pkgsrc/security/easy-rsa/distinfo:1.13
--- pkgsrc/security/easy-rsa/distinfo:1.12      Tue Oct 26 11:17:04 2021
+++ pkgsrc/security/easy-rsa/distinfo   Tue Jun  6 16:15:25 2023
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.12 2021/10/26 11:17:04 nia Exp $
+$NetBSD: distinfo,v 1.13 2023/06/06 16:15:25 leot Exp $
 
 BLAKE2s (EasyRSA-3.0.8.tgz) = 982b53198ba2140451f51a40e8ed8a93b89b2fc0d005bc7da6731ca553ab8848
 SHA512 (EasyRSA-3.0.8.tgz) = fd2cde4725cffd60c6af1b6aeaff0dbf15f31f0f322c9df75c22838e2297ba9dc3bba610d956464c8227bd74b3e63840e2a3da41fbc5ee1c79c1e7f5350adc94
 Size (EasyRSA-3.0.8.tgz) = 48907 bytes
-SHA1 (patch-easyrsa) = e64deb7ca97eba9e2a3bd07688ce720ebef5331e
+SHA1 (patch-easyrsa) = 767ff3df6e6863864eee6d76758558d77a22c51f
 SHA1 (patch-vars.example) = 31ffcf40ced1fb07a7531ec7de373ad24c04455e

Index: pkgsrc/security/easy-rsa/patches/patch-easyrsa
diff -u pkgsrc/security/easy-rsa/patches/patch-easyrsa:1.2 pkgsrc/security/easy-rsa/patches/patch-easyrsa:1.3
--- pkgsrc/security/easy-rsa/patches/patch-easyrsa:1.2  Thu Oct 11 09:13:30 2018
+++ pkgsrc/security/easy-rsa/patches/patch-easyrsa      Tue Jun  6 16:15:25 2023
@@ -1,10 +1,33 @@
-$NetBSD: patch-easyrsa,v 1.2 2018/10/11 09:13:30 adam Exp $
+$NetBSD: patch-easyrsa,v 1.3 2023/06/06 16:15:25 leot Exp $
 
-Set a sane default for config file. Needs to be SUBSTed.
+- Only FreeBSD and OpenBSD date(1) knowns about `-f' and `-v' option.
+  Exclude possible other *BSD and fallbacks to date(1) `-d' there
+  that is supported by NetBSD.
+- Stick to POSIX basic regular expression (spell spaces via `[[:blank:]]'
+  instead of `\s' that could be not supported and undefined).
+- Set a sane default for config file. Needs to be SUBSTed.
 
---- easyrsa.orig       2018-09-15 04:21:19.000000000 +0000
+--- easyrsa.orig       2020-09-09 20:59:45.000000000 +0000
 +++ easyrsa
-@@ -1137,6 +1137,9 @@ vars_setup() {
+@@ -1179,7 +1179,7 @@ at: $crt_in"
+               sed 's/^notAfter=//'
+               )
+         case $(uname 2>/dev/null) in
+-              "Darwin"|*"BSD")
++              "Darwin"|"FreeBSD"|"OpenBSD")
+                       expire_date=$(date -j -f '%b %d %T %Y %Z' "$expire_date" +%s)
+                       allow_renew_date=$(date -j -v"+${EASYRSA_CERT_RENEW}d" +%s)
+                       ;;
+@@ -1515,7 +1515,7 @@ display_san() {
+       echo "$EASYRSA_EXTRA_EXTS" | grep -q subjectAltName
+ 
+       if [ $? -eq 0 ]; then
+-              print "$(echo "$EASYRSA_EXTRA_EXTS" | grep subjectAltName | sed 's/^\s*subjectAltName\s*=\s*//')"
++              print "$(echo "$EASYRSA_EXTRA_EXTS" | grep subjectAltName | sed 's/^[[:space:]]*subjectAltName[[:space:]]*=[[:space:]]*//')"
+       else
+               san=$(
+                       "$EASYRSA_OPENSSL" "$format" -in "$path" -noout -text |
+@@ -1685,6 +1685,9 @@ vars_setup() {
        # EASYRSA, if defined:
        elif [ -n "$EASYRSA" ] && [ -f "$EASYRSA/vars" ]; then
                vars="$EASYRSA/vars"



Home | Main Index | Thread Index | Old Index