pkgsrc-Changes archive

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

CVS commit: pkgsrc/net/chrony



Module Name:    pkgsrc
Committed By:   adam
Date:           Sun Jun  7 17:36:03 UTC 2026

Modified Files:
        pkgsrc/net/chrony: Makefile distinfo
        pkgsrc/net/chrony/patches: patch-configure
Added Files:
        pkgsrc/net/chrony/patches: patch-cmac__nettle.c patch-hash__nettle.c

Log Message:
chrony: Add support for Nettle 4.0; bump revision


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 pkgsrc/net/chrony/Makefile
cvs rdiff -u -r1.20 -r1.21 pkgsrc/net/chrony/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/chrony/patches/patch-cmac__nettle.c \
    pkgsrc/net/chrony/patches/patch-hash__nettle.c
cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/chrony/patches/patch-configure

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

Modified files:

Index: pkgsrc/net/chrony/Makefile
diff -u pkgsrc/net/chrony/Makefile:1.64 pkgsrc/net/chrony/Makefile:1.65
--- pkgsrc/net/chrony/Makefile:1.64     Thu May 14 16:41:41 2026
+++ pkgsrc/net/chrony/Makefile  Sun Jun  7 17:36:03 2026
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.64 2026/05/14 16:41:41 ryoon Exp $
+# $NetBSD: Makefile,v 1.65 2026/06/07 17:36:03 adam Exp $
 
 DISTNAME=      chrony-4.8
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    net
 MASTER_SITES=  https://chrony-project.org/releases/
 

Index: pkgsrc/net/chrony/distinfo
diff -u pkgsrc/net/chrony/distinfo:1.20 pkgsrc/net/chrony/distinfo:1.21
--- pkgsrc/net/chrony/distinfo:1.20     Thu Jan 22 10:10:19 2026
+++ pkgsrc/net/chrony/distinfo  Sun Jun  7 17:36:03 2026
@@ -1,10 +1,12 @@
-$NetBSD: distinfo,v 1.20 2026/01/22 10:10:19 wiz Exp $
+$NetBSD: distinfo,v 1.21 2026/06/07 17:36:03 adam Exp $
 
 BLAKE2s (chrony-4.8.tar.gz) = 34eafb5ca35d3b21b1e3fc496a3b1e5ec1721bbab1d1cf0db8da5a4e8e53859e
 SHA512 (chrony-4.8.tar.gz) = 949b796bb34db32a5c1b9e6b53be6a22e51c59f24a316d585b8a52a52ab1f61bdf0378dc58b282bb0ba4fac1f05e1e99fbe37cb4259aa2b359e7bf679c176aab
 Size (chrony-4.8.tar.gz) = 649368 bytes
 SHA1 (patch-Makefile.in) = 42ebfcdbce472a173890571625efc4fef583d5b6
 SHA1 (patch-client.c) = 483c71fc734192002bb0eaaefcb0f73c9aaaa941
-SHA1 (patch-configure) = bf8ab3d81dafafb329402dd0eb4ac276eed10a2f
+SHA1 (patch-cmac__nettle.c) = bdf58604d505e944abbb4c8b361cd020b9186d65
+SHA1 (patch-configure) = 25f9294d78f7a1e0392260adad6c86cbe269fab2
 SHA1 (patch-doc_Makefile.in) = 8e9902690ff431fd47429d53346faf2ac8f1b923
 SHA1 (patch-examples_chrony.conf.example3) = 52ab12ded077447b79601c0f07257740dd2ec926
+SHA1 (patch-hash__nettle.c) = f8b3cf7695ce1c0d9baee1db36d7b916c68cde96

Index: pkgsrc/net/chrony/patches/patch-configure
diff -u pkgsrc/net/chrony/patches/patch-configure:1.1 pkgsrc/net/chrony/patches/patch-configure:1.2
--- pkgsrc/net/chrony/patches/patch-configure:1.1       Fri Mar 12 09:57:18 2021
+++ pkgsrc/net/chrony/patches/patch-configure   Sun Jun  7 17:36:03 2026
@@ -1,8 +1,11 @@
-$NetBSD: patch-configure,v 1.1 2021/03/12 09:57:18 nia Exp $
+$NetBSD: patch-configure,v 1.2 2026/06/07 17:36:03 adam Exp $
 
 NetBSD provides libedit-as-readline, but chrony wants libedit.
 just include the fake readline header.
 
+Add support for Nettle 4.0
+https://gitlab.com/chrony/chrony/-/commit/fee12ec914cce805cc704a4c2804d75b4933ad2f
+
 --- configure.orig     2020-10-07 15:27:34.000000000 +0000
 +++ configure
 @@ -858,7 +858,7 @@ fi
@@ -14,3 +17,12 @@ just include the fake readline header.
        'add_history(readline("prompt"));'
      then
        add_def FEAT_READLINE
