GNU bug report logs - #78347
[PATCH 0/2] Add NTPsec and pps-tools

Previous Next

Package: guix-patches;

Reported by: Ahmad Draidi <a.r.draidi <at> redscript.org>

Date: Sat, 10 May 2025 08:08:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

To reply to this bug, email your comments to 78347 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#78347; Package guix-patches. (Sat, 10 May 2025 08:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ahmad Draidi <a.r.draidi <at> redscript.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 10 May 2025 08:08:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ahmad Draidi <a.r.draidi <at> redscript.org>
To: guix-patches <at> gnu.org
Cc: Ahmad Draidi <a.r.draidi <at> redscript.org>
Subject: [PATCH 0/2] Add NTPsec and pps-tools
Date: Sat, 10 May 2025 12:04:56 +0400
Greetings,

NTPsec is a hardened version of the NTP daemon. Debian currently uses it as the
default NTP daemon. It's mostly compatible with the original NTP daemon.

I'll try to prepare patches to use it by default with ntp-service-type in Guix,
once I get the time.

Thanks,
Ahmad

Ahmad Draidi (2):
  gnu: Add pps-tools.
  gnu: Add ntpsec.

 gnu/packages/ntp.scm  | 93 +++++++++++++++++++++++++++++++++++++++++++
 gnu/packages/time.scm | 40 +++++++++++++++++++
 2 files changed, 133 insertions(+)


base-commit: 0ae79a787f81e680e3983813c684a7d82dc213f3
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#78347; Package guix-patches. (Sat, 10 May 2025 08:22:01 GMT) Full text and rfc822 format available.

Message #8 received at 78347 <at> debbugs.gnu.org (full text, mbox):

From: Ahmad Draidi <a.r.draidi <at> redscript.org>
To: 78347 <at> debbugs.gnu.org
Cc: Ahmad Draidi <a.r.draidi <at> redscript.org>
Subject: [PATCH 1/2] gnu: Add pps-tools.
Date: Sat, 10 May 2025 12:20:23 +0400
* gnu/packages/time.scm (pps-tools): New variable.

Change-Id: I06a10988acbf4dcd684721e1bee6a2d0c6f2dac6
---
 gnu/packages/time.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index 56053da5010..2a09efb1fc2 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -118,6 +118,46 @@ (define-public time
 to a file.")
     (license gpl3+)))
 
+(define-public pps-tools
+  ;; Last tagged release was in 2021
+  (let ((commit "e5083fe1481a34373dee2acfabb63001ee9c40e0")
+        (revision "1"))
+    (package
+      (name "pps-tools")
+      (version (git-version "1.0.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/redlab-i/pps-tools")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1q3yvkwgqzafpx940cgqjn0harziv9gix1k3r3ymidmip0i5z1cp"))))
+      (arguments
+       (list
+        #:tests? #f ;There is no test suite.
+        #:make-flags
+        #~(list "CC=gcc"
+                (string-append "DESTDIR=" %output))
+        #:phases
+        #~(modify-phases %standard-phases
+            ;; No configure script
+            (delete 'configure)
+            (add-after 'unpack 'patch-makefile
+              (lambda _
+                (substitute* "Makefile"
+                  (("/usr/")
+                   "/")))))))
+      (build-system gnu-build-system)
+      (home-page "https://github.com/redlab-i/pps-tools")
+      (synopsis "User-space tools and headers for LinuxPPS")
+      (description
+       "This package includes the necessary headers for using
+@url{http://linuxpps.org/, LinuxPPS} PPSAPI kernel interface in user-space
+applications, and several support tools.")
+      (license gpl2+))))
+
 (define-public python-pytimeparse
   (package
     (name "python-pytimeparse")
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#78347; Package guix-patches. (Sat, 10 May 2025 08:22:02 GMT) Full text and rfc822 format available.

Message #11 received at 78347 <at> debbugs.gnu.org (full text, mbox):

From: Ahmad Draidi <a.r.draidi <at> redscript.org>
To: 78347 <at> debbugs.gnu.org
Cc: Ahmad Draidi <a.r.draidi <at> redscript.org>
Subject: [PATCH 2/2] gnu: Add ntpsec.
Date: Sat, 10 May 2025 12:20:24 +0400
* gnu/packages/ntp.scm: Add use-modules (gnu packages gps),
(gnu packages m4), (gnu packages python), (gnu packages python-xyz),
(gnu packages time), (guix build-system waf).
(ntpsec): New variable.

Change-Id: I34704665c338475f146fd1b61979b9e3dd8f23f4
---
 gnu/packages/ntp.scm | 93 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)

diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm
index 0b01f339d59..089814b6ab2 100644
--- a/gnu/packages/ntp.scm
+++ b/gnu/packages/ntp.scm
@@ -32,14 +32,20 @@ (define-module (gnu packages ntp)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages gps)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages m4)
   #:use-module (gnu packages nettle)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages ruby)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system waf)
   #:use-module (guix download)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
@@ -187,6 +193,93 @@ (define-public ntp
               "A non-copyleft free licence from the University of Delaware"))
     (home-page "https://www.ntp.org")))
 
