Blame SOURCES/0001-Chrony-add-new-directives-and-options-745.patch

95d751
From 08101c754aafab4d0f79367839bbd0d6012c31cf Mon Sep 17 00:00:00 2001
95d751
From: Miroslav Lichvar <mlichvar@redhat.com>
95d751
Date: Wed, 2 Mar 2022 14:54:39 +0100
95d751
Subject: [PATCH 1/2] Chrony: add new directives and options (#745)
95d751
MIME-Version: 1.0
95d751
Content-Type: text/plain; charset=UTF-8
95d751
Content-Transfer-Encoding: 8bit
95d751
95d751
Support new configuration added in chrony 4.1 and 4.2.
95d751
95d751
Co-authored-by: Raphaƫl Pinson <github+aem1eeshi1@raphink.net>
95d751
(cherry picked from commit 5f3a566511626c35f69961598f1f332db01ed7a1)
95d751
---
95d751
 lenses/chrony.aug            | 11 ++++++++---
95d751
 lenses/tests/test_chrony.aug |  9 +++++++--
95d751
 2 files changed, 15 insertions(+), 5 deletions(-)
95d751
95d751
diff --git a/lenses/chrony.aug b/lenses/chrony.aug
95d751
index 91c8ed51..d1c29531 100644
95d751
--- a/lenses/chrony.aug
95d751
+++ b/lenses/chrony.aug
95d751
@@ -57,8 +57,11 @@ module Chrony =
95d751
 (************************************************************************
95d751
  * Group: Create required expressions
95d751
  ************************************************************************)
95d751
+    (* Variable: hex *)
95d751
+    let hex = /[0-9a-fA-F]+/
95d751
+
95d751
     (* Variable: number *)
95d751
-    let number = integer | decimal | decimal . /[eE]/ . integer
95d751
+    let number = integer | decimal | decimal . /[eE]/ . integer | hex
95d751
 
95d751
     (* Variable: address_re *)
95d751
     let address_re = Rx.ip | Rx.hostname
95d751
@@ -79,6 +82,8 @@ module Chrony =
95d751
          Server/Peer/Pool options with values
95d751
     *)
95d751
     let cmd_options = "asymmetry"
95d751
+                    | "certset"
95d751
+                    | "extfield"
95d751
                     | "filter"
95d751
                     | "key"
95d751
                     | /maxdelay((dev)?ratio)?/
95d751
@@ -96,7 +101,7 @@ module Chrony =
95d751
          Server/Peer/Pool options without values
95d751
     *)
95d751
     let cmd_flags = "auto_offline"|"iburst"|"noselect"|"offline"|"prefer"
95d751
-                  |"require"|"trust"|"xleave"|"burst"|"nts"
95d751
+                  |"copy"|"require"|"trust"|"xleave"|"burst"|"nts"
95d751
 
95d751
     (* Variable: ntp_source
95d751
          Server/Peer/Pool key names
95d751
@@ -183,7 +188,7 @@ module Chrony =
95d751
                     | "nocerttimecheck" | "ntsdumpdir" | "ntsntpserver"
95d751
                     | "ntsport" | "ntsprocesses" | "ntsrefresh" | "ntsrotate"
95d751
                     | "ntsservercert" | "ntsserverkey" | "ntstrustedcerts"
95d751
-                    | "ntpsigndsocket" | "pidfile"
95d751
+                    | "ntpsigndsocket" | "pidfile" | "ptpport"
95d751
                     | "port" | "reselectdist" | "rtcautotrim" | "rtcdevice"
95d751
                     | "rtcfile" | "sched_priority" | "stratumweight" | "user"
95d751
 
95d751
diff --git a/lenses/tests/test_chrony.aug b/lenses/tests/test_chrony.aug
95d751
index 0c86cde7..691e63f7 100644
95d751
--- a/lenses/tests/test_chrony.aug
95d751
+++ b/lenses/tests/test_chrony.aug
95d751
@@ -17,8 +17,8 @@ module Test_Chrony =
95d751
 server ntp1.example.com
95d751
 server ntp2.example.com iburst
95d751
 server ntp3.example.com presend 2
95d751
-server ntp4.example.com offline polltarget 4
95d751
-server ntp5.example.com maxdelay 2 offline
95d751
+server ntp4.example.com offline polltarget 4 extfield F323 copy
95d751
+server ntp5.example.com maxdelay 2 offline certset 1
95d751
 server ntp6.example.com maxdelay 2 iburst presend 2 xleave offset 1e-4
95d751
 server ntp7.example.com iburst presend 2 offline prefer trust require
95d751
 server ntp8.example.com minsamples 8 maxsamples 16 version 3
95d751
@@ -88,6 +88,7 @@ ntsport 123
95d751
 ntsprocesses 2
95d751
 ntsrefresh 86400
95d751
 ntsrotate 86400
95d751
+ptpport 319
95d751
 "
95d751
 
95d751
   test Chrony.lns get exampleconf =
95d751
@@ -110,10 +111,13 @@ ntsrotate 86400
95d751
   { "server" = "ntp4.example.com"
95d751
     { "offline" }
95d751
     { "polltarget" = "4" }
95d751
+    { "extfield" = "F323" }
95d751
+    { "copy" }
95d751
   }
95d751
   { "server" = "ntp5.example.com"
95d751
     { "maxdelay" = "2" }
95d751
     { "offline" }
95d751
+    { "certset" = "1" }
95d751
   }
95d751
   { "server" = "ntp6.example.com"
95d751
     { "maxdelay" = "2" }
95d751
@@ -312,6 +316,7 @@ ntsrotate 86400
95d751
   { "ntsprocesses" = "2" }
95d751
   { "ntsrefresh" = "86400" }
95d751
   { "ntsrotate" = "86400" }
95d751
+  { "ptpport" = "319" }
95d751
 
95d751
 
95d751
 (* Local Variables: *)
95d751
-- 
95d751
2.31.1
95d751