+@@ -891,7 +891,7 @@ HASH_LINK=""
+ if [ $feat_sechash = "1" ] && [ "x$HASH_LINK" = "x" ]  && [ $try_nettle = "1" ]; then
+   test_cflags="`pkg_config --cflags nettle`"
+   test_link="`pkg_config --libs nettle`"
+-  if test_code 'nettle' 'nettle/nettle-meta.h nettle/sha2.h' \
++  if test_code 'nettle' 'nettle/nettle-meta.h nettle/sha2.h nettle/version.h' \
+     "$test_cflags" "$test_link" \
+     'return nettle_hashes[0]->context_size;'
+   then

Added files:

Index: pkgsrc/net/chrony/patches/patch-cmac__nettle.c
diff -u /dev/null pkgsrc/net/chrony/patches/patch-cmac__nettle.c:1.1
--- /dev/null   Sun Jun  7 17:36:03 2026
+++ pkgsrc/net/chrony/patches/patch-cmac__nettle.c      Sun Jun  7 17:36:03 2026
@@ -0,0 +1,60 @@
+$NetBSD: patch-cmac__nettle.c,v 1.1 2026/06/07 17:36:03 adam Exp $
+
+Add support for Nettle 4.0
+https://gitlab.com/chrony/chrony/-/commit/fee12ec914cce805cc704a4c2804d75b4933ad2f
+
+--- cmac_nettle.c.orig 2025-08-27 12:05:31.000000000 +0000
++++ cmac_nettle.c
+@@ -30,8 +30,10 @@
+ #include "sysincl.h"
+ 
+ #include <nettle/cmac.h>
++#include <nettle/version.h>
+ 
+ #include "cmac.h"
++#include "hash.h"
+ #include "memory.h"
+ 
+ struct CMC_Instance_Record {
+@@ -86,25 +88,39 @@ CMC_CreateInstance(CMC_Algorithm algorit
+ int
+ CMC_Hash(CMC_Instance inst, const void *in, int in_len, unsigned char *out, int out_len)
+ {
++  unsigned char buf[MAX_HASH_LENGTH];
++
+   if (in_len < 0 || out_len < 0)
+     return 0;
+ 
+   if (out_len > CMAC128_DIGEST_SIZE)
+     out_len = CMAC128_DIGEST_SIZE;
+ 
++  assert(CMAC128_DIGEST_SIZE <= sizeof (buf));
++
+   switch (inst->key_length) {
+     case AES128_KEY_SIZE:
+       cmac_aes128_update(&inst->context.aes128, in_len, in);
+-      cmac_aes128_digest(&inst->context.aes128, out_len, out);
++      cmac_aes128_digest(&inst->context.aes128,
++#if NETTLE_VERSION_MAJOR < 4
++                         CMAC128_DIGEST_SIZE,
++#endif
++                         buf);
+       break;
+     case AES256_KEY_SIZE:
+       cmac_aes256_update(&inst->context.aes256, in_len, in);
+-      cmac_aes256_digest(&inst->context.aes256, out_len, out);
++      cmac_aes256_digest(&inst->context.aes256,
++#if NETTLE_VERSION_MAJOR < 4
++                         CMAC128_DIGEST_SIZE,
++#endif
++                         buf);
+       break;
+     default:
+       assert(0);
+   }
+ 
++  memcpy(out, buf, out_len);
++
+   return out_len;
+ }
+ 
Index: pkgsrc/net/chrony/patches/patch-hash__nettle.c
diff -u /dev/null pkgsrc/net/chrony/patches/patch-hash__nettle.c:1.1
--- /dev/null   Sun Jun  7 17:36:03 2026
+++ pkgsrc/net/chrony/patches/patch-hash__nettle.c      Sun Jun  7 17:36:03 2026
@@ -0,0 +1,45 @@
+$NetBSD: patch-hash__nettle.c,v 1.1 2026/06/07 17:36:03 adam Exp $
+
+Add support for Nettle 4.0
+https://gitlab.com/chrony/chrony/-/commit/fee12ec914cce805cc704a4c2804d75b4933ad2f
+
+--- hash_nettle.c.orig 2025-08-27 12:05:31.000000000 +0000
++++ hash_nettle.c
+@@ -30,6 +30,7 @@
+ #include "sysincl.h"
+ 
+ #include <nettle/nettle-meta.h>
++#include <nettle/version.h>
+ 
+ #include "hash.h"
+ #include "memory.h"
+@@ -91,6 +92,7 @@ int
+ HSH_Hash(int id, const void *in1, int in1_len, const void *in2, int in2_len,
+          unsigned char *out, int out_len)
+ {
++  unsigned char buf[MAX_HASH_LENGTH];
+   const struct nettle_hash *hash;
+   void *context;
+ 
+@@ -103,11 +105,20 @@ HSH_Hash(int id, const void *in1, int in
+   if (out_len > hash->digest_size)
+     out_len = hash->digest_size;
+ 
++  if (hash->digest_size > sizeof (buf))
++    return 0;
++
+   hash->init(context);
+   hash->update(context, in1_len, in1);
+   if (in2)
+     hash->update(context, in2_len, in2);
+-  hash->digest(context, out_len, out);
++  hash->digest(context,
++#if NETTLE_VERSION_MAJOR < 4
++               hash->digest_size,
++#endif
++               buf);
++
++  memcpy(out, buf, out_len);
+ 
+   return out_len;
+ }



Home | Main Index | Thread Index | Old Index