GNU bug report logs - #53441
[PATCH] Add service examples to the GNU Shepherd manual

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: AwesomeAdam54321 <adam.faiz5990@HIDDEN>; Keywords: patch; dated Sat, 22 Jan 2022 11:29:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 Jan 2022 11:28:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 22 06:28:22 2022
Received: from localhost ([127.0.0.1]:35831 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nBEZC-0006pH-Aw
	for submit <at> debbugs.gnu.org; Sat, 22 Jan 2022 06:28:22 -0500
Received: from lists.gnu.org ([209.51.188.17]:54202)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <adam.faiz5990@HIDDEN>) id 1nBDhJ-0005F8-88
 for submit <at> debbugs.gnu.org; Sat, 22 Jan 2022 05:32:41 -0500
Received: from eggs.gnu.org ([209.51.188.92]:39920)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <adam.faiz5990@HIDDEN>)
 id 1nBDhJ-0002S1-03
 for guix-patches@HIDDEN; Sat, 22 Jan 2022 05:32:41 -0500
Received: from [2a00:1450:4864:20::134] (port=45795
 helo=mail-lf1-x134.google.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <adam.faiz5990@HIDDEN>)
 id 1nBDhH-0003oC-5U
 for guix-patches@HIDDEN; Sat, 22 Jan 2022 05:32:40 -0500
Received: by mail-lf1-x134.google.com with SMTP id o12so38977075lfu.12
 for <guix-patches@HIDDEN>; Sat, 22 Jan 2022 02:32:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:date:message-id:mime-version
 :content-transfer-encoding;
 bh=wWCkOgE7qiCoMb8PNIBuw+oJTMrbZfcu6DcpaNw+U/Q=;
 b=PLTkMtSQn1Jiyr9vulsVhHWmOXN8zrOPg8PTS1CBfZW5ZjWeK6lYD9KjZx1bEoU0pj
 JoYFmwX9mOmX1KcnkTt7jkm1j7V9RoDxh/4sNNQ1IZUpRYFvd/JxsYSmT1MhPT/ySuuC
 AU2/ii3YoJ4qqxvB5kgh61PBWFp1c81r0pV17iwGx051DZ0zf8ldjBEdbtBN69W9RVfn
 loYPB5Cb4YOJoHg3U+QhUNfl9bK1k7gbZEGWC6nhg+Y1Giil4VvKZdCIGESix8wj65pu
 uQQ1srnDXA//8qTFC8zKIJFq+ScqoPr8/bxHH7tLr8ClLJAal9WpSNS+WRoy74TH+xdl
 w7cA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version
 :content-transfer-encoding;
 bh=wWCkOgE7qiCoMb8PNIBuw+oJTMrbZfcu6DcpaNw+U/Q=;
 b=fM+o+bC/HJaw+RFju1+ifAzg/PjHj3mdkwzXoZ4gdrvAsglzQKgabnTWmcAhhzbjni
 e/6KpLlr6PB7ClGnxAQrz9h+WKb4maTeTOgixkhfMAUCE0u5ngtu2hOVNJnk4W/Dpach
 sWG0EDl85cxxErvzZJlEW2vf73arvwlx/Nv2XZbWMMAxZ8WHrqn2gQCXl61Ie6S/NhMI
 JJk8l2XE+Dd1jzbRJRuTE3v9t79e1Ro0QDnjpA9xyCtxyzc4ruR+oIrozDoZgn2C127E
 E/xZ9s497Qu98rqaqBlqS3KkeaubWQShljCj+hG78I5Vq1TVG1Xka0YLtW9fO1gsguh2
 vneQ==
X-Gm-Message-State: AOAM530epBpCL3yAS/AEDVldleXlaa2gNsbDbo1hiklRfFaDoMafZGCA
 FISNJGMSzEF3X2xHn8tZdNPKGXv2+97PJSYS
X-Google-Smtp-Source: ABdhPJzjQGdg08qI88Qe5r8FlGjxsfqYopEpp35kWkpeBZPWIqSxhpf3uIQY2K+UpkVEH2lPRIIF5w==
X-Received: by 2002:a17:907:94c1:: with SMTP id
 dn1mr6086028ejc.251.1642847144764; 
 Sat, 22 Jan 2022 02:25:44 -0800 (PST)
