[PATCH] services: syncthing: ensure that service runs after mounting home directories

  • Done
  • quality assurance status badge
Details
2 participants
  • Adam Maleszka
  • Ludovic Courtès
Owner
unassigned
Submitted by
Adam Maleszka
Severity
normal
A
A
Adam Maleszka wrote on 4 Sep 2023 14:25
(address . guix-patches@gnu.org)
87il8q3z2k.fsf@aol.com
Sometimes `syncthing-service-type' fails during startup because it tries
to read configuration files from the user's home directory:

Failure on home directory: mkdir /home/xyz/.config: permission denied

This patch adds `user-processes' to the shepherd service requirements to
ensure that `user-homes' is fired before `syncthing' tries to read data
from the home directory.

* gnu/services/syncthing.scm (syncthing-shepherd-service): add
`user-processes' to requirements

---
gnu/services/syncthing.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/services/syncthing.scm b/gnu/services/syncthing.scm
index 2f7c822827..9bb623186b 100644
--- a/gnu/services/syncthing.scm
+++ b/gnu/services/syncthing.scm
@@ -63,7 +63,7 @@ (define syncthing-shepherd-service
(list (string->symbol
(string-append "syncthing-" user)))))
(documentation "Run syncthing.")
- (requirement (if home-service? '() '(loopback)))
+ (requirement (if home-service? '() '(loopback user-processes)))
(start #~(make-forkexec-constructor
(append (list (string-append #$syncthing "/bin/syncthing")
"--no-browser"
--
2.41.0
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEERQucRYoeupMglC1aWTH8ZLoP+osFAmT1zLMACgkQWTH8ZLoP
+otj0g/+NXcdWsK/AjeRSv2B2HVgE0FFv7kKP24MoD0GJ4svXhY3AcYmkZrsh2Sp
sY62RvP2bHJKoW4wiPMMp8VuwWr3L3sQO4sru+SNzAWMMPmLqf35g8yf4ET4p1N/
4wQ5YNQbG3uf4kea1WBmAl+3yyCcjNv8aoirNP9X5vyGI8fVPHfYoQIORmFUAK7l
wkzyQpc0xX5XF9KztosYOPGJy0Ta2wykuhxlfInPjZdwnsEGKPQAgdaN/IckO3M9
QxfHjEwRkWXHK8g4x4UgW7F0+WE9WcMee8PeKwdDDM44m5pBc2dsuIw+VDWhbX+R
X30bUqtztrcvNTMOHwKdbZse2SwYEHGUx3Jn2Ehu7pZWJ9uXBNt1LZJHREl/GbUp
9yzu9NyCMKsnjFyyMe7YHkBItwxoUcVfKj8P/3FOyHVRDm6C37zDHUNLmhUcbBB7
4uo8tKE9IJuba6bg2AQ2KPU6Yhsya7dotCA766c1VrOl8AGTpgFb2Rj/xLtxq4GK
5YaMhHNZIsokLRlAW3r5kXbQwbSJKXhbhLmP9gdzJeuaHeSDwgJA3z6/A32sGTRC
WqeAXaHZxGKMdLUxFJIAeOKHbUrEcRRsAd3FRW3jBgbT5slfaJjs7NtCFOcmALpP
eQ6Xcso7WGXkPx4zeZtaZmo2tpNUs/BujDGuN0cFYFWgxPk33A0=
=rvHz
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 17 Sep 2023 11:56
(name . Adam Maleszka)(address . adam_maleszka@aol.com)(address . 65731-done@debbugs.gnu.org)
87cyyh15tl.fsf_-_@gnu.org
Hi,

Adam Maleszka <adam_maleszka@aol.com> skribis:

Toggle quote (12 lines)
> Sometimes `syncthing-service-type' fails during startup because it tries
> to read configuration files from the user's home directory:
>
> Failure on home directory: mkdir /home/xyz/.config: permission denied
>
> This patch adds `user-processes' to the shepherd service requirements to
> ensure that `user-homes' is fired before `syncthing' tries to read data
> from the home directory.
>
> * gnu/services/syncthing.scm (syncthing-shepherd-service): add
> `user-processes' to requirements

Applied, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 65731@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 65731
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch