* [bug#52717] Add watchdogd
@ 2021-12-21 21:25 phodina via Guix-patches via
2021-12-23 17:14 ` bug#52717: " Mathieu Othacehe
0 siblings, 1 reply; 4+ messages in thread
From: phodina via Guix-patches via @ 2021-12-21 21:25 UTC (permalink / raw)
To: 52717
[-- Attachment #1.1: Type: text/plain, Size: 127 bytes --]
Hi,
these patches add watchdogd utility to supervise the system - applicable both to server and embedded instances.
----
Petr
[-- Attachment #1.2: Type: text/html, Size: 257 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-libite.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-libite.patch, Size: 2424 bytes --]
From 535b8a293fbab681837b93f4624a62b59fd06a7e Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
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 <josselin.poiret@protonmail.ch>
;;; Copyright © 2021 Olivier Dion <olivier.dion@polymtl.ca>
;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;;
;;; 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0003-gnu-Add-watchdogd.patch --]
[-- Type: text/x-patch; name=0003-gnu-Add-watchdogd.patch, Size: 1952 bytes --]
From 802eec2151d1b2c3e37731142dbb3b7f96a6b000 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0002-gnu-Add-libuev.patch --]
[-- Type: text/x-patch; name=0002-gnu-Add-libuev.patch, Size: 1382 bytes --]
From 56dd72045055c55cecdd360ccafc3ae2b4d30898 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#52717: Add watchdogd
2021-12-21 21:25 [bug#52717] Add watchdogd phodina via Guix-patches via
@ 2021-12-23 17:14 ` Mathieu Othacehe
2021-12-23 17:38 ` [bug#52717] " Leo Famulari
0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Othacehe @ 2021-12-23 17:14 UTC (permalink / raw)
To: phodina; +Cc: 52717-done
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#52717] Add watchdogd
2021-12-23 17:14 ` bug#52717: " Mathieu Othacehe
@ 2021-12-23 17:38 ` Leo Famulari
2021-12-26 11:47 ` Mathieu Othacehe
0 siblings, 1 reply; 4+ messages in thread
From: Leo Famulari @ 2021-12-23 17:38 UTC (permalink / raw)
To: 52717, othacehe, phodina
On Thu, Dec 23, 2021 at 06:14:49PM +0100, Mathieu Othacehe wrote:
>
> 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.
Hi Mathieu,
I want to point out that search-input-file does not do the same thing as
(assoc-ref inputs "foo").
We should consider search-input-file as a replacement for the WHICH
procedure, and use gexps like #$foo to replace (assoc-ref inputs "foo").
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#52717] Add watchdogd
2021-12-23 17:38 ` [bug#52717] " Leo Famulari
@ 2021-12-26 11:47 ` Mathieu Othacehe
0 siblings, 0 replies; 4+ messages in thread
From: Mathieu Othacehe @ 2021-12-26 11:47 UTC (permalink / raw)
To: Leo Famulari; +Cc: 52717, phodina
Hello,
> I want to point out that search-input-file does not do the same thing as
> (assoc-ref inputs "foo").
>
> We should consider search-input-file as a replacement for the WHICH
> procedure, and use gexps like #$foo to replace (assoc-ref inputs "foo").
Using #$foo could be problematic when using package inheritance, as
explained by Ludo in the recent blog article.
This leaves us with #$(this-package-input foo) and "search-input-file"
as alternatives. Maybe we should promote the first one, but I see that
you have rightfully started a thread about that.
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-26 11:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-21 21:25 [bug#52717] Add watchdogd phodina via Guix-patches via
2021-12-23 17:14 ` bug#52717: " Mathieu Othacehe
2021-12-23 17:38 ` [bug#52717] " Leo Famulari
2021-12-26 11:47 ` Mathieu Othacehe
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).