Received: from localhost.localdomain ([60.51.145.32])
 by smtp.gmail.com with ESMTPSA id s9sm3537776edj.48.2022.01.22.02.25.42
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 22 Jan 2022 02:25:44 -0800 (PST)
From: AwesomeAdam54321 <adam.faiz5990@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] Add service examples to the GNU Shepherd manual
Date: Sat, 22 Jan 2022 18:24:16 +0800
Message-Id: <98d6b3ce5ebbc019175145751371c5bf0946a308.1642847055.git.adam.faiz5990@HIDDEN>
X-Mailer: git-send-email 2.34.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::134
 (failed)
Received-SPF: pass client-ip=2a00:1450:4864:20::134;
 envelope-from=adam.faiz5990@HIDDEN; helo=mail-lf1-x134.google.com
X-Spam_score_int: -10
X-Spam_score: -1.1
X-Spam_bar: -
X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.6 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: --- doc/shepherd.texi | 62
 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed,
 62 insertions(+) diff --git a/doc/shepherd.texi b/doc/shepherd.texi
 index 94f6131..618d852 100644 --- a/doc/shepherd.texi +++ b/doc/shepherd.texi
 @@ -1033,6 +1033,68 @@ also specifies some more initial values for the [...]
 Content analysis details:   (1.6 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
 in digit (adam.faiz5990[at]gmail.com)
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (adam.faiz5990[at]gmail.com)
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,
 medium trust [209.51.188.17 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.51.188.17 listed in wl.mailspike.net]
 1.3 SPOOFED_FREEMAIL       No description available.
 1.5 SPOOF_GMAIL_MID        From Gmail but it doesn't seem to be...
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sat, 22 Jan 2022 06:28:21 -0500
Cc: AwesomeAdam54321 <adam.faiz5990@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

---
 doc/shepherd.texi | 62 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index 94f6131..618d852 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -1033,6 +1033,68 @@ also specifies some more initial values for the slots:
                    (restart (...)))))
 @end lisp
 
+Here are some more examples:
+
+@lisp
+(register-services
+  (make <service>
+        #:provides '(cups)
+        #:requires '()
+        #:docstring "The cups service provides the CUPS scheduler."
+        #:start (make-forkexec-constructor '("cupsd" "-f"))
+        #:stop (make-kill-destructor)
+        #:respawn? #t)
+
+  (make <service>
+        #:provides '(cups-browsed)
+        #:requires '(cups)
+        #:docstring "The cups-browsed service makes remote CUPS printers available locally."
+        #:start (make-forkexec-constructor '("cups-browsed"))
+        #:stop (make-kill-destructor)
+        #:respawn? #t)
+
+  (make <service>
+        #:provides '(cron)
+        #:requires '()
+        #:docstring "The cron service provides execution of regularly scheduled commands."
+        #:start (make-forkexec-constructor '("cron" "-f"))
+        #:stop (make-kill-destructor)
+        #:respawn? #t)
+
+ (make <service>
+       #:provides '(guix-daemon)
+       #:requires '()
+       #:docstring "The guix-daemon service accesses the store, and builds derivations on behalf of its clients."
+       #:start (make-forkexec-constructor '("env" "GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale" "LC_ALL=en_US.utf8" "/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon" "--build-users-group=guixbuild"))
+       #:stop (make-kill-destructor)
+       #:respawn? #t)
+
+ (make <service>
+       #:provides '(binfmt-support)
+       #:requires '()
+       #:docstring "Enables support for additional executable binary formats."
+       #:start (make-forkexec-constructor '("update-binfmts" "--enable"))
+       #:stop (make-system-destructor "update-binfmts --disable")
+       #:oneshot? #t)
+
+ (make <service>
+       #:provides '(lm-sensors)
+       #:requires '()
+       #:docstring "Initialize hardware monitoring sensors."
+       #:start (make-system-constructor "sensors -s ; sensors")
+       #:stop (make-system-destructor)
+       #:oneshot? #t)
+
+ (make <service>
+       #:provides '(pulseaudio)
+       #:requires '()
+       #:docstring "The pulseaudio service provides the PulseAudio Sound Server."
+       #:start (make-forkexec-constructor '("pulseaudio" "--daemonize=no" "--log-target=stderr") #:user "user" #:group "audio" #:environment-variables '("HOME=/home/user"))
+       #:stop (make-kill-destructor)
+       #:respawn? #t))
+
+@end lisp
+
 @node Managing User Services
 @section Managing User Services
 
-- 
2.34.0





Acknowledgement sent to AwesomeAdam54321 <adam.faiz5990@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#53441; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 22 Jan 2022 11:30:03 UTC

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