+(define-public ntpsec
+  (package
+    (name "ntpsec")
+    (version "1.2.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/NTPsec/ntpsec.git")
+             (commit (string-append "NTPsec_"
+                                    (string-replace-substring version "." "_")))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1m23mzsj3iq36d14ncj0w74hy152blv61nxd8w4xcs52vsh48mps"))))
+    (native-inputs (list bison
+                         m4
+                         pkg-config
+                         pps-tools
+                         python-waf
+                         ruby-asciidoctor))
+    (inputs (cons* gpsd openssl
+                   ;; Build with POSIX capabilities and syscall filtering
+                   ;; support on GNU/Linux, for extra security features.
+                   (if (target-linux?)
+                       (list libcap libseccomp)
+                       '())))
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "--refclock=all"
+              "--enable-manpage"
+              "--disable-doc"
+              #$@(if (target-linux?)
+                     '("--enable-seccomp")
+                     '())
+              "--enable-mssntp")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'disable-network-test
+            (lambda _
+              (substitute* "tests/wscript"
+                (("\"libntp/decodenetnum.c\",")
+                 ""))
+              (substitute* "tests/common/tests_main.c"
+                (("RUN_TEST_GROUP\\(decodenetnum\\);")
+                 ""))))
+          ;; Tests fail without this. PYTHONPATH is ignored, unfortunately.
+          (add-before 'build 'symlink-python-gps
+            (lambda* (#:key inputs #:allow-other-keys)
+              (mkdir-p "build/main/tests/pylib")
+              (let ((python-version #$(version-major+minor (package-version
+                                                            python))))
+                (symlink (string-append (assoc-ref inputs "gpsd")
+                                        "/lib/python" python-version
+                                        "/site-packages/gps")
+                         "build/main/tests/pylib/gps")))))))
+    (build-system waf-build-system)
+    (synopsis "Real time clock synchronization system and utilities")
+    (description
+     "@acronym{NTP, Network Time Protocol}, the protocol, is used to keep
+computer clocks accurate by synchronizing them over the Internet or a
+local network, or by following an accurate hardware receiver that interprets
+GPS, DCF-77, or similar time signals.
+
+NTPsec is a hardened and improved implementation derived from the original
+@url{https://www.ntp.org, NTP project}.  NTPsec supports
+@acronym{NTS, Network Time Security} which provides cryptographically
+authenticated time.
+
+This package contains the NTP daemon and utility programs.  An NTP daemon
+needs to be running on each host that is to have its clock accuracy controlled
+by NTP.  The same NTP daemon is also used to provide NTP service to other hosts.")
+    ;; All licenses are in file://LICENSES/
+    (license (list l:bsd-2
+                   l:bsd-3
+                   l:bsd-4
+                   l:isc
+                   l:expat
+                   l:asl2.0
+                   l:cc-by4.0
+                   (l:non-copyleft "file://LICENSES/Beerware.txt"
+                    "See LICENSES/Beerware.txt in the distribution.")
+                   (l:x11-style
+                    "https://www.eecis.udel.edu/~mills/ntp/html/copyright.html"
+                    "A non-copyleft free licence from the University of Delaware")))
+    (home-page "https://www.ntpsec.org")))
+
 (define-public openntpd
   (package
     (name "openntpd")
-- 
2.49.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 12 May 2025 08:55:06 GMT) Full text and rfc822 format available.

Notification sent to Ahmad Draidi <a.r.draidi <at> redscript.org>:
bug acknowledged by developer. (Mon, 12 May 2025 08:55:06 GMT) Full text and rfc822 format available.

Message #16 received at 78347-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ahmad Draidi <a.r.draidi <at> redscript.org>
Cc: 78347-done <at> debbugs.gnu.org
Subject: Re: [bug#78347] [PATCH 0/2] Add NTPsec and pps-tools
Date: Mon, 12 May 2025 10:00:44 +0200
Hello,

Ahmad Draidi <a.r.draidi <at> redscript.org> writes:

>   gnu: Add pps-tools.
>   gnu: Add ntpsec.

Applied, thanks!

Ludo’.




This bug report was last modified 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.