Subject: bug#52717: closed (Re: bug#52717: Add watchdogd)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 23 Dec 2021 17:15:02 +0000

Your bug report

#52717: Add watchdogd

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
52717: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52717
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#52717: Add watchdogd
From: Mathieu Othacehe <[email-masked]>
To: phodina <[email-masked]>
Cc: [email-masked]
Date: Thu, 23 Dec 2021 18:14:49 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hey,

> +               (("/usr/bin/which") (string-append (assoc-ref inputs "which")
> +                                                  "/bin/which"))
> +               (("ls\"") (string-append (assoc-ref inputs "coreutils")
> +                                        "/bin/ls\"")))

I replaced those lines to use the search-input-file procedure, and
pushed the whole series.

Thanks,

Mathieu

Subject: Add watchdogd
From: phodina <[email-masked]>
To: Guix Patches <[email-masked]>
Date: Tue, 21 Dec 2021 21:25:07 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

these patches add watchdogd utility to supervise the system - applicable both to server and embedded instances.

----
Petr

From 535b8a293fbab681837b93f4624a62b59fd06a7e Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 21 Dec 2021 22:18:37 +0100
Subject: [PATCH 1/3] gnu: Add libite.

* gnu/packages/linux.scm (libite): New variable.

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1e39d3d078..1fe3924ca2 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -59,6 +59,7 @@
 ;;; Copyright © 2021 Josselin Poiret <[email-masked]>
 ;;; Copyright © 2021 Olivier Dion <[email-masked]>
 ;;; Copyright © 2021 Solene Rapenne <[email-masked]>
+;;; Copyright © 2021 Petr Hodina <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4869,6 +4870,42 @@ (define-public cpufrequtils
 capabilities of the Linux kernel.")
     (license license:gpl2)))
 
+(define-public libite
+  (package
+    (name "libite")
+    (version "2.5.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/troglobit/libite")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "14i0q0nxns6g4zh86zdqy97dwljkqdr5l85ammljzccsrijg9m8v"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-tests
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; replace paths to the executables
+             (substitute* "test/which.c"
+               (("/usr/bin/which") (string-append (assoc-ref inputs "which")
+                                                  "/bin/which"))
+               (("ls\"") (string-append (assoc-ref inputs "coreutils")
+                                        "/bin/ls\"")))
+             ;; create pidfile in /tmp instead of /var
+             (substitute* "test/pidfile.c" (("/var/tmp") "/tmp")))))))
+    (native-inputs (list autoconf automake libtool which))
+    (synopsis "Missing pieces in GNU libc")
+    (description "This package provides many of the missing pieces in GNU libc.
+Most notably the string functions: strlcpy(3), strlcat(3) and the highly
+useful *BSD sys/queue.h and sys/tree.h API's")
+    (home-page "https://troglobit.com/projects/libite/")
+    (license license:expat)))
+
 (define-public libraw1394
   (package
     (name "libraw1394")
-- 
2.34.0

From 802eec2151d1b2c3e37731142dbb3b7f96a6b000 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 21 Dec 2021 22:20:27 +0100
Subject: [PATCH 3/3] gnu: Add watchdogd.

* gnu/packages/linux.scm (watchdogd): New variable.

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1f57d9fe89..4b28bed61a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -142,6 +142,7 @@ (define-module (gnu packages linux)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages textutils)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
   #:use-module (gnu packages video)
@@ -4127,6 +4128,29 @@ (define-public thin-provisioning-tools
     (home-page "https://github.com/jthornber/thin-provisioning-tools")
     (license license:gpl3+)))
 
+(define-public watchdogd
+  (package
+    (name "watchdogd")
+    (version "3.5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/troglobit/watchdogd")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "05f7igavzimfgbh39fflbkmpya12r854n03dkyimwashcqwchx8f"))))
+    (build-system gnu-build-system)
+    (native-inputs (list autoconf automake libtool pkg-config))
+    (inputs (list libconfuse libite libuev))
+    (synopsis "Advanced system & process supervisor for Linux")
+    (description "This package provides an advanced monitor of critical system
+resources, supervises the heartbeat of processes, records deadline
+transgressions, and initiates a controlled reset if needed")
+    (home-page "https://troglobit.com/projects/watchdogd/")
+    (license license:isc)))
+
 (define-public wireless-tools
   (package
     (name "wireless-tools")
-- 
2.34.0

From 56dd72045055c55cecdd360ccafc3ae2b4d30898 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 21 Dec 2021 22:20:01 +0100
Subject: [PATCH 2/3] gnu: Add libuev.

* gnu/packages/linux.scm (libuev): New variable.

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1fe3924ca2..1f57d9fe89 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4906,6 +4906,28 @@ (define-public libite
     (home-page "https://troglobit.com/projects/libite/")
     (license license:expat)))
 
+(define-public libuev
+  (package
+    (name "libuev")
+    (version "2.4.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/troglobit/libuev")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0ih82lxfdcq179kknzdl5c8vi1l0n5j7yh68y8f6kwsrm457paf7"))))
+    (build-system gnu-build-system)
+    (native-inputs (list autoconf automake libtool))
+    (synopsis "Lightweight event loop library for epoll family APIs")
+    (description "This package provides small event loop that wraps the
+epoll family of APIs.")
+    (home-page "https://troglobit.com/projects/libuev/")
+    (license license:expat)))
+
 (define-public libraw1394
   (package
     (name "libraw1394")
-- 
2.34.0