git: dae0316326d9 - main - dns/opendnssec2: update to 2.1.12

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Sun, 23 Apr 2023 17:19:15 UTC
The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dae0316326d93d331f90a11ea8564b5441b8db29

commit dae0316326d93d331f90a11ea8564b5441b8db29
Author:     Jaap Akkerhuis <jaap@NLnetLabs.nl>
AuthorDate: 2023-04-23 12:39:57 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-04-23 17:17:06 +0000

    dns/opendnssec2: update to 2.1.12
    
    Changelog: https://www.opendnssec.org/2022/11/opendnssec-2-1-12
    
    PR:             270931
---
 dns/opendnssec2/Makefile                           | 18 +++++------
 dns/opendnssec2/distinfo                           |  6 ++--
 .../files/patch-libhsm_src_bin_hsmutil.c           | 27 ++++++++++++++++
 .../files/patch-libhsm_src_lib_libhsm.c            | 37 ++++++++++++++++++++++
 4 files changed, 75 insertions(+), 13 deletions(-)

diff --git a/dns/opendnssec2/Makefile b/dns/opendnssec2/Makefile
index 43fadcfde6d7..3dda04cc712c 100644
--- a/dns/opendnssec2/Makefile
+++ b/dns/opendnssec2/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	opendnssec
-DISTVERSION=	2.1.10
-PORTREVISION=	2
+DISTVERSION=	2.1.12
 CATEGORIES=	dns
 MASTER_SITES=	http://dist.opendnssec.org/source/
 PKGNAMESUFFIX=	2
@@ -61,22 +60,21 @@ pre-build:
 		${WRKSRC}/configure
 
 pre-install-MYSQL-on:
-	${REINPLACE_CMD} -e '/REQUIRE:/ s|$$| mysql|' ${WRKDIR}/opendnssec
+	${REINPLACE_CMD} -e '/REQUIRE:/ s|$$| mysql|' \
+		${WRKDIR}/opendnssec
 
 post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} \
+		${STAGEDIR}${DOCSDIR}
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}/1.4-2.0_db_convert
-	${INSTALL_DATA} \
-		${MIGRATE:S|^|${WRKSRC}/enforcer/utils/1.4-2.0_db_convert/|} \
+	${INSTALL_DATA} ${MIGRATE:S|^|${WRKSRC}/enforcer/utils/1.4-2.0_db_convert/|} \
 		${STAGEDIR}${DOCSDIR}/1.4-2.0_db_convert
-	${INSTALL_DATA} \
-		${CONVERT:S|^|${WRKSRC}/enforcer/utils/|} \
+	${INSTALL_DATA} ${CONVERT:S|^|${WRKSRC}/enforcer/utils/|} \
 		${STAGEDIR}${DOCSDIR}
 	${REINPLACE_CMD} -e 's|enforcer/utils/|${DOCSDIR}/|' \
 		${STAGEDIR}${DOCSDIR}/MIGRATION
-	${INSTALL_DATA} \
-		${SCHEMAS:S|^|${WRKSRC}/enforcer/src/db/|} \
+	${INSTALL_DATA} ${SCHEMAS:S|^|${WRKSRC}/enforcer/src/db/|} \
 		${STAGEDIR}${DOCSDIR}
 	${REINPLACE_CMD} -e 's|../src/db/schema|${DOCSDIR}/schema|' \
 		-e 's|mysql_convert.sql|${DOCSDIR}/1.4-2.0_db_convert/&|' \
