unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#37624] Add how to create a runit service in step 5 of binary installation manual
@ 2019-10-04 15:38 Foxmean via Guix-patches via
  2019-10-05  7:47 ` Jan Nieuwenhuizen
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Foxmean via Guix-patches via @ 2019-10-04 15:38 UTC (permalink / raw)
  To: 37624

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

I would like to add a patch in https://guix.gnu.org/manual/en/html_node/Binary-Installation.html#Binary-Installation
-> step 5 Run the daemon, and set it to automatically start on boot.

If your host distro uses the Runit system:

<code>
# mkdir /etc/sv/guix-daemon
</code>

Then create file /etc/sv/guix-daemon/run with your favorite text editor e.g. emacs.

<code>
# emacs /etc/sv/guix-daemon/run
</code>

And add this two line of code in the file.

<code>
#!/bin/sh
exec /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild
</code>

Now, you can enable and start guix-daemon service with:

<code>
# ln -s /etc/sv/guix-daemon /var/service/ && sv up guix-daemon
</code>

I would like to add it in etc and the manual at doc/guix.texi updated.
How can I contribute?

Sent with [ProtonMail](https://protonmail.com) Secure Email.

[-- Attachment #2: Type: text/html, Size: 1740 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#37624] Add how to create a runit service in step 5 of binary installation manual
  2019-10-04 15:38 [bug#37624] Add how to create a runit service in step 5 of binary installation manual Foxmean via Guix-patches via
@ 2019-10-05  7:47 ` Jan Nieuwenhuizen
  2019-10-12 19:30 ` [bug#37624] Try to add Runit daemon setup in manual (install guix in existing GNU/Linux) Foxmean via Guix-patches via
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Jan Nieuwenhuizen @ 2019-10-05  7:47 UTC (permalink / raw)
  To: Foxmean; +Cc: 37624

Foxmean writes:

Hello Foxmean,

> I would like to add a patch in
> https://guix.gnu.org/manual/en/html_node/Binary-Installation.html#Binary-Installation
> -> step 5 Run the daemon, and set it to automatically start on boot.

That's great!

> If your host distro uses the Runit system:
>
> <code>
> # mkdir /etc/sv/guix-daemon
> </code>

Okay.  As you will see, <code> is coded as @example ... @end example.

> Then create file /etc/sv/guix-daemon/run with your favorite text editor e.g. emacs.
>
> <code>
> # emacs /etc/sv/guix-daemon/run
> </code>
>
> And add this two line of code in the file.
>
> <code>
> #!/bin/sh
> exec /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild
> </code>

I would suggest you change this bit to resemble the other init systems:
this file to the repository for people to simply cp.  You will have to
replace `/var' directory with the configurable `@localstatedir@'.

> Now, you can enable and start guix-daemon service with:
>
> <code>
> # ln -s /etc/sv/guix-daemon /var/service/ && sv up guix-daemon
> </code>
>
> I would like to add it in etc and the manual at doc/guix.texi updated.
> How can I contribute?

You will need to create a patch to doc/guix.texi.  You first need to
clone the guix git archive.

Have a look at the `Contributing' section in the manual, especially
https://guix.gnu.org/manual/en/html_node/Building-from-Git.html.

Edit doc/guix.texi, check the result by building the manual:

    make info
    <visit doc/guix.info>

For the rest, follow the pattern used for the file

    etc/guix-daemon.service.in

do not forget to add your file to

    etc/local.mk

Commit your changes to git and reply to this bug with your patch.  Feel
free to ask if you have any questions.

Greetings,
janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#37624] Try to add Runit daemon setup in manual (install guix in existing GNU/Linux)
  2019-10-04 15:38 [bug#37624] Add how to create a runit service in step 5 of binary installation manual Foxmean via Guix-patches via
  2019-10-05  7:47 ` Jan Nieuwenhuizen