diff --git a/dns/opendnssec2/distinfo b/dns/opendnssec2/distinfo
index 7bff5192d8f8..7bab5123602a 100644
--- a/dns/opendnssec2/distinfo
+++ b/dns/opendnssec2/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1631361191
-SHA256 (opendnssec-2.1.10.tar.gz) = c0a8427de241118dccbf7abc508e4dd53fb75b45e9f386addbadae7ecc092756
-SIZE (opendnssec-2.1.10.tar.gz) = 1142027
+TIMESTAMP = 1668601009
+SHA256 (opendnssec-2.1.12.tar.gz) = 50d7b9b0ccfc6a502784606ca4e5c03680fcf6425fb3947f45d8809ea8503e59
+SIZE (opendnssec-2.1.12.tar.gz) = 1157828
diff --git a/dns/opendnssec2/files/patch-libhsm_src_bin_hsmutil.c b/dns/opendnssec2/files/patch-libhsm_src_bin_hsmutil.c
new file mode 100644
index 000000000000..55c4ef1ad0f3
--- /dev/null
+++ b/dns/opendnssec2/files/patch-libhsm_src_bin_hsmutil.c
@@ -0,0 +1,27 @@
+--- libhsm/src/bin/hsmutil.c.orig	2022-11-08 08:46:49 UTC
++++ libhsm/src/bin/hsmutil.c
+@@ -503,6 +503,7 @@ cmd_dnskey (int argc, char *argv[])
+             }
+             break;
+ #if (LDNS_REVISION >= ((1<<16)|(7<<8)|(0)))
++#if (LDNS_BUILD_CONFIG_USE_ED25519 > 0)
+         case LDNS_SIGN_ED25519:
+             if (strcmp(key_info->algorithm_name, "EDDSA") != 0) {
+                 printf("Not an EDDSA key, the key is of algorithm %s.\n", key_info->algorithm_name);
+@@ -521,6 +522,8 @@ cmd_dnskey (int argc, char *argv[])
+                 return -1;
+             }
+             break;
++#endif
++#if (LDNS_BUILD_CONFIG_USE_ED448 > 0)
+         case LDNS_SIGN_ED448:
+             if (strcmp(key_info->algorithm_name, "EDDSA") != 0) {
+                 printf("Not an EDDSA key, the key is of algorithm %s.\n", key_info->algorithm_name);
+@@ -539,6 +542,7 @@ cmd_dnskey (int argc, char *argv[])
+                 return -1;
+             }
+             break;
++#endif
+ #endif
+         default:
+             printf("Invalid algorithm: %i\n", algo);
diff --git a/dns/opendnssec2/files/patch-libhsm_src_lib_libhsm.c b/dns/opendnssec2/files/patch-libhsm_src_lib_libhsm.c
new file mode 100644
index 000000000000..d1a9385a0d63
--- /dev/null
+++ b/dns/opendnssec2/files/patch-libhsm_src_lib_libhsm.c
@@ -0,0 +1,37 @@
+--- libhsm/src/lib/libhsm.c.orig	2022-11-08 08:46:49 UTC
++++ libhsm/src/lib/libhsm.c
+@@ -2175,13 +2175,17 @@ hsm_sign_buffer(hsm_ctx_t *ctx,
+                                             sign_buf);
+             break;
+ #if (LDNS_REVISION >= ((1<<16)|(7<<8)|(0)))
++#if (LDNS_BUILD_CONFIG_USE_ED25519 > 0)
+         case LDNS_SIGN_ED25519:
+             data_direct = 1;
+             break;
++#endif
++#if (LDNS_BUILD_CONFIG_USE_ED448 > 0)
+         case LDNS_SIGN_ED448:
+             data_direct = 1;
+             break;
+ #endif
++#endif
+         default:
+             /* log error? or should we not even get here for
+              * unsupported algorithms? */
+@@ -2225,12 +2229,16 @@ hsm_sign_buffer(hsm_ctx_t *ctx,
+             sign_mechanism.mechanism = CKM_ECDSA;
+             break;
+ #if (LDNS_REVISION >= ((1<<16)|(7<<8)|(0)))
++#ifdef LDNS_BUILD_CONFIG_ED25519
+         case LDNS_SIGN_ED25519:
+             sign_mechanism.mechanism = CKM_EDDSA;
+             break;
++#endif
++#ifdef LDNS_BUILD_CONFIG_ED448
+         case LDNS_SIGN_ED448:
+             sign_mechanism.mechanism = CKM_EDDSA;
+             break;
++#endif
+ #endif
+         default:
+             /* log error? or should we not even get here for