@ 2019-10-12 19:30 ` Foxmean via Guix-patches via
  2019-10-12 19:31 ` [bug#37624] Try to add Runit daemon setup in documentation " Foxmean via Guix-patches via
  2020-04-13 22:22 ` [bug#37624] [PATCH v2] Re: Add how to create a runit service in step 5 of binary installation manual Vincent Legoll
  3 siblings, 0 replies; 8+ messages in thread
From: Foxmean via Guix-patches via @ 2019-10-12 19:30 UTC (permalink / raw)
  To: 37624


[-- Attachment #1.1: Type: text/plain, Size: 146 bytes --]

I hope this can help you, even so a little.

ProtonMailモバイルから送信

---元のメッセージ---

> ProtonMailモバイルから送信

[-- Attachment #1.2: Type: text/html, Size: 237 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-Runit-init-system-in-guix-installation.patch --]
[-- Type: text/x-patch; name="0001-Add-Runit-init-system-in-guix-installation.patch", Size: 1198 bytes --]

From 0ff778ff5d7d17fef76b5abc14f274173fd263b8 Mon Sep 17 00:00:00 2001
From: Pathompong Kwangtong <foxmean@protonmail.com>
Date: Sun, 13 Oct 2019 01:24:48 +0700
Subject: [PATCH] Add Runit init system in guix installation

---
 doc/guix.texi | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 6703c2756c..99068111bb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -649,6 +649,31 @@ If your host distro uses the Upstart init system:
 # start guix-daemon
 @end example
 
+If your host distro use th Runit init system:
+
+@example
+# mkdir /etc/sv/guix-daemon
+@end example
+
+Then create file /etc/sv/guix-daemon/run with your favorite text editor e.g. emacs.
+
+@example
+# emacs /etc/sv/guix-daemon/run
+@end example
+
+And add this two line of code in the file.
+
+@example
+#!/bin/sh
+exec /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild
+@end example
+
+Now, you can enable and start guix-daemon service with:
+
+@example
+> # ln -s /etc/sv/guix-daemon /var/service/ && sv up guix-daemon
+@end example
+
 Otherwise, you can still start the daemon manually with:
 
 @example
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#37624] Try to add Runit daemon setup in documentation (install guix in existing GNU/Linux)
  2019-10-04 15:38 [bug#37624] Add how to create a runit service in step 5 of binary installation manual Foxmean via Guix-patches via
  2019-10-05  7:47 ` Jan Nieuwenhuizen
  2019-10-12 19:30 ` [bug#37624] Try to add Runit daemon setup in manual (install guix in existing GNU/Linux) Foxmean via Guix-patches via
@ 2019-10-12 19:31 ` Foxmean via Guix-patches via
  2020-04-13 22:22 ` [bug#37624] [PATCH v2] Re: Add how to create a runit service in step 5 of binary installation manual Vincent Legoll
  3 siblings, 0 replies; 8+ messages in thread
From: Foxmean via Guix-patches via @ 2019-10-12 19:31 UTC (permalink / raw)
  To: 37624


[-- Attachment #1.1: Type: text/plain, Size: 68 bytes --]

Sorry for non-attach file email.

Sent with ProtonMail Secure Email.

[-- Attachment #1.2: Type: text/html, Size: 78 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-Runit-init-system-in-guix-installation.patch --]
[-- Type: text/x-patch; name="0001-Add-Runit-init-system-in-guix-installation.patch", Size: 1198 bytes --]

From 0ff778ff5d7d17fef76b5abc14f274173fd263b8 Mon Sep 17 00:00:00 2001
From: Pathompong Kwangtong <foxmean@protonmail.com>
Date: Sun, 13 Oct 2019 01:24:48 +0700
Subject: [PATCH] Add Runit init system in guix installation

---
 doc/guix.texi | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 6703c2756c..99068111bb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -649,6 +649,31 @@ If your host distro uses the Upstart init system:
 # start guix-daemon
 @end example
 
+If your host distro use th Runit init system:
+
+@example
+# mkdir /etc/sv/guix-daemon
+@end example
+
+Then create file /etc/sv/guix-daemon/run with your favorite text editor e.g. emacs.
+
+@example
+# emacs /etc/sv/guix-daemon/run
+@end example
+
+And add this two line of code in the file.
+
+@example
+#!/bin/sh
+exec /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild
+@end example
+
+Now, you can enable and start guix-daemon service with:
+
+@example
+> # ln -s /etc/sv/guix-daemon /var/service/ && sv up guix-daemon
+@end example
+
 Otherwise, you can still start the daemon manually with:
 
 @example
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#37624] [PATCH v2] Re: Add how to create a runit service in step 5 of binary installation manual
  2019-10-04 15:38 [bug#37624] Add how to create a runit service in step 5 of binary installation manual Foxmean via Guix-patches via
                   ` (2 preceding siblings ...)
  2019-10-12 19:31 ` [bug#37624] Try to add Runit daemon setup in documentation " Foxmean via Guix-patches via
@ 2020-04-13 22:22 ` Vincent Legoll
  2020-04-13 22:29   ` Vincent Legoll
  3 siblings, 1 reply; 8+ messages in thread
From: Vincent Legoll @ 2020-04-13 22:22 UTC (permalink / raw)
  To: Foxmean; +Cc: 37624, 40601

Hello,


as I recently worked on the same subject in [1],

I reviewed and amended the documentation patch [2].


[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40601

[2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37624


-- 

Vincent Legoll

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#37624] [PATCH v2] Re: Add how to create a runit service in step 5 of binary installation manual
  2020-04-13 22:22 ` [bug#37624] [PATCH v2] Re: Add how to create a runit service in step 5 of binary installation manual Vincent Legoll
@ 2020-04-13 22:29   ` Vincent Legoll
  2020-12-18 13:35     ` Christopher Baines
  0 siblings, 1 reply; 8+ messages in thread
From: Vincent Legoll @ 2020-04-13 22:29 UTC (permalink / raw)
  To: Foxmean; +Cc: 37624, 40601

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]


On 14/04/2020 00:22, Vincent Legoll wrote:
> Hello,
>
>
> as I recently worked on the same subject in [1],
>
> I reviewed and amended the documentation patch [2].
>
>
> [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40601
>
> [2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37624
>

And now with the patch...


[-- Attachment #2: 0001-doc-Add-Runit-init-system-in-guix-installation.patch --]
[-- Type: text/x-patch, Size: 2313 bytes --]

From 6b656a54ef7a17fdbd5f82ceaeb98198e2c241af Mon Sep 17 00:00:00 2001
From: Pathompong Kwangtong <foxmean@protonmail.com>
Date: Sun, 13 Oct 2019 01:24:48 +0700
Subject: [PATCH] doc: Add Runit init system in guix installation.

* doc/guix.texi (Binary Installation): Add runit section.
* .mailmap: Add author email adress.

Co-authored-by: Vincent Legoll <vincent.legoll@gmail.com>
---
 .mailmap      |  1 +
 doc/guix.texi | 30 ++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/.mailmap b/.mailmap
index 97018775f6..aa5227b91d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -62,6 +62,7 @@ ng0 <ng0@n0.is> <ngillmann@runbox.com>
 ng0 <ng0@n0.is> <niasterisk@grrlz.net>
 ng0 <ng0@n0.is> <ng@niasterisk.space>
 ng0 <ng0@n0.is> <ng0@libertad.pw>
+Pathompong Kwangtong <foxmean@protonmail.com>
 Pierre Neidhardt <mail@ambrevar.xyz>
 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
 Pjotr Prins <pjotr.guix@thebird.nl> <pjotr.public01@thebird.nl>
diff --git a/doc/guix.texi b/doc/guix.texi
index 8bf4ef9b74..94cb89eddf 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -71,6 +71,7 @@ Copyright @copyright{} 2019 Alex Griffin@*
 Copyright @copyright{} 2019 Guillaume Le Vaillant@*
 Copyright @copyright{} 2020 Leo Prikler@*
 Copyright @copyright{} 2019, 2020 Simon Tournier@*
+Copyright @copyright{} 2019 Pathompong Kwangtong@*
 Copyright @copyright{} 2020 Wiktor Żelazny@*
 Copyright @copyright{} 2020 Damien Cassou@*
 Copyright @copyright{} 2020 Jakub Kądziołka@*
@@ -664,6 +665,35 @@ If your host distro uses the Upstart init system:
 # start guix-daemon
 @end example
 
+If your host distro use the Runit init system:
+
+@example
+# mkdir /etc/sv/guix-daemon
+@end example
+
+Then create the guix-daemon runit launch script:
+
+@example
+# cat > /etc/sv/guix-daemon/run <<EOF
+#!/bin/sh
+
+GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale
+LC_ALL=en_US.utf8
+
+export GUIX_LOCPATH LC_ALL
+
+exec /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon \
+  --build-users-group=guixbuild
+EOF
+@end example
+
+Now, you can enable and start the guix-daemon service with:
+
+@example
+# ln -s /etc/sv/guix-daemon /etc/runit/runsvdir/default/
+# sv up guix-daemon
+@end example
+
 Otherwise, you can still start the daemon manually with:
 
 @example
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#37624] [PATCH v2] Re: Add how to create a runit service in step 5 of binary installation manual
  2020-04-13 22:29   ` Vincent Legoll
@ 2020-12-18 13:35     ` Christopher Baines
  2020-12-18 19:37       ` Vincent Legoll
  0 siblings, 1 reply; 8+ messages in thread
From: Christopher Baines @ 2020-12-18 13:35 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: 37624, Foxmean

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]


Vincent Legoll <vincent.legoll@gmail.com> writes:

> On 14/04/2020 00:22, Vincent Legoll wrote:
>> Hello,
>>
>>
>> as I recently worked on the same subject in [1],
>>
>> I reviewed and amended the documentation patch [2].
>>
>>
>> [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40601
>>
>> [2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37624
>>
>
> And now with the patch...

I've had a look at the patch, it seems OK. Did you consider adding the
config file to Guix itself, so that a user can copy it, just like the
systemd and upstart examples?

That might be more consistent, and avoid the docs getting longer.

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#37624] [PATCH v2] Re: Add how to create a runit service in step 5 of binary installation manual
  2020-12-18 13:35     ` Christopher Baines
@ 2020-12-18 19:37       ` Vincent Legoll
  0 siblings, 0 replies; 8+ messages in thread
From: Vincent Legoll @ 2020-12-18 19:37 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 37624, Foxmean

Hello again,

> I've had a look at the patch, it seems OK. Did you consider adding the
> config file to Guix itself, so that a user can copy it, just like the
> systemd and upstart examples?

Yes, I think I have that done also, I'll dig it out. I even think I saw the
doc issue bug after having done the config file thing.

> That might be more consistent, and avoid the docs getting longer.

Stay tuned

-- 
Vincent Legoll




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-12-18 19:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-04 15:38 [bug#37624] Add how to create a runit service in step 5 of binary installation manual Foxmean via Guix-patches via
2019-10-05  7:47 ` Jan Nieuwenhuizen
2019-10-12 19:30 ` [bug#37624] Try to add Runit daemon setup in manual (install guix in existing GNU/Linux) Foxmean via Guix-patches via
2019-10-12 19:31 ` [bug#37624] Try to add Runit daemon setup in documentation " Foxmean via Guix-patches via
2020-04-13 22:22 ` [bug#37624] [PATCH v2] Re: Add how to create a runit service in step 5 of binary installation manual Vincent Legoll
2020-04-13 22:29   ` Vincent Legoll
2020-12-18 13:35     ` Christopher Baines
2020-12-18 19:37       ` Vincent Legoll

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).